From dccf55d57a11485069108b4b34f76352ae9684a0 Mon Sep 17 00:00:00 2001 From: Aleh Khantsevich Date: Sun, 23 Jun 2024 13:32:06 +0200 Subject: [PATCH 1/8] Added separated zones --- Wino.Mail/AppShell.xaml | 55 +- Wino.Mail/Styles/Colors.xaml | 12 +- Wino.Mail/Views/ComposePage.xaml | 1198 ++++++++++++------------ Wino.Mail/Views/MailListPage.xaml | 759 +++++++-------- Wino.Mail/Views/MailListPage.xaml.cs | 3 +- Wino.Mail/Views/MailRenderingPage.xaml | 460 ++++----- 6 files changed, 1269 insertions(+), 1218 deletions(-) diff --git a/Wino.Mail/AppShell.xaml b/Wino.Mail/AppShell.xaml index 1cc75798..f870c256 100644 --- a/Wino.Mail/AppShell.xaml +++ b/Wino.Mail/AppShell.xaml @@ -2,26 +2,29 @@ x:Class="Wino.Views.AppShell" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" - x:Name="Root" xmlns:abstract="using:Wino.Views.Abstract" xmlns:advanced="using:Wino.Controls.Advanced" xmlns:animatedvisuals="using:Microsoft.UI.Xaml.Controls.AnimatedVisuals" + xmlns:animations="using:CommunityToolkit.WinUI.Animations" xmlns:controls="using:Wino.Controls" xmlns:controls1="using:CommunityToolkit.WinUI.Controls" - xmlns:domain="using:Wino.Core.Domain" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" + xmlns:domain="using:Wino.Core.Domain" + xmlns:enums="using:Wino.Core.Domain.Enums" xmlns:helpers="using:Wino.Helpers" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" - xmlns:enums="using:Wino.Core.Domain.Enums" xmlns:menu="using:Wino.Core.MenuItems" xmlns:muxc="using:Microsoft.UI.Xaml.Controls" - xmlns:animations="using:CommunityToolkit.WinUI.Animations" xmlns:selectors="using:Wino.Selectors" + x:Name="Root" muxc:BackdropMaterial.ApplyToRootOrPageBackground="{ThemeResource UseMica}" mc:Ignorable="d"> + + + @@ -110,15 +113,15 @@ + SelectsOnInvoked="False" + Style="{StaticResource SingleAccountNavigationViewItemTemplate}"> @@ -159,8 +162,8 @@ @@ -239,8 +242,8 @@ + DataContext="{x:Bind}" + SelectsOnInvoked="False"> @@ -258,16 +261,16 @@ MinHeight="30" AllowDrop="True" ContextRequested="MenuItemContextRequested" + DataContext="{x:Bind}" DragEnter="ItemDragEnterOnFolder" DragLeave="ItemDragLeaveFromFolder" Drop="ItemDroppedOnFolder" - DataContext="{x:Bind}" FontSize="50" FontWeight="{x:Bind helpers:XamlHelpers.GetFontWeightByChildSelectedState(IsSelected), Mode=OneWay}" IsExpanded="{x:Bind IsExpanded, Mode=TwoWay}" IsSelected="{x:Bind IsSelected, Mode=TwoWay}" - SelectsOnInvoked="{x:Bind IsMoveTarget, Mode=OneWay}" - MenuItemsSource="{x:Bind SubMenuItems, Mode=OneWay}"> + MenuItemsSource="{x:Bind SubMenuItems, Mode=OneWay}" + SelectsOnInvoked="{x:Bind IsMoveTarget, Mode=OneWay}"> @@ -329,8 +332,8 @@ IsActiveAccount="{x:Bind IsSelected, Mode=OneWay}" IsChildSelected="{x:Bind IsChildSelected, Mode=TwoWay}" IsExpanded="{x:Bind IsExpanded, Mode=TwoWay}" - Style="{StaticResource SingleAccountNavigationViewItemTemplate}" - SelectsOnInvoked="False"> + SelectsOnInvoked="False" + Style="{StaticResource SingleAccountNavigationViewItemTemplate}"> @@ -469,15 +472,15 @@ + IsClosable="False" + IsOpen="False" /> + PreferredPlacement="Bottom" + Target="{x:Bind ShellInfoBar}" /> diff --git a/Wino.Mail/Styles/Colors.xaml b/Wino.Mail/Styles/Colors.xaml index f33c0dba..6d8d9bab 100644 --- a/Wino.Mail/Styles/Colors.xaml +++ b/Wino.Mail/Styles/Colors.xaml @@ -1,4 +1,7 @@ - + #e74c3c #e74c3c @@ -10,10 +13,17 @@ #fdcb6e #636e72 + #fdcb6e #2d3436 + diff --git a/Wino.Mail/Views/ComposePage.xaml b/Wino.Mail/Views/ComposePage.xaml index 7faf05df..2c21d4f6 100644 --- a/Wino.Mail/Views/ComposePage.xaml +++ b/Wino.Mail/Views/ComposePage.xaml @@ -3,17 +3,17 @@ 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:d="http://schemas.microsoft.com/expression/blend/2008" - xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:controls="using:Wino.Controls" - xmlns:helpers="using:Wino.Helpers" - xmlns:muxc="using:Microsoft.UI.Xaml.Controls" - xmlns:mailkit="using:MimeKit" - xmlns:entities="using:Wino.Core.Domain.Entities" xmlns:controls1="using:CommunityToolkit.WinUI.Controls" + xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:data="using:Wino.Mail.ViewModels.Data" - xmlns:reader="using:Wino.Core.Domain.Models.Reader" xmlns:domain="using:Wino.Core.Domain" + xmlns:entities="using:Wino.Core.Domain.Entities" + xmlns:helpers="using:Wino.Helpers" + xmlns:mailkit="using:MimeKit" + xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" + xmlns:muxc="using:Microsoft.UI.Xaml.Controls" + xmlns:reader="using:Wino.Core.Domain.Models.Reader" x:Name="root" d:Background="White" Loaded="ComposerLoaded" @@ -48,7 +48,7 @@ FromName="{x:Bind Name}" IsKnown="False" /> - + @@ -58,9 +58,9 @@ + ColumnSpacing="3"> @@ -85,8 +85,8 @@ + Foreground="{StaticResource DeleteBrush}" + Symbol="Cancel" /> - - - Transparent - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - - - - + Grid.Row="0" + AllowDrop="True" + Background="{ThemeResource AppBarBackgroundColor}" + DragLeave="OnComposeGridDragLeave" + DragOver="OnComposeGridDragOver"> + + Transparent + - + + + + + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - + FontSize="20" + FontWeight="SemiBold" + Opacity="0.5" + Text="{x:Bind domain:Translator.ComposerAttachmentsDropZone_Message}" /> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + diff --git a/Wino.Mail/Views/MailListPage.xaml b/Wino.Mail/Views/MailListPage.xaml index 91328aa4..b6dc7407 100644 --- a/Wino.Mail/Views/MailListPage.xaml +++ b/Wino.Mail/Views/MailListPage.xaml @@ -7,6 +7,7 @@ xmlns:controls="using:Wino.Controls" xmlns:controls1="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:helpers="using:Wino.Helpers" xmlns:i="using:Microsoft.Xaml.Interactivity" @@ -16,10 +17,9 @@ xmlns:menuflyouts="using:Wino.MenuFlyouts" xmlns:muxc="using:Microsoft.UI.Xaml.Controls" xmlns:selectors="using:Wino.Selectors" - xmlns:domain="using:Wino.Core.Domain" xmlns:ui="using:Microsoft.Toolkit.Uwp.UI" - xmlns:wino="using:Wino" xmlns:viewModelData="using:Wino.Mail.ViewModels.Data" + xmlns:wino="using:Wino" x:Name="root" Loaded="MailListPageLoaded" mc:Ignorable="d"> @@ -66,8 +66,8 @@ CornerRadius="6"> @@ -224,8 +224,6 @@ Tag="{x:Bind}"> @@ -357,8 +357,8 @@ - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - + + - + + @@ -31,36 +31,36 @@ + Content="{x:Bind DisplayName}" /> + SetFlag="{StaticResource CommandBarItemSetFlagTemplate}" + Unarchive="{StaticResource CommandBarItemUnarchiveTemplate}" + Zoom="{StaticResource CommandBarItemZoomTemplate}" /> - + @@ -70,26 +70,26 @@ + ColumnSpacing="3"> + CommandParameter="{x:Bind}" + Text="{x:Bind domain:Translator.Buttons_Open}"> + CommandParameter="{x:Bind}" + Text="{x:Bind domain:Translator.Buttons_Save}"> @@ -108,9 +108,10 @@ ContentTemplateSelector="{StaticResource FileTypeIconSelector}" /> - + @@ -118,10 +119,10 @@ + Text="{x:Bind FileName}" + TextTrimming="CharacterEllipsis" + TextWrapping="Wrap" /> + Visibility="{x:Bind IsBusy, Mode=OneWay}" /> @@ -148,228 +149,241 @@ - + - - - - - - - - - - - - - - + Margin="0,0,0,7" + Background="{ThemeResource WorkZoneBackground}" + BorderBrush="{StaticResource CardStrokeColorDefaultBrush}" + BorderThickness="1" + CornerRadius="7"> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - + + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - - - - - - - - - - + + x:Load="{x:Bind ViewModel.ShouldDisplayDownloadProgress, Mode=OneWay}" + IsIndeterminate="{x:Bind ViewModel.IsIndetermineProgress, Mode=OneWay}" + Value="{x:Bind ViewModel.CurrentDownloadPercentage, Mode=OneWay}" /> + Severity="Warning">