Add configurable mail notification actions
@@ -41,9 +41,14 @@ internal static class ToastActivationResolver
|
||||
return calendarAction == Constants.ToastCalendarNavigateAction;
|
||||
}
|
||||
|
||||
if (toastArguments.TryGetValue(Constants.ToastDismissActionKey, out string _))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
if (toastArguments.TryGetValue(Constants.ToastActionKey, out MailOperation mailAction))
|
||||
{
|
||||
return mailAction == MailOperation.Navigate;
|
||||
return mailAction is MailOperation.Navigate or MailOperation.Reply or MailOperation.ReplyAll or MailOperation.Forward;
|
||||
}
|
||||
|
||||
return true;
|
||||
@@ -52,5 +57,6 @@ internal static class ToastActivationResolver
|
||||
private static bool ContainsKnownToastKey(NotificationArguments toastArguments)
|
||||
=> toastArguments.TryGetValue(Constants.ToastStoreUpdateActionKey, out string _) ||
|
||||
toastArguments.TryGetValue(Constants.ToastCalendarActionKey, out string _) ||
|
||||
toastArguments.TryGetValue(Constants.ToastDismissActionKey, out string _) ||
|
||||
toastArguments.TryGetValue(Constants.ToastActionKey, out string _);
|
||||
}
|
||||
|
||||
@@ -358,6 +358,7 @@ public partial class App : WinoApplication,
|
||||
services.AddTransient(typeof(AccountDetailsPageViewModel));
|
||||
services.AddTransient(typeof(SignatureManagementPageViewModel));
|
||||
services.AddTransient(typeof(MessageListPageViewModel));
|
||||
services.AddTransient(typeof(MailNotificationSettingsPageViewModel));
|
||||
services.AddTransient(typeof(ReadComposePanePageViewModel));
|
||||
services.AddTransient(typeof(MergedAccountDetailsPageViewModel));
|
||||
services.AddTransient(typeof(AppPreferencesPageViewModel));
|
||||
@@ -599,6 +600,12 @@ public partial class App : WinoApplication,
|
||||
return;
|
||||
}
|
||||
|
||||
if (toastArguments.TryGetValue(Constants.ToastDismissActionKey, out string _))
|
||||
{
|
||||
LogActivation("Handling notification dismiss action.");
|
||||
return;
|
||||
}
|
||||
|
||||
// Check calendar reminder toast activation first.
|
||||
if (toastArguments.TryGetValue(Constants.ToastCalendarActionKey, out string calendarAction) &&
|
||||
toastArguments.TryGetValue(Constants.ToastCalendarItemIdKey, out string calendarItemIdString) &&
|
||||
@@ -632,6 +639,10 @@ public partial class App : WinoApplication,
|
||||
// User clicked notification - create window if needed and navigate.
|
||||
await HandleToastNavigationAsync(mailItemUniqueId);
|
||||
}
|
||||
else if (IsComposeToastAction(action))
|
||||
{
|
||||
await HandleToastComposeActionAsync(action, mailItemUniqueId);
|
||||
}
|
||||
else
|
||||
{
|
||||
// User clicked action button (Mark as Read, Delete, etc.)
|
||||
@@ -985,6 +996,87 @@ public partial class App : WinoApplication,
|
||||
}
|
||||
}
|
||||
|
||||
private async Task HandleToastComposeActionAsync(MailOperation action, Guid mailItemUniqueId)
|
||||
{
|
||||
LogActivation($"Handling compose toast action: {action} for mail {mailItemUniqueId}");
|
||||
|
||||
var mailService = Services.GetRequiredService<IMailService>();
|
||||
var folderService = Services.GetRequiredService<IFolderService>();
|
||||
var mimeFileService = Services.GetRequiredService<IMimeFileService>();
|
||||
var navigationService = Services.GetRequiredService<INavigationService>();
|
||||
var requestDelegator = Services.GetRequiredService<IWinoRequestDelegator>();
|
||||
var mailShellViewModel = Services.GetRequiredService<MailAppShellViewModel>();
|
||||
|
||||
var mailItem = await mailService.GetSingleMailItemAsync(mailItemUniqueId);
|
||||
if (mailItem == null)
|
||||
{
|
||||
LogActivation($"Compose toast mail item was not found for {mailItemUniqueId}.");
|
||||
return;
|
||||
}
|
||||
|
||||
var account = await mailService.GetMailAccountByUniqueIdAsync(mailItemUniqueId) ?? mailItem.AssignedAccount;
|
||||
if (account == null)
|
||||
{
|
||||
LogActivation($"Compose toast account was not found for {mailItemUniqueId}.");
|
||||
return;
|
||||
}
|
||||
|
||||
var draftFolder = await folderService.GetSpecialFolderByAccountIdAsync(account.Id, SpecialFolderType.Draft);
|
||||
if (draftFolder == null)
|
||||
{
|
||||
LogActivation($"Compose toast draft folder is missing for account {account.Id}.");
|
||||
return;
|
||||
}
|
||||
|
||||
var mimeInformation = await mimeFileService.GetMimeMessageInformationAsync(mailItem.FileId, account.Id);
|
||||
if (mimeInformation?.MimeMessage == null)
|
||||
{
|
||||
LogActivation($"Compose toast MIME payload was not found for mail {mailItemUniqueId}.");
|
||||
return;
|
||||
}
|
||||
|
||||
await EnsureShellWindowAsync(WinoApplicationMode.Mail, activateWindow: true);
|
||||
navigationService.ChangeApplicationMode(WinoApplicationMode.Mail);
|
||||
|
||||
if (mailShellViewModel.MenuItems.TryGetAccountMenuItem(account.Id, out IAccountMenuItem accountMenuItem))
|
||||
{
|
||||
await mailShellViewModel.ChangeLoadedAccountAsync(accountMenuItem, navigateInbox: false);
|
||||
}
|
||||
|
||||
if (mailShellViewModel.MenuItems.TryGetSpecialFolderMenuItem(account.Id, SpecialFolderType.Draft, out var draftFolderMenuItem))
|
||||
{
|
||||
await mailShellViewModel.NavigateFolderAsync(draftFolderMenuItem);
|
||||
}
|
||||
|
||||
var draftOptions = new DraftCreationOptions
|
||||
{
|
||||
Reason = action switch
|
||||
{
|
||||
MailOperation.Reply => DraftCreationReason.Reply,
|
||||
MailOperation.ReplyAll => DraftCreationReason.ReplyAll,
|
||||
MailOperation.Forward => DraftCreationReason.Forward,
|
||||
_ => DraftCreationReason.Empty
|
||||
},
|
||||
ReferencedMessage = new ReferencedMessage
|
||||
{
|
||||
MimeMessage = mimeInformation.MimeMessage,
|
||||
MailCopy = mailItem
|
||||
}
|
||||
};
|
||||
|
||||
var (draftMailCopy, draftBase64MimeMessage) = await mailService.CreateDraftAsync(account.Id, draftOptions);
|
||||
var draftPreparationRequest = new DraftPreparationRequest(account, draftMailCopy, draftBase64MimeMessage, draftOptions.Reason, mailItem);
|
||||
|
||||
await requestDelegator.ExecuteAsync(draftPreparationRequest);
|
||||
navigationService.Navigate(WinoPage.ComposePage,
|
||||
new MailItemViewModel(draftMailCopy),
|
||||
NavigationReferenceFrame.RenderingFrame,
|
||||
NavigationTransitionType.DrillIn);
|
||||
}
|
||||
|
||||
private static bool IsComposeToastAction(MailOperation action)
|
||||
=> action is MailOperation.Reply or MailOperation.ReplyAll or MailOperation.Forward;
|
||||
|
||||
/// <summary>
|
||||
/// Creates the main window and activates it.
|
||||
/// </summary>
|
||||
|
||||
|
After Width: | Height: | Size: 426 B |
|
After Width: | Height: | Size: 420 B |
|
After Width: | Height: | Size: 287 B |
|
After Width: | Height: | Size: 327 B |
|
After Width: | Height: | Size: 506 B |
|
After Width: | Height: | Size: 518 B |
|
After Width: | Height: | Size: 337 B |
|
After Width: | Height: | Size: 399 B |
|
After Width: | Height: | Size: 608 B |
|
After Width: | Height: | Size: 601 B |
|
After Width: | Height: | Size: 365 B |
|
After Width: | Height: | Size: 455 B |
|
After Width: | Height: | Size: 776 B |
|
After Width: | Height: | Size: 759 B |
|
After Width: | Height: | Size: 481 B |
|
After Width: | Height: | Size: 597 B |
|
After Width: | Height: | Size: 1.5 KiB |
|
After Width: | Height: | Size: 1.5 KiB |
|
After Width: | Height: | Size: 767 B |
|
After Width: | Height: | Size: 1.0 KiB |
|
After Width: | Height: | Size: 380 B |
|
After Width: | Height: | Size: 386 B |
|
After Width: | Height: | Size: 271 B |
|
After Width: | Height: | Size: 305 B |
|
After Width: | Height: | Size: 473 B |
|
After Width: | Height: | Size: 481 B |
|
After Width: | Height: | Size: 318 B |
|
After Width: | Height: | Size: 363 B |
|
After Width: | Height: | Size: 558 B |
|
After Width: | Height: | Size: 550 B |
|
After Width: | Height: | Size: 347 B |
|
After Width: | Height: | Size: 424 B |
|
After Width: | Height: | Size: 691 B |
|
After Width: | Height: | Size: 697 B |
|
After Width: | Height: | Size: 452 B |
|
After Width: | Height: | Size: 552 B |
|
After Width: | Height: | Size: 1.4 KiB |
|
After Width: | Height: | Size: 1.3 KiB |
|
After Width: | Height: | Size: 705 B |
|
After Width: | Height: | Size: 974 B |
@@ -79,6 +79,7 @@ public class NavigationService : NavigationServiceBase, INavigationService
|
||||
WinoPage.AboutPage,
|
||||
WinoPage.PersonalizationPage,
|
||||
WinoPage.MessageListPage,
|
||||
WinoPage.MailNotificationSettingsPage,
|
||||
WinoPage.ReadComposePanePage,
|
||||
WinoPage.AppPreferencesPage,
|
||||
WinoPage.AliasManagementPage,
|
||||
@@ -142,6 +143,7 @@ public class NavigationService : NavigationServiceBase, INavigationService
|
||||
WinoPage.AboutPage => typeof(AboutPage),
|
||||
WinoPage.PersonalizationPage => typeof(PersonalizationPage),
|
||||
WinoPage.MessageListPage => typeof(MessageListPage),
|
||||
WinoPage.MailNotificationSettingsPage => typeof(MailNotificationSettingsPage),
|
||||
WinoPage.ReadComposePanePage => typeof(ReadComposePanePage),
|
||||
WinoPage.MailRenderingPage => typeof(MailRenderingPage),
|
||||
WinoPage.ComposePage => typeof(ComposePage),
|
||||
|
||||
@@ -17,6 +17,7 @@ using Wino.Core.Domain.Entities.Shared;
|
||||
using Wino.Core.Domain.Enums;
|
||||
using Wino.Core.Domain.Extensions;
|
||||
using Wino.Core.Domain.Interfaces;
|
||||
using Wino.Helpers;
|
||||
using Wino.Mail.WinUI.Activation;
|
||||
using Wino.Messaging.UI;
|
||||
|
||||
@@ -26,6 +27,16 @@ public class NotificationBuilder : INotificationBuilder
|
||||
{
|
||||
private const string NotificationIconRootUri = "ms-appx:///Assets/NotificationIcons/";
|
||||
private static int _calendarTaskbarBadgeCount;
|
||||
private static readonly MailOperation[] SupportedMailNotificationActions =
|
||||
[
|
||||
MailOperation.MarkAsRead,
|
||||
MailOperation.SoftDelete,
|
||||
MailOperation.MoveToJunk,
|
||||
MailOperation.Archive,
|
||||
MailOperation.Reply,
|
||||
MailOperation.ReplyAll,
|
||||
MailOperation.Forward
|
||||
];
|
||||
|
||||
private readonly IAccountService _accountService;
|
||||
private readonly IFolderService _folderService;
|
||||
@@ -76,6 +87,7 @@ public class NotificationBuilder : INotificationBuilder
|
||||
builder.AddText(Translator.Notifications_MultipleNotificationsTitle);
|
||||
builder.AddText(string.Format(Translator.Notifications_MultipleNotificationsMessage, mailCount));
|
||||
builder.AddArgument(Constants.ToastModeKey, Constants.ToastModeMail);
|
||||
builder.AddButton(CreateDismissButton());
|
||||
builder.SetAudioUri(new Uri("ms-winsoundevent:Notification.Mail"));
|
||||
|
||||
ShowNotification(builder);
|
||||
@@ -167,6 +179,7 @@ public class NotificationBuilder : INotificationBuilder
|
||||
builder.AddButton(new AppNotificationButton(Translator.Buttons_FixAccount)
|
||||
.AddArgument(Constants.ToastMailAccountIdKey, account.Id.ToString())
|
||||
.AddArgument(Constants.ToastModeKey, Constants.ToastModeMail));
|
||||
builder.AddButton(CreateDismissButton());
|
||||
|
||||
ShowNotification(builder);
|
||||
}
|
||||
@@ -177,6 +190,7 @@ public class NotificationBuilder : INotificationBuilder
|
||||
builder.AddText(Translator.Exception_WebView2RuntimeMissing_Title);
|
||||
builder.AddText(Translator.Exception_WebView2RuntimeMissing_Message);
|
||||
builder.AddArgument(Constants.ToastModeKey, Constants.ToastModeMail);
|
||||
builder.AddButton(CreateDismissButton());
|
||||
|
||||
ShowNotification(builder);
|
||||
}
|
||||
@@ -188,6 +202,7 @@ public class NotificationBuilder : INotificationBuilder
|
||||
builder.AddText(Translator.Notifications_StoreUpdateAvailableMessage);
|
||||
builder.AddArgument(Constants.ToastStoreUpdateActionKey, Constants.ToastStoreUpdateActionInstall);
|
||||
builder.AddArgument(Constants.ToastModeKey, Constants.ToastModeMail);
|
||||
builder.AddButton(CreateDismissButton());
|
||||
|
||||
ShowNotification(builder, "store-update-available");
|
||||
}
|
||||
@@ -255,6 +270,8 @@ public class NotificationBuilder : INotificationBuilder
|
||||
.AddArgument(Constants.ToastModeKey, Constants.ToastModeCalendar));
|
||||
}
|
||||
|
||||
builder.AddButton(CreateDismissButton());
|
||||
|
||||
var tag = $"calendar-reminder-{calendarItem.Id:N}-{reminderDurationInSeconds}";
|
||||
ShowNotification(builder, tag);
|
||||
|
||||
@@ -288,9 +305,11 @@ public class NotificationBuilder : INotificationBuilder
|
||||
builder.AddArgument(Constants.ToastMailUniqueIdKey, mailItem.UniqueId.ToString());
|
||||
builder.AddArgument(Constants.ToastActionKey, MailOperation.Navigate.ToString());
|
||||
builder.AddArgument(Constants.ToastModeKey, Constants.ToastModeMail);
|
||||
builder.AddButton(GetMarkAsReadButton(mailItem.UniqueId));
|
||||
builder.AddButton(GetDeleteButton(mailItem.UniqueId));
|
||||
builder.AddButton(GetArchiveButton(mailItem.UniqueId));
|
||||
|
||||
var (firstAction, secondAction) = GetConfiguredMailNotificationActions();
|
||||
builder.AddButton(CreateMailNotificationActionButton(firstAction, mailItem.UniqueId));
|
||||
builder.AddButton(CreateMailNotificationActionButton(secondAction, mailItem.UniqueId));
|
||||
builder.AddButton(CreateDismissButton());
|
||||
builder.SetAudioUri(new Uri("ms-winsoundevent:Notification.Mail"));
|
||||
|
||||
ShowNotification(builder, mailItem.UniqueId.ToString());
|
||||
@@ -347,26 +366,55 @@ public class NotificationBuilder : INotificationBuilder
|
||||
return string.Format(Translator.CalendarReminder_StartedMinutesAgo, minutesAgo);
|
||||
}
|
||||
|
||||
private AppNotificationButton GetArchiveButton(Guid mailUniqueId)
|
||||
=> new AppNotificationButton(Translator.MailOperation_Archive)
|
||||
.SetIcon(GetNotificationIconUri("mail-archive"))
|
||||
private (MailOperation FirstAction, MailOperation SecondAction) GetConfiguredMailNotificationActions()
|
||||
{
|
||||
var firstAction = ResolveMailNotificationAction(_preferencesService.FirstMailNotificationAction, MailOperation.MarkAsRead);
|
||||
var secondAction = ResolveMailNotificationAction(_preferencesService.SecondMailNotificationAction, MailOperation.SoftDelete);
|
||||
|
||||
if (secondAction == firstAction)
|
||||
{
|
||||
secondAction = SupportedMailNotificationActions.First(action => action != firstAction);
|
||||
}
|
||||
|
||||
return (firstAction, secondAction);
|
||||
}
|
||||
|
||||
private static MailOperation ResolveMailNotificationAction(MailOperation configuredAction, MailOperation fallbackAction)
|
||||
=> SupportedMailNotificationActions.Contains(configuredAction) ? configuredAction : fallbackAction;
|
||||
|
||||
private AppNotificationButton CreateMailNotificationActionButton(MailOperation action, Guid mailUniqueId)
|
||||
{
|
||||
var button = new AppNotificationButton(XamlHelpers.GetOperationString(action))
|
||||
.AddArgument(Constants.ToastMailUniqueIdKey, mailUniqueId.ToString())
|
||||
.AddArgument(Constants.ToastActionKey, MailOperation.Archive.ToString())
|
||||
.AddArgument(Constants.ToastActionKey, action.ToString())
|
||||
.AddArgument(Constants.ToastModeKey, Constants.ToastModeMail);
|
||||
|
||||
private AppNotificationButton GetDeleteButton(Guid mailUniqueId)
|
||||
=> new AppNotificationButton(Translator.MailOperation_Delete)
|
||||
.SetIcon(GetNotificationIconUri("mail-delete"))
|
||||
.AddArgument(Constants.ToastMailUniqueIdKey, mailUniqueId.ToString())
|
||||
.AddArgument(Constants.ToastActionKey, MailOperation.SoftDelete.ToString())
|
||||
.AddArgument(Constants.ToastModeKey, Constants.ToastModeMail);
|
||||
var iconUri = GetMailActionIconUri(action);
|
||||
if (iconUri != null)
|
||||
{
|
||||
button.SetIcon(iconUri);
|
||||
}
|
||||
|
||||
private AppNotificationButton GetMarkAsReadButton(Guid mailUniqueId)
|
||||
=> new AppNotificationButton(Translator.MailOperation_MarkAsRead)
|
||||
.SetIcon(GetNotificationIconUri("mail-markread"))
|
||||
.AddArgument(Constants.ToastMailUniqueIdKey, mailUniqueId.ToString())
|
||||
.AddArgument(Constants.ToastActionKey, MailOperation.MarkAsRead.ToString())
|
||||
.AddArgument(Constants.ToastModeKey, Constants.ToastModeMail);
|
||||
return button;
|
||||
}
|
||||
|
||||
private static Uri? GetMailActionIconUri(MailOperation action)
|
||||
=> action switch
|
||||
{
|
||||
MailOperation.Archive => GetNotificationIconUri("mail-archive"),
|
||||
MailOperation.SoftDelete => GetNotificationIconUri("mail-delete"),
|
||||
MailOperation.MarkAsRead => GetNotificationIconUri("mail-markread"),
|
||||
MailOperation.MoveToJunk => GetNotificationIconUri("mail-junk"),
|
||||
MailOperation.Reply => GetNotificationIconUri("mail-reply"),
|
||||
MailOperation.ReplyAll => GetNotificationIconUri("mail-replyall"),
|
||||
MailOperation.Forward => GetNotificationIconUri("mail-forward"),
|
||||
_ => null
|
||||
};
|
||||
|
||||
private static AppNotificationButton CreateDismissButton()
|
||||
=> new AppNotificationButton(Translator.Buttons_Dismiss)
|
||||
.SetIcon(GetNotificationIconUri("dismiss"))
|
||||
.AddArgument(Constants.ToastDismissActionKey, bool.TrueString);
|
||||
|
||||
private static AppNotificationBuilder CreateBuilder(AppNotificationScenario scenario = AppNotificationScenario.Default)
|
||||
=> new AppNotificationBuilder().SetScenario(scenario);
|
||||
|
||||
@@ -237,6 +237,18 @@ public class PreferencesService(IConfigurationService configurationService) : Ob
|
||||
set => SaveProperty(propertyName: nameof(StartupEntityId), value);
|
||||
}
|
||||
|
||||
public MailOperation FirstMailNotificationAction
|
||||
{
|
||||
get => _configurationService.Get(nameof(FirstMailNotificationAction), MailOperation.MarkAsRead);
|
||||
set => SetPropertyAndSave(nameof(FirstMailNotificationAction), value);
|
||||
}
|
||||
|
||||
public MailOperation SecondMailNotificationAction
|
||||
{
|
||||
get => _configurationService.Get(nameof(SecondMailNotificationAction), MailOperation.SoftDelete);
|
||||
set => SetPropertyAndSave(nameof(SecondMailNotificationAction), value);
|
||||
}
|
||||
|
||||
public AppLanguage CurrentLanguage
|
||||
{
|
||||
get => _configurationService.Get(nameof(CurrentLanguage), TranslationService.DefaultAppLanguage);
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
using Wino.Mail.ViewModels;
|
||||
|
||||
namespace Wino.Views.Abstract;
|
||||
|
||||
public abstract class MailNotificationSettingsPageAbstract : SettingsPageBase<MailNotificationSettingsPageViewModel> { }
|
||||
@@ -0,0 +1,49 @@
|
||||
<abstract:MailNotificationSettingsPageAbstract
|
||||
x:Class="Wino.Views.Settings.MailNotificationSettingsPage"
|
||||
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:mailViewModels="using:Wino.Mail.ViewModels"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
mc:Ignorable="d">
|
||||
|
||||
<ScrollViewer>
|
||||
<StackPanel Spacing="{StaticResource SettingsCardSpacing}">
|
||||
<controls:SettingsExpander
|
||||
Description="{x:Bind domain:Translator.SettingsMailNotifications_Actions_Description}"
|
||||
Header="{x:Bind domain:Translator.SettingsMailNotifications_Actions_Title}"
|
||||
IsExpanded="True">
|
||||
<controls:SettingsExpander.HeaderIcon>
|
||||
<PathIcon Data="F1 M 6.347656 16.25 L 3.701172 16.25 C 3.375651 16.25 3.064779 16.18327 2.768555 16.049805 C 2.472331 15.916342 2.211914 15.737305 1.987305 15.512695 C 1.762695 15.288086 1.583659 15.02767 1.450195 14.731445 C 1.316732 14.435222 1.25 14.12435 1.25 13.798828 L 1.25 3.701172 C 1.25 3.375652 1.316732 3.064779 1.450195 2.768555 C 1.583659 2.472332 1.762695 2.211914 1.987305 1.987305 C 2.211914 1.762695 2.472331 1.58366 2.768555 1.450195 C 3.064779 1.316732 3.375651 1.25 3.701172 1.25 L 16.298828 1.25 C 16.624348 1.25 16.935221 1.316732 17.231445 1.450195 C 17.527668 1.58366 17.788086 1.762695 18.012695 1.987305 C 18.237305 2.211914 18.41634 2.472332 18.549805 2.768555 C 18.683268 3.064779 18.75 3.375652 18.75 3.701172 L 18.75 13.798828 C 18.75 14.13737 18.681641 14.454753 18.544922 14.750977 C 18.408203 15.047201 18.22591 15.30599 17.998047 15.527344 C 17.770182 15.748698 17.504883 15.924479 17.202148 16.054688 C 16.899414 16.184896 16.582031 16.25 16.25 16.25 L 13.652344 16.25 L 10.46875 19.794922 C 10.345052 19.931641 10.188802 20 10 20 C 9.811197 20 9.654947 19.931641 9.53125 19.794922 Z M 15.625 7.5 C 15.79427 7.5 15.940754 7.438151 16.064453 7.314453 C 16.18815 7.190756 16.25 7.044271 16.25 6.875 C 16.25 6.705729 16.18815 6.559245 16.064453 6.435547 C 15.940754 6.31185 15.79427 6.25 15.625 6.25 L 4.375 6.25 C 4.205729 6.25 4.059245 6.31185 3.935547 6.435547 C 3.811849 6.559245 3.75 6.705729 3.75 6.875 C 3.75 7.044271 3.811849 7.190756 3.935547 7.314453 C 4.059245 7.438151 4.205729 7.5 4.375 7.5 Z M 15.625 11.25 C 15.79427 11.25 15.940754 11.188151 16.064453 11.064453 C 16.18815 10.940756 16.25 10.794271 16.25 10.625 C 16.25 10.455729 16.18815 10.309245 16.064453 10.185547 C 15.940754 10.06185 15.79427 10 15.625 10 L 4.375 10 C 4.205729 10 4.059245 10.06185 3.935547 10.185547 C 3.811849 10.309245 3.75 10.455729 3.75 10.625 C 3.75 10.794271 3.811849 10.940756 3.935547 11.064453 C 4.059245 11.188151 4.205729 11.25 4.375 11.25 Z " />
|
||||
</controls:SettingsExpander.HeaderIcon>
|
||||
<controls:SettingsExpander.Items>
|
||||
<controls:SettingsCard Description="{x:Bind domain:Translator.SettingsMailNotifications_FirstAction_Description}" Header="{x:Bind domain:Translator.SettingsMailNotifications_FirstAction_Title}">
|
||||
|
||||
<ComboBox ItemsSource="{x:Bind ViewModel.AvailableNotificationActions, Mode=OneWay}" SelectedItem="{x:Bind ViewModel.SelectedFirstAction, Mode=TwoWay}">
|
||||
<ComboBox.ItemTemplate>
|
||||
<DataTemplate x:DataType="mailViewModels:MailNotificationActionOption">
|
||||
<TextBlock Text="{x:Bind DisplayText}" />
|
||||
</DataTemplate>
|
||||
</ComboBox.ItemTemplate>
|
||||
</ComboBox>
|
||||
</controls:SettingsCard>
|
||||
|
||||
<controls:SettingsCard Description="{x:Bind domain:Translator.SettingsMailNotifications_SecondAction_Description}" Header="{x:Bind domain:Translator.SettingsMailNotifications_SecondAction_Title}">
|
||||
|
||||
<ComboBox ItemsSource="{x:Bind ViewModel.AvailableNotificationActions, Mode=OneWay}" SelectedItem="{x:Bind ViewModel.SelectedSecondAction, Mode=TwoWay}">
|
||||
<ComboBox.ItemTemplate>
|
||||
<DataTemplate x:DataType="mailViewModels:MailNotificationActionOption">
|
||||
<TextBlock Text="{x:Bind DisplayText}" />
|
||||
</DataTemplate>
|
||||
</ComboBox.ItemTemplate>
|
||||
</ComboBox>
|
||||
</controls:SettingsCard>
|
||||
</controls:SettingsExpander.Items>
|
||||
</controls:SettingsExpander>
|
||||
|
||||
</StackPanel>
|
||||
</ScrollViewer>
|
||||
</abstract:MailNotificationSettingsPageAbstract>
|
||||
@@ -0,0 +1,11 @@
|
||||
using Wino.Views.Abstract;
|
||||
|
||||
namespace Wino.Views.Settings;
|
||||
|
||||
public sealed partial class MailNotificationSettingsPage : MailNotificationSettingsPageAbstract
|
||||
{
|
||||
public MailNotificationSettingsPage()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||