Settings UI
This commit is contained in:
@@ -748,6 +748,8 @@
|
|||||||
"SettingsOptions_MailSection": "Mail",
|
"SettingsOptions_MailSection": "Mail",
|
||||||
"SettingsOptions_CalendarSection": "Calendar",
|
"SettingsOptions_CalendarSection": "Calendar",
|
||||||
"SettingsOptions_MoreComingSoon": "More options coming soon",
|
"SettingsOptions_MoreComingSoon": "More options coming soon",
|
||||||
|
"SettingsOptions_HeroDescription": "Customize your Wino Mail experience",
|
||||||
|
"SettingsOptions_AccountsSummary": "{0} account(s) configured",
|
||||||
"SettingsPaneLengthReset_Description": "Reset the size of the mail list to original if you have issues with it.",
|
"SettingsPaneLengthReset_Description": "Reset the size of the mail list to original if you have issues with it.",
|
||||||
"SettingsPaneLengthReset_Title": "Reset Mail List Size",
|
"SettingsPaneLengthReset_Title": "Reset Mail List Size",
|
||||||
"SettingsPaypal_Description": "Show much more love ❤️ All donations are appreciated.",
|
"SettingsPaypal_Description": "Show much more love ❤️ All donations are appreciated.",
|
||||||
|
|||||||
@@ -1,14 +1,56 @@
|
|||||||
using System;
|
using System;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using CommunityToolkit.Mvvm.ComponentModel;
|
||||||
using CommunityToolkit.Mvvm.Input;
|
using CommunityToolkit.Mvvm.Input;
|
||||||
using CommunityToolkit.Mvvm.Messaging;
|
using CommunityToolkit.Mvvm.Messaging;
|
||||||
using Wino.Core.Domain;
|
using Wino.Core.Domain;
|
||||||
using Wino.Core.Domain.Enums;
|
using Wino.Core.Domain.Enums;
|
||||||
|
using Wino.Core.Domain.Interfaces;
|
||||||
|
using Wino.Core.Domain.Models.Navigation;
|
||||||
using Wino.Messaging.Client.Navigation;
|
using Wino.Messaging.Client.Navigation;
|
||||||
|
|
||||||
namespace Wino.Core.ViewModels;
|
namespace Wino.Core.ViewModels;
|
||||||
|
|
||||||
public partial class SettingOptionsPageViewModel : CoreBaseViewModel
|
public partial class SettingOptionsPageViewModel : CoreBaseViewModel
|
||||||
{
|
{
|
||||||
|
private readonly INativeAppService _nativeAppService;
|
||||||
|
private readonly IAccountService _accountService;
|
||||||
|
|
||||||
|
[ObservableProperty]
|
||||||
|
public partial string VersionText { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
[ObservableProperty]
|
||||||
|
public partial string AccountSummaryText { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
[ObservableProperty]
|
||||||
|
public partial int AccountCount { get; set; }
|
||||||
|
|
||||||
|
public SettingOptionsPageViewModel(INativeAppService nativeAppService, IAccountService accountService)
|
||||||
|
{
|
||||||
|
_nativeAppService = nativeAppService;
|
||||||
|
_accountService = accountService;
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void OnNavigatedTo(NavigationMode mode, object parameters)
|
||||||
|
{
|
||||||
|
base.OnNavigatedTo(mode, parameters);
|
||||||
|
|
||||||
|
VersionText = string.Format("{0}{1}", Translator.SettingsAboutVersion, _nativeAppService.GetFullAppVersion());
|
||||||
|
_ = LoadAccountSummaryAsync();
|
||||||
|
}
|
||||||
|
|
||||||
|
private async Task LoadAccountSummaryAsync()
|
||||||
|
{
|
||||||
|
var accounts = await _accountService.GetAccountsAsync();
|
||||||
|
int count = accounts?.Count ?? 0;
|
||||||
|
|
||||||
|
await ExecuteUIThread(() =>
|
||||||
|
{
|
||||||
|
AccountCount = count;
|
||||||
|
AccountSummaryText = string.Format(Translator.SettingsOptions_AccountsSummary, count);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
[RelayCommand]
|
[RelayCommand]
|
||||||
private void GoAccountSettings() => Messenger.Send<NavigateManageAccountsRequested>();
|
private void GoAccountSettings() => Messenger.Send<NavigateManageAccountsRequested>();
|
||||||
|
|
||||||
|
|||||||
@@ -13,16 +13,17 @@
|
|||||||
mc:Ignorable="d">
|
mc:Ignorable="d">
|
||||||
|
|
||||||
<ScrollViewer Padding="0,0,16,0" VerticalScrollBarVisibility="Auto">
|
<ScrollViewer Padding="0,0,16,0" VerticalScrollBarVisibility="Auto">
|
||||||
<StackPanel Margin="0,8,0,24" Spacing="16">
|
<StackPanel Margin="0,8,0,24" Spacing="4">
|
||||||
<StackPanel.ChildrenTransitions>
|
<StackPanel.ChildrenTransitions>
|
||||||
<TransitionCollection>
|
<TransitionCollection>
|
||||||
<EntranceThemeTransition FromVerticalOffset="50" IsStaggeringEnabled="True" />
|
<EntranceThemeTransition FromVerticalOffset="50" IsStaggeringEnabled="True" />
|
||||||
</TransitionCollection>
|
</TransitionCollection>
|
||||||
</StackPanel.ChildrenTransitions>
|
</StackPanel.ChildrenTransitions>
|
||||||
|
|
||||||
<!-- Hero Account Card - Prominent at top -->
|
<!-- Hero Banner - Windows 11 style -->
|
||||||
<Grid
|
<Grid
|
||||||
Padding="20"
|
Margin="0,0,0,12"
|
||||||
|
Padding="24,28"
|
||||||
Background="{ThemeResource CardBackgroundFillColorDefaultBrush}"
|
Background="{ThemeResource CardBackgroundFillColorDefaultBrush}"
|
||||||
BorderBrush="{ThemeResource CardStrokeColorDefaultBrush}"
|
BorderBrush="{ThemeResource CardStrokeColorDefaultBrush}"
|
||||||
BorderThickness="1"
|
BorderThickness="1"
|
||||||
@@ -30,36 +31,55 @@
|
|||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition Width="Auto" />
|
<ColumnDefinition Width="Auto" />
|
||||||
<ColumnDefinition Width="*" />
|
<ColumnDefinition Width="*" />
|
||||||
<ColumnDefinition Width="Auto" />
|
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
|
|
||||||
|
<!-- App Icon -->
|
||||||
<Border
|
<Border
|
||||||
Width="56"
|
Width="72"
|
||||||
Height="56"
|
Height="72"
|
||||||
CornerRadius="28">
|
Background="{ThemeResource AccentFillColorDefaultBrush}"
|
||||||
|
CornerRadius="16">
|
||||||
<FontIcon
|
<FontIcon
|
||||||
HorizontalAlignment="Center"
|
HorizontalAlignment="Center"
|
||||||
VerticalAlignment="Center"
|
VerticalAlignment="Center"
|
||||||
FontSize="24"
|
FontSize="32"
|
||||||
Foreground="{ThemeResource TextOnAccentAAFillColorDisabledBrush}"
|
Foreground="{ThemeResource TextOnAccentFillColorPrimaryBrush}"
|
||||||
Glyph="" />
|
Glyph="" />
|
||||||
</Border>
|
</Border>
|
||||||
|
|
||||||
|
<!-- App Info -->
|
||||||
<StackPanel
|
<StackPanel
|
||||||
Grid.Column="1"
|
Grid.Column="1"
|
||||||
Margin="16,0,0,0"
|
Margin="20,0,0,0"
|
||||||
VerticalAlignment="Center"
|
VerticalAlignment="Center"
|
||||||
Spacing="2">
|
Spacing="4">
|
||||||
<TextBlock Style="{StaticResource SubtitleTextBlockStyle}" Text="{x:Bind domain:Translator.SettingsManageAccountSettings_Title}" />
|
<TextBlock
|
||||||
|
Style="{StaticResource TitleTextBlockStyle}"
|
||||||
|
Text="Wino Mail" />
|
||||||
<TextBlock
|
<TextBlock
|
||||||
Foreground="{ThemeResource TextFillColorSecondaryBrush}"
|
Foreground="{ThemeResource TextFillColorSecondaryBrush}"
|
||||||
|
Style="{StaticResource BodyTextBlockStyle}"
|
||||||
|
Text="{x:Bind domain:Translator.SettingsOptions_HeroDescription}" />
|
||||||
|
<TextBlock
|
||||||
|
Margin="0,2,0,0"
|
||||||
|
Foreground="{ThemeResource TextFillColorTertiaryBrush}"
|
||||||
Style="{StaticResource CaptionTextBlockStyle}"
|
Style="{StaticResource CaptionTextBlockStyle}"
|
||||||
Text="{x:Bind domain:Translator.SettingsManageAccountSettings_Description}" />
|
Text="{x:Bind ViewModel.VersionText, Mode=OneWay}" />
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
|
</Grid>
|
||||||
|
|
||||||
|
<!-- Account Management Card -->
|
||||||
|
<controls:SettingsCard
|
||||||
|
Margin="0,0,0,12"
|
||||||
|
Click="SettingOptionClicked"
|
||||||
|
Description="{x:Bind ViewModel.AccountSummaryText, Mode=OneWay}"
|
||||||
|
Header="{x:Bind domain:Translator.SettingsManageAccountSettings_Title}"
|
||||||
|
IsClickEnabled="True"
|
||||||
|
Tag="{x:Bind enums:WinoPage.AccountManagementPage}">
|
||||||
|
<controls:SettingsCard.HeaderIcon>
|
||||||
|
<FontIcon Foreground="{ThemeResource AccentTextFillColorPrimaryBrush}" Glyph="" />
|
||||||
|
</controls:SettingsCard.HeaderIcon>
|
||||||
<Button
|
<Button
|
||||||
Grid.Column="2"
|
|
||||||
VerticalAlignment="Center"
|
|
||||||
Click="SettingOptionClicked"
|
Click="SettingOptionClicked"
|
||||||
Style="{StaticResource AccentButtonStyle}"
|
Style="{StaticResource AccentButtonStyle}"
|
||||||
Tag="{x:Bind enums:WinoPage.AccountManagementPage}">
|
Tag="{x:Bind enums:WinoPage.AccountManagementPage}">
|
||||||
@@ -68,454 +88,135 @@
|
|||||||
<FontIcon FontSize="12" Glyph="" />
|
<FontIcon FontSize="12" Glyph="" />
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</Button>
|
</Button>
|
||||||
</Grid>
|
</controls:SettingsCard>
|
||||||
|
|
||||||
<!-- General Settings Card -->
|
<!-- General Section -->
|
||||||
<Grid
|
<TextBlock
|
||||||
Padding="20"
|
Margin="1,8,0,4"
|
||||||
Background="{ThemeResource CardBackgroundFillColorDefaultBrush}"
|
Style="{StaticResource BodyStrongTextBlockStyle}"
|
||||||
BorderBrush="{ThemeResource CardStrokeColorDefaultBrush}"
|
Text="{x:Bind domain:Translator.SettingsOptions_GeneralSection}" />
|
||||||
BorderThickness="1"
|
|
||||||
CornerRadius="8">
|
|
||||||
<Grid.RowDefinitions>
|
|
||||||
<RowDefinition Height="Auto" />
|
|
||||||
<RowDefinition Height="*" />
|
|
||||||
</Grid.RowDefinitions>
|
|
||||||
|
|
||||||
<!-- General Header -->
|
<controls:SettingsCard
|
||||||
<StackPanel
|
Click="SettingOptionClicked"
|
||||||
Margin="0,0,0,16"
|
Description="{x:Bind domain:Translator.SettingsAppPreferences_Description}"
|
||||||
Orientation="Horizontal"
|
Header="{x:Bind domain:Translator.SettingsAppPreferences_Title}"
|
||||||
Spacing="12">
|
IsClickEnabled="True"
|
||||||
<Border
|
Tag="{x:Bind enums:WinoPage.AppPreferencesPage}">
|
||||||
Width="40"
|
<controls:SettingsCard.HeaderIcon>
|
||||||
Height="40"
|
<FontIcon Foreground="{ThemeResource AccentTextFillColorPrimaryBrush}" Glyph="" />
|
||||||
Background="{ThemeResource SystemFillColorNeutralBackgroundBrush}"
|
</controls:SettingsCard.HeaderIcon>
|
||||||
CornerRadius="8">
|
</controls:SettingsCard>
|
||||||
<FontIcon
|
|
||||||
HorizontalAlignment="Center"
|
|
||||||
VerticalAlignment="Center"
|
|
||||||
FontSize="18"
|
|
||||||
Foreground="{ThemeResource AccentTextFillColorPrimaryBrush}"
|
|
||||||
Glyph="" />
|
|
||||||
</Border>
|
|
||||||
<TextBlock
|
|
||||||
VerticalAlignment="Center"
|
|
||||||
Style="{StaticResource SubtitleTextBlockStyle}"
|
|
||||||
Text="{x:Bind domain:Translator.SettingsOptions_GeneralSection}" />
|
|
||||||
</StackPanel>
|
|
||||||
|
|
||||||
<!-- General Options -->
|
<controls:SettingsCard
|
||||||
<StackPanel Grid.Row="1" Spacing="2">
|
Click="SettingOptionClicked"
|
||||||
<Button
|
Description="{x:Bind domain:Translator.SettingsLanguageTime_Description}"
|
||||||
HorizontalAlignment="Stretch"
|
Header="{x:Bind domain:Translator.SettingsLanguageTime_Title}"
|
||||||
HorizontalContentAlignment="Stretch"
|
IsClickEnabled="True"
|
||||||
Background="Transparent"
|
Tag="{x:Bind enums:WinoPage.LanguageTimePage}">
|
||||||
BorderThickness="0"
|
<controls:SettingsCard.HeaderIcon>
|
||||||
Click="SettingOptionClicked"
|
<FontIcon Foreground="{ThemeResource AccentTextFillColorPrimaryBrush}" Glyph="" />
|
||||||
CornerRadius="4"
|
</controls:SettingsCard.HeaderIcon>
|
||||||
Tag="{x:Bind enums:WinoPage.AppPreferencesPage}">
|
</controls:SettingsCard>
|
||||||
<Grid Padding="4,10" ColumnSpacing="12">
|
|
||||||
<Grid.ColumnDefinitions>
|
|
||||||
<ColumnDefinition Width="Auto" />
|
|
||||||
<ColumnDefinition Width="*" />
|
|
||||||
<ColumnDefinition Width="Auto" />
|
|
||||||
</Grid.ColumnDefinitions>
|
|
||||||
<FontIcon
|
|
||||||
VerticalAlignment="Center"
|
|
||||||
FontSize="16"
|
|
||||||
Foreground="{ThemeResource TextFillColorSecondaryBrush}"
|
|
||||||
Glyph="" />
|
|
||||||
<TextBlock
|
|
||||||
Grid.Column="1"
|
|
||||||
VerticalAlignment="Center"
|
|
||||||
Text="{x:Bind domain:Translator.SettingsAppPreferences_Title}" />
|
|
||||||
<FontIcon
|
|
||||||
Grid.Column="2"
|
|
||||||
VerticalAlignment="Center"
|
|
||||||
FontSize="12"
|
|
||||||
Foreground="{ThemeResource TextFillColorTertiaryBrush}"
|
|
||||||
Glyph="" />
|
|
||||||
</Grid>
|
|
||||||
</Button>
|
|
||||||
|
|
||||||
<Button
|
<controls:SettingsCard
|
||||||
HorizontalAlignment="Stretch"
|
Click="SettingOptionClicked"
|
||||||
HorizontalContentAlignment="Stretch"
|
Description="{x:Bind domain:Translator.SettingsPersonalization_Description}"
|
||||||
Background="Transparent"
|
Header="{x:Bind domain:Translator.SettingsPersonalization_Title}"
|
||||||
BorderThickness="0"
|
IsClickEnabled="True"
|
||||||
Click="SettingOptionClicked"
|
Tag="{x:Bind enums:WinoPage.PersonalizationPage}">
|
||||||
CornerRadius="4"
|
<controls:SettingsCard.HeaderIcon>
|
||||||
Tag="{x:Bind enums:WinoPage.LanguageTimePage}">
|
<FontIcon Foreground="{ThemeResource AccentTextFillColorPrimaryBrush}" Glyph="" />
|
||||||
<Grid Padding="4,10" ColumnSpacing="12">
|
</controls:SettingsCard.HeaderIcon>
|
||||||
<Grid.ColumnDefinitions>
|
</controls:SettingsCard>
|
||||||
<ColumnDefinition Width="Auto" />
|
|
||||||
<ColumnDefinition Width="*" />
|
|
||||||
<ColumnDefinition Width="Auto" />
|
|
||||||
</Grid.ColumnDefinitions>
|
|
||||||
<FontIcon
|
|
||||||
VerticalAlignment="Center"
|
|
||||||
FontSize="16"
|
|
||||||
Foreground="{ThemeResource TextFillColorSecondaryBrush}"
|
|
||||||
Glyph="" />
|
|
||||||
<TextBlock
|
|
||||||
Grid.Column="1"
|
|
||||||
VerticalAlignment="Center"
|
|
||||||
Text="{x:Bind domain:Translator.SettingsLanguageTime_Title}" />
|
|
||||||
<FontIcon
|
|
||||||
Grid.Column="2"
|
|
||||||
VerticalAlignment="Center"
|
|
||||||
FontSize="12"
|
|
||||||
Foreground="{ThemeResource TextFillColorTertiaryBrush}"
|
|
||||||
Glyph="" />
|
|
||||||
</Grid>
|
|
||||||
</Button>
|
|
||||||
|
|
||||||
<Button
|
<controls:SettingsCard
|
||||||
HorizontalAlignment="Stretch"
|
Click="SettingOptionClicked"
|
||||||
HorizontalContentAlignment="Stretch"
|
Description="{x:Bind domain:Translator.SettingsAbout_Description}"
|
||||||
Background="Transparent"
|
Header="{x:Bind domain:Translator.SettingsAbout_Title}"
|
||||||
BorderThickness="0"
|
IsClickEnabled="True"
|
||||||
Click="SettingOptionClicked"
|
Tag="{x:Bind enums:WinoPage.AboutPage}">
|
||||||
CornerRadius="4"
|
<controls:SettingsCard.HeaderIcon>
|
||||||
Tag="{x:Bind enums:WinoPage.PersonalizationPage}">
|
<FontIcon Foreground="{ThemeResource AccentTextFillColorPrimaryBrush}" Glyph="" />
|
||||||
<Grid Padding="4,10" ColumnSpacing="12">
|
</controls:SettingsCard.HeaderIcon>
|
||||||
<Grid.ColumnDefinitions>
|
</controls:SettingsCard>
|
||||||
<ColumnDefinition Width="Auto" />
|
|
||||||
<ColumnDefinition Width="*" />
|
|
||||||
<ColumnDefinition Width="Auto" />
|
|
||||||
</Grid.ColumnDefinitions>
|
|
||||||
<FontIcon
|
|
||||||
VerticalAlignment="Center"
|
|
||||||
FontSize="16"
|
|
||||||
Foreground="{ThemeResource TextFillColorSecondaryBrush}"
|
|
||||||
Glyph="" />
|
|
||||||
<TextBlock
|
|
||||||
Grid.Column="1"
|
|
||||||
VerticalAlignment="Center"
|
|
||||||
Text="{x:Bind domain:Translator.SettingsPersonalization_Title}" />
|
|
||||||
<FontIcon
|
|
||||||
Grid.Column="2"
|
|
||||||
VerticalAlignment="Center"
|
|
||||||
FontSize="12"
|
|
||||||
Foreground="{ThemeResource TextFillColorTertiaryBrush}"
|
|
||||||
Glyph="" />
|
|
||||||
</Grid>
|
|
||||||
</Button>
|
|
||||||
|
|
||||||
<Button
|
<!-- Mail Section -->
|
||||||
HorizontalAlignment="Stretch"
|
<TextBlock
|
||||||
HorizontalContentAlignment="Stretch"
|
Margin="1,16,0,4"
|
||||||
Background="Transparent"
|
Style="{StaticResource BodyStrongTextBlockStyle}"
|
||||||
BorderThickness="0"
|
Text="{x:Bind domain:Translator.SettingsOptions_MailSection}" />
|
||||||
Click="SettingOptionClicked"
|
|
||||||
CornerRadius="4"
|
|
||||||
Tag="{x:Bind enums:WinoPage.AboutPage}">
|
|
||||||
<Grid Padding="4,10" ColumnSpacing="12">
|
|
||||||
<Grid.ColumnDefinitions>
|
|
||||||
<ColumnDefinition Width="Auto" />
|
|
||||||
<ColumnDefinition Width="*" />
|
|
||||||
<ColumnDefinition Width="Auto" />
|
|
||||||
</Grid.ColumnDefinitions>
|
|
||||||
<FontIcon
|
|
||||||
VerticalAlignment="Center"
|
|
||||||
FontSize="16"
|
|
||||||
Foreground="{ThemeResource TextFillColorSecondaryBrush}"
|
|
||||||
Glyph="" />
|
|
||||||
<TextBlock
|
|
||||||
Grid.Column="1"
|
|
||||||
VerticalAlignment="Center"
|
|
||||||
Text="{x:Bind domain:Translator.SettingsAbout_Title}" />
|
|
||||||
<FontIcon
|
|
||||||
Grid.Column="2"
|
|
||||||
VerticalAlignment="Center"
|
|
||||||
FontSize="12"
|
|
||||||
Foreground="{ThemeResource TextFillColorTertiaryBrush}"
|
|
||||||
Glyph="" />
|
|
||||||
</Grid>
|
|
||||||
</Button>
|
|
||||||
</StackPanel>
|
|
||||||
</Grid>
|
|
||||||
|
|
||||||
<!-- Two-Column Layout for Mail & Calendar -->
|
<controls:SettingsCard
|
||||||
<Grid ColumnSpacing="16">
|
Click="SettingOptionClicked"
|
||||||
<Grid.ColumnDefinitions>
|
Description="{x:Bind domain:Translator.Settings_KeyboardShortcuts_Description}"
|
||||||
<ColumnDefinition Width="*" />
|
Header="{x:Bind domain:Translator.Settings_KeyboardShortcuts_Title}"
|
||||||
<ColumnDefinition Width="*" />
|
IsClickEnabled="True"
|
||||||
</Grid.ColumnDefinitions>
|
Tag="{x:Bind enums:WinoPage.KeyboardShortcutsPage}">
|
||||||
|
<controls:SettingsCard.HeaderIcon>
|
||||||
|
<FontIcon Foreground="{ThemeResource AccentTextFillColorPrimaryBrush}" Glyph="" />
|
||||||
|
</controls:SettingsCard.HeaderIcon>
|
||||||
|
</controls:SettingsCard>
|
||||||
|
|
||||||
<!-- Mail Settings Card -->
|
<controls:SettingsCard
|
||||||
<Grid
|
Click="SettingOptionClicked"
|
||||||
Grid.Column="0"
|
Description="{x:Bind domain:Translator.SettingsMessageList_Description}"
|
||||||
Padding="20"
|
Header="{x:Bind domain:Translator.SettingsMessageList_Title}"
|
||||||
Background="{ThemeResource CardBackgroundFillColorDefaultBrush}"
|
IsClickEnabled="True"
|
||||||
BorderBrush="{ThemeResource CardStrokeColorDefaultBrush}"
|
Tag="{x:Bind enums:WinoPage.MessageListPage}">
|
||||||
BorderThickness="1"
|
<controls:SettingsCard.HeaderIcon>
|
||||||
CornerRadius="8">
|
<FontIcon Foreground="{ThemeResource AccentTextFillColorPrimaryBrush}" Glyph="" />
|
||||||
<Grid.RowDefinitions>
|
</controls:SettingsCard.HeaderIcon>
|
||||||
<RowDefinition Height="Auto" />
|
</controls:SettingsCard>
|
||||||
<RowDefinition Height="*" />
|
|
||||||
</Grid.RowDefinitions>
|
|
||||||
|
|
||||||
<!-- Mail Header -->
|
<controls:SettingsCard
|
||||||
<StackPanel
|
Click="SettingOptionClicked"
|
||||||
Margin="0,0,0,16"
|
Description="{x:Bind domain:Translator.SettingsReadComposePane_Description}"
|
||||||
Orientation="Horizontal"
|
Header="{x:Bind domain:Translator.SettingsReadComposePane_Title}"
|
||||||
Spacing="12">
|
IsClickEnabled="True"
|
||||||
<Border
|
Tag="{x:Bind enums:WinoPage.ReadComposePanePage}">
|
||||||
Width="40"
|
<controls:SettingsCard.HeaderIcon>
|
||||||
Height="40"
|
<FontIcon Foreground="{ThemeResource AccentTextFillColorPrimaryBrush}" Glyph="" />
|
||||||
Background="{ThemeResource SystemFillColorNeutralBackgroundBrush}"
|
</controls:SettingsCard.HeaderIcon>
|
||||||
CornerRadius="8">
|
</controls:SettingsCard>
|
||||||
<FontIcon
|
|
||||||
HorizontalAlignment="Center"
|
|
||||||
VerticalAlignment="Center"
|
|
||||||
FontSize="18"
|
|
||||||
Foreground="{ThemeResource AccentTextFillColorPrimaryBrush}"
|
|
||||||
Glyph="" />
|
|
||||||
</Border>
|
|
||||||
<TextBlock
|
|
||||||
VerticalAlignment="Center"
|
|
||||||
Style="{StaticResource SubtitleTextBlockStyle}"
|
|
||||||
Text="{x:Bind domain:Translator.SettingsOptions_MailSection}" />
|
|
||||||
</StackPanel>
|
|
||||||
|
|
||||||
<!-- Mail Options -->
|
<controls:SettingsCard
|
||||||
<StackPanel Grid.Row="1" Spacing="2">
|
Click="SettingOptionClicked"
|
||||||
<Button
|
Description="{x:Bind domain:Translator.SettingsSignatureAndEncryption_Description}"
|
||||||
HorizontalAlignment="Stretch"
|
Header="{x:Bind domain:Translator.SettingsSignatureAndEncryption_Title}"
|
||||||
HorizontalContentAlignment="Stretch"
|
IsClickEnabled="True"
|
||||||
Background="Transparent"
|
Tag="{x:Bind enums:WinoPage.SignatureAndEncryptionPage}">
|
||||||
BorderThickness="0"
|
<controls:SettingsCard.HeaderIcon>
|
||||||
Click="SettingOptionClicked"
|
<FontIcon Foreground="{ThemeResource AccentTextFillColorPrimaryBrush}" Glyph="" />
|
||||||
CornerRadius="4"
|
</controls:SettingsCard.HeaderIcon>
|
||||||
Tag="{x:Bind enums:WinoPage.KeyboardShortcutsPage}">
|
</controls:SettingsCard>
|
||||||
<Grid Padding="4,10" ColumnSpacing="12">
|
|
||||||
<Grid.ColumnDefinitions>
|
|
||||||
<ColumnDefinition Width="Auto" />
|
|
||||||
<ColumnDefinition Width="*" />
|
|
||||||
<ColumnDefinition Width="Auto" />
|
|
||||||
</Grid.ColumnDefinitions>
|
|
||||||
<FontIcon
|
|
||||||
VerticalAlignment="Center"
|
|
||||||
FontSize="16"
|
|
||||||
Foreground="{ThemeResource TextFillColorSecondaryBrush}"
|
|
||||||
Glyph="" />
|
|
||||||
<TextBlock
|
|
||||||
Grid.Column="1"
|
|
||||||
VerticalAlignment="Center"
|
|
||||||
Text="{x:Bind domain:Translator.Settings_KeyboardShortcuts_Title}" />
|
|
||||||
<FontIcon
|
|
||||||
Grid.Column="2"
|
|
||||||
VerticalAlignment="Center"
|
|
||||||
FontSize="12"
|
|
||||||
Foreground="{ThemeResource TextFillColorTertiaryBrush}"
|
|
||||||
Glyph="" />
|
|
||||||
</Grid>
|
|
||||||
</Button>
|
|
||||||
|
|
||||||
<Button
|
<controls:SettingsCard
|
||||||
HorizontalAlignment="Stretch"
|
Click="SettingOptionClicked"
|
||||||
HorizontalContentAlignment="Stretch"
|
Description="{x:Bind domain:Translator.SettingsStorage_Description}"
|
||||||
Background="Transparent"
|
Header="{x:Bind domain:Translator.SettingsStorage_Title}"
|
||||||
BorderThickness="0"
|
IsClickEnabled="True"
|
||||||
Click="SettingOptionClicked"
|
Tag="{x:Bind enums:WinoPage.StoragePage}">
|
||||||
CornerRadius="4"
|
<controls:SettingsCard.HeaderIcon>
|
||||||
Tag="{x:Bind enums:WinoPage.MessageListPage}">
|
<FontIcon Foreground="{ThemeResource AccentTextFillColorPrimaryBrush}" Glyph="" />
|
||||||
<Grid Padding="4,10" ColumnSpacing="12">
|
</controls:SettingsCard.HeaderIcon>
|
||||||
<Grid.ColumnDefinitions>
|
</controls:SettingsCard>
|
||||||
<ColumnDefinition Width="Auto" />
|
|
||||||
<ColumnDefinition Width="*" />
|
|
||||||
<ColumnDefinition Width="Auto" />
|
|
||||||
</Grid.ColumnDefinitions>
|
|
||||||
<FontIcon
|
|
||||||
VerticalAlignment="Center"
|
|
||||||
FontSize="16"
|
|
||||||
Foreground="{ThemeResource TextFillColorSecondaryBrush}"
|
|
||||||
Glyph="" />
|
|
||||||
<TextBlock
|
|
||||||
Grid.Column="1"
|
|
||||||
VerticalAlignment="Center"
|
|
||||||
Text="{x:Bind domain:Translator.SettingsMessageList_Title}" />
|
|
||||||
<FontIcon
|
|
||||||
Grid.Column="2"
|
|
||||||
VerticalAlignment="Center"
|
|
||||||
FontSize="12"
|
|
||||||
Foreground="{ThemeResource TextFillColorTertiaryBrush}"
|
|
||||||
Glyph="" />
|
|
||||||
</Grid>
|
|
||||||
</Button>
|
|
||||||
|
|
||||||
<Button
|
<!-- Calendar Section -->
|
||||||
HorizontalAlignment="Stretch"
|
<TextBlock
|
||||||
HorizontalContentAlignment="Stretch"
|
Margin="1,16,0,4"
|
||||||
Background="Transparent"
|
Style="{StaticResource BodyStrongTextBlockStyle}"
|
||||||
BorderThickness="0"
|
Text="{x:Bind domain:Translator.SettingsOptions_CalendarSection}" />
|
||||||
Click="SettingOptionClicked"
|
|
||||||
CornerRadius="4"
|
|
||||||
Tag="{x:Bind enums:WinoPage.ReadComposePanePage}">
|
|
||||||
<Grid Padding="4,10" ColumnSpacing="12">
|
|
||||||
<Grid.ColumnDefinitions>
|
|
||||||
<ColumnDefinition Width="Auto" />
|
|
||||||
<ColumnDefinition Width="*" />
|
|
||||||
<ColumnDefinition Width="Auto" />
|
|
||||||
</Grid.ColumnDefinitions>
|
|
||||||
<FontIcon
|
|
||||||
VerticalAlignment="Center"
|
|
||||||
FontSize="16"
|
|
||||||
Foreground="{ThemeResource TextFillColorSecondaryBrush}"
|
|
||||||
Glyph="" />
|
|
||||||
<TextBlock
|
|
||||||
Grid.Column="1"
|
|
||||||
VerticalAlignment="Center"
|
|
||||||
Text="{x:Bind domain:Translator.SettingsReadComposePane_Title}" />
|
|
||||||
<FontIcon
|
|
||||||
Grid.Column="2"
|
|
||||||
VerticalAlignment="Center"
|
|
||||||
FontSize="12"
|
|
||||||
Foreground="{ThemeResource TextFillColorTertiaryBrush}"
|
|
||||||
Glyph="" />
|
|
||||||
</Grid>
|
|
||||||
</Button>
|
|
||||||
|
|
||||||
<Button
|
<controls:SettingsCard
|
||||||
HorizontalAlignment="Stretch"
|
Click="SettingOptionClicked"
|
||||||
HorizontalContentAlignment="Stretch"
|
Description="{x:Bind domain:Translator.SettingsCalendarSettings_Description}"
|
||||||
Background="Transparent"
|
Header="{x:Bind domain:Translator.SettingsCalendarSettings_Title}"
|
||||||
BorderThickness="0"
|
IsClickEnabled="True"
|
||||||
Click="SettingOptionClicked"
|
Tag="{x:Bind enums:WinoPage.CalendarSettingsPage}">
|
||||||
CornerRadius="4"
|
<controls:SettingsCard.HeaderIcon>
|
||||||
Tag="{x:Bind enums:WinoPage.SignatureAndEncryptionPage}">
|
<FontIcon Foreground="{ThemeResource AccentTextFillColorPrimaryBrush}" Glyph="" />
|
||||||
<Grid Padding="4,10" ColumnSpacing="12">
|
</controls:SettingsCard.HeaderIcon>
|
||||||
<Grid.ColumnDefinitions>
|
</controls:SettingsCard>
|
||||||
<ColumnDefinition Width="Auto" />
|
|
||||||
<ColumnDefinition Width="*" />
|
|
||||||
<ColumnDefinition Width="Auto" />
|
|
||||||
</Grid.ColumnDefinitions>
|
|
||||||
<FontIcon
|
|
||||||
VerticalAlignment="Center"
|
|
||||||
FontSize="16"
|
|
||||||
Foreground="{ThemeResource TextFillColorSecondaryBrush}"
|
|
||||||
Glyph="" />
|
|
||||||
<TextBlock
|
|
||||||
Grid.Column="1"
|
|
||||||
VerticalAlignment="Center"
|
|
||||||
Text="{x:Bind domain:Translator.SettingsSignatureAndEncryption_Title}" />
|
|
||||||
<FontIcon
|
|
||||||
Grid.Column="2"
|
|
||||||
VerticalAlignment="Center"
|
|
||||||
FontSize="12"
|
|
||||||
Foreground="{ThemeResource TextFillColorTertiaryBrush}"
|
|
||||||
Glyph="" />
|
|
||||||
</Grid>
|
|
||||||
</Button>
|
|
||||||
|
|
||||||
<Button
|
|
||||||
HorizontalAlignment="Stretch"
|
|
||||||
HorizontalContentAlignment="Stretch"
|
|
||||||
Background="Transparent"
|
|
||||||
BorderThickness="0"
|
|
||||||
Click="SettingOptionClicked"
|
|
||||||
CornerRadius="4"
|
|
||||||
Tag="{x:Bind enums:WinoPage.StoragePage}">
|
|
||||||
<Grid Padding="4,10" ColumnSpacing="12">
|
|
||||||
<Grid.ColumnDefinitions>
|
|
||||||
<ColumnDefinition Width="Auto" />
|
|
||||||
<ColumnDefinition Width="*" />
|
|
||||||
<ColumnDefinition Width="Auto" />
|
|
||||||
</Grid.ColumnDefinitions>
|
|
||||||
<FontIcon
|
|
||||||
VerticalAlignment="Center"
|
|
||||||
FontSize="16"
|
|
||||||
Foreground="{ThemeResource TextFillColorSecondaryBrush}"
|
|
||||||
Glyph="" />
|
|
||||||
<TextBlock
|
|
||||||
Grid.Column="1"
|
|
||||||
VerticalAlignment="Center"
|
|
||||||
Text="{x:Bind domain:Translator.SettingsStorage_Title}" />
|
|
||||||
<FontIcon
|
|
||||||
Grid.Column="2"
|
|
||||||
VerticalAlignment="Center"
|
|
||||||
FontSize="12"
|
|
||||||
Foreground="{ThemeResource TextFillColorTertiaryBrush}"
|
|
||||||
Glyph="" />
|
|
||||||
</Grid>
|
|
||||||
</Button>
|
|
||||||
</StackPanel>
|
|
||||||
</Grid>
|
|
||||||
|
|
||||||
<!-- Calendar Settings Card -->
|
|
||||||
<Grid
|
|
||||||
Grid.Column="1"
|
|
||||||
Padding="20"
|
|
||||||
Background="{ThemeResource CardBackgroundFillColorDefaultBrush}"
|
|
||||||
BorderBrush="{ThemeResource CardStrokeColorDefaultBrush}"
|
|
||||||
BorderThickness="1"
|
|
||||||
CornerRadius="8">
|
|
||||||
<Grid.RowDefinitions>
|
|
||||||
<RowDefinition Height="Auto" />
|
|
||||||
<RowDefinition Height="*" />
|
|
||||||
</Grid.RowDefinitions>
|
|
||||||
|
|
||||||
<!-- Calendar Header -->
|
|
||||||
<StackPanel
|
|
||||||
Margin="0,0,0,16"
|
|
||||||
Orientation="Horizontal"
|
|
||||||
Spacing="12">
|
|
||||||
<Border
|
|
||||||
Width="40"
|
|
||||||
Height="40"
|
|
||||||
Background="{ThemeResource SystemFillColorNeutralBackgroundBrush}"
|
|
||||||
CornerRadius="8">
|
|
||||||
<FontIcon
|
|
||||||
HorizontalAlignment="Center"
|
|
||||||
VerticalAlignment="Center"
|
|
||||||
FontSize="18"
|
|
||||||
Foreground="{ThemeResource AccentTextFillColorPrimaryBrush}"
|
|
||||||
Glyph="" />
|
|
||||||
</Border>
|
|
||||||
<TextBlock
|
|
||||||
VerticalAlignment="Center"
|
|
||||||
Style="{StaticResource SubtitleTextBlockStyle}"
|
|
||||||
Text="{x:Bind domain:Translator.SettingsOptions_CalendarSection}" />
|
|
||||||
</StackPanel>
|
|
||||||
|
|
||||||
<!-- Calendar Options -->
|
|
||||||
<StackPanel Grid.Row="1" Spacing="2">
|
|
||||||
<Button
|
|
||||||
HorizontalAlignment="Stretch"
|
|
||||||
HorizontalContentAlignment="Stretch"
|
|
||||||
Background="Transparent"
|
|
||||||
BorderThickness="0"
|
|
||||||
Click="SettingOptionClicked"
|
|
||||||
CornerRadius="4"
|
|
||||||
Tag="{x:Bind enums:WinoPage.CalendarSettingsPage}">
|
|
||||||
<Grid Padding="4,10" ColumnSpacing="12">
|
|
||||||
<Grid.ColumnDefinitions>
|
|
||||||
<ColumnDefinition Width="Auto" />
|
|
||||||
<ColumnDefinition Width="*" />
|
|
||||||
<ColumnDefinition Width="Auto" />
|
|
||||||
</Grid.ColumnDefinitions>
|
|
||||||
<FontIcon
|
|
||||||
VerticalAlignment="Center"
|
|
||||||
FontSize="16"
|
|
||||||
Foreground="{ThemeResource TextFillColorSecondaryBrush}"
|
|
||||||
Glyph="" />
|
|
||||||
<TextBlock
|
|
||||||
Grid.Column="1"
|
|
||||||
VerticalAlignment="Center"
|
|
||||||
Text="{x:Bind domain:Translator.SettingsCalendarSettings_Title}" />
|
|
||||||
<FontIcon
|
|
||||||
Grid.Column="2"
|
|
||||||
VerticalAlignment="Center"
|
|
||||||
FontSize="12"
|
|
||||||
Foreground="{ThemeResource TextFillColorTertiaryBrush}"
|
|
||||||
Glyph="" />
|
|
||||||
</Grid>
|
|
||||||
</Button>
|
|
||||||
</StackPanel>
|
|
||||||
</Grid>
|
|
||||||
</Grid>
|
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</ScrollViewer>
|
</ScrollViewer>
|
||||||
</abstract:SettingOptionsPageAbstract>
|
</abstract:SettingOptionsPageAbstract>
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
using CommunityToolkit.WinUI.Controls;
|
||||||
using Microsoft.UI.Xaml;
|
using Microsoft.UI.Xaml;
|
||||||
using Microsoft.UI.Xaml.Controls;
|
using Microsoft.UI.Xaml.Controls;
|
||||||
using Wino.Core.Domain.Enums;
|
using Wino.Core.Domain.Enums;
|
||||||
@@ -17,6 +18,7 @@ public sealed partial class SettingOptionsPage : SettingOptionsPageAbstract
|
|||||||
WinoPage? page = sender switch
|
WinoPage? page = sender switch
|
||||||
{
|
{
|
||||||
Button button when button.Tag is WinoPage p => p,
|
Button button when button.Tag is WinoPage p => p,
|
||||||
|
SettingsCard card when card.Tag is WinoPage p => p,
|
||||||
_ => null
|
_ => null
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user