Merge main
This commit is contained in:
@@ -11,7 +11,8 @@
|
||||
ChangeFlag,
|
||||
AlwaysMoveTo,
|
||||
MoveToFocused,
|
||||
RenameFolder
|
||||
RenameFolder,
|
||||
Archive
|
||||
}
|
||||
|
||||
// UI requests
|
||||
|
||||
66
Wino.Core/Requests/ArchiveRequest.cs
Normal file
66
Wino.Core/Requests/ArchiveRequest.cs
Normal file
@@ -0,0 +1,66 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using CommunityToolkit.Mvvm.Messaging;
|
||||
using MoreLinq;
|
||||
using Wino.Core.Domain.Entities;
|
||||
using Wino.Core.Domain.Enums;
|
||||
using Wino.Core.Domain.Interfaces;
|
||||
using Wino.Core.Domain.Models.Requests;
|
||||
|
||||
namespace Wino.Core.Requests
|
||||
{
|
||||
/// <summary>
|
||||
/// Archive message request.
|
||||
/// By default, the message will be moved to the Archive folder.
|
||||
/// For Gmail, 'Archive' label will be removed from the message.
|
||||
/// </summary>
|
||||
/// <param name="IsArchiving">Whether are archiving or unarchiving</param>
|
||||
/// <param name="Item">Mail to archive</param>
|
||||
/// <param name="FromFolder">Source folder.</param>
|
||||
/// <param name="ToFolder">Optional Target folder. Required for ImapSynchronizer and OutlookSynchronizer.</param>
|
||||
public record ArchiveRequest(bool IsArchiving, MailCopy Item, MailItemFolder FromFolder, MailItemFolder ToFolder = null) : RequestBase<BatchArchiveRequest>(Item, MailSynchronizerOperation.Archive), ICustomFolderSynchronizationRequest
|
||||
{
|
||||
public List<Guid> SynchronizationFolderIds
|
||||
{
|
||||
get
|
||||
{
|
||||
var folderIds = new List<Guid> { FromFolder.Id };
|
||||
|
||||
if (ToFolder != null)
|
||||
{
|
||||
folderIds.Add(ToFolder.Id);
|
||||
}
|
||||
|
||||
return folderIds;
|
||||
}
|
||||
}
|
||||
|
||||
public override IBatchChangeRequest CreateBatch(IEnumerable<IRequest> matchingItems)
|
||||
=> new BatchArchiveRequest(IsArchiving, matchingItems, FromFolder, ToFolder);
|
||||
|
||||
public override void ApplyUIChanges()
|
||||
{
|
||||
WeakReferenceMessenger.Default.Send(new MailRemovedMessage(Item));
|
||||
}
|
||||
|
||||
public override void RevertUIChanges()
|
||||
{
|
||||
WeakReferenceMessenger.Default.Send(new MailAddedMessage(Item));
|
||||
}
|
||||
}
|
||||
|
||||
[EditorBrowsable(EditorBrowsableState.Never)]
|
||||
public record BatchArchiveRequest(bool IsArchiving, IEnumerable<IRequest> Items, MailItemFolder FromFolder, MailItemFolder ToFolder = null) : BatchRequestBase(Items, MailSynchronizerOperation.Archive)
|
||||
{
|
||||
public override void ApplyUIChanges()
|
||||
{
|
||||
Items.ForEach(item => WeakReferenceMessenger.Default.Send(new MailRemovedMessage(item.Item)));
|
||||
}
|
||||
|
||||
public override void RevertUIChanges()
|
||||
{
|
||||
Items.ForEach(item => WeakReferenceMessenger.Default.Send(new MailAddedMessage(item.Item)));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -476,7 +476,11 @@ namespace Wino.Core.Services
|
||||
.Where(a => a.MailAccountId == options.AccountId && a.IsSynchronizationEnabled && options.SynchronizationFolderIds.Contains(a.Id))
|
||||
.ToListAsync();
|
||||
|
||||
folders.AddRange(synchronizationFolders);
|
||||
// Order is important for moving.
|
||||
// By implementation, removing mail folders must be synchronized first. Requests are made in that order for custom sync.
|
||||
// eg. Moving item from Folder A to Folder B. If we start syncing Folder B first, we might miss adding assignment for Folder A.
|
||||
|
||||
folders.AddRange(synchronizationFolders.OrderBy(a => options.SynchronizationFolderIds.IndexOf(a.Id)));
|
||||
}
|
||||
|
||||
return folders;
|
||||
|
||||
@@ -160,20 +160,37 @@ namespace Wino.Core.Services
|
||||
}
|
||||
else if (action == MailOperation.Archive)
|
||||
{
|
||||
// Validate archive folder exists.
|
||||
// For IMAP and Outlook: Validate archive folder exists.
|
||||
// Gmail doesn't need archive folder existence.
|
||||
|
||||
var archiveFolder = await _folderService.GetSpecialFolderByAccountIdAsync(mailItem.AssignedAccount.Id, SpecialFolderType.Archive)
|
||||
MailItemFolder archiveFolder = null;
|
||||
|
||||
bool shouldRequireArchiveFolder = mailItem.AssignedAccount.ProviderType == MailProviderType.Outlook
|
||||
|| mailItem.AssignedAccount.ProviderType == MailProviderType.IMAP4
|
||||
|| mailItem.AssignedAccount.ProviderType == MailProviderType.Office365;
|
||||
|
||||
if (shouldRequireArchiveFolder)
|
||||
{
|
||||
archiveFolder = await _folderService.GetSpecialFolderByAccountIdAsync(mailItem.AssignedAccount.Id, SpecialFolderType.Archive)
|
||||
?? throw new UnavailableSpecialFolderException(SpecialFolderType.Archive, mailItem.AssignedAccount.Id);
|
||||
}
|
||||
|
||||
return new MoveRequest(mailItem, mailItem.AssignedFolder, archiveFolder);
|
||||
return new ArchiveRequest(true, mailItem, mailItem.AssignedFolder, archiveFolder);
|
||||
}
|
||||
else if (action == MailOperation.UnArchive || action == MailOperation.MarkAsNotJunk)
|
||||
else if (action == MailOperation.MarkAsNotJunk)
|
||||
{
|
||||
var inboxFolder = await _folderService.GetSpecialFolderByAccountIdAsync(mailItem.AssignedAccount.Id, SpecialFolderType.Inbox)
|
||||
?? throw new UnavailableSpecialFolderException(SpecialFolderType.Inbox, mailItem.AssignedAccount.Id);
|
||||
|
||||
return new MoveRequest(mailItem, mailItem.AssignedFolder, inboxFolder);
|
||||
}
|
||||
else if (action == MailOperation.UnArchive)
|
||||
{
|
||||
var inboxFolder = await _folderService.GetSpecialFolderByAccountIdAsync(mailItem.AssignedAccount.Id, SpecialFolderType.Inbox)
|
||||
?? throw new UnavailableSpecialFolderException(SpecialFolderType.Inbox, mailItem.AssignedAccount.Id);
|
||||
|
||||
return new ArchiveRequest(false, mailItem, mailItem.AssignedFolder, inboxFolder);
|
||||
}
|
||||
else if (action == MailOperation.SoftDelete)
|
||||
{
|
||||
var trashFolder = await _folderService.GetSpecialFolderByAccountIdAsync(mailItem.AssignedAccount.Id, SpecialFolderType.Deleted)
|
||||
|
||||
@@ -272,6 +272,9 @@ namespace Wino.Core.Synchronizers
|
||||
case MailSynchronizerOperation.CreateDraft:
|
||||
yield return CreateDraft((BatchCreateDraftRequest)item);
|
||||
break;
|
||||
case MailSynchronizerOperation.Archive:
|
||||
yield return Archive((BatchArchiveRequest)item);
|
||||
break;
|
||||
}
|
||||
}
|
||||
};
|
||||
@@ -324,6 +327,7 @@ namespace Wino.Core.Synchronizers
|
||||
public virtual IEnumerable<IRequestBundle<TBaseRequest>> MoveToFocused(BatchMoveToFocusedRequest request) => throw new NotSupportedException(string.Format(Translator.Exception_UnsupportedSynchronizerOperation, this.GetType()));
|
||||
public virtual IEnumerable<IRequestBundle<TBaseRequest>> CreateDraft(BatchCreateDraftRequest request) => throw new NotSupportedException(string.Format(Translator.Exception_UnsupportedSynchronizerOperation, this.GetType()));
|
||||
public virtual IEnumerable<IRequestBundle<TBaseRequest>> SendDraft(BatchSendDraftRequestRequest request) => throw new NotSupportedException(string.Format(Translator.Exception_UnsupportedSynchronizerOperation, this.GetType()));
|
||||
public virtual IEnumerable<IRequestBundle<TBaseRequest>> Archive(BatchArchiveRequest request) => throw new NotSupportedException(string.Format(Translator.Exception_UnsupportedSynchronizerOperation, this.GetType()));
|
||||
|
||||
/// <summary>
|
||||
/// Downloads a single missing message from synchronizer and saves it to given FileId from IMailItem.
|
||||
|
||||
@@ -635,6 +635,28 @@ namespace Wino.Core.Synchronizers
|
||||
});
|
||||
}
|
||||
|
||||
public override IEnumerable<IRequestBundle<IClientServiceRequest>> Archive(BatchArchiveRequest request)
|
||||
{
|
||||
return CreateBatchedHttpBundleFromGroup(request, (items) =>
|
||||
{
|
||||
var batchModifyRequest = new BatchModifyMessagesRequest
|
||||
{
|
||||
Ids = items.Select(a => a.Item.Id.ToString()).ToList()
|
||||
};
|
||||
|
||||
if (request.IsArchiving)
|
||||
{
|
||||
batchModifyRequest.RemoveLabelIds = new[] { GoogleIntegratorExtensions.INBOX_LABEL_ID };
|
||||
}
|
||||
else
|
||||
{
|
||||
batchModifyRequest.AddLabelIds = new[] { GoogleIntegratorExtensions.INBOX_LABEL_ID };
|
||||
}
|
||||
|
||||
return _gmailService.Users.Messages.BatchModify(batchModifyRequest, "me");
|
||||
});
|
||||
}
|
||||
|
||||
public override IEnumerable<IRequestBundle<IClientServiceRequest>> SendDraft(BatchSendDraftRequestRequest request)
|
||||
{
|
||||
return CreateHttpBundle(request, (item) =>
|
||||
|
||||
@@ -272,6 +272,9 @@ namespace Wino.Core.Synchronizers
|
||||
}, request);
|
||||
}
|
||||
|
||||
public override IEnumerable<IRequestBundle<ImapRequest>> Archive(BatchArchiveRequest request)
|
||||
=> Move(new BatchMoveRequest(request.Items, request.FromFolder, request.ToFolder));
|
||||
|
||||
public override IEnumerable<IRequestBundle<ImapRequest>> SendDraft(BatchSendDraftRequestRequest request)
|
||||
{
|
||||
return CreateTaskBundle(async (ImapClient client) =>
|
||||
|
||||
@@ -572,6 +572,9 @@ namespace Wino.Core.Synchronizers
|
||||
return [deleteBundle, sendMailRequest];
|
||||
}
|
||||
|
||||
public override IEnumerable<IRequestBundle<RequestInformation>> Archive(BatchArchiveRequest request)
|
||||
=> Move(new BatchMoveRequest(request.Items, request.FromFolder, request.ToFolder));
|
||||
|
||||
public override async Task DownloadMissingMimeMessageAsync(IMailItem mailItem,
|
||||
MailKit.ITransferProgress transferProgress = null,
|
||||
CancellationToken cancellationToken = default)
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
<Identity
|
||||
Name="58272BurakKSE.WinoMailPreview"
|
||||
Publisher="CN=51FBDAF3-E212-4149-89A2-A2636B3BC911"
|
||||
Version="1.7.3.0" />
|
||||
Version="1.7.4.0" />
|
||||
|
||||
<mp:PhoneIdentity PhoneProductId="0f6f3c1b-6ffd-4212-9c91-a16e8d1fa437" PhonePublisherId="00000000-0000-0000-0000-000000000000"/>
|
||||
|
||||
|
||||
@@ -379,25 +379,32 @@
|
||||
</Page.Resources>
|
||||
|
||||
<wino:BasePage.ShellContent>
|
||||
<AutoSuggestBox
|
||||
x:Name="SearchBar"
|
||||
VerticalAlignment="Center"
|
||||
BorderBrush="Transparent"
|
||||
GotFocus="SearchBoxFocused"
|
||||
IsFocusEngagementEnabled="False"
|
||||
IsTabStop="False"
|
||||
LostFocus="SearchBarUnfocused"
|
||||
PlaceholderText="{x:Bind domain:Translator.SearchBarPlaceholder}"
|
||||
QueryIcon="Find"
|
||||
TabIndex="1000"
|
||||
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>
|
||||
<!-- Hidden focus receiver... -->
|
||||
<TextBox
|
||||
Grid.Column="1"
|
||||
HorizontalAlignment="Right"
|
||||
VerticalAlignment="Bottom"
|
||||
Opacity="0"
|
||||
Visibility="Collapsed" />
|
||||
|
||||
<AutoSuggestBox
|
||||
x:Name="SearchBar"
|
||||
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">
|
||||
@@ -439,147 +446,160 @@
|
||||
<!-- Top Commands -->
|
||||
<Grid
|
||||
Grid.Row="0"
|
||||
Padding="4"
|
||||
Padding="2,0"
|
||||
Background="{ThemeResource ApplicationPageBackgroundThemeBrush}"
|
||||
CornerRadius="8">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="48" />
|
||||
<RowDefinition Height="2" />
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<!-- Commands -->
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*" />
|
||||
<ColumnDefinition Width="*" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="*" />
|
||||
<ColumnDefinition Width="*" />
|
||||
<ColumnDefinition Width="*" />
|
||||
<ColumnDefinition Width="*" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*" />
|
||||
<ColumnDefinition Width="*" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="*" />
|
||||
<ColumnDefinition Width="*" />
|
||||
<ColumnDefinition Width="*" />
|
||||
<ColumnDefinition Width="*" />
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<Button
|
||||
Command="{x:Bind ViewModel.SyncFolderCommand}"
|
||||
IsEnabled="{x:Bind ViewModel.CanSynchronize, Mode=OneWay}"
|
||||
Style="{StaticResource TopCommandBarButtonStyle}">
|
||||
<Button.Content>
|
||||
<controls:WinoFontIcon FontSize="16" Icon="Sync" />
|
||||
</Button.Content>
|
||||
</Button>
|
||||
<Button
|
||||
Command="{x:Bind ViewModel.SyncFolderCommand}"
|
||||
IsEnabled="{x:Bind ViewModel.CanSynchronize, Mode=OneWay}"
|
||||
Style="{StaticResource TopCommandBarButtonStyle}">
|
||||
<Button.Content>
|
||||
<controls:WinoFontIcon FontSize="16" Icon="Sync" />
|
||||
</Button.Content>
|
||||
</Button>
|
||||
|
||||
<ToggleButton
|
||||
x:Name="SelectionModeToggle"
|
||||
Grid.Column="1"
|
||||
Checked="SelectionModeToggleChecked"
|
||||
Style="{StaticResource TopCommandBarToggleButtonStyle}"
|
||||
Unchecked="SelectionModeToggleUnchecked">
|
||||
<ToggleButton.Content>
|
||||
<controls:WinoFontIcon FontSize="18" Icon="MultiSelect" />
|
||||
</ToggleButton.Content>
|
||||
</ToggleButton>
|
||||
<ToggleButton
|
||||
x:Name="SelectionModeToggle"
|
||||
Grid.Column="1"
|
||||
Checked="SelectionModeToggleChecked"
|
||||
Style="{StaticResource TopCommandBarToggleButtonStyle}"
|
||||
Unchecked="SelectionModeToggleUnchecked">
|
||||
<ToggleButton.Content>
|
||||
<controls:WinoFontIcon FontSize="18" Icon="MultiSelect" />
|
||||
</ToggleButton.Content>
|
||||
</ToggleButton>
|
||||
|
||||
<AppBarSeparator Grid.Column="2" Margin="2,0" />
|
||||
<AppBarSeparator Grid.Column="2" Margin="2,0" />
|
||||
|
||||
<Button
|
||||
x:Name="ArchiveAppBarButton"
|
||||
Grid.Column="3"
|
||||
x:Load="{x:Bind helpers:XamlHelpers.ReverseBoolConverter(ViewModel.IsArchiveSpecialFolder), Mode=OneWay}"
|
||||
Command="{x:Bind ViewModel.MailOperationCommand}"
|
||||
IsEnabled="{x:Bind ViewModel.HasSelectedItems, Mode=OneWay}"
|
||||
Style="{StaticResource TopCommandBarButtonStyle}"
|
||||
ToolTipService.ToolTip="{x:Bind domain:Translator.MailOperation_Archive}">
|
||||
<Button.Content>
|
||||
<controls:WinoFontIcon FontSize="18" Icon="Archive" />
|
||||
</Button.Content>
|
||||
<Button.CommandParameter>
|
||||
<enums:MailOperation>Archive</enums:MailOperation>
|
||||
</Button.CommandParameter>
|
||||
</Button>
|
||||
<Button
|
||||
x:Name="ArchiveAppBarButton"
|
||||
Grid.Column="3"
|
||||
x:Load="{x:Bind helpers:XamlHelpers.ReverseBoolConverter(ViewModel.IsArchiveSpecialFolder), Mode=OneWay}"
|
||||
Command="{x:Bind ViewModel.MailOperationCommand}"
|
||||
IsEnabled="{x:Bind ViewModel.HasSelectedItems, Mode=OneWay}"
|
||||
Style="{StaticResource TopCommandBarButtonStyle}"
|
||||
ToolTipService.ToolTip="{x:Bind domain:Translator.MailOperation_Archive}">
|
||||
<Button.Content>
|
||||
<controls:WinoFontIcon FontSize="18" Icon="Archive" />
|
||||
</Button.Content>
|
||||
<Button.CommandParameter>
|
||||
<enums:MailOperation>Archive</enums:MailOperation>
|
||||
</Button.CommandParameter>
|
||||
</Button>
|
||||
|
||||
<Button
|
||||
x:Name="UnarchiveAppBarButton"
|
||||
Grid.Column="3"
|
||||
x:Load="{x:Bind ViewModel.IsArchiveSpecialFolder, Mode=OneWay}"
|
||||
Command="{x:Bind ViewModel.MailOperationCommand}"
|
||||
IsEnabled="{x:Bind ViewModel.HasSelectedItems, Mode=OneWay}"
|
||||
Style="{StaticResource TopCommandBarButtonStyle}"
|
||||
ToolTipService.ToolTip="{x:Bind domain:Translator.MailOperation_Unarchive}">
|
||||
<Button.Content>
|
||||
<controls:WinoFontIcon FontSize="18" Icon="UnArchive" />
|
||||
</Button.Content>
|
||||
<Button.CommandParameter>
|
||||
<enums:MailOperation>UnArchive</enums:MailOperation>
|
||||
</Button.CommandParameter>
|
||||
</Button>
|
||||
<Button
|
||||
x:Name="UnarchiveAppBarButton"
|
||||
Grid.Column="3"
|
||||
x:Load="{x:Bind ViewModel.IsArchiveSpecialFolder, Mode=OneWay}"
|
||||
Command="{x:Bind ViewModel.MailOperationCommand}"
|
||||
IsEnabled="{x:Bind ViewModel.HasSelectedItems, Mode=OneWay}"
|
||||
Style="{StaticResource TopCommandBarButtonStyle}"
|
||||
ToolTipService.ToolTip="{x:Bind domain:Translator.MailOperation_Unarchive}">
|
||||
<Button.Content>
|
||||
<controls:WinoFontIcon FontSize="18" Icon="UnArchive" />
|
||||
</Button.Content>
|
||||
<Button.CommandParameter>
|
||||
<enums:MailOperation>UnArchive</enums:MailOperation>
|
||||
</Button.CommandParameter>
|
||||
</Button>
|
||||
|
||||
<Button
|
||||
Grid.Column="4"
|
||||
Command="{x:Bind ViewModel.MailOperationCommand}"
|
||||
IsEnabled="{x:Bind ViewModel.HasSelectedItems, Mode=OneWay}"
|
||||
Style="{StaticResource TopCommandBarButtonStyle}"
|
||||
ToolTipService.ToolTip="{x:Bind domain:Translator.MailOperation_Delete}">
|
||||
<Button.CommandParameter>
|
||||
<enums:MailOperation>SoftDelete</enums:MailOperation>
|
||||
</Button.CommandParameter>
|
||||
<Button.Content>
|
||||
<controls:WinoFontIcon FontSize="18" Icon="Delete" />
|
||||
</Button.Content>
|
||||
</Button>
|
||||
<Button
|
||||
Grid.Column="4"
|
||||
Command="{x:Bind ViewModel.MailOperationCommand}"
|
||||
IsEnabled="{x:Bind ViewModel.HasSelectedItems, Mode=OneWay}"
|
||||
Style="{StaticResource TopCommandBarButtonStyle}"
|
||||
ToolTipService.ToolTip="{x:Bind domain:Translator.MailOperation_Delete}">
|
||||
<Button.CommandParameter>
|
||||
<enums:MailOperation>SoftDelete</enums:MailOperation>
|
||||
</Button.CommandParameter>
|
||||
<Button.Content>
|
||||
<controls:WinoFontIcon FontSize="18" Icon="Delete" />
|
||||
</Button.Content>
|
||||
</Button>
|
||||
|
||||
<Button
|
||||
x:Name="MoveButtonAppBarButton"
|
||||
Grid.Column="5"
|
||||
Command="{x:Bind ViewModel.MailOperationCommand}"
|
||||
IsEnabled="{x:Bind ViewModel.HasSelectedItems, Mode=OneWay}"
|
||||
Style="{StaticResource TopCommandBarButtonStyle}"
|
||||
ToolTipService.ToolTip="{x:Bind domain:Translator.MailOperation_Move}">
|
||||
<Button.CommandParameter>
|
||||
<enums:MailOperation>Move</enums:MailOperation>
|
||||
</Button.CommandParameter>
|
||||
<Button.Content>
|
||||
<controls:WinoFontIcon FontSize="18" Icon="Move" />
|
||||
</Button.Content>
|
||||
</Button>
|
||||
<Button
|
||||
x:Name="MoveButtonAppBarButton"
|
||||
Grid.Column="5"
|
||||
Command="{x:Bind ViewModel.MailOperationCommand}"
|
||||
IsEnabled="{x:Bind ViewModel.HasSelectedItems, Mode=OneWay}"
|
||||
Style="{StaticResource TopCommandBarButtonStyle}"
|
||||
ToolTipService.ToolTip="{x:Bind domain:Translator.MailOperation_Move}">
|
||||
<Button.CommandParameter>
|
||||
<enums:MailOperation>Move</enums:MailOperation>
|
||||
</Button.CommandParameter>
|
||||
<Button.Content>
|
||||
<controls:WinoFontIcon FontSize="18" Icon="Move" />
|
||||
</Button.Content>
|
||||
</Button>
|
||||
|
||||
<Button
|
||||
Grid.Column="6"
|
||||
IsEnabled="{x:Bind ViewModel.HasSelectedItems, Mode=OneWay}"
|
||||
Style="{StaticResource TopCommandBarButtonStyle}">
|
||||
<Button.Content>
|
||||
<controls:WinoFontIcon FontSize="20" Icon="More" />
|
||||
</Button.Content>
|
||||
<Button.Flyout>
|
||||
<MenuFlyout AreOpenCloseAnimationsEnabled="False" Placement="BottomEdgeAlignedLeft">
|
||||
<MenuFlyoutItem Command="{x:Bind ViewModel.MailOperationCommand}" Text="{x:Bind domain:Translator.MailOperation_SetFlag}">
|
||||
<MenuFlyoutItem.CommandParameter>
|
||||
<enums:MailOperation>SetFlag</enums:MailOperation>
|
||||
</MenuFlyoutItem.CommandParameter>
|
||||
<MenuFlyoutItem.Icon>
|
||||
<controls:WinoFontIcon Icon="Flag" />
|
||||
</MenuFlyoutItem.Icon>
|
||||
</MenuFlyoutItem>
|
||||
<MenuFlyoutItem Command="{x:Bind ViewModel.MailOperationCommand}" Text="{x:Bind domain:Translator.MailOperation_ClearFlag}">
|
||||
<MenuFlyoutItem.CommandParameter>
|
||||
<enums:MailOperation>ClearFlag</enums:MailOperation>
|
||||
</MenuFlyoutItem.CommandParameter>
|
||||
<MenuFlyoutItem.Icon>
|
||||
<controls:WinoFontIcon Icon="ClearFlag" />
|
||||
</MenuFlyoutItem.Icon>
|
||||
</MenuFlyoutItem>
|
||||
<MenuFlyoutItem Command="{x:Bind ViewModel.MailOperationCommand}" Text="{x:Bind domain:Translator.MailOperation_MarkAsRead}">
|
||||
<MenuFlyoutItem.CommandParameter>
|
||||
<enums:MailOperation>MarkAsRead</enums:MailOperation>
|
||||
</MenuFlyoutItem.CommandParameter>
|
||||
<MenuFlyoutItem.Icon>
|
||||
<controls:WinoFontIcon Icon="MarkRead" />
|
||||
</MenuFlyoutItem.Icon>
|
||||
</MenuFlyoutItem>
|
||||
<MenuFlyoutItem Command="{x:Bind ViewModel.MailOperationCommand}" Text="{x:Bind domain:Translator.MailOperation_MarkAsUnread}">
|
||||
<MenuFlyoutItem.CommandParameter>
|
||||
<enums:MailOperation>MarkAsUnread</enums:MailOperation>
|
||||
</MenuFlyoutItem.CommandParameter>
|
||||
<MenuFlyoutItem.Icon>
|
||||
<controls:WinoFontIcon Icon="MarkUnread" />
|
||||
</MenuFlyoutItem.Icon>
|
||||
</MenuFlyoutItem>
|
||||
</MenuFlyout>
|
||||
</Button.Flyout>
|
||||
</Button>
|
||||
<Button
|
||||
Grid.Column="6"
|
||||
IsEnabled="{x:Bind ViewModel.HasSelectedItems, Mode=OneWay}"
|
||||
Style="{StaticResource TopCommandBarButtonStyle}">
|
||||
<Button.Content>
|
||||
<controls:WinoFontIcon FontSize="20" Icon="More" />
|
||||
</Button.Content>
|
||||
<Button.Flyout>
|
||||
<MenuFlyout AreOpenCloseAnimationsEnabled="False" Placement="BottomEdgeAlignedLeft">
|
||||
<MenuFlyoutItem Command="{x:Bind ViewModel.MailOperationCommand}" Text="{x:Bind domain:Translator.MailOperation_SetFlag}">
|
||||
<MenuFlyoutItem.CommandParameter>
|
||||
<enums:MailOperation>SetFlag</enums:MailOperation>
|
||||
</MenuFlyoutItem.CommandParameter>
|
||||
<MenuFlyoutItem.Icon>
|
||||
<controls:WinoFontIcon Icon="Flag" />
|
||||
</MenuFlyoutItem.Icon>
|
||||
</MenuFlyoutItem>
|
||||
<MenuFlyoutItem Command="{x:Bind ViewModel.MailOperationCommand}" Text="{x:Bind domain:Translator.MailOperation_ClearFlag}">
|
||||
<MenuFlyoutItem.CommandParameter>
|
||||
<enums:MailOperation>ClearFlag</enums:MailOperation>
|
||||
</MenuFlyoutItem.CommandParameter>
|
||||
<MenuFlyoutItem.Icon>
|
||||
<controls:WinoFontIcon Icon="ClearFlag" />
|
||||
</MenuFlyoutItem.Icon>
|
||||
</MenuFlyoutItem>
|
||||
<MenuFlyoutItem Command="{x:Bind ViewModel.MailOperationCommand}" Text="{x:Bind domain:Translator.MailOperation_MarkAsRead}">
|
||||
<MenuFlyoutItem.CommandParameter>
|
||||
<enums:MailOperation>MarkAsRead</enums:MailOperation>
|
||||
</MenuFlyoutItem.CommandParameter>
|
||||
<MenuFlyoutItem.Icon>
|
||||
<controls:WinoFontIcon Icon="MarkRead" />
|
||||
</MenuFlyoutItem.Icon>
|
||||
</MenuFlyoutItem>
|
||||
<MenuFlyoutItem Command="{x:Bind ViewModel.MailOperationCommand}" Text="{x:Bind domain:Translator.MailOperation_MarkAsUnread}">
|
||||
<MenuFlyoutItem.CommandParameter>
|
||||
<enums:MailOperation>MarkAsUnread</enums:MailOperation>
|
||||
</MenuFlyoutItem.CommandParameter>
|
||||
<MenuFlyoutItem.Icon>
|
||||
<controls:WinoFontIcon Icon="MarkUnread" />
|
||||
</MenuFlyoutItem.Icon>
|
||||
</MenuFlyoutItem>
|
||||
</MenuFlyout>
|
||||
</Button.Flyout>
|
||||
</Button>
|
||||
</Grid>
|
||||
|
||||
<muxc:ProgressBar
|
||||
x:Name="LoadingProgressBar"
|
||||
Grid.Row="1"
|
||||
x:Load="{x:Bind ViewModel.IsInitializingFolder, Mode=OneWay}"
|
||||
IsIndeterminate="True" />
|
||||
</Grid>
|
||||
|
||||
<!-- Pivot + Sync + Multi Select -->
|
||||
@@ -794,6 +814,9 @@
|
||||
Grid.Column="1"
|
||||
IsNavigationStackEnabled="False" />
|
||||
|
||||
|
||||
|
||||
|
||||
<VisualStateManager.VisualStateGroups>
|
||||
<VisualStateGroup x:Name="AdaptiveStates" CurrentStateChanged="AdaptivenessChanged">
|
||||
<VisualState x:Name="NormalState">
|
||||
@@ -840,4 +863,3 @@
|
||||
</VisualStateManager.VisualStateGroups>
|
||||
</Grid>
|
||||
</abstract:MailListPageAbstract>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user