Some UI changes on settings.

This commit is contained in:
Burak Kaan Köse
2026-03-09 00:28:10 +01:00
parent 3e731967cd
commit 44be3eb4f7
17 changed files with 291 additions and 149 deletions
@@ -331,6 +331,7 @@ public sealed partial class ImagePreviewControl : PersonPicture
if (!IsActiveRefresh(refreshVersion, cancellationToken))
return;
DisplayName = string.Empty;
Initials = string.Empty;
ProfilePicture = bitmapImage;
}).ConfigureAwait(false);
@@ -188,7 +188,7 @@ public class NavigationService : NavigationServiceBase, INavigationService
// Update the application mode in state persistence service
_statePersistanceService.ApplicationMode = mode;
_statePersistanceService.CoreWindowTitle = mode == WinoApplicationMode.Calendar
_statePersistanceService.AppModeTitle = mode == WinoApplicationMode.Calendar
? "Wino Calendar"
: "Wino Mail";
@@ -13,6 +13,7 @@ public class StatePersistenceService : ObservableObject, IStatePersistanceServic
private const string OpenPaneLengthKey = nameof(OpenPaneLengthKey);
private const string MailListPaneLengthKey = nameof(MailListPaneLengthKey);
private const string AppModeTitleKey = nameof(AppModeTitle);
private readonly IConfigurationService _configurationService;
@@ -22,6 +23,7 @@ public class StatePersistenceService : ObservableObject, IStatePersistanceServic
_openPaneLength = _configurationService.Get(OpenPaneLengthKey, 320d);
_mailListPaneLength = _configurationService.Get(MailListPaneLengthKey, 420d);
_appModeTitle = _configurationService.Get(AppModeTitleKey, "Wino Mail");
_calendarDisplayType = EnsureValidCalendarDisplayType(_configurationService.Get(nameof(CalendarDisplayType), CalendarDisplayType.Week));
_dayDisplayCount = _configurationService.Get(nameof(DayDisplayCount), 1);
@@ -144,6 +146,21 @@ public class StatePersistenceService : ObservableObject, IStatePersistanceServic
}
}
private string _appModeTitle;
public string AppModeTitle
{
get => _appModeTitle;
set
{
if (SetProperty(ref _appModeTitle, value))
{
_configurationService.Set(AppModeTitleKey, value);
UpdateAppWindowTitle();
}
}
}
private double _openPaneLength;
public double OpenPaneLength
{
@@ -199,10 +216,15 @@ public class StatePersistenceService : ObservableObject, IStatePersistanceServic
}
private void UpdateAppCoreWindowTitle()
{
OnPropertyChanged(nameof(CoreWindowTitle));
}
private void UpdateAppWindowTitle()
{
if (WinoApplication.MainWindow != null)
{
WinoApplication.MainWindow.Title = CoreWindowTitle;
WinoApplication.MainWindow.Title = AppModeTitle;
}
}
+3 -2
View File
@@ -26,7 +26,7 @@
<Grid Grid.RowSpan="2" Background="{ThemeResource WinoApplicationBackgroundColor}" />
<TitleBar
x:Name="ShellTitleBar"
Title="{x:Bind StatePersistanceService.CoreWindowTitle, Mode=OneWay}"
Title="{x:Bind StatePersistanceService.AppModeTitle, Mode=OneWay}"
Margin="-2"
HorizontalContentAlignment="Stretch"
VerticalContentAlignment="Stretch"
@@ -34,7 +34,8 @@
Background="Transparent"
IsBackButtonVisible="{x:Bind StatePersistanceService.IsBackButtonVisible, Mode=OneWay}"
IsPaneToggleButtonVisible="True"
PaneToggleRequested="PaneButtonClicked">
PaneToggleRequested="PaneButtonClicked"
Subtitle="{x:Bind StatePersistanceService.CoreWindowTitle, Mode=OneWay}">
<TitleBar.RightHeader>
<StackPanel Orientation="Horizontal" Spacing="8">
<!-- Sync Status Button -->
+8 -1
View File
@@ -68,7 +68,7 @@ public sealed partial class ShellWindow : WindowEx, IWinoShellWindow,
ExitWinoCommand = new RelayCommand(ForceClose);
this.SetIcon("Assets/Wino_Icon.ico");
Title = "Wino Mail";
Title = StatePersistanceService.AppModeTitle;
SystemTrayIcon.ForceCreate();
}
@@ -122,6 +122,7 @@ public sealed partial class ShellWindow : WindowEx, IWinoShellWindow,
AppModeSegmentedControl.SelectedIndex = targetMode == WinoApplicationMode.Mail ? 0 : 1;
_isApplyingActivationMode = false;
StatePersistanceService.AppModeTitle = GetAppModeTitle(targetMode);
NavigationService.ChangeApplicationMode(targetMode);
}
@@ -317,6 +318,7 @@ public sealed partial class ShellWindow : WindowEx, IWinoShellWindow,
AppModeSegmentedControl.SelectedIndex = mode == WinoApplicationMode.Mail ? 0 : 1;
_isApplyingActivationMode = false;
StatePersistanceService.AppModeTitle = GetAppModeTitle(mode);
NavigationService.ChangeApplicationMode(mode);
RestoreFromTray();
}
@@ -371,4 +373,9 @@ public sealed partial class ShellWindow : WindowEx, IWinoShellWindow,
_currentMode = selectedMode;
NavigationService.ChangeApplicationMode(selectedMode);
}
private static string GetAppModeTitle(WinoApplicationMode mode)
=> mode == WinoApplicationMode.Calendar
? "Wino Calendar"
: "Wino Mail";
}
@@ -2,14 +2,14 @@
x:Class="Wino.Views.AccountDetailsPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:accounts="using:Wino.Core.Domain.Models.Accounts"
xmlns:abstract="using:Wino.Views.Abstract"
xmlns:accounts="using:Wino.Core.Domain.Models.Accounts"
xmlns:calendar="using:Wino.Core.Domain.Entities.Calendar"
xmlns:controls="using:CommunityToolkit.WinUI.Controls"
xmlns:controls1="using:Wino.Controls"
xmlns:coreControls="using:Wino.Mail.WinUI.Controls"
xmlns:data="using:Wino.Core.ViewModels.Data"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:data="using:Wino.Core.ViewModels.Data"
xmlns:domain="using:Wino.Core.Domain"
xmlns:folders="using:Wino.Core.Domain.Models.Folders"
xmlns:helpers="using:Wino.Helpers"
@@ -81,13 +81,9 @@
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<controls:SettingsExpander
Description="{x:Bind ViewModel.Address, Mode=OneWay}"
Header="{x:Bind ViewModel.AccountName, Mode=OneWay}">
<controls:SettingsExpander Description="{x:Bind ViewModel.Address, Mode=OneWay}" Header="{x:Bind ViewModel.AccountName, Mode=OneWay}">
<controls:SettingsExpander.HeaderIcon>
<BitmapIcon
ShowAsMonochrome="False"
UriSource="{x:Bind ViewModel.ProviderIconPath, Mode=OneWay}" />
<BitmapIcon ShowAsMonochrome="False" UriSource="{x:Bind ViewModel.ProviderIconPath, Mode=OneWay}" />
</controls:SettingsExpander.HeaderIcon>
<controls:SettingsExpander.Items>
<controls:SettingsCard Description="{x:Bind domain:Translator.AccountEditDialog_Message}" Header="{x:Bind domain:Translator.AccountDetailsPage_Title}">
@@ -132,6 +128,7 @@
<Button
Grid.Row="1"
Width="100"
HorizontalAlignment="Right"
Command="{x:Bind ViewModel.ResetColorCommand}"
Content="{x:Bind domain:Translator.Buttons_Reset}" />
@@ -310,6 +307,7 @@
<SymbolIcon Symbol="Save" />
</controls:SettingsCard.HeaderIcon>
<Button
Width="100"
HorizontalAlignment="Right"
Command="{x:Bind ViewModel.SaveChangesCommand}"
Content="{x:Bind domain:Translator.Buttons_Save}"
@@ -321,6 +319,7 @@
<SymbolIcon Symbol="Delete" />
</controls:SettingsCard.HeaderIcon>
<Button
Width="100"
Background="Red"
Command="{x:Bind ViewModel.DeleteAccountCommand}"
Content="{x:Bind domain:Translator.Buttons_Delete}" />
@@ -63,7 +63,9 @@
HorizontalContentAlignment="Left"
Style="{StaticResource DefaultButtonStyle}">
<Button.Flyout>
<Flyout Placement="BottomEdgeAlignedLeft">
<Flyout
x:Name="CalendarSelectionFlyout"
Placement="BottomEdgeAlignedLeft">
<ScrollViewer MaxHeight="360">
<ItemsControl ItemsSource="{x:Bind ViewModel.AvailableCalendarGroups, Mode=OneWay}">
<ItemsControl.ItemTemplate>
@@ -155,6 +155,7 @@ public sealed partial class CalendarEventComposePage : CalendarEventComposePageA
if (e.ClickedItem is AccountCalendarViewModel calendar)
{
ViewModel.SelectedCalendar = calendar;
CalendarSelectionFlyout.Hide();
}
}
+79 -30
View File
@@ -33,43 +33,92 @@
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Image
Width="96"
Height="96"
VerticalAlignment="Center"
Source="ms-appx:///Assets/AppEntries/MailAssets/Square150x150Logo.scale-100.png"
Stretch="Uniform" />
<!-- App Info -->
<StackPanel
<Grid
Grid.Column="1"
Margin="20,0,0,0"
Margin="8,0,0,0"
VerticalAlignment="Center"
Spacing="4">
<TextBlock
Style="{StaticResource TitleTextBlockStyle}"
Text="Wino Mail" />
<TextBlock
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}"
Text="{x:Bind ViewModel.VersionText, Mode=OneWay}" />
ColumnSpacing="12">
<Grid.RowDefinitions>
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<StackPanel
Margin="0,8,0,0"
VerticalAlignment="Center"
Orientation="Horizontal"
Spacing="8">
<HyperlinkButton
Content="{x:Bind ViewModel.WebsiteUrl, Mode=OneWay}"
NavigateUri="{x:Bind ViewModel.WebsiteUrl, Mode=OneWay}" />
<HyperlinkButton
Content="{x:Bind domain:Translator.SettingsPaypal_Title}"
NavigateUri="{x:Bind ViewModel.PaypalUrl, Mode=OneWay}" />
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>
<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"
Style="{StaticResource AccentButtonStyle}"
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 AccentTextFillColorPrimaryBrush}"
Stretch="Uniform" />
</Viewbox>
</Button>
</StackPanel>
</Grid>
</Grid>
<!-- Account Management Card -->