557 lines
40 KiB
XML
557 lines
40 KiB
XML
<abstract:MailListPageAbstract
|
|
x:Class="Wino.Views.MailListPage"
|
|
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:collections="using:CommunityToolkit.Mvvm.Collections"
|
|
xmlns:controls="using:Wino.Controls"
|
|
xmlns:converters="using:Wino.Converters"
|
|
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"
|
|
xmlns:ic="using:Microsoft.Xaml.Interactions.Core"
|
|
xmlns:interactivity="using:Microsoft.Xaml.Interactivity"
|
|
xmlns:listview="using:Wino.Controls.Advanced"
|
|
xmlns:local="using:Wino.Behaviors"
|
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
|
xmlns:menuflyouts="using:Wino.MenuFlyouts"
|
|
xmlns:muxc="using:Microsoft.UI.Xaml.Controls"
|
|
xmlns:selectors="using:Wino.Selectors"
|
|
xmlns:toolkit="using:CommunityToolkit.WinUI.Controls"
|
|
xmlns:ui="using:Microsoft.Toolkit.Uwp.UI"
|
|
xmlns:viewModelData="using:Wino.Mail.ViewModels.Data"
|
|
xmlns:wino="using:Wino"
|
|
x:Name="root"
|
|
SizeChanged="PageSizeChanged"
|
|
mc:Ignorable="d">
|
|
|
|
<Page.Resources>
|
|
<CollectionViewSource
|
|
x:Name="MailCollectionViewSource"
|
|
IsSourceGrouped="True"
|
|
Source="{x:Bind ViewModel.MailCollection.MailItems, Mode=OneWay}" />
|
|
|
|
<Thickness x:Key="ExpanderHeaderPadding">0,0,0,0</Thickness>
|
|
<Thickness x:Key="ExpanderChevronMargin">0,0,12,0</Thickness>
|
|
<Thickness x:Key="ExpanderHeaderBorderThickness">0,0,0,0</Thickness>
|
|
|
|
<SolidColorBrush x:Key="CardBackgroundFillColorDefaultBrush">Transparent</SolidColorBrush>
|
|
<SolidColorBrush x:Key="CardBackgroundFillColorSecondaryBrush">Transparent</SolidColorBrush>
|
|
<SolidColorBrush x:Key="ExpanderContentBorderBrush">Transparent</SolidColorBrush>
|
|
|
|
<StaticResource x:Key="ExpanderContentBackground" ResourceKey="CardBackgroundFillColorSecondaryBrush" />
|
|
<StaticResource x:Key="ExpanderHeaderBackground" ResourceKey="CardBackgroundFillColorDefaultBrush" />
|
|
|
|
<SolidColorBrush x:Key="SystemControlRevealFocusVisualBrush" Color="#FF4C4A48" />
|
|
<SolidColorBrush x:Key="SystemControlFocusVisualSecondaryBrush" Color="#FFFFFFFF" />
|
|
|
|
<!-- Header Templates -->
|
|
<DataTemplate x:Key="MailGroupHeaderDefaultTemplate" x:DataType="collections:IReadOnlyObservableGroup">
|
|
<Grid
|
|
Margin="2,2,6,2"
|
|
AllowFocusOnInteraction="False"
|
|
Background="{ThemeResource MailListHeaderBackgroundColor}"
|
|
CornerRadius="6">
|
|
<TextBlock
|
|
Padding="12"
|
|
VerticalAlignment="Center"
|
|
AllowFocusOnInteraction="False"
|
|
FontSize="13"
|
|
FontWeight="SemiBold"
|
|
Text="{x:Bind helpers:XamlHelpers.GetMailGroupDateString(Key)}" />
|
|
</Grid>
|
|
</DataTemplate>
|
|
|
|
<!-- Swipe Items -->
|
|
<!--
|
|
TODO: Temporarily disabled. WinUI2 - SwipeControl crash.
|
|
https://github.com/microsoft/microsoft-ui-xaml/issues/2527
|
|
-->
|
|
|
|
<!--<muxc:SwipeItems x:Key="LeftSwipeItems" Mode="Execute">
|
|
<muxc:SwipeItem BehaviorOnInvoked="Close"
|
|
Invoked="LeftSwipeItemInvoked"
|
|
Text="{x:Bind domain:Translator.MailOperation_Delete}">
|
|
<muxc:SwipeItem.IconSource>
|
|
<controls:WinoFontIconSource Icon="Delete" />
|
|
</muxc:SwipeItem.IconSource>
|
|
<muxc:SwipeItem.Background>
|
|
<LinearGradientBrush StartPoint="0,0.5" EndPoint="1,0.5">
|
|
<GradientStop Offset="0.0" Color="#FFF5A6A6" />
|
|
<GradientStop Offset="0.5" Color="#FFEF4444" />
|
|
<GradientStop Offset="1.0" Color="#FFF32525" />
|
|
</LinearGradientBrush>
|
|
</muxc:SwipeItem.Background>
|
|
</muxc:SwipeItem>
|
|
</muxc:SwipeItems>
|
|
|
|
-->
|
|
|
|
<!--
|
|
<muxc:SwipeItems x:Key="RightSwipeItems" Mode="Execute">
|
|
<muxc:SwipeItem BehaviorOnInvoked="Close"
|
|
Invoked="RightSwipeItemInvoked"
|
|
Text="{x:Bind domain:Translator.MarkReadUnread}">
|
|
<muxc:SwipeItem.IconSource>
|
|
<controls:WinoFontIconSource Icon="MarkRead" />
|
|
</muxc:SwipeItem.IconSource>
|
|
</muxc:SwipeItem>
|
|
</muxc:SwipeItems>-->
|
|
|
|
<!-- Single Mail Item Template -->
|
|
<DataTemplate x:Key="SingleMailItemTemplate" x:DataType="viewModelData:MailItemViewModel">
|
|
<controls:MailItemDisplayInformationControl
|
|
x:DefaultBindMode="OneWay"
|
|
CenterHoverAction="{Binding ElementName=root, Path=ViewModel.PreferencesService.CenterHoverAction, Mode=OneWay}"
|
|
ContextRequested="MailItemContextRequested"
|
|
DisplayMode="{Binding ElementName=root, Path=ViewModel.PreferencesService.MailItemDisplayMode, Mode=OneWay}"
|
|
HoverActionExecutedCommand="{Binding ElementName=root, Path=ViewModel.ExecuteHoverActionCommand}"
|
|
IsAvatarVisible="{Binding ElementName=root, Path=ViewModel.PreferencesService.IsShowSenderPicturesEnabled, Mode=OneWay}"
|
|
IsCustomFocused="{x:Bind IsCustomFocused, Mode=OneWay}"
|
|
IsHoverActionsEnabled="{Binding ElementName=root, Path=ViewModel.PreferencesService.IsHoverActionsEnabled, Mode=OneWay}"
|
|
LeftHoverAction="{Binding ElementName=root, Path=ViewModel.PreferencesService.LeftHoverAction, Mode=OneWay}"
|
|
MailItem="{x:Bind MailCopy, Mode=OneWay}"
|
|
Prefer24HourTimeFormat="{Binding ElementName=root, Path=ViewModel.PreferencesService.Prefer24HourTimeFormat, Mode=OneWay}"
|
|
RightHoverAction="{Binding ElementName=root, Path=ViewModel.PreferencesService.RightHoverAction, Mode=OneWay}"
|
|
ShowPreviewText="{Binding ElementName=root, Path=ViewModel.PreferencesService.IsShowPreviewEnabled, Mode=OneWay}" />
|
|
</DataTemplate>
|
|
|
|
<!-- Single Mail Item Template for Threads -->
|
|
<DataTemplate x:Key="ThreadSingleMailItemTemplate" x:DataType="viewModelData:MailItemViewModel">
|
|
<controls:MailItemDisplayInformationControl
|
|
x:DefaultBindMode="OneWay"
|
|
CenterHoverAction="{Binding ElementName=root, Path=ViewModel.PreferencesService.CenterHoverAction, Mode=OneWay}"
|
|
ContextRequested="MailItemContextRequested"
|
|
DisplayMode="{Binding ElementName=root, Path=ViewModel.PreferencesService.MailItemDisplayMode, Mode=OneWay}"
|
|
FocusVisualMargin="8"
|
|
FocusVisualPrimaryBrush="{StaticResource SystemControlRevealFocusVisualBrush}"
|
|
FocusVisualPrimaryThickness="2"
|
|
FocusVisualSecondaryBrush="{StaticResource SystemControlFocusVisualSecondaryBrush}"
|
|
FocusVisualSecondaryThickness="1"
|
|
HoverActionExecutedCommand="{Binding ElementName=root, Path=ViewModel.ExecuteHoverActionCommand}"
|
|
IsAvatarVisible="{Binding ElementName=root, Path=ViewModel.PreferencesService.IsShowSenderPicturesEnabled, Mode=OneWay}"
|
|
IsCustomFocused="{x:Bind IsCustomFocused, Mode=OneWay}"
|
|
IsHoverActionsEnabled="{Binding ElementName=root, Path=ViewModel.PreferencesService.IsHoverActionsEnabled, Mode=OneWay}"
|
|
LeftHoverAction="{Binding ElementName=root, Path=ViewModel.PreferencesService.LeftHoverAction, Mode=OneWay}"
|
|
MailItem="{x:Bind MailCopy, Mode=OneWay}"
|
|
Prefer24HourTimeFormat="{Binding ElementName=root, Path=ViewModel.PreferencesService.Prefer24HourTimeFormat, Mode=OneWay}"
|
|
RightHoverAction="{Binding ElementName=root, Path=ViewModel.PreferencesService.RightHoverAction, Mode=OneWay}"
|
|
ShowPreviewText="{Binding ElementName=root, Path=ViewModel.PreferencesService.IsShowPreviewEnabled, Mode=OneWay}" />
|
|
</DataTemplate>
|
|
|
|
<!-- Mail Item Content Selector -->
|
|
<selectors:MailItemDisplaySelector x:Key="MailItemDisplaySelector" SingleMailItemTemplate="{StaticResource SingleMailItemTemplate}">
|
|
<selectors:MailItemDisplaySelector.ThreadMailItemTemplate>
|
|
<DataTemplate x:DataType="viewModelData:ThreadMailItemViewModel">
|
|
<controls:WinoExpander
|
|
x:Name="ThreadExpander"
|
|
HorizontalAlignment="Stretch"
|
|
HorizontalContentAlignment="Stretch"
|
|
IsExpanded="{x:Bind IsThreadExpanded, Mode=TwoWay}">
|
|
<controls:WinoExpander.Header>
|
|
<controls:MailItemDisplayInformationControl
|
|
x:DefaultBindMode="OneWay"
|
|
Background="Transparent"
|
|
BorderThickness="0"
|
|
CenterHoverAction="{Binding ElementName=root, Path=ViewModel.PreferencesService.CenterHoverAction, Mode=OneWay}"
|
|
ConnectedExpander="{Binding ElementName=ThreadExpander}"
|
|
ContextRequested="MailItemContextRequested"
|
|
DisplayMode="{Binding ElementName=root, Path=ViewModel.PreferencesService.MailItemDisplayMode, Mode=OneWay}"
|
|
DragStarting="ThreadHeaderDragStart"
|
|
DropCompleted="ThreadHeaderDragFinished"
|
|
HoverActionExecutedCommand="{Binding ElementName=root, Path=ViewModel.ExecuteHoverActionCommand}"
|
|
IsAvatarVisible="{Binding ElementName=root, Path=ViewModel.PreferencesService.IsShowSenderPicturesEnabled, Mode=OneWay}"
|
|
IsHitTestVisible="True"
|
|
IsHoverActionsEnabled="{Binding ElementName=root, Path=ViewModel.PreferencesService.IsHoverActionsEnabled, Mode=OneWay}"
|
|
IsThreadExpanded="{x:Bind IsThreadExpanded, Mode=TwoWay}"
|
|
IsThreadExpanderVisible="True"
|
|
LeftHoverAction="{Binding ElementName=root, Path=ViewModel.PreferencesService.LeftHoverAction, Mode=OneWay}"
|
|
MailItem="{x:Bind MailItem, Mode=OneWay}"
|
|
Prefer24HourTimeFormat="{Binding ElementName=root, Path=ViewModel.PreferencesService.Prefer24HourTimeFormat, Mode=OneWay}"
|
|
RightHoverAction="{Binding ElementName=root, Path=ViewModel.PreferencesService.RightHoverAction, Mode=OneWay}"
|
|
ShowPreviewText="{Binding ElementName=root, Path=ViewModel.PreferencesService.IsShowPreviewEnabled, Mode=OneWay}" />
|
|
</controls:WinoExpander.Header>
|
|
<controls:WinoExpander.Content>
|
|
<listview:WinoListView
|
|
x:Name="ThreadItemsList"
|
|
ui:ListViewExtensions.ItemContainerStretchDirection="Horizontal"
|
|
IsThreadListView="True"
|
|
ItemTemplate="{StaticResource ThreadSingleMailItemTemplate}"
|
|
ItemsSource="{x:Bind ThreadItems}"
|
|
ProcessKeyboardAccelerators="ProcessMailItemKeyboardAccelerator"
|
|
ScrollViewer.VerticalScrollBarVisibility="Hidden">
|
|
<ListView.ItemContainerTransitions>
|
|
<TransitionCollection>
|
|
<EdgeUIThemeTransition />
|
|
</TransitionCollection>
|
|
</ListView.ItemContainerTransitions>
|
|
</listview:WinoListView>
|
|
</controls:WinoExpander.Content>
|
|
</controls:WinoExpander>
|
|
</DataTemplate>
|
|
</selectors:MailItemDisplaySelector.ThreadMailItemTemplate>
|
|
</selectors:MailItemDisplaySelector>
|
|
|
|
<SolidColorBrush x:Key="ButtonBackgroundDisabled">Transparent</SolidColorBrush>
|
|
</Page.Resources>
|
|
|
|
<wino:BasePage.ShellContent>
|
|
<Grid>
|
|
<!-- Hidden focus receiver... -->
|
|
<TextBox
|
|
Grid.Column="1"
|
|
HorizontalAlignment="Right"
|
|
VerticalAlignment="Bottom"
|
|
Opacity="0"
|
|
Visibility="Collapsed" />
|
|
|
|
<AutoSuggestBox
|
|
x:Name="SearchBar"
|
|
Margin="2,0,-2,0"
|
|
VerticalAlignment="Center"
|
|
BorderBrush="Transparent"
|
|
GotFocus="SearchBoxFocused"
|
|
LostFocus="SearchBarUnfocused"
|
|
PlaceholderText="{x:Bind domain:Translator.SearchBarPlaceholder}"
|
|
QueryIcon="Find"
|
|
Text="{x:Bind ViewModel.SearchQuery, Mode=TwoWay}"
|
|
TextChanged="SearchBar_TextChanged">
|
|
<i:Interaction.Behaviors>
|
|
<ic:EventTriggerBehavior EventName="QuerySubmitted">
|
|
<ic:InvokeCommandAction Command="{x:Bind ViewModel.PerformSearchCommand}" />
|
|
</ic:EventTriggerBehavior>
|
|
</i:Interaction.Behaviors>
|
|
</AutoSuggestBox>
|
|
</Grid>
|
|
</wino:BasePage.ShellContent>
|
|
|
|
<Grid x:Name="RootGrid" Padding="0,0,0,7">
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition x:Name="MailListColumn" Width="{x:Bind ViewModel.MailListLength, Mode=OneWay, Converter={StaticResource GridLengthConverter}}" />
|
|
<ColumnDefinition x:Name="RendererColumn" Width="*" />
|
|
</Grid.ColumnDefinitions>
|
|
|
|
<!-- Mail Items -->
|
|
<Border
|
|
x:Name="MailListContainer"
|
|
Grid.Column="0"
|
|
Padding="5,5,5,0"
|
|
HorizontalAlignment="Stretch"
|
|
Background="{ThemeResource WinoContentZoneBackgroud}"
|
|
BorderBrush="{StaticResource CardStrokeColorDefaultBrush}"
|
|
BorderThickness="1"
|
|
CornerRadius="7">
|
|
<Grid x:Name="MailListGrid">
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="Auto" />
|
|
<RowDefinition Height="Auto" />
|
|
<RowDefinition Height="*" />
|
|
</Grid.RowDefinitions>
|
|
|
|
<!-- Action bar -->
|
|
<Grid
|
|
Margin="0,0,0,5"
|
|
Background="{ThemeResource ApplicationPageBackgroundThemeBrush}"
|
|
CornerRadius="8"
|
|
Visibility="{x:Bind ViewModel.PreferencesService.IsMailListActionBarEnabled}">
|
|
<CommandBar
|
|
HorizontalAlignment="Left"
|
|
DefaultLabelPosition="Collapsed"
|
|
IsEnabled="{x:Bind helpers:XamlHelpers.CountToBooleanConverter(ViewModel.SelectedItemCount), Mode=OneWay}"
|
|
OverflowButtonVisibility="Auto">
|
|
<interactivity:Interaction.Behaviors>
|
|
<local:BindableCommandBarBehavior ItemClickedCommand="{x:Bind ViewModel.ExecuteTopBarActionCommand}" PrimaryCommands="{x:Bind ViewModel.ActionItems, Mode=OneWay}" />
|
|
</interactivity:Interaction.Behaviors>
|
|
</CommandBar>
|
|
</Grid>
|
|
|
|
<!-- Pivot + Sync + Multi Select -->
|
|
<Grid Grid.Row="1" Padding="0,0,0,6">
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="Auto" />
|
|
<ColumnDefinition Width="*" />
|
|
<ColumnDefinition Width="Auto" />
|
|
</Grid.ColumnDefinitions>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="Auto" />
|
|
<RowDefinition Height="Auto" />
|
|
</Grid.RowDefinitions>
|
|
|
|
<!-- Select All Checkbox -->
|
|
<CheckBox
|
|
x:Name="SelectAllCheckbox"
|
|
Grid.Row="1"
|
|
MinWidth="0"
|
|
Margin="8,0,0,0"
|
|
VerticalAlignment="Center"
|
|
Canvas.ZIndex="100"
|
|
Checked="SelectAllCheckboxChecked"
|
|
Unchecked="SelectAllCheckboxUnchecked"
|
|
Visibility="{x:Bind helpers:XamlHelpers.IsSelectionModeMultiple(MailListView.SelectionMode), Mode=OneWay}" />
|
|
|
|
<!-- Folders -->
|
|
<toolkit:Segmented
|
|
Grid.Row="1"
|
|
Grid.Column="1"
|
|
ItemsSource="{x:Bind ViewModel.PivotFolders, Mode=OneWay}"
|
|
SelectedItem="{x:Bind ViewModel.SelectedFolderPivot, Mode=TwoWay}"
|
|
SelectionChanged="FolderPivotChanged"
|
|
Style="{StaticResource PivotSegmentedStyle}">
|
|
<toolkit:Segmented.ItemTemplate>
|
|
<DataTemplate x:DataType="viewModelData:FolderPivotViewModel">
|
|
<StackPanel Orientation="Horizontal">
|
|
<TextBlock Text="{x:Bind FolderTitle}" />
|
|
<TextBlock
|
|
Margin="4,0,0,0"
|
|
FontWeight="SemiBold"
|
|
Visibility="{x:Bind ShouldDisplaySelectedItemCount, Mode=OneWay}">
|
|
<Run Text="(" /><Run Text="{x:Bind SelectedItemCount, Mode=OneWay}" /><Run Text=")" />
|
|
</TextBlock>
|
|
</StackPanel>
|
|
</DataTemplate>
|
|
</toolkit:Segmented.ItemTemplate>
|
|
</toolkit:Segmented>
|
|
|
|
<!-- Sync + Multi Select + Filtering -->
|
|
<StackPanel
|
|
Grid.Row="1"
|
|
Grid.Column="2"
|
|
Orientation="Horizontal">
|
|
<Button
|
|
Width="36"
|
|
Height="36"
|
|
Background="Transparent"
|
|
BorderThickness="0"
|
|
Command="{x:Bind ViewModel.SyncFolderCommand}"
|
|
IsEnabled="{x:Bind ViewModel.CanSynchronize, Mode=OneWay}"
|
|
ToolTipService.ToolTip="{x:Bind domain:Translator.Buttons_Sync}">
|
|
<Button.Content>
|
|
<Viewbox Width="14" Height="14">
|
|
<PathIcon
|
|
HorizontalAlignment="Center"
|
|
VerticalAlignment="Center"
|
|
Data="F1 M 20 1.875 L 20 6.875 C 20 7.044271 19.93815 7.190756 19.814453 7.314453 C 19.690754 7.438151 19.54427 7.5 19.375 7.5 L 14.375 7.5 C 14.205729 7.5 14.059244 7.438151 13.935547 7.314453 C 13.811849 7.190756 13.75 7.044271 13.75 6.875 C 13.75 6.705729 13.811849 6.559245 13.935547 6.435547 C 14.059244 6.31185 14.205729 6.25 14.375 6.25 L 17.900391 6.25 C 17.542316 5.46875 17.084961 4.768881 16.52832 4.150391 C 15.97168 3.531902 15.345052 3.007812 14.648438 2.578125 C 13.951822 2.148438 13.201497 1.819662 12.397461 1.591797 C 11.593424 1.363934 10.764974 1.25 9.912109 1.25 C 9.189453 1.25 8.478189 1.344402 7.77832 1.533203 C 7.07845 1.722006 6.416016 1.988934 5.791016 2.333984 C 5.166016 2.679037 4.586588 3.095703 4.052734 3.583984 C 3.51888 4.072266 3.053385 4.615886 2.65625 5.214844 C 2.402344 5.598959 2.184245 6.00586 2.001953 6.435547 C 1.95638 6.539714 1.91569 6.647136 1.879883 6.757812 C 1.844075 6.86849 1.80013 6.975912 1.748047 7.080078 C 1.676432 7.210287 1.601562 7.312826 1.523438 7.387695 C 1.445312 7.462565 1.32487 7.5 1.162109 7.5 C 0.992839 7.5 0.846354 7.438151 0.722656 7.314453 C 0.598958 7.190756 0.537109 7.044271 0.537109 6.875 C 0.537109 6.796876 0.546875 6.728517 0.566406 6.669922 C 0.911458 5.69336 1.396484 4.798178 2.021484 3.984375 C 2.646484 3.170574 3.369141 2.467449 4.189453 1.875 C 5.009766 1.282553 5.906575 0.821941 6.879883 0.493164 C 7.85319 0.164389 8.857422 0 9.892578 0 C 10.810547 0 11.705729 0.117188 12.578125 0.351562 C 13.45052 0.585938 14.269205 0.922852 15.03418 1.362305 C 15.799153 1.801758 16.499023 2.342123 17.133789 2.983398 C 17.768555 3.624676 18.307291 4.348959 18.75 5.15625 L 18.75 1.875 C 18.75 1.70573 18.811848 1.559246 18.935547 1.435547 C 19.059244 1.31185 19.205729 1.25 19.375 1.25 C 19.54427 1.25 19.690754 1.31185 19.814453 1.435547 C 19.93815 1.559246 20 1.70573 20 1.875 Z M 19.335938 13.125 C 19.335938 13.235678 19.291992 13.400065 19.204102 13.618164 C 19.116211 13.836264 19.013672 14.0625 18.896484 14.296875 C 18.779297 14.53125 18.66048 14.755859 18.540039 14.970703 C 18.419596 15.185547 18.323566 15.345053 18.251953 15.449219 C 17.789713 16.139324 17.25423 16.764324 16.645508 17.324219 C 16.036783 17.884115 15.377604 18.362631 14.667969 18.759766 C 13.958333 19.1569 13.208008 19.462891 12.416992 19.677734 C 11.625977 19.892578 10.810547 20 9.970703 20 C 9.072266 20 8.198242 19.890951 7.348633 19.672852 C 6.499023 19.454752 5.698242 19.135742 4.946289 18.71582 C 4.194336 18.295898 3.502604 17.779947 2.871094 17.167969 C 2.239583 16.55599 1.699219 15.859375 1.25 15.078125 L 1.25 18.125 C 1.25 18.294271 1.188151 18.440756 1.064453 18.564453 C 0.940755 18.68815 0.794271 18.75 0.625 18.75 C 0.455729 18.75 0.309245 18.68815 0.185547 18.564453 C 0.061849 18.440756 0 18.294271 0 18.125 L 0 13.125 C 0 12.955729 0.061849 12.809245 0.185547 12.685547 C 0.309245 12.56185 0.455729 12.5 0.625 12.5 L 5.625 12.5 C 5.794271 12.5 5.940755 12.56185 6.064453 12.685547 C 6.188151 12.809245 6.25 12.955729 6.25 13.125 C 6.25 13.294271 6.188151 13.440756 6.064453 13.564453 C 5.940755 13.688151 5.794271 13.75 5.625 13.75 L 1.962891 13.75 C 2.320963 14.53125 2.779948 15.23112 3.339844 15.849609 C 3.89974 16.4681 4.526367 16.992188 5.219727 17.421875 C 5.913086 17.851562 6.661784 18.180338 7.46582 18.408203 C 8.269856 18.636068 9.098307 18.75 9.951172 18.75 C 10.673828 18.75 11.383463 18.657227 12.080078 18.47168 C 12.776691 18.286133 13.439127 18.020834 14.067383 17.675781 C 14.695638 17.330729 15.276692 16.914062 15.810547 16.425781 C 16.3444 15.9375 16.809895 15.390625 17.207031 14.785156 C 17.460938 14.401042 17.679035 13.994141 17.861328 13.564453 C 17.9069 13.460287 17.94759 13.352865 17.983398 13.242188 C 18.019205 13.131511 18.06315 13.024089 18.115234 12.919922 C 18.186848 12.789714 18.261719 12.687175 18.339844 12.612305 C 18.417969 12.537436 18.53841 12.5 18.701172 12.5 C 18.876953 12.5 19.026691 12.560222 19.150391 12.680664 C 19.274088 12.801107 19.335938 12.949219 19.335938 13.125 Z " />
|
|
</Viewbox>
|
|
</Button.Content>
|
|
</Button>
|
|
<ToggleButton
|
|
x:Name="SelectionModeToggle"
|
|
Width="36"
|
|
Height="36"
|
|
Background="Transparent"
|
|
BorderThickness="0"
|
|
Checked="SelectionModeToggleChecked"
|
|
IsChecked="{x:Bind ViewModel.IsMultiSelectionModeEnabled, Mode=TwoWay}"
|
|
ToolTipService.ToolTip="{x:Bind domain:Translator.Buttons_Multiselect}"
|
|
Unchecked="SelectionModeToggleUnchecked">
|
|
<ToggleButton.Content>
|
|
<Viewbox Width="14" Height="14">
|
|
<PathIcon
|
|
HorizontalAlignment="Center"
|
|
VerticalAlignment="Center"
|
|
Data="F1 M 0 4.375 C 0 4.20573 0.061849 4.059246 0.185547 3.935547 C 0.309245 3.81185 0.455729 3.75 0.625 3.75 C 0.794271 3.75 0.940755 3.81185 1.064453 3.935547 L 1.875 4.736328 L 5.185547 1.435547 C 5.309245 1.31185 5.455729 1.25 5.625 1.25 C 5.794271 1.25 5.940755 1.31185 6.064453 1.435547 C 6.188151 1.559246 6.25 1.70573 6.25 1.875 C 6.25 2.044271 6.188151 2.190756 6.064453 2.314453 L 2.314453 6.064453 C 2.190755 6.188151 2.044271 6.25 1.875 6.25 C 1.705729 6.25 1.559245 6.188151 1.435547 6.064453 L 0.185547 4.814453 C 0.061849 4.690756 0 4.544271 0 4.375 Z M 8.125 5 C 7.955729 5.000001 7.809245 4.938152 7.685547 4.814453 C 7.561849 4.690756 7.5 4.544271 7.5 4.375 C 7.5 4.20573 7.561849 4.059246 7.685547 3.935547 C 7.809245 3.81185 7.955729 3.75 8.125 3.75 L 19.375 3.75 C 19.54427 3.75 19.690754 3.81185 19.814453 3.935547 C 19.93815 4.059246 20 4.20573 20 4.375 C 20 4.544271 19.93815 4.690756 19.814453 4.814453 C 19.690754 4.938152 19.54427 5.000001 19.375 5 Z M 8.125 11.25 C 7.955729 11.25 7.809245 11.188151 7.685547 11.064453 C 7.561849 10.940756 7.5 10.794271 7.5 10.625 C 7.5 10.455729 7.561849 10.309245 7.685547 10.185547 C 7.809245 10.06185 7.955729 10 8.125 10 L 19.375 10 C 19.54427 10 19.690754 10.06185 19.814453 10.185547 C 19.93815 10.309245 20 10.455729 20 10.625 C 20 10.794271 19.93815 10.940756 19.814453 11.064453 C 19.690754 11.188151 19.54427 11.25 19.375 11.25 Z M 0 16.875 C 0 16.705729 0.061849 16.559244 0.185547 16.435547 C 0.309245 16.31185 0.455729 16.25 0.625 16.25 C 0.794271 16.25 0.940755 16.31185 1.064453 16.435547 L 1.875 17.236328 L 5.185547 13.935547 C 5.309245 13.81185 5.455729 13.75 5.625 13.75 C 5.794271 13.75 5.940755 13.81185 6.064453 13.935547 C 6.188151 14.059245 6.25 14.205729 6.25 14.375 C 6.25 14.544271 6.188151 14.690756 6.064453 14.814453 L 2.314453 18.564453 C 2.190755 18.68815 2.044271 18.75 1.875 18.75 C 1.705729 18.75 1.559245 18.68815 1.435547 18.564453 L 0.185547 17.314453 C 0.061849 17.190756 0 17.044271 0 16.875 Z M 8.125 17.5 C 7.955729 17.5 7.809245 17.43815 7.685547 17.314453 C 7.561849 17.190756 7.5 17.044271 7.5 16.875 C 7.5 16.705729 7.561849 16.559244 7.685547 16.435547 C 7.809245 16.31185 7.955729 16.25 8.125 16.25 L 19.375 16.25 C 19.54427 16.25 19.690754 16.31185 19.814453 16.435547 C 19.93815 16.559244 20 16.705729 20 16.875 C 20 17.044271 19.93815 17.190756 19.814453 17.314453 C 19.690754 17.43815 19.54427 17.5 19.375 17.5 Z " />
|
|
</Viewbox>
|
|
</ToggleButton.Content>
|
|
</ToggleButton>
|
|
<muxc:DropDownButton
|
|
Height="36"
|
|
Background="Transparent"
|
|
BorderThickness="0"
|
|
Content="{x:Bind ViewModel.SelectedFilterOption.Title, Mode=OneWay}"
|
|
ToolTipService.ToolTip="Filter">
|
|
<muxc:DropDownButton.Flyout>
|
|
<menuflyouts:FilterMenuFlyout
|
|
x:Name="FilterMenuFlyout"
|
|
AreOpenCloseAnimationsEnabled="True"
|
|
FilterOptions="{x:Bind ViewModel.FilterOptions, Mode=OneTime}"
|
|
Placement="Bottom"
|
|
SelectedFilterChangedCommand="{x:Bind ViewModel.SelectedFilterChangedCommand}"
|
|
SelectedFilterOption="{x:Bind ViewModel.SelectedFilterOption, Mode=TwoWay}"
|
|
SelectedSortingOption="{x:Bind ViewModel.SelectedSortingOption, Mode=TwoWay}"
|
|
SelectedSortingOptionChangedCommand="{x:Bind ViewModel.SelectedSortingChangedCommand}"
|
|
SortingOptions="{x:Bind ViewModel.SortingOptions, Mode=OneTime}" />
|
|
</muxc:DropDownButton.Flyout>
|
|
</muxc:DropDownButton>
|
|
</StackPanel>
|
|
|
|
<muxc:InfoBar
|
|
Title="{x:Bind domain:Translator.InfoBarTitle_SynchronizationDisabledFolder}"
|
|
Grid.Row="0"
|
|
Grid.ColumnSpan="3"
|
|
IsClosable="True"
|
|
IsOpen="{x:Bind ViewModel.IsFolderSynchronizationEnabled, Converter={StaticResource ReverseBooleanConverter}, Mode=OneWay}"
|
|
Message="{x:Bind domain:Translator.InfoBarMessage_SynchronizationDisabledFolder}"
|
|
Severity="Informational">
|
|
<muxc:InfoBar.ActionButton>
|
|
<Button Command="{x:Bind ViewModel.EnableFolderSynchronizationCommand}" Content="Enable" />
|
|
</muxc:InfoBar.ActionButton>
|
|
</muxc:InfoBar>
|
|
</Grid>
|
|
|
|
<!-- No items createria -->
|
|
<StackPanel
|
|
x:Name="NoItemsPanel"
|
|
Grid.Row="2"
|
|
Grid.RowSpan="3"
|
|
HorizontalAlignment="Stretch"
|
|
VerticalAlignment="Center"
|
|
Spacing="10">
|
|
|
|
<Viewbox
|
|
Width="48"
|
|
Opacity="0.4"
|
|
Visibility="{x:Bind ViewModel.IsEmpty, Mode=OneWay}">
|
|
<Path Data="M252,960C227,960 203.083,954.917 180.25,944.75C157.417,934.583 137.417,920.917 120.25,903.75C103.083,886.583 89.4167,866.583 79.25,843.75C69.0833,820.917 64,797 64,772L64,252C64,227 69.0833,203.083 79.25,180.25C89.4167,157.417 103.083,137.417 120.25,120.25C137.417,103.083 157.417,89.4167 180.25,79.25C203.083,69.0834 227,64.0001 252,64L772,64C797,64.0001 820.917,69.0834 843.75,79.25C866.583,89.4167 886.583,103.083 903.75,120.25C920.917,137.417 934.583,157.417 944.75,180.25C954.917,203.083 960,227 960,252L960,772C960,797 954.917,820.917 944.75,843.75C934.583,866.583 920.917,886.583 903.75,903.75C886.583,920.917 866.583,934.583 843.75,944.75C820.917,954.917 797,960 772,960ZM770.5,896C787.167,896 803.083,892.583 818.25,885.75C833.417,878.917 846.75,869.75 858.25,858.25C869.75,846.75 878.917,833.417 885.75,818.25C892.583,803.083 896,787.167 896,770.5L896,253.5C896,236.833 892.583,220.917 885.75,205.75C878.917,190.583 869.75,177.25 858.25,165.75C846.75,154.25 833.417,145.083 818.25,138.25C803.083,131.417 787.167,128 770.5,128L253.5,128C236.833,128 220.917,131.417 205.75,138.25C190.583,145.083 177.25,154.25 165.75,165.75C154.25,177.25 145.083,190.583 138.25,205.75C131.417,220.917 128,236.833 128,253.5L128,770.5C128,787.167 131.417,803.083 138.25,818.25C145.083,833.417 154.25,846.75 165.75,858.25C177.25,869.75 190.583,878.917 205.75,885.75C220.917,892.583 236.833,896 253.5,896ZM559,604.5C541.667,616.833 523.417,625.833 504.25,631.5C485.083,637.167 465,640 444,640C418,640 393.583,634.833 370.75,624.5C347.917,614.167 328,600.167 311,582.5C294,564.833 280.583,544.417 270.75,521.25C260.917,498.083 256,473.667 256,448C256,421.333 261,396.333 271,373C281,349.667 294.667,329.333 312,312C329.333,294.667 349.667,281 373,271C396.333,261 421.333,256 448,256C473.667,256 498.083,260.917 521.25,270.75C544.417,280.583 564.833,294 582.5,311C600.167,328 614.167,347.917 624.5,370.75C634.833,393.583 640,418 640,444C640,465 637.167,485.083 631.5,504.25C625.833,523.417 616.833,541.667 604.5,559L758.5,713.5C764.833,719.833 768,727.333 768,736C768,744.667 764.833,752.167 758.5,758.5C752.167,764.833 744.667,768 736,768C727.333,768 719.833,764.833 713.5,758.5ZM576,448L576,445.5C576,428.167 572.5,411.917 565.5,396.75C558.5,381.583 549.167,368.333 537.5,357C525.833,345.667 512.25,336.667 496.75,330C481.25,323.333 465,320 448,320C430.333,320 413.75,323.417 398.25,330.25C382.75,337.083 369.25,346.25 357.75,357.75C346.25,369.25 337.083,382.833 330.25,398.5C323.417,414.167 320,430.667 320,448C320,465.667 323.417,482.25 330.25,497.75C337.083,513.25 346.25,526.75 357.75,538.25C369.25,549.75 382.75,558.917 398.25,565.75C413.75,572.583 430.333,576 448,576C465.333,576 481.833,572.583 497.5,565.75C513.167,558.917 526.75,549.75 538.25,538.25C549.75,526.75 558.917,513.25 565.75,497.75C572.583,482.25 576,465.667 576,448Z" Fill="{ThemeResource InformationBrush}" />
|
|
</Viewbox>
|
|
|
|
<TextBlock
|
|
HorizontalAlignment="Center"
|
|
FontSize="20"
|
|
FontWeight="ExtraLight"
|
|
Foreground="{ThemeResource InformationBrush}"
|
|
Opacity="0.4"
|
|
Text="{x:Bind domain:Translator.NoMessageCrieteria}"
|
|
Visibility="{x:Bind ViewModel.IsCriteriaFailed, Mode=OneWay}" />
|
|
|
|
<TextBlock
|
|
HorizontalAlignment="Center"
|
|
FontSize="20"
|
|
FontWeight="ExtraLight"
|
|
Foreground="{ThemeResource InformationBrush}"
|
|
Opacity="0.4"
|
|
Text="{x:Bind domain:Translator.NoMessageEmptyFolder}"
|
|
Visibility="{x:Bind ViewModel.IsFolderEmpty, Mode=OneWay}" />
|
|
|
|
<muxc:ProgressRing
|
|
x:Name="LoadingProgressIndicator"
|
|
Grid.Row="2"
|
|
HorizontalAlignment="Center"
|
|
VerticalAlignment="Center"
|
|
x:Load="{x:Bind ViewModel.IsProgressRing, Mode=OneWay}"
|
|
Canvas.ZIndex="999" />
|
|
</StackPanel>
|
|
|
|
<!-- Mail Items -->
|
|
<muxc:RefreshContainer
|
|
Grid.Row="2"
|
|
RefreshRequested="PullToRefreshRequested"
|
|
Visibility="{x:Bind ViewModel.IsEmpty, Converter={StaticResource ReverseBooleanToVisibilityConverter}, Mode=OneWay}">
|
|
<SemanticZoom x:Name="SemanticZoomContainer" CanChangeViews="{x:Bind ViewModel.PreferencesService.IsSemanticZoomEnabled, Mode=OneWay}">
|
|
<SemanticZoom.ZoomedInView>
|
|
<listview:WinoListView
|
|
x:Name="MailListView"
|
|
HorizontalAlignment="Stretch"
|
|
HorizontalContentAlignment="Stretch"
|
|
ui:ListViewExtensions.ItemContainerStretchDirection="Horizontal"
|
|
ui:ScrollViewerExtensions.EnableMiddleClickScrolling="True"
|
|
ui:ScrollViewerExtensions.VerticalScrollBarMargin="0"
|
|
ItemDeletedCommand="{x:Bind ViewModel.ExecuteMailOperationCommand}"
|
|
ItemTemplateSelector="{StaticResource MailItemDisplaySelector}"
|
|
ItemsSource="{x:Bind MailCollectionViewSource.View, Mode=OneWay}"
|
|
LoadMoreCommand="{x:Bind ViewModel.LoadMoreItemsCommand}"
|
|
ProcessKeyboardAccelerators="ProcessMailItemKeyboardAccelerator"
|
|
ScrollViewer.VerticalScrollBarVisibility="Auto">
|
|
<ListView.ItemContainerTransitions>
|
|
<TransitionCollection>
|
|
<AddDeleteThemeTransition />
|
|
</TransitionCollection>
|
|
</ListView.ItemContainerTransitions>
|
|
<ListView.ItemsPanel>
|
|
<ItemsPanelTemplate>
|
|
<ItemsStackPanel AreStickyGroupHeadersEnabled="True" />
|
|
</ItemsPanelTemplate>
|
|
</ListView.ItemsPanel>
|
|
<ListView.Resources>
|
|
<ResourceDictionary>
|
|
<Style BasedOn="{StaticResource MailListHeaderStyle}" TargetType="ListViewHeaderItem" />
|
|
</ResourceDictionary>
|
|
</ListView.Resources>
|
|
<ListView.GroupStyle>
|
|
<GroupStyle HeaderTemplate="{StaticResource MailGroupHeaderDefaultTemplate}" HidesIfEmpty="True" />
|
|
</ListView.GroupStyle>
|
|
</listview:WinoListView>
|
|
</SemanticZoom.ZoomedInView>
|
|
<SemanticZoom.ZoomedOutView>
|
|
<ListView
|
|
x:Name="ZoomOutList"
|
|
x:Load="{x:Bind helpers:XamlHelpers.ReverseBoolConverter(SemanticZoomContainer.IsZoomedInViewActive), Mode=OneWay}"
|
|
ItemsSource="{x:Bind MailCollectionViewSource.View.CollectionGroups}">
|
|
<ListView.Resources>
|
|
<Style TargetType="ListViewItem">
|
|
<Setter Property="HorizontalContentAlignment" Value="Stretch" />
|
|
<Setter Property="VerticalContentAlignment" Value="Stretch" />
|
|
<Setter Property="Margin" Value="0,12" />
|
|
<Setter Property="Padding" Value="0" />
|
|
</Style>
|
|
</ListView.Resources>
|
|
<ListView.ItemTemplate>
|
|
<DataTemplate x:DataType="ICollectionViewGroup">
|
|
<Grid Background="{ThemeResource MailListHeaderBackgroundColor}" CornerRadius="4">
|
|
<TextBlock
|
|
Margin="12,0"
|
|
HorizontalAlignment="Center"
|
|
VerticalAlignment="Center"
|
|
FontWeight="SemiBold"
|
|
Text="{x:Bind helpers:XamlHelpers.GetMailGroupDateString(Group)}" />
|
|
</Grid>
|
|
</DataTemplate>
|
|
</ListView.ItemTemplate>
|
|
</ListView>
|
|
</SemanticZoom.ZoomedOutView>
|
|
</SemanticZoom>
|
|
</muxc:RefreshContainer>
|
|
|
|
|
|
<!-- Update Info Bar -->
|
|
<controls:WinoInfoBar
|
|
Title="{x:Bind ViewModel.BarTitle, Mode=OneWay}"
|
|
Grid.Row="2"
|
|
Margin="0,0,0,5"
|
|
VerticalAlignment="Bottom"
|
|
AnimationType="SlideFromBottomToTop"
|
|
DismissInterval="2"
|
|
IsClosable="False"
|
|
IsOpen="{x:Bind ViewModel.IsBarOpen, Mode=TwoWay}"
|
|
Message="{x:Bind ViewModel.BarMessage, Mode=OneWay}"
|
|
Severity="{x:Bind helpers:XamlHelpers.InfoBarSeverityConverter(ViewModel.BarSeverity), Mode=OneWay}" />
|
|
|
|
</Grid>
|
|
</Border>
|
|
<toolkit:PropertySizer
|
|
x:Name="MailListSizer"
|
|
Grid.Column="1"
|
|
Width="16"
|
|
HorizontalAlignment="Left"
|
|
Binding="{x:Bind ViewModel.MailListLength, Mode=TwoWay}"
|
|
Canvas.ZIndex="20"
|
|
ManipulationCompleted="MailListSizerManipulationCompleted"
|
|
Maximum="{x:Bind ViewModel.MaxMailListLength, Mode=OneWay}"
|
|
Minimum="270"
|
|
Opacity="0" />
|
|
|
|
<Grid x:Name="RenderingGrid" Grid.Column="1">
|
|
<!-- Mail Rendering Frame -->
|
|
<Frame x:Name="RenderingFrame" IsNavigationStackEnabled="False" />
|
|
|
|
<!-- No Mail Selected Message -->
|
|
<StackPanel
|
|
x:Name="NoMailSelectedPanel"
|
|
HorizontalAlignment="Center"
|
|
VerticalAlignment="Center"
|
|
Opacity="0.5"
|
|
Spacing="6">
|
|
|
|
<controls:WinoFontIcon FontSize="80" Icon="Mail" />
|
|
|
|
<TextBlock
|
|
HorizontalAlignment="Center"
|
|
FontSize="31"
|
|
Style="{StaticResource SubheaderTextBlockStyle}"
|
|
Text="{x:Bind ViewModel.SelectedMessageText, Mode=OneWay}" />
|
|
</StackPanel>
|
|
</Grid>
|
|
</Grid>
|
|
</abstract:MailListPageAbstract>
|