Files
Wino-Mail/Wino.Mail.WinUI/Views/SettingOptionsPage.xaml
T
Burak Kaan Köse 7f0b671b62 Settings shell.
2026-03-12 19:04:47 +01:00

144 lines
10 KiB
XML

<abstract:SettingOptionsPageAbstract
x:Class="Wino.Views.Settings.SettingOptionsPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:abstract="using:Wino.Views.Abstract"
xmlns:controls="using:CommunityToolkit.WinUI.Controls"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:domain="using:Wino.Core.Domain"
xmlns:enums="using:Wino.Core.Domain.Enums"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
x:Name="root"
Title="{x:Bind domain:Translator.SettingsHome_Title}"
mc:Ignorable="d">
<ScrollViewer Padding="0,0,16,0" VerticalScrollBarVisibility="Auto">
<StackPanel Margin="0,8,0,24" Spacing="12">
<StackPanel.ChildrenTransitions>
<TransitionCollection>
<EntranceThemeTransition FromVerticalOffset="50" IsStaggeringEnabled="True" />
</TransitionCollection>
</StackPanel.ChildrenTransitions>
<Grid
Margin="0,0,0,12"
Padding="24,28"
Background="{ThemeResource CardBackgroundFillColorDefaultBrush}"
BorderBrush="{ThemeResource CardStrokeColorDefaultBrush}"
BorderThickness="1"
CornerRadius="8">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Grid
Grid.Column="1"
Margin="8,0,0,0"
VerticalAlignment="Center"
ColumnSpacing="12">
<Grid.RowDefinitions>
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<StackPanel
VerticalAlignment="Center"
Orientation="Horizontal"
Spacing="12">
<Image
Width="56"
Height="56"
VerticalAlignment="Top"
Source="ms-appx:///Assets/AppEntries/MailAssets/Square150x150Logo.scale-100.png"
Stretch="Uniform" />
<StackPanel VerticalAlignment="Center">
<TextBlock
VerticalAlignment="Center"
Style="{StaticResource TitleTextBlockStyle}"
Text="Wino Mail" />
<TextBlock
VerticalAlignment="Top"
Foreground="{ThemeResource TextFillColorTertiaryBrush}"
Style="{StaticResource CaptionTextBlockStyle}"
Text="{x:Bind ViewModel.VersionText, Mode=OneWay}" />
</StackPanel>
</StackPanel>
<StackPanel
Grid.RowSpan="2"
Grid.Column="2"
Margin="0,12,0,0"
HorizontalAlignment="Right"
VerticalAlignment="Center"
Orientation="Horizontal"
Spacing="12">
<Button
Command="{x:Bind ViewModel.NavigateExternalCommand}"
CommandParameter="{x:Bind ViewModel.PaypalUrl, Mode=OneWay}"
Style="{StaticResource DefaultButtonStyle}"
ToolTipService.ToolTip="{x:Bind domain:Translator.SettingsPaypal_Title}">
<Viewbox Width="18" Height="18">
<Path
Data="M385.52,51.09C363.84,26.52,324.71,16,274.63,16H129.25a20.75,20.75,0,0,0-20.54,17.48l-60.55,382a12.43,12.43,0,0,0,10.39,14.22,12.58,12.58,0,0,0,1.94.15h89.76l22.54-142.29-.7,4.46a20.67,20.67,0,0,1,20.47-17.46h42.65c83.77,0,149.36-33.86,168.54-131.8.57-2.9,1.05-5.72,1.49-8.48h0C410.94,98.06,405.19,73.41,385.52,51.09Z"
Fill="{ThemeResource TextFillColorPrimaryBrush}"
Stretch="Uniform" />
</Viewbox>
</Button>
<Button
Grid.Column="1"
Command="{x:Bind ViewModel.NavigateExternalCommand}"
CommandParameter="{x:Bind ViewModel.GitHubUrl, Mode=OneWay}"
Style="{StaticResource DefaultButtonStyle}"
ToolTipService.ToolTip="{x:Bind domain:Translator.SettingsAboutGithub_Title}">
<StackPanel HorizontalAlignment="Center" Spacing="6">
<Viewbox Width="18" Height="18">
<Path
Data="m 12.2135 0 c -6.7538 0 -12.2135 5.5 -12.2135 12.3042 c 0 5.439 3.4983 10.043 8.3513 11.6725 c 0.6067 0.1225 0.829 -0.2647 0.829 -0.5905 c 0 -0.2853 -0.02 -1.263 -0.02 -2.2817 c -3.3975 0.7335 -4.105 -1.4668 -4.105 -1.4668 c -0.546 -1.426 -1.355 -1.7925 -1.355 -1.7925 c -1.112 -0.7538 0.081 -0.7538 0.081 -0.7538 c 1.2335 0.0815 1.8807 1.263 1.8807 1.263 c 1.0918 1.874 2.851 1.3445 3.5587 1.0185 c 0.101 -0.7945 0.4247 -1.3445 0.7685 -1.65 c -2.7097 -0.2853 -5.5607 -1.3445 -5.5607 -6.0708 c 0 -1.3445 0.485 -2.4445 1.2535 -3.3 c -0.1212 -0.3055 -0.546 -1.5687 0.1215 -3.2595 c 0 0 1.0313 -0.326 3.3565 1.263 a 11.7425 11.7425 90 0 1 3.0535 -0.4075 c 1.0313 0 2.0825 0.1428 3.0533 0.4075 c 2.3255 -1.589 3.3567 -1.263 3.3567 -1.263 c 0.6675 1.6908 0.2425 2.954 0.1212 3.2595 c 0.7888 0.8555 1.2538 1.9555 1.2538 3.3 c 0 4.7263 -2.851 5.765 -5.581 6.0708 c 0.445 0.387 0.829 1.1202 0.829 2.2815 c 0 1.65 -0.02 2.9743 -0.02 3.3815 c 0 0.326 0.2225 0.7132 0.829 0.591 c 4.853 -1.63 8.3513 -6.2338 8.3513 -11.6728 c 0.02 -6.8043 -5.4598 -12.3043 -12.1933 -12.3043 z"
Fill="{ThemeResource TextFillColorPrimaryBrush}"
Stretch="Uniform" />
</Viewbox>
</StackPanel>
</Button>
<Button
Grid.Column="2"
Command="{x:Bind ViewModel.NavigateExternalCommand}"
CommandParameter="Store"
ToolTipService.ToolTip="{x:Bind domain:Translator.SettingsStore_Title}">
<Viewbox Width="18" Height="18">
<Path
Data="F1 M 19.003906 3.251953 L 19.003906 15.947266 C 19.003906 16.357422 18.920898 16.748047 18.754883 17.119141 C 18.588867 17.490234 18.367512 17.814127 18.09082 18.09082 C 17.814127 18.367514 17.490234 18.588867 17.119141 18.754883 C 16.748047 18.920898 16.357422 19.003906 15.947266 19.003906 L 3.056641 19.003906 C 2.646484 19.003906 2.255859 18.920898 1.884766 18.754883 C 1.513672 18.588867 1.189779 18.367514 0.913086 18.09082 C 0.636393 17.814127 0.415039 17.490234 0.249023 17.119141 C 0.083008 16.748047 0 16.357422 0 15.947266 L 0 3.251953 C 0 3.076172 0.032552 2.913412 0.097656 2.763672 C 0.16276 2.613934 0.252279 2.482098 0.366211 2.368164 C 0.480143 2.254232 0.611979 2.164715 0.761719 2.099609 C 0.911458 2.034506 1.074219 2.001953 1.25 2.001953 L 4.003906 2.001953 L 4.003906 0.996094 C 4.003906 0.859375 4.029948 0.730795 4.082031 0.610352 C 4.134114 0.48991 4.205729 0.384115 4.296875 0.292969 C 4.388021 0.201824 4.493815 0.130209 4.614258 0.078125 C 4.7347 0.026043 4.863281 0 5 0 L 14.003906 0 C 14.140624 0 14.269205 0.026043 14.389648 0.078125 C 14.510091 0.130209 14.615885 0.201824 14.707031 0.292969 C 14.798177 0.384115 14.869791 0.48991 14.921875 0.610352 C 14.973957 0.730795 14.999999 0.859375 15 0.996094 L 15 2.001953 L 17.753906 2.001953 C 17.923176 2.001953 18.084309 2.034506 18.237305 2.099609 C 18.390299 2.164715 18.523762 2.254232 18.637695 2.368164 C 18.751627 2.482098 18.841145 2.615561 18.90625 2.768555 C 18.971354 2.921551 19.003906 3.082684 19.003906 3.251953 Z M 14.003906 0.996094 L 5 0.996094 L 5 2.001953 L 14.003906 2.001953 Z M 5 10 L 9.003906 10 L 9.003906 5.996094 L 5 5.996094 Z M 10 10 L 14.003906 10 L 14.003906 5.996094 L 10 5.996094 Z M 5 15 L 9.003906 15 L 9.003906 10.996094 L 5 10.996094 Z M 10 15 L 14.003906 15 L 14.003906 10.996094 L 10 10.996094 Z "
Fill="{ThemeResource TextFillColorPrimaryBrush}"
Stretch="Uniform" />
</Viewbox>
</Button>
</StackPanel>
</Grid>
</Grid>
<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.ManageAccountsPage}">
<controls:SettingsCard.HeaderIcon>
<FontIcon Foreground="{ThemeResource AccentTextFillColorPrimaryBrush}" Glyph="&#xE77B;" />
</controls:SettingsCard.HeaderIcon>
<Button
Click="SettingOptionClicked"
Style="{StaticResource AccentButtonStyle}"
Tag="{x:Bind enums:WinoPage.ManageAccountsPage}">
<StackPanel Orientation="Horizontal" Spacing="8">
<TextBlock Text="{x:Bind domain:Translator.Buttons_Manage}" />
<FontIcon FontSize="12" Glyph="&#xE76C;" />
</StackPanel>
</Button>
</controls:SettingsCard>
</StackPanel>
</ScrollViewer>
</abstract:SettingOptionsPageAbstract>