Full trust Wino Server implementation. (#295)
* Separation of messages. Introducing Wino.Messages library. * Wino.Server and Wino.Packaging projects. Enabling full trust for UWP and app service connection manager basics. * Remove debug code. * Enable generating assembly info to deal with unsupported os platform warnings. * Fix server-client connection. * UIMessage communication. Single instancing for server and re-connection mechanism on suspension. * Removed IWinoSynchronizerFactory from UWP project. * Removal of background task service from core. * Delegating changes to UI and triggering new background synchronization. * Fix build error. * Moved core lib messages to Messaging project. * Better client-server communication. Handling of requests in the server. New synchronizer factory in the server. * WAM broker and MSAL token caching for OutlookAuthenticator. Handling account creation for Outlook. * WinoServerResponse basics. * Delegating protocol activation for Gmail authenticator. * Adding margin to searchbox to match action bar width. * Move libraries into lib folder. * Storing base64 encoded mime on draft creation instead of MimeMessage object. Fixes serialization/deserialization issue with S.T.Json * Scrollbar adjustments * WınoExpander for thread expander layout ıssue. * Handling synchronizer state changes. * Double init on background activation. * FIxing packaging issues and new Wino Mail launcher protocol for activation from full thrust process. * Remove debug deserialization. * Remove debug code. * Making sure the server connection is established when the app is launched. * Thrust -> Trust string replacement... * Rename package to Wino Mail * Enable translated values in the server. * Fixed an issue where toast activation can't find the clicked mail after the folder is initialized. * Revert debug code. * Change server background sync to every 3 minute and Inbox only synchronization. * Revert google auth changes. * App preferences page. * Changing tray icon visibility on preference change. * Start the server with invisible tray icon if set to invisible. * Reconnect button on the title bar. * Handling of toast actions. * Enable x86 build for server during packaging. * Get rid of old background tasks and v180 migration. * Terminate client when Exit clicked in server. * Introducing SynchronizationSource to prevent notifying UI after server tick synchronization. * Remove confirmAppClose restricted capability and unused debug code in manifest. * Closing the reconnect info popup when reconnect is clicked. * Custom RetryHandler for OutlookSynchronizer and separating client/server logs. * Running server on Windows startup. * Fix startup exe. * Fix for expander list view item paddings. * Force full sync on app launch instead of Inbox. * Fix draft creation. * Fix an issue with custom folder sync logic. * Reporting back account sync progress from server. * Fix sending drafts and missing notifications for imap. * Changing imap folder sync requirements. * Retain file count is set to 3. * Disabled swipe gestures temporarily due to native crash with SwipeControl * Save all attachments implementation. * Localization for save all attachments button. * Fix logging dates for logs. * Fixing ARM64 build. * Add ARM64 build config to packaging project. * Comment out OutOfProcPDB for ARM64. * Hnadling GONE response for Outlook folder synchronization.
This commit is contained in:
@@ -1,165 +0,0 @@
|
||||
using System.Diagnostics;
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.Toolkit.Uwp.Notifications;
|
||||
using Serilog;
|
||||
using Windows.ApplicationModel.Activation;
|
||||
using Windows.ApplicationModel.Background;
|
||||
using Windows.UI.Notifications;
|
||||
using Wino.Core;
|
||||
using Wino.Core.Domain;
|
||||
using Wino.Core.Domain.Enums;
|
||||
using Wino.Core.Domain.Interfaces;
|
||||
using Wino.Core.Domain.Models.MailItem;
|
||||
using Wino.Core.Domain.Models.Synchronization;
|
||||
using Wino.Core.UWP.Services;
|
||||
using Wino.Services;
|
||||
|
||||
namespace Wino.Activation
|
||||
{
|
||||
internal class BackgroundActivationHandler : ActivationHandler<BackgroundActivatedEventArgs>
|
||||
{
|
||||
private const string BackgroundExecutionLogTag = "[BackgroundExecution] ";
|
||||
|
||||
private readonly IWinoRequestDelegator _winoRequestDelegator;
|
||||
private readonly IBackgroundSynchronizer _backgroundSynchronizer;
|
||||
private readonly INativeAppService _nativeAppService;
|
||||
private readonly IWinoRequestProcessor _winoRequestProcessor;
|
||||
private readonly IWinoSynchronizerFactory _winoSynchronizerFactory;
|
||||
private readonly IMailService _mailService;
|
||||
private ToastArguments _toastArguments;
|
||||
|
||||
BackgroundTaskDeferral _deferral;
|
||||
public BackgroundActivationHandler(IWinoRequestDelegator winoRequestDelegator,
|
||||
IBackgroundSynchronizer backgroundSynchronizer,
|
||||
INativeAppService nativeAppService,
|
||||
IWinoRequestProcessor winoRequestProcessor,
|
||||
IWinoSynchronizerFactory winoSynchronizerFactory,
|
||||
IMailService mailService)
|
||||
{
|
||||
_winoRequestDelegator = winoRequestDelegator;
|
||||
_backgroundSynchronizer = backgroundSynchronizer;
|
||||
_nativeAppService = nativeAppService;
|
||||
_winoRequestProcessor = winoRequestProcessor;
|
||||
_winoSynchronizerFactory = winoSynchronizerFactory;
|
||||
_mailService = mailService;
|
||||
}
|
||||
|
||||
protected override async Task HandleInternalAsync(BackgroundActivatedEventArgs args)
|
||||
{
|
||||
var instance = args.TaskInstance;
|
||||
var taskName = instance.Task.Name;
|
||||
|
||||
instance.Canceled -= OnBackgroundExecutionCanceled;
|
||||
instance.Canceled += OnBackgroundExecutionCanceled;
|
||||
|
||||
_deferral = instance.GetDeferral();
|
||||
|
||||
if (taskName == BackgroundTaskService.ToastActivationTaskEx)
|
||||
{
|
||||
if (instance.TriggerDetails is ToastNotificationActionTriggerDetail toastNotificationActionTriggerDetail)
|
||||
_toastArguments = ToastArguments.Parse(toastNotificationActionTriggerDetail.Argument);
|
||||
|
||||
// All toast activation mail actions are handled here like mark as read or delete.
|
||||
// This should not launch the application on the foreground.
|
||||
|
||||
// Get the action and mail item id.
|
||||
// Prepare package and send to delegator.
|
||||
|
||||
if (_toastArguments.TryGetValue(Constants.ToastMailItemIdKey, out string mailItemId) &&
|
||||
_toastArguments.TryGetValue(Constants.ToastActionKey, out MailOperation action) &&
|
||||
_toastArguments.TryGetValue(Constants.ToastMailItemRemoteFolderIdKey, out string remoteFolderId))
|
||||
{
|
||||
var mailItem = await _mailService.GetSingleMailItemAsync(mailItemId, remoteFolderId);
|
||||
|
||||
if (mailItem == null) return;
|
||||
|
||||
if (_nativeAppService.IsAppRunning())
|
||||
{
|
||||
// Just send the package. We should reflect the UI changes as well.
|
||||
var package = new MailOperationPreperationRequest(action, mailItem);
|
||||
|
||||
await _winoRequestDelegator.ExecuteAsync(package);
|
||||
}
|
||||
else
|
||||
{
|
||||
// We need to synchronize changes without reflection the UI changes.
|
||||
|
||||
var synchronizer = _winoSynchronizerFactory.GetAccountSynchronizer(mailItem.AssignedAccount.Id);
|
||||
var prepRequest = new MailOperationPreperationRequest(action, mailItem);
|
||||
|
||||
var requests = await _winoRequestProcessor.PrepareRequestsAsync(prepRequest);
|
||||
|
||||
foreach (var request in requests)
|
||||
{
|
||||
synchronizer.QueueRequest(request);
|
||||
}
|
||||
|
||||
var options = new SynchronizationOptions()
|
||||
{
|
||||
Type = SynchronizationType.ExecuteRequests,
|
||||
AccountId = mailItem.AssignedAccount.Id
|
||||
};
|
||||
|
||||
await synchronizer.SynchronizeAsync(options);
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (taskName == BackgroundTaskService.BackgroundSynchronizationTimerTaskNameEx)
|
||||
{
|
||||
var watch = new Stopwatch();
|
||||
watch.Start();
|
||||
|
||||
// Run timer based background synchronization.
|
||||
|
||||
await _backgroundSynchronizer.RunBackgroundSynchronizationAsync(BackgroundSynchronizationReason.Timer);
|
||||
|
||||
watch.Stop();
|
||||
Log.Information($"{BackgroundExecutionLogTag}Background synchronization is completed in {watch.Elapsed.TotalSeconds} seconds.");
|
||||
}
|
||||
|
||||
instance.Canceled -= OnBackgroundExecutionCanceled;
|
||||
|
||||
_deferral.Complete();
|
||||
}
|
||||
|
||||
private void OnBackgroundExecutionCanceled(Windows.ApplicationModel.Background.IBackgroundTaskInstance sender, Windows.ApplicationModel.Background.BackgroundTaskCancellationReason reason)
|
||||
{
|
||||
Log.Error($"{BackgroundExecutionLogTag} ({sender.Task.Name}) Background task is canceled. Reason -> {reason}");
|
||||
|
||||
_deferral?.Complete();
|
||||
}
|
||||
|
||||
protected override bool CanHandleInternal(BackgroundActivatedEventArgs args)
|
||||
{
|
||||
var instance = args.TaskInstance;
|
||||
var taskName = instance.Task.Name;
|
||||
|
||||
if (taskName == BackgroundTaskService.ToastActivationTaskEx)
|
||||
{
|
||||
// User clicked Mark as Read or Delete in toast notification.
|
||||
// MailId and Action must present in the arguments.
|
||||
|
||||
return true;
|
||||
|
||||
//if (instance.TriggerDetails is ToastNotificationActionTriggerDetail toastNotificationActionTriggerDetail)
|
||||
//{
|
||||
// _toastArguments = ToastArguments.Parse(toastNotificationActionTriggerDetail.Argument);
|
||||
|
||||
// return
|
||||
// _toastArguments.Contains(Constants.ToastMailItemIdKey) &&
|
||||
// _toastArguments.Contains(Constants.ToastActionKey);
|
||||
//}
|
||||
|
||||
}
|
||||
else if (taskName == BackgroundTaskService.BackgroundSynchronizationTimerTaskNameEx)
|
||||
{
|
||||
// This is timer based background synchronization.
|
||||
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -3,8 +3,8 @@ using System.Web;
|
||||
using CommunityToolkit.Mvvm.Messaging;
|
||||
using Windows.ApplicationModel.Activation;
|
||||
using Wino.Core.Domain.Interfaces;
|
||||
using Wino.Core.Messages.Authorization;
|
||||
using Wino.Core.Messages.Shell;
|
||||
using Wino.Messaging.Client.Authorization;
|
||||
using Wino.Messaging.Client.Shell;
|
||||
|
||||
namespace Wino.Activation
|
||||
{
|
||||
@@ -25,7 +25,6 @@ namespace Wino.Activation
|
||||
protected override Task HandleInternalAsync(ProtocolActivatedEventArgs args)
|
||||
{
|
||||
// Check URI prefix.
|
||||
|
||||
var protocolString = args.Uri.AbsoluteUri;
|
||||
|
||||
// Google OAuth Response
|
||||
|
||||
@@ -7,7 +7,7 @@ using Serilog;
|
||||
using Windows.ApplicationModel.Activation;
|
||||
using Wino.Core.Domain;
|
||||
using Wino.Core.Domain.Interfaces;
|
||||
using Wino.Core.Messages.Accounts;
|
||||
using Wino.Messaging.Client.Accounts;
|
||||
|
||||
namespace Wino.Activation
|
||||
{
|
||||
@@ -39,7 +39,7 @@ namespace Wino.Activation
|
||||
// Otherwise we'll save it and handle it when the shell loads all accounts.
|
||||
|
||||
// Parse the mail unique id and perform above actions.
|
||||
if (Guid.TryParse(_toastArguments[Constants.ToastMailItemIdKey], out Guid mailItemUniqueId))
|
||||
if (Guid.TryParse(_toastArguments[Constants.ToastMailUniqueIdKey], out Guid mailItemUniqueId))
|
||||
{
|
||||
var account = await _mailService.GetMailAccountByUniqueIdAsync(mailItemUniqueId).ConfigureAwait(false);
|
||||
if (account == null) return;
|
||||
@@ -65,7 +65,7 @@ namespace Wino.Activation
|
||||
_toastArguments = ToastArguments.Parse(args.Argument);
|
||||
|
||||
return
|
||||
_toastArguments.Contains(Constants.ToastMailItemIdKey) &&
|
||||
_toastArguments.Contains(Constants.ToastMailUniqueIdKey) &&
|
||||
_toastArguments.Contains(Constants.ToastActionKey);
|
||||
}
|
||||
catch (Exception ex)
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
<Application
|
||||
x:Class="Wino.App"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:controls="using:Wino.Controls"
|
||||
xmlns:selectors="using:Wino.Selectors"
|
||||
xmlns:wino="using:Wino">
|
||||
<Application x:Class="Wino.App"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:controls="using:Wino.Controls"
|
||||
xmlns:selectors="using:Wino.Selectors"
|
||||
xmlns:wino="using:Wino">
|
||||
|
||||
<Application.Resources>
|
||||
<ResourceDictionary>
|
||||
@@ -61,10 +60,9 @@
|
||||
</Style>
|
||||
|
||||
<!-- Default Style for ContentDialog -->
|
||||
<Style
|
||||
x:Key="WinoDialogStyle"
|
||||
BasedOn="{StaticResource DefaultContentDialogStyle}"
|
||||
TargetType="ContentDialog" />
|
||||
<Style x:Key="WinoDialogStyle"
|
||||
BasedOn="{StaticResource DefaultContentDialogStyle}"
|
||||
TargetType="ContentDialog" />
|
||||
|
||||
<!-- Settings Menu Item Template -->
|
||||
<Style TargetType="controls:SettingsMenuItemControl">
|
||||
@@ -76,71 +74,63 @@
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="controls:SettingsMenuItemControl">
|
||||
<Grid>
|
||||
<Button
|
||||
Padding="0"
|
||||
HorizontalAlignment="Stretch"
|
||||
HorizontalContentAlignment="Stretch"
|
||||
Command="{TemplateBinding Command}"
|
||||
CommandParameter="{TemplateBinding CommandParameter}"
|
||||
IsEnabled="{TemplateBinding IsEnabled}"
|
||||
IsHitTestVisible="{TemplateBinding IsClickable}">
|
||||
<Grid
|
||||
Height="70"
|
||||
Padding="0,6,12,6"
|
||||
CornerRadius="4">
|
||||
<Button Padding="0"
|
||||
HorizontalAlignment="Stretch"
|
||||
HorizontalContentAlignment="Stretch"
|
||||
Command="{TemplateBinding Command}"
|
||||
CommandParameter="{TemplateBinding CommandParameter}"
|
||||
IsEnabled="{TemplateBinding IsEnabled}"
|
||||
IsHitTestVisible="{TemplateBinding IsClickable}">
|
||||
<Grid Height="70"
|
||||
Padding="0,6,12,6"
|
||||
CornerRadius="4">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="50" />
|
||||
<ColumnDefinition Width="*" />
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<ContentControl
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center"
|
||||
Content="{TemplateBinding Icon}" />
|
||||
<ContentControl HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center"
|
||||
Content="{TemplateBinding Icon}" />
|
||||
|
||||
<Grid
|
||||
Grid.Column="1"
|
||||
Margin="4,0"
|
||||
VerticalAlignment="Center"
|
||||
RowSpacing="3">
|
||||
<Grid Grid.Column="1"
|
||||
Margin="4,0"
|
||||
VerticalAlignment="Center"
|
||||
RowSpacing="3">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<TextBlock
|
||||
VerticalAlignment="Center"
|
||||
FontWeight="SemiBold"
|
||||
Style="{StaticResource BodyTextBlockStyle}"
|
||||
Text="{TemplateBinding Title}" />
|
||||
<TextBlock
|
||||
Grid.Row="1"
|
||||
VerticalAlignment="Center"
|
||||
Style="{StaticResource CaptionTextBlockStyle}"
|
||||
Text="{TemplateBinding Description}" />
|
||||
<TextBlock VerticalAlignment="Center"
|
||||
FontWeight="SemiBold"
|
||||
Style="{StaticResource BodyTextBlockStyle}"
|
||||
Text="{TemplateBinding Title}" />
|
||||
<TextBlock Grid.Row="1"
|
||||
VerticalAlignment="Center"
|
||||
Style="{StaticResource CaptionTextBlockStyle}"
|
||||
Text="{TemplateBinding Description}" />
|
||||
</Grid>
|
||||
|
||||
<Viewbox
|
||||
Grid.Column="0"
|
||||
Grid.ColumnSpan="2"
|
||||
Width="16"
|
||||
Height="16"
|
||||
HorizontalAlignment="Right"
|
||||
VerticalAlignment="Center"
|
||||
Visibility="{Binding RelativeSource={RelativeSource Mode=TemplatedParent}, Path=IsNavigateIconVisible}">
|
||||
<Viewbox Grid.Column="0"
|
||||
Grid.ColumnSpan="2"
|
||||
Width="16"
|
||||
Height="16"
|
||||
HorizontalAlignment="Right"
|
||||
VerticalAlignment="Center"
|
||||
Visibility="{Binding RelativeSource={RelativeSource Mode=TemplatedParent}, Path=IsNavigateIconVisible}">
|
||||
<PathIcon Data="F1 M 5.029297 19.091797 L 14.111328 10 L 5.029297 0.908203 L 5.908203 0.029297 L 15.888672 10 L 5.908203 19.970703 Z " />
|
||||
</Viewbox>
|
||||
</Grid>
|
||||
</Button>
|
||||
|
||||
<ContentControl
|
||||
Grid.RowSpan="2"
|
||||
Margin="0,0,16,0"
|
||||
HorizontalAlignment="Right"
|
||||
VerticalAlignment="Center"
|
||||
Content="{TemplateBinding SideContent}"
|
||||
IsHitTestVisible="True"
|
||||
Visibility="{Binding RelativeSource={RelativeSource Mode=TemplatedParent}, Path=IsNavigateIconVisible, Converter={StaticResource ReverseBooleanToVisibilityConverter}}" />
|
||||
<ContentControl Grid.RowSpan="2"
|
||||
Margin="0,0,16,0"
|
||||
HorizontalAlignment="Right"
|
||||
VerticalAlignment="Center"
|
||||
Content="{TemplateBinding SideContent}"
|
||||
IsHitTestVisible="True"
|
||||
Visibility="{Binding RelativeSource={RelativeSource Mode=TemplatedParent}, Path=IsNavigateIconVisible, Converter={StaticResource ReverseBooleanToVisibilityConverter}}" />
|
||||
</Grid>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
@@ -198,17 +188,16 @@
|
||||
<Image Source="/Assets/FileTypes/type_other.png" />
|
||||
</DataTemplate>
|
||||
|
||||
<selectors:FileAttachmentTypeSelector
|
||||
x:Key="FileTypeIconSelector"
|
||||
Archive="{StaticResource ArchiveTemplate}"
|
||||
Executable="{StaticResource ExecutableTemplate}"
|
||||
HTML="{StaticResource HTMLTemplate}"
|
||||
Image="{StaticResource ImageTemplate}"
|
||||
None="{StaticResource NoneTemplate}"
|
||||
Other="{StaticResource OtherTemplate}"
|
||||
PDF="{StaticResource PDFTemplate}"
|
||||
RarArchive="{StaticResource RarTemplate}"
|
||||
Video="{StaticResource VideoTemplate}" />
|
||||
<selectors:FileAttachmentTypeSelector x:Key="FileTypeIconSelector"
|
||||
Archive="{StaticResource ArchiveTemplate}"
|
||||
Executable="{StaticResource ExecutableTemplate}"
|
||||
HTML="{StaticResource HTMLTemplate}"
|
||||
Image="{StaticResource ImageTemplate}"
|
||||
None="{StaticResource NoneTemplate}"
|
||||
Other="{StaticResource OtherTemplate}"
|
||||
PDF="{StaticResource PDFTemplate}"
|
||||
RarArchive="{StaticResource RarTemplate}"
|
||||
Video="{StaticResource VideoTemplate}" />
|
||||
</ResourceDictionary>
|
||||
|
||||
<XamlControlsResources xmlns="using:Microsoft.UI.Xaml.Controls" />
|
||||
|
||||
@@ -1,8 +1,11 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using CommunityToolkit.Mvvm.Messaging;
|
||||
using CommunityToolkit.WinUI.Notifications;
|
||||
using Microsoft.AppCenter;
|
||||
using Microsoft.AppCenter.Analytics;
|
||||
using Microsoft.AppCenter.Crashes;
|
||||
@@ -10,26 +13,36 @@ using Microsoft.Extensions.DependencyInjection;
|
||||
using Serilog;
|
||||
using Windows.ApplicationModel;
|
||||
using Windows.ApplicationModel.Activation;
|
||||
using Windows.ApplicationModel.AppService;
|
||||
using Windows.ApplicationModel.Background;
|
||||
using Windows.ApplicationModel.Core;
|
||||
using Windows.Foundation.Metadata;
|
||||
using Windows.Storage;
|
||||
using Windows.System.Profile;
|
||||
using Windows.UI;
|
||||
using Windows.UI.Notifications;
|
||||
using Windows.UI.ViewManagement;
|
||||
using Windows.UI.Xaml;
|
||||
using Windows.UI.Xaml.Controls;
|
||||
using Wino.Activation;
|
||||
using Wino.Core;
|
||||
using Wino.Core.Domain;
|
||||
using Wino.Core.Domain.Enums;
|
||||
using Wino.Core.Domain.Exceptions;
|
||||
using Wino.Core.Domain.Interfaces;
|
||||
using Wino.Core.Domain.Models.MailItem;
|
||||
using Wino.Core.Domain.Models.Synchronization;
|
||||
using Wino.Core.Services;
|
||||
using Wino.Core.UWP;
|
||||
using Wino.Core.UWP.Services;
|
||||
using Wino.Mail.ViewModels;
|
||||
using Wino.Messaging.Client.Connection;
|
||||
using Wino.Messaging.Server;
|
||||
using Wino.Services;
|
||||
|
||||
namespace Wino
|
||||
{
|
||||
public sealed partial class App : Application
|
||||
public sealed partial class App : Application, IRecipient<NewSynchronizationRequested>
|
||||
{
|
||||
private const string WinoLaunchLogPrefix = "[Wino Launch] ";
|
||||
private const string AppCenterKey = "90deb1d0-a77f-47d0-8a6b-7eaf111c6b72";
|
||||
@@ -37,20 +50,25 @@ namespace Wino
|
||||
public new static App Current => (App)Application.Current;
|
||||
public IServiceProvider Services { get; }
|
||||
|
||||
private BackgroundTaskDeferral connectionBackgroundTaskDeferral;
|
||||
private BackgroundTaskDeferral toastActionBackgroundTaskDeferral;
|
||||
|
||||
private readonly IWinoServerConnectionManager<AppServiceConnection> _appServiceConnectionManager;
|
||||
private readonly ILogInitializer _logInitializer;
|
||||
private readonly IThemeService _themeService;
|
||||
private readonly IDatabaseService _databaseService;
|
||||
private readonly IAppInitializerService _appInitializerService;
|
||||
private readonly IWinoSynchronizerFactory _synchronizerFactory;
|
||||
private readonly IApplicationConfiguration _appInitializerService;
|
||||
private readonly ITranslationService _translationService;
|
||||
private readonly IApplicationConfiguration _applicationFolderConfiguration;
|
||||
private readonly IDialogService _dialogService;
|
||||
|
||||
// Order matters.
|
||||
private List<IInitializeAsync> initializeServices => new List<IInitializeAsync>()
|
||||
{
|
||||
_translationService,
|
||||
_databaseService,
|
||||
_appServiceConnectionManager,
|
||||
_translationService,
|
||||
_themeService,
|
||||
_synchronizerFactory
|
||||
};
|
||||
|
||||
public App()
|
||||
@@ -61,6 +79,9 @@ namespace Wino
|
||||
EnteredBackground += OnEnteredBackground;
|
||||
LeavingBackground += OnLeavingBackground;
|
||||
|
||||
Resuming += OnResuming;
|
||||
Suspending += OnSuspending;
|
||||
|
||||
Services = ConfigureServices();
|
||||
|
||||
_logInitializer = Services.GetService<ILogInitializer>();
|
||||
@@ -70,13 +91,37 @@ namespace Wino
|
||||
ConfigurePrelaunch();
|
||||
ConfigureXbox();
|
||||
|
||||
_applicationFolderConfiguration = Services.GetService<IApplicationConfiguration>();
|
||||
|
||||
// Make sure the paths are setup on app start.
|
||||
_applicationFolderConfiguration.ApplicationDataFolderPath = ApplicationData.Current.LocalFolder.Path;
|
||||
_applicationFolderConfiguration.PublisherSharedFolderPath = ApplicationData.Current.GetPublisherCacheFolder(ApplicationConfiguration.SharedFolderName).Path;
|
||||
|
||||
_appServiceConnectionManager = Services.GetService<IWinoServerConnectionManager<AppServiceConnection>>();
|
||||
_themeService = Services.GetService<IThemeService>();
|
||||
_databaseService = Services.GetService<IDatabaseService>();
|
||||
_appInitializerService = Services.GetService<IAppInitializerService>();
|
||||
_synchronizerFactory = Services.GetService<IWinoSynchronizerFactory>();
|
||||
_appInitializerService = Services.GetService<IApplicationConfiguration>();
|
||||
_translationService = Services.GetService<ITranslationService>();
|
||||
_dialogService = Services.GetService<IDialogService>();
|
||||
|
||||
Encoding.RegisterProvider(CodePagesEncodingProvider.Instance);
|
||||
|
||||
WeakReferenceMessenger.Default.Register(this);
|
||||
}
|
||||
|
||||
private async void OnResuming(object sender, object e)
|
||||
{
|
||||
// App Service connection was lost on suspension.
|
||||
// We must restore it.
|
||||
// Server might be running already, but re-launching it will trigger a new connection attempt.
|
||||
|
||||
await _appServiceConnectionManager.ConnectAsync();
|
||||
}
|
||||
|
||||
private void OnSuspending(object sender, SuspendingEventArgs e)
|
||||
{
|
||||
var deferral = e.SuspendingOperation.GetDeferral();
|
||||
deferral.Complete();
|
||||
}
|
||||
|
||||
private void LogActivation(string log) => Log.Information($"{WinoLaunchLogPrefix}{log}");
|
||||
@@ -101,7 +146,7 @@ namespace Wino
|
||||
private void RegisterActivationHandlers(IServiceCollection services)
|
||||
{
|
||||
services.AddTransient<ProtocolActivationHandler>();
|
||||
services.AddTransient<BackgroundActivationHandler>();
|
||||
// services.AddTransient<BackgroundActivationHandler>();
|
||||
services.AddTransient<ToastNotificationActivationHandler>();
|
||||
services.AddTransient<FileActivationHandler>();
|
||||
}
|
||||
@@ -138,13 +183,18 @@ namespace Wino
|
||||
services.AddTransient(typeof(ReadComposePanePageViewModel));
|
||||
services.AddTransient(typeof(MergedAccountDetailsPageViewModel));
|
||||
services.AddTransient(typeof(LanguageTimePageViewModel));
|
||||
services.AddTransient(typeof(AppPreferencesPageViewModel));
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Misc Configuration
|
||||
|
||||
private void ConfigureLogger() => _logInitializer.SetupLogger(ApplicationData.Current.LocalFolder.Path);
|
||||
private void ConfigureLogger()
|
||||
{
|
||||
string logFilePath = Path.Combine(ApplicationData.Current.LocalFolder.Path, Constants.ClientLogFile);
|
||||
_logInitializer.SetupLogger(logFilePath);
|
||||
}
|
||||
|
||||
private void ConfigureAppCenter() => AppCenter.Start(AppCenterKey, typeof(Analytics), typeof(Crashes));
|
||||
|
||||
@@ -221,9 +271,79 @@ namespace Wino
|
||||
{
|
||||
base.OnBackgroundActivated(args);
|
||||
|
||||
LogActivation($"OnBackgroundActivated -> {args.GetType().Name}, TaskInstanceIdName -> {args.TaskInstance?.Task?.Name ?? "NA"}");
|
||||
if (args.TaskInstance.TriggerDetails is AppServiceTriggerDetails appServiceTriggerDetails)
|
||||
{
|
||||
// Only accept connections from callers in the same package
|
||||
if (appServiceTriggerDetails.CallerPackageFamilyName == Package.Current.Id.FamilyName)
|
||||
{
|
||||
// Connection established from the fulltrust process
|
||||
|
||||
await ActivateWinoAsync(args);
|
||||
connectionBackgroundTaskDeferral = args.TaskInstance.GetDeferral();
|
||||
args.TaskInstance.Canceled += OnConnectionBackgroundTaskCanceled;
|
||||
|
||||
_appServiceConnectionManager.Connection = appServiceTriggerDetails.AppServiceConnection;
|
||||
|
||||
WeakReferenceMessenger.Default.Send(new WinoServerConnectionEstrablished());
|
||||
}
|
||||
}
|
||||
else if (args.TaskInstance.TriggerDetails is ToastNotificationActionTriggerDetail toastNotificationActionTriggerDetail)
|
||||
{
|
||||
await InitializeServicesAsync();
|
||||
|
||||
// Notification action is triggered and the app is not running.
|
||||
|
||||
toastActionBackgroundTaskDeferral = args.TaskInstance.GetDeferral();
|
||||
|
||||
args.TaskInstance.Canceled += OnToastActionClickedBackgroundTaskCanceled;
|
||||
|
||||
var toastArguments = ToastArguments.Parse(toastNotificationActionTriggerDetail.Argument);
|
||||
|
||||
// All toast activation mail actions are handled here like mark as read or delete.
|
||||
// This should not launch the application on the foreground.
|
||||
|
||||
// Get the action and mail item id.
|
||||
// Prepare package and send to delegator.
|
||||
|
||||
if (toastArguments.TryGetValue(Constants.ToastActionKey, out MailOperation action) &&
|
||||
toastArguments.TryGetValue(Constants.ToastMailUniqueIdKey, out string mailUniqueIdString) &&
|
||||
Guid.TryParse(mailUniqueIdString, out Guid mailUniqueId))
|
||||
{
|
||||
|
||||
// At this point server should've already been connected.
|
||||
|
||||
var processor = Services.GetService<IWinoRequestProcessor>();
|
||||
var delegator = Services.GetService<IWinoRequestDelegator>();
|
||||
var mailService = Services.GetService<IMailService>();
|
||||
|
||||
var mailItem = await mailService.GetSingleMailItemAsync(mailUniqueId);
|
||||
|
||||
if (mailItem != null)
|
||||
{
|
||||
var package = new MailOperationPreperationRequest(action, mailItem);
|
||||
|
||||
await delegator.ExecuteAsync(package);
|
||||
}
|
||||
}
|
||||
|
||||
toastActionBackgroundTaskDeferral.Complete();
|
||||
}
|
||||
else
|
||||
{
|
||||
// Other background activations might have handlers.
|
||||
// AppServiceTrigger is handled here because delegating it to handlers somehow make it not work...
|
||||
|
||||
await ActivateWinoAsync(args);
|
||||
}
|
||||
}
|
||||
|
||||
private void OnToastActionClickedBackgroundTaskCanceled(IBackgroundTaskInstance sender, BackgroundTaskCancellationReason reason)
|
||||
{
|
||||
sender.Canceled -= OnToastActionClickedBackgroundTaskCanceled;
|
||||
|
||||
Log.Information($"Toast action background task was canceled. Reason: {reason}");
|
||||
|
||||
toastActionBackgroundTaskDeferral?.Complete();
|
||||
toastActionBackgroundTaskDeferral = null;
|
||||
}
|
||||
|
||||
private void OnAppUnhandledException(object sender, Windows.UI.Xaml.UnhandledExceptionEventArgs e)
|
||||
@@ -244,9 +364,17 @@ namespace Wino
|
||||
|
||||
private bool IsInteractiveLaunchArgs(object args) => args is IActivatedEventArgs;
|
||||
|
||||
private async Task InitializeServicesAsync()
|
||||
{
|
||||
foreach (var service in initializeServices)
|
||||
{
|
||||
await service.InitializeAsync();
|
||||
}
|
||||
}
|
||||
|
||||
private async Task ActivateWinoAsync(object args)
|
||||
{
|
||||
await PreInitializationAsync();
|
||||
await InitializeServicesAsync();
|
||||
|
||||
if (IsInteractiveLaunchArgs(args))
|
||||
{
|
||||
@@ -270,37 +398,6 @@ namespace Wino
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Tasks that must run before the activation and launch.
|
||||
/// Regardless of whether it's an interactive launch or not.
|
||||
/// </summary>
|
||||
private async Task PreInitializationAsync()
|
||||
{
|
||||
// Handle migrations.
|
||||
// TODO: Automate migration process with more proper way.
|
||||
|
||||
if (!ApplicationData.Current.LocalSettings.Values.ContainsKey("Migration_169"))
|
||||
{
|
||||
try
|
||||
{
|
||||
await _appInitializerService.MigrateAsync();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Log.Error(ex, $"{WinoLaunchLogPrefix}Migration_169 failed.");
|
||||
}
|
||||
finally
|
||||
{
|
||||
ApplicationData.Current.LocalSettings.Values["Migration_169"] = true;
|
||||
}
|
||||
}
|
||||
|
||||
foreach (var service in initializeServices)
|
||||
{
|
||||
await service.InitializeAsync();
|
||||
}
|
||||
}
|
||||
|
||||
private async Task HandleActivationAsync(object activationArgs)
|
||||
{
|
||||
var activationHandler = GetActivationHandlers().FirstOrDefault(h => h.CanHandle(activationArgs));
|
||||
@@ -323,9 +420,35 @@ namespace Wino
|
||||
private IEnumerable<ActivationHandler> GetActivationHandlers()
|
||||
{
|
||||
yield return Services.GetService<ProtocolActivationHandler>();
|
||||
yield return Services.GetService<BackgroundActivationHandler>();
|
||||
yield return Services.GetService<ToastNotificationActivationHandler>();
|
||||
yield return Services.GetService<FileActivationHandler>();
|
||||
}
|
||||
|
||||
public async void OnConnectionBackgroundTaskCanceled(IBackgroundTaskInstance sender, BackgroundTaskCancellationReason reason)
|
||||
{
|
||||
sender.Canceled -= OnConnectionBackgroundTaskCanceled;
|
||||
|
||||
Log.Information($"Background task {sender.Task.Name} was canceled. Reason: {reason}");
|
||||
|
||||
await _appServiceConnectionManager.DisconnectAsync();
|
||||
|
||||
connectionBackgroundTaskDeferral?.Complete();
|
||||
connectionBackgroundTaskDeferral = null;
|
||||
|
||||
_appServiceConnectionManager.Connection = null;
|
||||
}
|
||||
|
||||
public async void Receive(NewSynchronizationRequested message)
|
||||
{
|
||||
try
|
||||
{
|
||||
var synchronizationResultResponse = await _appServiceConnectionManager.GetResponseAsync<SynchronizationResult, NewSynchronizationRequested>(message);
|
||||
synchronizationResultResponse.ThrowIfFailed();
|
||||
}
|
||||
catch (WinoServerException serverException)
|
||||
{
|
||||
_dialogService.InfoBarMessage(Translator.Info_SyncFailedTitle, serverException.Message, InfoBarMessageType.Error);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -17,13 +17,13 @@ using Wino.Core.Domain.Interfaces;
|
||||
using Wino.Core.Domain.Models.Folders;
|
||||
using Wino.Core.Domain.Models.MailItem;
|
||||
using Wino.Core.Domain.Models.Navigation;
|
||||
using Wino.Core.Messages.Accounts;
|
||||
using Wino.Core.Messages.Mails;
|
||||
using Wino.Core.Messages.Shell;
|
||||
using Wino.Extensions;
|
||||
using Wino.Mail.ViewModels.Data;
|
||||
using Wino.MenuFlyouts;
|
||||
using Wino.MenuFlyouts.Context;
|
||||
using Wino.Messaging.Client.Accounts;
|
||||
using Wino.Messaging.Client.Mails;
|
||||
using Wino.Messaging.Client.Shell;
|
||||
using Wino.Views.Abstract;
|
||||
|
||||
namespace Wino.Views
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
<ResourceDictionary
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:xaml="using:Windows.UI.Xaml">
|
||||
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:xaml="using:Windows.UI.Xaml">
|
||||
|
||||
<x:String x:Key="ThemeName">Mica</x:String>
|
||||
<x:Boolean x:Key="UseMica">True</x:Boolean>
|
||||
|
||||
@@ -5,9 +5,9 @@ using Microsoft.Extensions.DependencyInjection;
|
||||
using Windows.UI.Xaml;
|
||||
using Windows.UI.Xaml.Controls;
|
||||
using Windows.UI.Xaml.Navigation;
|
||||
using Wino.Core.Messages.Shell;
|
||||
using Wino.Core.UWP;
|
||||
using Wino.Mail.ViewModels;
|
||||
using Wino.Messaging.Client.Shell;
|
||||
|
||||
namespace Wino
|
||||
{
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -1,6 +1,8 @@
|
||||
using Windows.Foundation;
|
||||
using System.Windows.Input;
|
||||
using Windows.Foundation;
|
||||
using Windows.UI.Xaml;
|
||||
using Windows.UI.Xaml.Controls;
|
||||
using Wino.Core.Domain.Enums;
|
||||
|
||||
namespace Wino.Controls.Advanced
|
||||
{
|
||||
@@ -8,6 +10,31 @@ namespace Wino.Controls.Advanced
|
||||
{
|
||||
public event TypedEventHandler<WinoAppTitleBar, RoutedEventArgs> BackButtonClicked;
|
||||
|
||||
public static readonly DependencyProperty IsRenderingPaneVisibleProperty = DependencyProperty.Register(nameof(IsRenderingPaneVisible), typeof(bool), typeof(WinoAppTitleBar), new PropertyMetadata(false, OnDrawingPropertyChanged));
|
||||
public static readonly DependencyProperty IsReaderNarrowedProperty = DependencyProperty.Register(nameof(IsReaderNarrowed), typeof(bool), typeof(WinoAppTitleBar), new PropertyMetadata(false, OnIsReaderNarrowedChanged));
|
||||
public static readonly DependencyProperty IsBackButtonVisibleProperty = DependencyProperty.Register(nameof(IsBackButtonVisible), typeof(bool), typeof(WinoAppTitleBar), new PropertyMetadata(false, OnDrawingPropertyChanged));
|
||||
public static readonly DependencyProperty OpenPaneLengthProperty = DependencyProperty.Register(nameof(OpenPaneLength), typeof(double), typeof(WinoAppTitleBar), new PropertyMetadata(0d, OnDrawingPropertyChanged));
|
||||
public static readonly DependencyProperty IsNavigationPaneOpenProperty = DependencyProperty.Register(nameof(IsNavigationPaneOpen), typeof(bool), typeof(WinoAppTitleBar), new PropertyMetadata(false, OnDrawingPropertyChanged));
|
||||
public static readonly DependencyProperty NavigationViewDisplayModeProperty = DependencyProperty.Register(nameof(NavigationViewDisplayMode), typeof(Microsoft.UI.Xaml.Controls.NavigationViewDisplayMode), typeof(WinoAppTitleBar), new PropertyMetadata(Microsoft.UI.Xaml.Controls.NavigationViewDisplayMode.Compact, OnDrawingPropertyChanged));
|
||||
public static readonly DependencyProperty ShellFrameContentProperty = DependencyProperty.Register(nameof(ShellFrameContent), typeof(UIElement), typeof(WinoAppTitleBar), new PropertyMetadata(null, OnDrawingPropertyChanged));
|
||||
public static readonly DependencyProperty SystemReservedProperty = DependencyProperty.Register(nameof(SystemReserved), typeof(double), typeof(WinoAppTitleBar), new PropertyMetadata(0, OnDrawingPropertyChanged));
|
||||
public static readonly DependencyProperty CoreWindowTextProperty = DependencyProperty.Register(nameof(CoreWindowText), typeof(string), typeof(WinoAppTitleBar), new PropertyMetadata(string.Empty, OnDrawingPropertyChanged));
|
||||
public static readonly DependencyProperty ReadingPaneLengthProperty = DependencyProperty.Register(nameof(ReadingPaneLength), typeof(double), typeof(WinoAppTitleBar), new PropertyMetadata(420d, OnDrawingPropertyChanged));
|
||||
public static readonly DependencyProperty ConnectionStatusProperty = DependencyProperty.Register(nameof(ConnectionStatus), typeof(WinoServerConnectionStatus), typeof(WinoAppTitleBar), new PropertyMetadata(WinoServerConnectionStatus.None, new PropertyChangedCallback(OnConnectionStatusChanged)));
|
||||
public static readonly DependencyProperty ReconnectCommandProperty = DependencyProperty.Register(nameof(ReconnectCommand), typeof(ICommand), typeof(WinoAppTitleBar), new PropertyMetadata(null));
|
||||
|
||||
public ICommand ReconnectCommand
|
||||
{
|
||||
get { return (ICommand)GetValue(ReconnectCommandProperty); }
|
||||
set { SetValue(ReconnectCommandProperty, value); }
|
||||
}
|
||||
|
||||
public WinoServerConnectionStatus ConnectionStatus
|
||||
{
|
||||
get { return (WinoServerConnectionStatus)GetValue(ConnectionStatusProperty); }
|
||||
set { SetValue(ConnectionStatusProperty, value); }
|
||||
}
|
||||
|
||||
public string CoreWindowText
|
||||
{
|
||||
get { return (string)GetValue(CoreWindowTextProperty); }
|
||||
@@ -62,16 +89,7 @@ namespace Wino.Controls.Advanced
|
||||
set { SetValue(IsRenderingPaneVisibleProperty, value); }
|
||||
}
|
||||
|
||||
public static readonly DependencyProperty IsRenderingPaneVisibleProperty = DependencyProperty.Register(nameof(IsRenderingPaneVisible), typeof(bool), typeof(WinoAppTitleBar), new PropertyMetadata(false, OnDrawingPropertyChanged));
|
||||
public static readonly DependencyProperty IsReaderNarrowedProperty = DependencyProperty.Register(nameof(IsReaderNarrowed), typeof(bool), typeof(WinoAppTitleBar), new PropertyMetadata(false, OnIsReaderNarrowedChanged));
|
||||
public static readonly DependencyProperty IsBackButtonVisibleProperty = DependencyProperty.Register(nameof(IsBackButtonVisible), typeof(bool), typeof(WinoAppTitleBar), new PropertyMetadata(false, OnDrawingPropertyChanged));
|
||||
public static readonly DependencyProperty OpenPaneLengthProperty = DependencyProperty.Register(nameof(OpenPaneLength), typeof(double), typeof(WinoAppTitleBar), new PropertyMetadata(0d, OnDrawingPropertyChanged));
|
||||
public static readonly DependencyProperty IsNavigationPaneOpenProperty = DependencyProperty.Register(nameof(IsNavigationPaneOpen), typeof(bool), typeof(WinoAppTitleBar), new PropertyMetadata(false, OnDrawingPropertyChanged));
|
||||
public static readonly DependencyProperty NavigationViewDisplayModeProperty = DependencyProperty.Register(nameof(NavigationViewDisplayMode), typeof(Microsoft.UI.Xaml.Controls.NavigationViewDisplayMode), typeof(WinoAppTitleBar), new PropertyMetadata(Microsoft.UI.Xaml.Controls.NavigationViewDisplayMode.Compact, OnDrawingPropertyChanged));
|
||||
public static readonly DependencyProperty ShellFrameContentProperty = DependencyProperty.Register(nameof(ShellFrameContent), typeof(UIElement), typeof(WinoAppTitleBar), new PropertyMetadata(null, OnDrawingPropertyChanged));
|
||||
public static readonly DependencyProperty SystemReservedProperty = DependencyProperty.Register(nameof(SystemReserved), typeof(double), typeof(WinoAppTitleBar), new PropertyMetadata(0, OnDrawingPropertyChanged));
|
||||
public static readonly DependencyProperty CoreWindowTextProperty = DependencyProperty.Register(nameof(CoreWindowText), typeof(string), typeof(WinoAppTitleBar), new PropertyMetadata(string.Empty, OnDrawingPropertyChanged));
|
||||
public static readonly DependencyProperty ReadingPaneLengthProperty = DependencyProperty.Register(nameof(ReadingPaneLength), typeof(double), typeof(WinoAppTitleBar), new PropertyMetadata(420d, OnDrawingPropertyChanged));
|
||||
|
||||
|
||||
|
||||
public double ReadingPaneLength
|
||||
@@ -96,6 +114,19 @@ namespace Wino.Controls.Advanced
|
||||
}
|
||||
}
|
||||
|
||||
private static void OnConnectionStatusChanged(DependencyObject obj, DependencyPropertyChangedEventArgs args)
|
||||
{
|
||||
if (obj is WinoAppTitleBar bar)
|
||||
{
|
||||
bar.UpdateConnectionStatus();
|
||||
}
|
||||
}
|
||||
|
||||
private void UpdateConnectionStatus()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
private void DrawTitleBar()
|
||||
{
|
||||
UpdateLayout();
|
||||
@@ -162,5 +193,17 @@ namespace Wino.Controls.Advanced
|
||||
}
|
||||
|
||||
private void TitlebarSizeChanged(object sender, SizeChangedEventArgs e) => DrawTitleBar();
|
||||
|
||||
private void ReconnectClicked(object sender, RoutedEventArgs e)
|
||||
{
|
||||
// Close the popup for reconnect button.
|
||||
if (sender is Button senderButton && senderButton.Flyout is Flyout senderButtonFlyout)
|
||||
{
|
||||
senderButtonFlyout.Hide();
|
||||
}
|
||||
|
||||
// Execute the reconnect command.
|
||||
ReconnectCommand?.Execute(null);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -378,5 +378,20 @@ namespace Wino.Controls.Advanced
|
||||
internalScrollviewer.ViewChanged -= InternalScrollVeiwerViewChanged;
|
||||
}
|
||||
}
|
||||
|
||||
protected override DependencyObject GetContainerForItemOverride()
|
||||
{
|
||||
var itemContainer = base.GetContainerForItemOverride();
|
||||
|
||||
// Adjust scrolling margin for all containers.
|
||||
// I don't want to override the default style for this.
|
||||
|
||||
if (itemContainer is ListViewItem listViewItem)
|
||||
{
|
||||
listViewItem.Margin = new Thickness(0, 0, 12, 4);
|
||||
}
|
||||
|
||||
return itemContainer;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
17
Wino.Mail/Controls/WinoExpander.cs
Normal file
17
Wino.Mail/Controls/WinoExpander.cs
Normal file
@@ -0,0 +1,17 @@
|
||||
using Microsoft.UI.Xaml.Controls;
|
||||
using Windows.UI.Xaml.Controls.Primitives;
|
||||
|
||||
namespace Wino.Controls
|
||||
{
|
||||
public class WinoExpander : Expander
|
||||
{
|
||||
protected override void OnApplyTemplate()
|
||||
{
|
||||
base.OnApplyTemplate();
|
||||
if (GetTemplateChild("ExpanderHeader") is ToggleButton toggleButton)
|
||||
{
|
||||
toggleButton.Padding = new Windows.UI.Xaml.Thickness(0, 4, 0, 4);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -6,7 +6,7 @@ using Windows.UI.Xaml.Media.Animation;
|
||||
using Wino.Core.Domain.Entities;
|
||||
using Wino.Core.Domain.Enums;
|
||||
using Wino.Core.Domain.Interfaces;
|
||||
using Wino.Core.Messages.Mails;
|
||||
using Wino.Messaging.Client.Mails;
|
||||
using Wino.Views.ImapSetup;
|
||||
|
||||
namespace Wino.Dialogs
|
||||
|
||||
@@ -10,7 +10,7 @@ using Windows.UI.Xaml.Controls;
|
||||
using Wino.Core.Domain;
|
||||
using Wino.Core.Domain.Entities;
|
||||
using Wino.Core.Domain.Interfaces;
|
||||
using Wino.Core.Domain.Models.Requests;
|
||||
using Wino.Core.Domain.Models.Reader;
|
||||
using Wino.Views.Settings;
|
||||
|
||||
namespace Wino.Dialogs
|
||||
@@ -329,41 +329,41 @@ namespace Wino.Dialogs
|
||||
{
|
||||
var change = JsonConvert.DeserializeObject<WebViewMessage>(args.WebMessageAsJson);
|
||||
|
||||
if (change.type == "bold")
|
||||
if (change.Type == "bold")
|
||||
{
|
||||
BoldButton.IsChecked = change.value == "true";
|
||||
BoldButton.IsChecked = change.Value == "true";
|
||||
}
|
||||
else if (change.type == "italic")
|
||||
else if (change.Type == "italic")
|
||||
{
|
||||
ItalicButton.IsChecked = change.value == "true";
|
||||
ItalicButton.IsChecked = change.Value == "true";
|
||||
}
|
||||
else if (change.type == "underline")
|
||||
else if (change.Type == "underline")
|
||||
{
|
||||
UnderlineButton.IsChecked = change.value == "true";
|
||||
UnderlineButton.IsChecked = change.Value == "true";
|
||||
}
|
||||
else if (change.type == "strikethrough")
|
||||
else if (change.Type == "strikethrough")
|
||||
{
|
||||
StrokeButton.IsChecked = change.value == "true";
|
||||
StrokeButton.IsChecked = change.Value == "true";
|
||||
}
|
||||
else if (change.type == "ol")
|
||||
else if (change.Type == "ol")
|
||||
{
|
||||
OrderedListButton.IsChecked = change.value == "true";
|
||||
OrderedListButton.IsChecked = change.Value == "true";
|
||||
}
|
||||
else if (change.type == "ul")
|
||||
else if (change.Type == "ul")
|
||||
{
|
||||
BulletListButton.IsChecked = change.value == "true";
|
||||
BulletListButton.IsChecked = change.Value == "true";
|
||||
}
|
||||
else if (change.type == "indent")
|
||||
else if (change.Type == "indent")
|
||||
{
|
||||
IncreaseIndentButton.IsEnabled = change.value == "disabled" ? false : true;
|
||||
IncreaseIndentButton.IsEnabled = change.Value == "disabled" ? false : true;
|
||||
}
|
||||
else if (change.type == "outdent")
|
||||
else if (change.Type == "outdent")
|
||||
{
|
||||
DecreaseIndentButton.IsEnabled = change.value == "disabled" ? false : true;
|
||||
DecreaseIndentButton.IsEnabled = change.Value == "disabled" ? false : true;
|
||||
}
|
||||
else if (change.type == "alignment")
|
||||
else if (change.Type == "alignment")
|
||||
{
|
||||
var parsedValue = change.value switch
|
||||
var parsedValue = change.Value switch
|
||||
{
|
||||
"jodit-icon_left" => 0,
|
||||
"jodit-icon_center" => 1,
|
||||
|
||||
@@ -63,13 +63,11 @@ namespace Wino.Helpers
|
||||
return prefer24HourTime ? localTime.ToString(TwentyFourHourTimeFormat) : localTime.ToString(TwelveHourTimeFormat);
|
||||
}
|
||||
}
|
||||
|
||||
public static string GetCreationDateString(DateTime date, bool prefer24HourTime)
|
||||
{
|
||||
var localTime = date.ToLocalTime();
|
||||
return $"{localTime.ToLongDateString()} {(prefer24HourTime ? localTime.ToString(TwentyFourHourTimeFormat) : localTime.ToString(TwelveHourTimeFormat))}";
|
||||
}
|
||||
|
||||
public static string GetMailGroupDateString(object groupObject)
|
||||
{
|
||||
if (groupObject is string stringObject)
|
||||
@@ -103,6 +101,7 @@ namespace Wino.Helpers
|
||||
|
||||
return Translator.UnknownDateHeader;
|
||||
}
|
||||
public static bool ConnectionStatusEquals(WinoServerConnectionStatus winoServerConnectionStatus, WinoServerConnectionStatus connectionStatus) => winoServerConnectionStatus == connectionStatus;
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
@@ -92,13 +92,6 @@
|
||||
Enabled="false"
|
||||
DisplayName="Wino Startup Service" />
|
||||
</uap5:Extension>
|
||||
|
||||
<!-- Registration of full trust backend application. -->
|
||||
<!--<uap:Extension Category="windows.appService">
|
||||
<uap:AppService Name="Wino.AppService" />
|
||||
</uap:Extension>-->
|
||||
|
||||
<!--<desktop:Extension Category="windows.fullTrustProcess" Executable="Wino.AppService.exe" />-->
|
||||
</Extensions>
|
||||
</Application>
|
||||
</Applications>
|
||||
|
||||
@@ -24,7 +24,9 @@
|
||||
<Assembly Name="*Application*" Dynamic="Required All" />
|
||||
|
||||
<!-- Reduce memory footprint when building with Microsoft.Graph -->
|
||||
<Assembly Name="Microsoft.Graph" Dynamic="Public" XmlSerializer="Excluded" DataContractSerializer="Excluded" />
|
||||
|
||||
<Assembly Name="Microsoft.Graph" Serialize="Excluded" />
|
||||
|
||||
<Assembly Name="Microsoft.Kiota.Abstractions" Dynamic="Public" />
|
||||
<Assembly Name="Microsoft.Kiota.Authentication.Azure" Dynamic="Public" />
|
||||
<Assembly Name="Microsoft.Kiota.Http.HttpClientLibrary" Dynamic="Public" />
|
||||
|
||||
@@ -16,11 +16,11 @@ using Wino.Core.Domain.Interfaces;
|
||||
using Wino.Core.Domain.Models.Accounts;
|
||||
using Wino.Core.Domain.Models.Folders;
|
||||
using Wino.Core.Domain.Models.Synchronization;
|
||||
using Wino.Core.Messages.Shell;
|
||||
using Wino.Core.Messages.Synchronization;
|
||||
using Wino.Core.Requests;
|
||||
using Wino.Core.UWP.Extensions;
|
||||
using Wino.Dialogs;
|
||||
using Wino.Messaging.Client.Shell;
|
||||
using Wino.Messaging.Server;
|
||||
using Wino.Messaging.UI;
|
||||
|
||||
namespace Wino.Services
|
||||
{
|
||||
@@ -244,7 +244,7 @@ namespace Wino.Services
|
||||
Type = SynchronizationType.Full,
|
||||
};
|
||||
|
||||
WeakReferenceMessenger.Default.Send(new NewSynchronizationRequested(options));
|
||||
WeakReferenceMessenger.Default.Send(new NewSynchronizationRequested(options, SynchronizationSource.Client));
|
||||
}
|
||||
|
||||
if (configuration != null)
|
||||
|
||||
@@ -1,205 +0,0 @@
|
||||
using System;
|
||||
using System.ComponentModel;
|
||||
using System.Diagnostics;
|
||||
using CommunityToolkit.Mvvm.ComponentModel;
|
||||
using Wino.Core.Domain.Enums;
|
||||
using Wino.Core.Domain.Interfaces;
|
||||
using Wino.Core.Domain.Models.Reader;
|
||||
using Wino.Core.Services;
|
||||
|
||||
namespace Wino.Services
|
||||
{
|
||||
public class PreferencesService : ObservableObject, IPreferencesService
|
||||
{
|
||||
private readonly IConfigurationService _configurationService;
|
||||
|
||||
public event EventHandler<string> PreferenceChanged;
|
||||
|
||||
public PreferencesService(IConfigurationService configurationService)
|
||||
{
|
||||
_configurationService = configurationService;
|
||||
}
|
||||
|
||||
protected override void OnPropertyChanged(PropertyChangedEventArgs e)
|
||||
{
|
||||
base.OnPropertyChanged(e);
|
||||
|
||||
PreferenceChanged?.Invoke(this, e.PropertyName);
|
||||
}
|
||||
|
||||
private void SaveProperty(string propertyName, object value) => _configurationService.Set(propertyName, value);
|
||||
|
||||
private void SetPropertyAndSave(string propertyName, object value)
|
||||
{
|
||||
_configurationService.Set(propertyName, value);
|
||||
|
||||
OnPropertyChanged(propertyName);
|
||||
Debug.WriteLine($"PreferencesService -> {propertyName}:{value?.ToString()}");
|
||||
}
|
||||
|
||||
public MailRenderingOptions GetRenderingOptions()
|
||||
=> new MailRenderingOptions() { LoadImages = RenderImages, LoadStyles = RenderStyles };
|
||||
|
||||
public MailListDisplayMode MailItemDisplayMode
|
||||
{
|
||||
get => _configurationService.Get(nameof(MailItemDisplayMode), MailListDisplayMode.Spacious);
|
||||
set => SetPropertyAndSave(nameof(MailItemDisplayMode), value);
|
||||
}
|
||||
|
||||
public bool IsSemanticZoomEnabled
|
||||
{
|
||||
get => _configurationService.Get(nameof(IsSemanticZoomEnabled), true);
|
||||
set => SetPropertyAndSave(nameof(IsSemanticZoomEnabled), value);
|
||||
}
|
||||
|
||||
public bool IsHardDeleteProtectionEnabled
|
||||
{
|
||||
get => _configurationService.Get(nameof(IsHardDeleteProtectionEnabled), true);
|
||||
set => SetPropertyAndSave(nameof(IsHardDeleteProtectionEnabled), value);
|
||||
}
|
||||
|
||||
public bool IsThreadingEnabled
|
||||
{
|
||||
get => _configurationService.Get(nameof(IsThreadingEnabled), true);
|
||||
set => SetPropertyAndSave(nameof(IsThreadingEnabled), value);
|
||||
}
|
||||
|
||||
public bool IsShowSenderPicturesEnabled
|
||||
{
|
||||
get => _configurationService.Get(nameof(IsShowSenderPicturesEnabled), true);
|
||||
set => SetPropertyAndSave(nameof(IsShowSenderPicturesEnabled), value);
|
||||
}
|
||||
|
||||
public bool IsShowPreviewEnabled
|
||||
{
|
||||
get => _configurationService.Get(nameof(IsShowPreviewEnabled), true);
|
||||
set => SetPropertyAndSave(nameof(IsShowPreviewEnabled), value);
|
||||
}
|
||||
|
||||
public bool RenderStyles
|
||||
{
|
||||
get => _configurationService.Get(nameof(RenderStyles), true);
|
||||
set => SetPropertyAndSave(nameof(RenderStyles), value);
|
||||
}
|
||||
|
||||
public bool RenderImages
|
||||
{
|
||||
get => _configurationService.Get(nameof(RenderImages), true);
|
||||
set => SetPropertyAndSave(nameof(RenderImages), value);
|
||||
}
|
||||
|
||||
public bool Prefer24HourTimeFormat
|
||||
{
|
||||
get => _configurationService.Get(nameof(Prefer24HourTimeFormat), false);
|
||||
set => SetPropertyAndSave(nameof(Prefer24HourTimeFormat), value);
|
||||
}
|
||||
|
||||
public MailMarkAsOption MarkAsPreference
|
||||
{
|
||||
get => _configurationService.Get(nameof(MarkAsPreference), MailMarkAsOption.WhenSelected);
|
||||
set => SetPropertyAndSave(nameof(MarkAsPreference), value);
|
||||
}
|
||||
|
||||
public int MarkAsDelay
|
||||
{
|
||||
get => _configurationService.Get(nameof(MarkAsDelay), 5);
|
||||
set => SetPropertyAndSave(nameof(MarkAsDelay), value);
|
||||
}
|
||||
|
||||
public MailOperation RightSwipeOperation
|
||||
{
|
||||
get => _configurationService.Get(nameof(RightSwipeOperation), MailOperation.MarkAsRead);
|
||||
set => SetPropertyAndSave(nameof(RightSwipeOperation), value);
|
||||
}
|
||||
|
||||
public MailOperation LeftSwipeOperation
|
||||
{
|
||||
get => _configurationService.Get(nameof(LeftSwipeOperation), MailOperation.SoftDelete);
|
||||
set => SetPropertyAndSave(nameof(LeftSwipeOperation), value);
|
||||
}
|
||||
|
||||
public bool IsHoverActionsEnabled
|
||||
{
|
||||
get => _configurationService.Get(nameof(IsHoverActionsEnabled), true);
|
||||
set => SetPropertyAndSave(nameof(IsHoverActionsEnabled), value);
|
||||
}
|
||||
|
||||
public MailOperation LeftHoverAction
|
||||
{
|
||||
get => _configurationService.Get(nameof(LeftHoverAction), MailOperation.Archive);
|
||||
set => SetPropertyAndSave(nameof(LeftHoverAction), value);
|
||||
}
|
||||
|
||||
public MailOperation CenterHoverAction
|
||||
{
|
||||
get => _configurationService.Get(nameof(CenterHoverAction), MailOperation.SoftDelete);
|
||||
set => SetPropertyAndSave(nameof(CenterHoverAction), value);
|
||||
}
|
||||
|
||||
public MailOperation RightHoverAction
|
||||
{
|
||||
get => _configurationService.Get(nameof(RightHoverAction), MailOperation.SetFlag);
|
||||
set => SetPropertyAndSave(nameof(RightHoverAction), value);
|
||||
}
|
||||
|
||||
public bool IsLoggingEnabled
|
||||
{
|
||||
get => _configurationService.Get(nameof(IsLoggingEnabled), true);
|
||||
set => SetPropertyAndSave(nameof(IsLoggingEnabled), value);
|
||||
}
|
||||
|
||||
public bool IsMailkitProtocolLoggerEnabled
|
||||
{
|
||||
get => _configurationService.Get(nameof(IsMailkitProtocolLoggerEnabled), false);
|
||||
set => SetPropertyAndSave(nameof(IsMailkitProtocolLoggerEnabled), value);
|
||||
}
|
||||
|
||||
public Guid? StartupEntityId
|
||||
{
|
||||
get => _configurationService.Get<Guid?>(nameof(StartupEntityId), null);
|
||||
set => SaveProperty(propertyName: nameof(StartupEntityId), value);
|
||||
}
|
||||
|
||||
public AppLanguage CurrentLanguage
|
||||
{
|
||||
get => _configurationService.Get(nameof(CurrentLanguage), TranslationService.DefaultAppLanguage);
|
||||
set => SaveProperty(propertyName: nameof(CurrentLanguage), value);
|
||||
}
|
||||
|
||||
public string ReaderFont
|
||||
{
|
||||
get => _configurationService.Get(nameof(ReaderFont), "Calibri");
|
||||
set => SaveProperty(propertyName: nameof(ReaderFont), value);
|
||||
}
|
||||
|
||||
public int ReaderFontSize
|
||||
{
|
||||
get => _configurationService.Get(nameof(ReaderFontSize), 14);
|
||||
set => SaveProperty(propertyName: nameof(ReaderFontSize), value);
|
||||
}
|
||||
|
||||
public string ComposerFont
|
||||
{
|
||||
get => _configurationService.Get(nameof(ComposerFont), "Calibri");
|
||||
set => SaveProperty(propertyName: nameof(ComposerFont), value);
|
||||
}
|
||||
|
||||
public int ComposerFontSize
|
||||
{
|
||||
get => _configurationService.Get(nameof(ComposerFontSize), 14);
|
||||
set => SaveProperty(propertyName: nameof(ComposerFontSize), value);
|
||||
}
|
||||
|
||||
public bool IsNavigationPaneOpened
|
||||
{
|
||||
get => _configurationService.Get(nameof(IsNavigationPaneOpened), true);
|
||||
set => SaveProperty(propertyName: nameof(IsNavigationPaneOpened), value);
|
||||
}
|
||||
|
||||
public bool AutoSelectNextItem
|
||||
{
|
||||
get => _configurationService.Get(nameof(AutoSelectNextItem), true);
|
||||
set => SaveProperty(propertyName: nameof(AutoSelectNextItem), value);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,132 +0,0 @@
|
||||
using System;
|
||||
using System.ComponentModel;
|
||||
using CommunityToolkit.Mvvm.ComponentModel;
|
||||
using CommunityToolkit.Mvvm.Messaging;
|
||||
using Microsoft.AppCenter.Crashes;
|
||||
using Wino.Core.Domain.Interfaces;
|
||||
using Wino.Core.Messages.Shell;
|
||||
|
||||
namespace Wino.Services
|
||||
{
|
||||
public class StatePersistenceService : ObservableObject, IStatePersistanceService
|
||||
{
|
||||
public event EventHandler<string> StatePropertyChanged;
|
||||
|
||||
private const string OpenPaneLengthKey = nameof(OpenPaneLengthKey);
|
||||
private const string MailListPaneLengthKey = nameof(MailListPaneLengthKey);
|
||||
|
||||
private readonly IConfigurationService _configurationService;
|
||||
|
||||
public StatePersistenceService(IConfigurationService configurationService)
|
||||
{
|
||||
_configurationService = configurationService;
|
||||
|
||||
openPaneLength = _configurationService.Get(OpenPaneLengthKey, 320d);
|
||||
_mailListPaneLength = _configurationService.Get(MailListPaneLengthKey, 420d);
|
||||
|
||||
PropertyChanged += ServicePropertyChanged;
|
||||
}
|
||||
|
||||
private void ServicePropertyChanged(object sender, PropertyChangedEventArgs e) => StatePropertyChanged?.Invoke(this, e.PropertyName);
|
||||
|
||||
public bool IsBackButtonVisible => IsReadingMail && IsReaderNarrowed;
|
||||
|
||||
private bool isReadingMail;
|
||||
|
||||
public bool IsReadingMail
|
||||
{
|
||||
get => isReadingMail;
|
||||
set
|
||||
{
|
||||
if (SetProperty(ref isReadingMail, value))
|
||||
{
|
||||
OnPropertyChanged(nameof(IsBackButtonVisible));
|
||||
WeakReferenceMessenger.Default.Send(new ShellStateUpdated());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private bool shouldShiftMailRenderingDesign;
|
||||
|
||||
public bool ShouldShiftMailRenderingDesign
|
||||
{
|
||||
get { return shouldShiftMailRenderingDesign; }
|
||||
set { shouldShiftMailRenderingDesign = value; }
|
||||
}
|
||||
|
||||
private bool isReaderNarrowed;
|
||||
|
||||
public bool IsReaderNarrowed
|
||||
{
|
||||
get => isReaderNarrowed;
|
||||
set
|
||||
{
|
||||
if (SetProperty(ref isReaderNarrowed, value))
|
||||
{
|
||||
OnPropertyChanged(nameof(IsBackButtonVisible));
|
||||
WeakReferenceMessenger.Default.Send(new ShellStateUpdated());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private string coreWindowTitle;
|
||||
|
||||
public string CoreWindowTitle
|
||||
{
|
||||
get => coreWindowTitle;
|
||||
set
|
||||
{
|
||||
if (SetProperty(ref coreWindowTitle, value))
|
||||
{
|
||||
UpdateAppCoreWindowTitle();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#region Settings
|
||||
|
||||
private double openPaneLength;
|
||||
public double OpenPaneLength
|
||||
{
|
||||
get => openPaneLength;
|
||||
set
|
||||
{
|
||||
if (SetProperty(ref openPaneLength, value))
|
||||
{
|
||||
_configurationService.Set(OpenPaneLengthKey, value);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private double _mailListPaneLength;
|
||||
public double MailListPaneLength
|
||||
{
|
||||
get => _mailListPaneLength;
|
||||
set
|
||||
{
|
||||
if (SetProperty(ref _mailListPaneLength, value))
|
||||
{
|
||||
_configurationService.Set(MailListPaneLengthKey, value);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private void UpdateAppCoreWindowTitle()
|
||||
{
|
||||
try
|
||||
{
|
||||
var appView = Windows.UI.ViewManagement.ApplicationView.GetForCurrentView();
|
||||
|
||||
if (appView != null)
|
||||
appView.Title = CoreWindowTitle;
|
||||
}
|
||||
catch (System.Exception ex)
|
||||
{
|
||||
Crashes.TrackError(ex);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,20 +0,0 @@
|
||||
using Wino.Core.Domain.Interfaces;
|
||||
|
||||
namespace Wino.Services
|
||||
{
|
||||
public class ToastActivationService
|
||||
{
|
||||
private readonly IMailService _mailService;
|
||||
private readonly IWinoRequestDelegator _winoRequestDelegator;
|
||||
private readonly INativeAppService _nativeAppService;
|
||||
|
||||
public ToastActivationService(IMailService mailService,
|
||||
IWinoRequestDelegator winoRequestDelegator,
|
||||
INativeAppService nativeAppService)
|
||||
{
|
||||
_mailService = mailService;
|
||||
_winoRequestDelegator = winoRequestDelegator;
|
||||
_nativeAppService = nativeAppService;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -86,6 +86,8 @@ namespace Wino.Services
|
||||
return typeof(WelcomePage);
|
||||
case WinoPage.SettingOptionsPage:
|
||||
return typeof(SettingOptionsPage);
|
||||
case WinoPage.AppPreferencesPage:
|
||||
return typeof(AppPreferencesPage);
|
||||
default:
|
||||
return null;
|
||||
}
|
||||
|
||||
6
Wino.Mail/Views/Abstract/AppPreferencesPageAbstract.cs
Normal file
6
Wino.Mail/Views/Abstract/AppPreferencesPageAbstract.cs
Normal file
@@ -0,0 +1,6 @@
|
||||
using Wino.Mail.ViewModels;
|
||||
|
||||
namespace Wino.Views.Abstract
|
||||
{
|
||||
public abstract class AppPreferencesPageAbstract : BasePage<AppPreferencesPageViewModel> { }
|
||||
}
|
||||
@@ -27,11 +27,11 @@ using Wino.Core.Domain;
|
||||
using Wino.Core.Domain.Entities;
|
||||
using Wino.Core.Domain.Enums;
|
||||
using Wino.Core.Domain.Interfaces;
|
||||
using Wino.Core.Domain.Models.Requests;
|
||||
using Wino.Core.Messages.Mails;
|
||||
using Wino.Core.Messages.Shell;
|
||||
using Wino.Core.Domain.Models.Reader;
|
||||
using Wino.Extensions;
|
||||
using Wino.Mail.ViewModels.Data;
|
||||
using Wino.Messaging.Client.Mails;
|
||||
using Wino.Messaging.Client.Shell;
|
||||
using Wino.Views.Abstract;
|
||||
|
||||
namespace Wino.Views
|
||||
@@ -489,41 +489,41 @@ namespace Wino.Views
|
||||
{
|
||||
var change = JsonConvert.DeserializeObject<WebViewMessage>(args.WebMessageAsJson);
|
||||
|
||||
if (change.type == "bold")
|
||||
if (change.Type == "bold")
|
||||
{
|
||||
BoldButton.IsChecked = change.value == "true";
|
||||
BoldButton.IsChecked = change.Value == "true";
|
||||
}
|
||||
else if (change.type == "italic")
|
||||
else if (change.Type == "italic")
|
||||
{
|
||||
ItalicButton.IsChecked = change.value == "true";
|
||||
ItalicButton.IsChecked = change.Value == "true";
|
||||
}
|
||||
else if (change.type == "underline")
|
||||
else if (change.Type == "underline")
|
||||
{
|
||||
UnderlineButton.IsChecked = change.value == "true";
|
||||
UnderlineButton.IsChecked = change.Value == "true";
|
||||
}
|
||||
else if (change.type == "strikethrough")
|
||||
else if (change.Type == "strikethrough")
|
||||
{
|
||||
StrokeButton.IsChecked = change.value == "true";
|
||||
StrokeButton.IsChecked = change.Value == "true";
|
||||
}
|
||||
else if (change.type == "ol")
|
||||
else if (change.Type == "ol")
|
||||
{
|
||||
OrderedListButton.IsChecked = change.value == "true";
|
||||
OrderedListButton.IsChecked = change.Value == "true";
|
||||
}
|
||||
else if (change.type == "ul")
|
||||
else if (change.Type == "ul")
|
||||
{
|
||||
BulletListButton.IsChecked = change.value == "true";
|
||||
BulletListButton.IsChecked = change.Value == "true";
|
||||
}
|
||||
else if (change.type == "indent")
|
||||
else if (change.Type == "indent")
|
||||
{
|
||||
IncreaseIndentButton.IsEnabled = change.value == "disabled" ? false : true;
|
||||
IncreaseIndentButton.IsEnabled = change.Value == "disabled" ? false : true;
|
||||
}
|
||||
else if (change.type == "outdent")
|
||||
else if (change.Type == "outdent")
|
||||
{
|
||||
DecreaseIndentButton.IsEnabled = change.value == "disabled" ? false : true;
|
||||
DecreaseIndentButton.IsEnabled = change.Value == "disabled" ? false : true;
|
||||
}
|
||||
else if (change.type == "alignment")
|
||||
else if (change.Type == "alignment")
|
||||
{
|
||||
var parsedValue = change.value switch
|
||||
var parsedValue = change.Value switch
|
||||
{
|
||||
"jodit-icon_left" => 0,
|
||||
"jodit-icon_center" => 1,
|
||||
|
||||
@@ -8,7 +8,7 @@ using Wino.Core.Domain;
|
||||
using Wino.Core.Domain.Entities;
|
||||
using Wino.Core.Domain.Models.Accounts;
|
||||
using Wino.Core.Domain.Models.AutoDiscovery;
|
||||
using Wino.Core.Messages.Mails;
|
||||
using Wino.Messaging.Client.Mails;
|
||||
|
||||
|
||||
namespace Wino.Views.ImapSetup
|
||||
|
||||
@@ -6,7 +6,7 @@ using Windows.UI.Xaml.Navigation;
|
||||
using Wino.Core.Domain;
|
||||
using Wino.Core.Domain.Exceptions;
|
||||
using Wino.Core.Domain.Interfaces;
|
||||
using Wino.Core.Messages.Mails;
|
||||
using Wino.Messaging.Client.Mails;
|
||||
|
||||
namespace Wino.Views.ImapSetup
|
||||
{
|
||||
|
||||
@@ -8,7 +8,7 @@ using Wino.Core.Domain.Entities;
|
||||
using Wino.Core.Domain.Exceptions;
|
||||
using Wino.Core.Domain.Interfaces;
|
||||
using Wino.Core.Domain.Models.AutoDiscovery;
|
||||
using Wino.Core.Messages.Mails;
|
||||
using Wino.Messaging.Client.Mails;
|
||||
|
||||
|
||||
namespace Wino.Views.ImapSetup
|
||||
|
||||
@@ -10,7 +10,7 @@ using Wino.Core.Domain.Entities;
|
||||
using Wino.Core.Domain.Exceptions;
|
||||
using Wino.Core.Domain.Interfaces;
|
||||
using Wino.Core.Domain.Models.AutoDiscovery;
|
||||
using Wino.Core.Messages.Mails;
|
||||
using Wino.Messaging.Client.Mails;
|
||||
|
||||
|
||||
namespace Wino.Views.ImapSetup
|
||||
|
||||
@@ -61,7 +61,7 @@
|
||||
<!-- Header Templates -->
|
||||
<DataTemplate x:Key="MailGroupHeaderDefaultTemplate" x:DataType="collections:IReadOnlyObservableGroup">
|
||||
<Grid
|
||||
Margin="6,2"
|
||||
Margin="2,2,16,2"
|
||||
AllowFocusOnInteraction="False"
|
||||
Background="{ThemeResource MailListHeaderBackgroundColor}"
|
||||
CornerRadius="6">
|
||||
@@ -75,123 +75,16 @@
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
|
||||
<!-- Swipe Items -->
|
||||
<!--
|
||||
Thread items should not display multi select checkbox.
|
||||
We override one for thread view models, and default items should use
|
||||
what the system has by default. Overriding ListViewItem and ListViewItemPresenter styles
|
||||
are really dangerous since they are somehow messy at system level.
|
||||
TODO: Temporarily disabled. WinUI2 - SwipeControl crash.
|
||||
https://github.com/microsoft/microsoft-ui-xaml/issues/2527
|
||||
-->
|
||||
|
||||
<!-- Thread Item Container Style -->
|
||||
<Style x:Key="ThreadItemContainerStyle" TargetType="ListViewItem">
|
||||
<Setter Property="FontFamily" Value="{ThemeResource ContentControlThemeFontFamily}" />
|
||||
<Setter Property="FontSize" Value="{ThemeResource ControlContentThemeFontSize}" />
|
||||
<Setter Property="Background" Value="{ThemeResource ListViewItemBackground}" />
|
||||
<Setter Property="Foreground" Value="{ThemeResource ListViewItemForeground}" />
|
||||
<Setter Property="TabNavigation" Value="Local" />
|
||||
<Setter Property="IsHoldingEnabled" Value="True" />
|
||||
<Setter Property="Padding" Value="0" />
|
||||
<Setter Property="HorizontalContentAlignment" Value="Stretch" />
|
||||
<Setter Property="VerticalContentAlignment" Value="Center" />
|
||||
<Setter Property="MinWidth" Value="{ThemeResource ListViewItemMinWidth}" />
|
||||
<Setter Property="MinHeight" Value="{ThemeResource ListViewItemMinHeight}" />
|
||||
<Setter Property="AllowDrop" Value="False" />
|
||||
<Setter Property="UseSystemFocusVisuals" Value="{StaticResource UseSystemFocusVisuals}" />
|
||||
<Setter Property="FocusVisualMargin" Value="0" />
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="ListViewItem">
|
||||
<ListViewItemPresenter
|
||||
x:Name="Root"
|
||||
HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
|
||||
VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
|
||||
CheckBoxBrush="Transparent"
|
||||
CheckBrush="Transparent"
|
||||
CheckMode="Overlay"
|
||||
ContentMargin="{TemplateBinding Padding}"
|
||||
ContentTransitions="{TemplateBinding ContentTransitions}"
|
||||
Control.IsTemplateFocusTarget="True"
|
||||
CornerRadius="5"
|
||||
DisabledOpacity="{ThemeResource ListViewItemDisabledThemeOpacity}"
|
||||
DragBackground="{ThemeResource ListViewItemDragBackground}"
|
||||
DragForeground="{ThemeResource ListViewItemDragForeground}"
|
||||
DragOpacity="{ThemeResource ListViewItemDragThemeOpacity}"
|
||||
FocusBorderBrush="{ThemeResource ListViewItemFocusBorderBrush}"
|
||||
FocusSecondaryBorderBrush="{ThemeResource ListViewItemFocusSecondaryBorderBrush}"
|
||||
FocusVisualMargin="{TemplateBinding FocusVisualMargin}"
|
||||
PlaceholderBackground="{ThemeResource ListViewItemPlaceholderBackground}"
|
||||
PointerOverBackground="{ThemeResource ListViewItemBackgroundPointerOver}"
|
||||
PointerOverForeground="{ThemeResource ListViewItemForegroundPointerOver}"
|
||||
PressedBackground="{ThemeResource ListViewItemBackgroundPressed}"
|
||||
ReorderHintOffset="{ThemeResource ListViewItemReorderHintThemeOffset}"
|
||||
RevealBackground="{ThemeResource ListViewItemRevealBackground}"
|
||||
RevealBorderBrush="{ThemeResource ListViewItemRevealBorderBrush}"
|
||||
RevealBorderThickness="{ThemeResource ListViewItemRevealBorderThemeThickness}"
|
||||
SelectedBackground="{ThemeResource ListViewItemBackgroundSelected}"
|
||||
SelectedForeground="{ThemeResource ListViewItemForegroundSelected}"
|
||||
SelectedPointerOverBackground="{ThemeResource ListViewItemBackgroundSelectedPointerOver}"
|
||||
SelectedPressedBackground="{ThemeResource ListViewItemBackgroundSelectedPressed}"
|
||||
SelectionCheckMarkVisualEnabled="False">
|
||||
<VisualStateManager.VisualStateGroups>
|
||||
<VisualStateGroup x:Name="CommonStates">
|
||||
<VisualState x:Name="Normal" />
|
||||
<VisualState x:Name="Selected" />
|
||||
<VisualState x:Name="PointerOver">
|
||||
<VisualState.Setters>
|
||||
<Setter Target="Root.(RevealBrush.State)" Value="PointerOver" />
|
||||
<Setter Target="Root.RevealBorderBrush" Value="{ThemeResource ListViewItemRevealBorderBrushPointerOver}" />
|
||||
</VisualState.Setters>
|
||||
</VisualState>
|
||||
<VisualState x:Name="PointerOverSelected">
|
||||
<VisualState.Setters>
|
||||
<Setter Target="Root.(RevealBrush.State)" Value="PointerOver" />
|
||||
<Setter Target="Root.RevealBorderBrush" Value="{ThemeResource ListViewItemRevealBorderBrushPointerOver}" />
|
||||
</VisualState.Setters>
|
||||
</VisualState>
|
||||
<VisualState x:Name="PointerOverPressed">
|
||||
<VisualState.Setters>
|
||||
<Setter Target="Root.(RevealBrush.State)" Value="Pressed" />
|
||||
<Setter Target="Root.RevealBorderBrush" Value="{ThemeResource ListViewItemRevealBorderBrushPressed}" />
|
||||
</VisualState.Setters>
|
||||
</VisualState>
|
||||
<VisualState x:Name="Pressed">
|
||||
<VisualState.Setters>
|
||||
<Setter Target="Root.(RevealBrush.State)" Value="Pressed" />
|
||||
<Setter Target="Root.RevealBorderBrush" Value="{ThemeResource ListViewItemRevealBorderBrushPressed}" />
|
||||
</VisualState.Setters>
|
||||
</VisualState>
|
||||
<VisualState x:Name="PressedSelected">
|
||||
<VisualState.Setters>
|
||||
<Setter Target="Root.(RevealBrush.State)" Value="Pressed" />
|
||||
<Setter Target="Root.RevealBorderBrush" Value="{ThemeResource ListViewItemRevealBorderBrushPressed}" />
|
||||
</VisualState.Setters>
|
||||
</VisualState>
|
||||
</VisualStateGroup>
|
||||
<VisualStateGroup x:Name="DisabledStates">
|
||||
<VisualState x:Name="Enabled" />
|
||||
<VisualState x:Name="Disabled">
|
||||
<VisualState.Setters>
|
||||
<Setter Target="Root.RevealBorderThickness" Value="0" />
|
||||
</VisualState.Setters>
|
||||
</VisualState>
|
||||
</VisualStateGroup>
|
||||
</VisualStateManager.VisualStateGroups>
|
||||
</ListViewItemPresenter>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
|
||||
<!-- Mail Item Container Style Selector -->
|
||||
<selectors:MailItemContainerStyleSelector x:Key="WinoContainerSelector" Thread="{StaticResource ThreadItemContainerStyle}" />
|
||||
|
||||
<!-- Swipe Items -->
|
||||
<!-- Left -->
|
||||
<muxc:SwipeItems x:Key="LeftSwipeItems" Mode="Execute">
|
||||
<muxc:SwipeItem
|
||||
BehaviorOnInvoked="Close"
|
||||
Invoked="LeftSwipeItemInvoked"
|
||||
Text="{x:Bind domain:Translator.MailOperation_Delete}">
|
||||
<!--<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>
|
||||
@@ -205,102 +98,94 @@
|
||||
</muxc:SwipeItem>
|
||||
</muxc:SwipeItems>
|
||||
|
||||
<!-- Right -->
|
||||
-->
|
||||
|
||||
<!--
|
||||
<muxc:SwipeItems x:Key="RightSwipeItems" Mode="Execute">
|
||||
<muxc:SwipeItem
|
||||
BehaviorOnInvoked="Close"
|
||||
Invoked="RightSwipeItemInvoked"
|
||||
Text="{x:Bind domain:Translator.MarkReadUnread}">
|
||||
<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>
|
||||
</muxc:SwipeItems>-->
|
||||
|
||||
<!-- Single Mail Item Template -->
|
||||
<DataTemplate x:Key="SingleMailItemTemplate" x:DataType="viewModelData:MailItemViewModel">
|
||||
<muxc:SwipeControl
|
||||
LeftItems="{StaticResource LeftSwipeItems}"
|
||||
RightItems="{StaticResource RightSwipeItems}"
|
||||
Tag="{x:Bind}">
|
||||
<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"
|
||||
FromAddress="{x:Bind FromAddress}"
|
||||
FromName="{x:Bind FromName}"
|
||||
HasAttachments="{x:Bind HasAttachments}"
|
||||
HoverActionExecutedCommand="{Binding ElementName=root, Path=ViewModel.ExecuteHoverActionCommand}"
|
||||
IsAvatarVisible="{Binding ElementName=root, Path=ViewModel.PreferencesService.IsShowSenderPicturesEnabled, Mode=OneWay}"
|
||||
IsCustomFocused="{x:Bind IsCustomFocused, Mode=OneWay}"
|
||||
IsDraft="{x:Bind IsDraft, Mode=OneWay}"
|
||||
IsFlagged="{x:Bind IsFlagged, Mode=OneWay}"
|
||||
IsHoverActionsEnabled="{Binding ElementName=root, Path=ViewModel.PreferencesService.IsHoverActionsEnabled, Mode=OneWay}"
|
||||
IsRead="{x:Bind IsRead, Mode=OneWay}"
|
||||
LeftHoverAction="{Binding ElementName=root, Path=ViewModel.PreferencesService.LeftHoverAction, Mode=OneWay}"
|
||||
MailItem="{Binding}"
|
||||
Prefer24HourTimeFormat="{Binding ElementName=root, Path=ViewModel.PreferencesService.Prefer24HourTimeFormat, Mode=OneWay}"
|
||||
ReceivedDate="{x:Bind CreationDate}"
|
||||
RightHoverAction="{Binding ElementName=root, Path=ViewModel.PreferencesService.RightHoverAction, Mode=OneWay}"
|
||||
ShowPreviewText="{Binding ElementName=root, Path=ViewModel.PreferencesService.IsShowPreviewEnabled, Mode=OneWay}"
|
||||
Snippet="{x:Bind PreviewText}"
|
||||
Subject="{x:Bind Subject}" />
|
||||
</muxc:SwipeControl>
|
||||
<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"
|
||||
FromAddress="{x:Bind FromAddress}"
|
||||
FromName="{x:Bind FromName}"
|
||||
HasAttachments="{x:Bind HasAttachments}"
|
||||
HoverActionExecutedCommand="{Binding ElementName=root, Path=ViewModel.ExecuteHoverActionCommand}"
|
||||
IsAvatarVisible="{Binding ElementName=root, Path=ViewModel.PreferencesService.IsShowSenderPicturesEnabled, Mode=OneWay}"
|
||||
IsCustomFocused="{x:Bind IsCustomFocused, Mode=OneWay}"
|
||||
IsDraft="{x:Bind IsDraft, Mode=OneWay}"
|
||||
IsFlagged="{x:Bind IsFlagged, Mode=OneWay}"
|
||||
IsHoverActionsEnabled="{Binding ElementName=root, Path=ViewModel.PreferencesService.IsHoverActionsEnabled, Mode=OneWay}"
|
||||
IsRead="{x:Bind IsRead, Mode=OneWay}"
|
||||
LeftHoverAction="{Binding ElementName=root, Path=ViewModel.PreferencesService.LeftHoverAction, Mode=OneWay}"
|
||||
MailItem="{Binding}"
|
||||
Prefer24HourTimeFormat="{Binding ElementName=root, Path=ViewModel.PreferencesService.Prefer24HourTimeFormat, Mode=OneWay}"
|
||||
ReceivedDate="{x:Bind CreationDate}"
|
||||
RightHoverAction="{Binding ElementName=root, Path=ViewModel.PreferencesService.RightHoverAction, Mode=OneWay}"
|
||||
ShowPreviewText="{Binding ElementName=root, Path=ViewModel.PreferencesService.IsShowPreviewEnabled, Mode=OneWay}"
|
||||
Snippet="{x:Bind PreviewText}"
|
||||
Subject="{x:Bind Subject}" />
|
||||
</DataTemplate>
|
||||
|
||||
<!-- Single Mail Item Template for Threads -->
|
||||
<DataTemplate x:Key="ThreadSingleMailItemTemplate" x:DataType="viewModelData:MailItemViewModel">
|
||||
<muxc:SwipeControl
|
||||
LeftItems="{StaticResource LeftSwipeItems}"
|
||||
RightItems="{StaticResource RightSwipeItems}"
|
||||
Tag="{x:Bind}">
|
||||
<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"
|
||||
FromAddress="{x:Bind FromAddress}"
|
||||
FromName="{x:Bind FromName}"
|
||||
HasAttachments="{x:Bind HasAttachments}"
|
||||
HoverActionExecutedCommand="{Binding ElementName=root, Path=ViewModel.ExecuteHoverActionCommand}"
|
||||
IsAvatarVisible="{Binding ElementName=root, Path=ViewModel.PreferencesService.IsShowSenderPicturesEnabled, Mode=OneWay}"
|
||||
IsCustomFocused="{x:Bind IsCustomFocused, Mode=OneWay}"
|
||||
IsDraft="{x:Bind IsDraft, Mode=OneWay}"
|
||||
IsFlagged="{x:Bind IsFlagged, Mode=OneWay}"
|
||||
IsHoverActionsEnabled="{Binding ElementName=root, Path=ViewModel.PreferencesService.IsHoverActionsEnabled, Mode=OneWay}"
|
||||
IsRead="{x:Bind IsRead, Mode=OneWay}"
|
||||
LeftHoverAction="{Binding ElementName=root, Path=ViewModel.PreferencesService.LeftHoverAction, Mode=OneWay}"
|
||||
MailItem="{Binding}"
|
||||
Prefer24HourTimeFormat="{Binding ElementName=root, Path=ViewModel.PreferencesService.Prefer24HourTimeFormat, Mode=OneWay}"
|
||||
ReceivedDate="{x:Bind CreationDate}"
|
||||
RightHoverAction="{Binding ElementName=root, Path=ViewModel.PreferencesService.RightHoverAction, Mode=OneWay}"
|
||||
ShowPreviewText="{Binding ElementName=root, Path=ViewModel.PreferencesService.IsShowPreviewEnabled, Mode=OneWay}"
|
||||
Snippet="{x:Bind PreviewText}"
|
||||
Subject="{x:Bind Subject}" />
|
||||
</muxc:SwipeControl>
|
||||
<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"
|
||||
FromAddress="{x:Bind FromAddress}"
|
||||
FromName="{x:Bind FromName}"
|
||||
HasAttachments="{x:Bind HasAttachments}"
|
||||
HoverActionExecutedCommand="{Binding ElementName=root, Path=ViewModel.ExecuteHoverActionCommand}"
|
||||
IsAvatarVisible="{Binding ElementName=root, Path=ViewModel.PreferencesService.IsShowSenderPicturesEnabled, Mode=OneWay}"
|
||||
IsCustomFocused="{x:Bind IsCustomFocused, Mode=OneWay}"
|
||||
IsDraft="{x:Bind IsDraft, Mode=OneWay}"
|
||||
IsFlagged="{x:Bind IsFlagged, Mode=OneWay}"
|
||||
IsHoverActionsEnabled="{Binding ElementName=root, Path=ViewModel.PreferencesService.IsHoverActionsEnabled, Mode=OneWay}"
|
||||
IsRead="{x:Bind IsRead, Mode=OneWay}"
|
||||
LeftHoverAction="{Binding ElementName=root, Path=ViewModel.PreferencesService.LeftHoverAction, Mode=OneWay}"
|
||||
MailItem="{Binding}"
|
||||
Prefer24HourTimeFormat="{Binding ElementName=root, Path=ViewModel.PreferencesService.Prefer24HourTimeFormat, Mode=OneWay}"
|
||||
ReceivedDate="{x:Bind CreationDate}"
|
||||
RightHoverAction="{Binding ElementName=root, Path=ViewModel.PreferencesService.RightHoverAction, Mode=OneWay}"
|
||||
ShowPreviewText="{Binding ElementName=root, Path=ViewModel.PreferencesService.IsShowPreviewEnabled, Mode=OneWay}"
|
||||
Snippet="{x:Bind PreviewText}"
|
||||
Subject="{x:Bind Subject}" />
|
||||
</DataTemplate>
|
||||
|
||||
<!-- Mail Item Content Selector -->
|
||||
<selectors:MailItemDisplaySelector x:Key="MailItemDisplaySelector" SingleMailItemTemplate="{StaticResource SingleMailItemTemplate}">
|
||||
<selectors:MailItemDisplaySelector.ThreadMailItemTemplate>
|
||||
<DataTemplate x:DataType="viewModelData:ThreadMailItemViewModel">
|
||||
<muxc:Expander
|
||||
<controls:WinoExpander
|
||||
x:Name="ThreadExpander"
|
||||
HorizontalAlignment="Stretch"
|
||||
HorizontalContentAlignment="Stretch"
|
||||
BackgroundSizing="InnerBorderEdge"
|
||||
BorderThickness="0"
|
||||
Padding="0"
|
||||
IsExpanded="{x:Bind IsThreadExpanded, Mode=TwoWay}">
|
||||
<muxc:Expander.Header>
|
||||
<controls:MailItemDisplayInformationControl
|
||||
@@ -349,7 +234,7 @@
|
||||
</ListView.ItemContainerTransitions>
|
||||
</listview:WinoListView>
|
||||
</muxc:Expander.Content>
|
||||
</muxc:Expander>
|
||||
</controls:WinoExpander>
|
||||
</DataTemplate>
|
||||
</selectors:MailItemDisplaySelector.ThreadMailItemTemplate>
|
||||
</selectors:MailItemDisplaySelector>
|
||||
@@ -393,6 +278,7 @@
|
||||
x:Name="SearchBar"
|
||||
VerticalAlignment="Center"
|
||||
BorderBrush="Transparent"
|
||||
Margin="2,0,-2,0"
|
||||
GotFocus="SearchBoxFocused"
|
||||
LostFocus="SearchBarUnfocused"
|
||||
PlaceholderText="{x:Bind domain:Translator.SearchBarPlaceholder}"
|
||||
@@ -435,7 +321,7 @@
|
||||
|
||||
<!-- Top Area -->
|
||||
<Grid
|
||||
Padding="6"
|
||||
Padding="2,6,4,6"
|
||||
CornerRadius="8"
|
||||
RowSpacing="4">
|
||||
<Grid.RowDefinitions>
|
||||
@@ -729,10 +615,11 @@
|
||||
<SemanticZoom x:Name="SemanticZoomContainer" CanChangeViews="{x:Bind ViewModel.PreferencesService.IsSemanticZoomEnabled, Mode=OneWay}">
|
||||
<SemanticZoom.ZoomedInView>
|
||||
<listview:WinoListView
|
||||
ui:ScrollViewerExtensions.VerticalScrollBarMargin="0"
|
||||
x:Name="MailListView"
|
||||
HorizontalContentAlignment="Stretch"
|
||||
ui:ScrollViewerExtensions.EnableMiddleClickScrolling="True"
|
||||
ui:ListViewExtensions.ItemContainerStretchDirection="Horizontal"
|
||||
ItemContainerStyleSelector="{StaticResource WinoContainerSelector}"
|
||||
ItemDeletedCommand="{x:Bind ViewModel.MailOperationCommand}"
|
||||
ItemTemplateSelector="{StaticResource MailItemDisplaySelector}"
|
||||
ItemsSource="{x:Bind MailCollectionViewSource.View, Mode=OneWay}"
|
||||
|
||||
@@ -22,11 +22,11 @@ using Wino.Core.Domain.Interfaces;
|
||||
using Wino.Core.Domain.Models.MailItem;
|
||||
using Wino.Core.Domain.Models.Menus;
|
||||
using Wino.Core.Domain.Models.Navigation;
|
||||
using Wino.Core.Messages.Mails;
|
||||
using Wino.Core.Messages.Shell;
|
||||
using Wino.Mail.ViewModels.Data;
|
||||
using Wino.Mail.ViewModels.Messages;
|
||||
using Wino.MenuFlyouts.Context;
|
||||
using Wino.Messaging.Client.Mails;
|
||||
using Wino.Messaging.Client.Shell;
|
||||
using Wino.Views.Abstract;
|
||||
|
||||
namespace Wino.Views
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -15,10 +15,9 @@ using Windows.UI.Xaml.Navigation;
|
||||
using Wino.Core.Domain;
|
||||
using Wino.Core.Domain.Enums;
|
||||
using Wino.Core.Domain.Interfaces;
|
||||
using Wino.Core.Messages.Mails;
|
||||
using Wino.Core.Messages.Shell;
|
||||
using Wino.Core.Services;
|
||||
using Wino.Mail.ViewModels.Data;
|
||||
using Wino.Messaging.Client.Mails;
|
||||
using Wino.Messaging.Client.Shell;
|
||||
using Wino.Views.Abstract;
|
||||
|
||||
namespace Wino.Views
|
||||
|
||||
@@ -6,9 +6,9 @@ using MoreLinq;
|
||||
using Windows.UI.Xaml.Media.Animation;
|
||||
using Windows.UI.Xaml.Navigation;
|
||||
using Wino.Core.Domain.Enums;
|
||||
using Wino.Core.Messages.Navigation;
|
||||
using Wino.Core.Requests;
|
||||
using Wino.Mail.ViewModels.Data;
|
||||
using Wino.Messaging.Client.Navigation;
|
||||
using Wino.Messaging.UI;
|
||||
using Wino.Views.Abstract;
|
||||
using Wino.Views.Account;
|
||||
using Wino.Views.Settings;
|
||||
|
||||
43
Wino.Mail/Views/Settings/AppPreferencesPage.xaml
Normal file
43
Wino.Mail/Views/Settings/AppPreferencesPage.xaml
Normal file
@@ -0,0 +1,43 @@
|
||||
<abstract:AppPreferencesPageAbstract x:Class="Wino.Views.Settings.AppPreferencesPage"
|
||||
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:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
mc:Ignorable="d">
|
||||
|
||||
<ScrollViewer>
|
||||
<StackPanel>
|
||||
<controls:SettingsCard Header="{x:Bind domain:Translator.SettingsAppPreferences_StartupBehavior_Title}" Description="{x:Bind domain:Translator.SettingsAppPreferences_StartupBehavior_Description}">
|
||||
<ToggleButton Command="{x:Bind ViewModel.ToggleStartupBehaviorCommand}"
|
||||
x:Name="StartupEnabledToggleButton"
|
||||
IsChecked="{x:Bind ViewModel.IsStartupBehaviorEnabled, Mode=OneWay}"
|
||||
Content="{x:Bind domain:Translator.SettingsAppPreferences_StartupBehavior_Disable}" />
|
||||
<controls:SettingsCard.HeaderIcon>
|
||||
<PathIcon Data="F1 M 9.375 8.125 L 9.375 0.625 C 9.375 0.45573 9.436849 0.309246 9.560547 0.185547 C 9.684244 0.06185 9.830729 0 10 0 C 10.169271 0 10.315755 0.06185 10.439453 0.185547 C 10.56315 0.309246 10.625 0.45573 10.625 0.625 L 10.625 8.125 C 10.625 8.294271 10.56315 8.440756 10.439453 8.564453 C 10.315755 8.688151 10.169271 8.75 10 8.75 C 9.830729 8.75 9.684244 8.688151 9.560547 8.564453 C 9.436849 8.440756 9.375 8.294271 9.375 8.125 Z M 0.625 10.625 C 0.625 9.811198 0.732422 9.008789 0.947266 8.217773 C 1.162109 7.426758 1.469727 6.678061 1.870117 5.97168 C 2.270508 5.265301 2.755534 4.617514 3.325195 4.02832 C 3.894857 3.439129 4.534505 2.942709 5.244141 2.539062 C 5.341797 2.480469 5.449219 2.451172 5.566406 2.451172 C 5.735677 2.451172 5.882161 2.513021 6.005859 2.636719 C 6.129557 2.760418 6.191406 2.906902 6.191406 3.076172 C 6.191406 3.206381 6.163737 3.310547 6.108398 3.388672 C 6.05306 3.466797 5.976562 3.541668 5.878906 3.613281 C 5.651042 3.769531 5.42806 3.920898 5.209961 4.067383 C 4.991862 4.213867 4.778646 4.381511 4.570312 4.570312 C 4.153646 4.947917 3.779297 5.367839 3.447266 5.830078 C 3.115234 6.292318 2.832031 6.7806 2.597656 7.294922 C 2.363281 7.809245 2.184245 8.3431 2.060547 8.896484 C 1.936849 9.44987 1.875 10.009766 1.875 10.576172 C 1.875 11.331381 1.971029 12.055664 2.163086 12.749023 C 2.355143 13.442383 2.625325 14.091797 2.973633 14.697266 C 3.32194 15.302734 3.74349 15.854492 4.238281 16.352539 C 4.733073 16.850586 5.281575 17.277018 5.883789 17.631836 C 6.486002 17.986654 7.133789 18.261719 7.827148 18.457031 C 8.520508 18.652344 9.244791 18.75 10 18.75 C 10.755208 18.75 11.479492 18.652344 12.172852 18.457031 C 12.86621 18.261719 13.513996 17.986654 14.116211 17.631836 C 14.718424 17.277018 15.266927 16.850586 15.761719 16.352539 C 16.25651 15.854492 16.678059 15.302734 17.026367 14.697266 C 17.374674 14.091797 17.644855 13.440756 17.836914 12.744141 C 18.028971 12.047526 18.125 11.32487 18.125 10.576172 C 18.125 10.009766 18.06315 9.44987 17.939453 8.896484 C 17.815754 8.3431 17.636719 7.809245 17.402344 7.294922 C 17.167969 6.7806 16.884766 6.292318 16.552734 5.830078 C 16.220703 5.367839 15.846354 4.947917 15.429688 4.570312 C 15.221354 4.381511 15.008137 4.213867 14.790039 4.067383 C 14.571939 3.920898 14.348958 3.769531 14.121094 3.613281 C 14.023437 3.541668 13.946939 3.466797 13.891602 3.388672 C 13.836263 3.310547 13.808594 3.206381 13.808594 3.076172 C 13.808594 2.906902 13.870442 2.760418 13.994141 2.636719 C 14.117838 2.513021 14.264322 2.451172 14.433594 2.451172 C 14.550781 2.451172 14.658203 2.480469 14.755859 2.539062 C 15.465494 2.942709 16.105143 3.439129 16.674805 4.02832 C 17.244465 4.617514 17.729492 5.265301 18.129883 5.97168 C 18.530273 6.678061 18.837891 7.426758 19.052734 8.217773 C 19.267578 9.008789 19.375 9.811198 19.375 10.625 C 19.375 11.484375 19.262695 12.312826 19.038086 13.110352 C 18.813477 13.907878 18.497721 14.654948 18.09082 15.351562 C 17.683918 16.048178 17.195637 16.681316 16.625977 17.250977 C 16.056314 17.820639 15.423177 18.30892 14.726562 18.71582 C 14.029947 19.122721 13.282877 19.438477 12.485352 19.663086 C 11.687825 19.887695 10.859375 20 10 20 C 9.134114 20 8.302408 19.887695 7.504883 19.663086 C 6.707356 19.438477 5.961914 19.122721 5.268555 18.71582 C 4.575195 18.30892 3.943685 17.820639 3.374023 17.250977 C 2.804362 16.681316 2.316081 16.049805 1.90918 15.356445 C 1.502279 14.663086 1.186523 13.916016 0.961914 13.115234 C 0.737305 12.314453 0.625 11.484375 0.625 10.625 Z " />
|
||||
</controls:SettingsCard.HeaderIcon>
|
||||
</controls:SettingsCard>
|
||||
<controls:SettingsCard Header="{x:Bind domain:Translator.SettingsAppPreferences_CloseBehavior_Title}" Description="{x:Bind domain:Translator.SettingsAppPreferences_CloseBehavior_Description}">
|
||||
<ComboBox ItemsSource="{x:Bind ViewModel.AppTerminationBehavior, Mode=OneWay}" SelectedItem="{x:Bind ViewModel.SelectedAppTerminationBehavior, Mode=TwoWay}" />
|
||||
<controls:SettingsCard.HeaderIcon>
|
||||
<PathIcon Data="F1 M 1.591797 15.244141 C 1.591797 15.055339 1.635742 14.912109 1.723633 14.814453 C 1.811523 14.716797 1.930339 14.625651 2.080078 14.541016 C 2.26237 14.443359 2.457682 14.363607 2.666016 14.301758 C 2.874349 14.239909 3.072917 14.169922 3.261719 14.091797 C 3.834635 13.863933 4.394531 13.606771 4.941406 13.320312 C 5.488281 13.033854 6.005859 12.705078 6.494141 12.333984 C 7.106119 11.871745 7.643229 11.352539 8.105469 10.776367 C 8.567708 10.200195 8.95345 9.584961 9.262695 8.930664 C 9.571939 8.276367 9.804688 7.587891 9.960938 6.865234 C 10.117188 6.142578 10.195312 5.400391 10.195312 4.638672 C 10.195312 4.007162 10.144856 3.390301 10.043945 2.788086 C 9.943033 2.185873 9.830729 1.578777 9.707031 0.966797 C 9.700521 0.934246 9.695638 0.904949 9.692383 0.878906 C 9.689127 0.852865 9.6875 0.823568 9.6875 0.791016 C 9.6875 0.582684 9.759114 0.406902 9.902344 0.263672 C 10.045572 0.120443 10.221354 0.048828 10.429688 0.048828 C 10.800781 0.048828 11.183268 0.083008 11.577148 0.151367 C 11.971028 0.219727 12.361653 0.314129 12.749023 0.43457 C 13.136393 0.555014 13.515624 0.694988 13.886719 0.854492 C 14.257812 1.013998 14.602863 1.184896 14.921875 1.367188 C 15.690104 1.809896 16.383463 2.342123 17.001953 2.963867 C 17.620441 3.585613 18.144531 4.270834 18.574219 5.019531 C 19.003906 5.76823 19.334309 6.567384 19.56543 7.416992 C 19.796549 8.266602 19.912109 9.134115 19.912109 10.019531 C 19.912109 10.9375 19.793293 11.821289 19.555664 12.670898 C 19.318033 13.520508 18.981119 14.314779 18.544922 15.053711 C 18.108723 15.792644 17.587891 16.464844 16.982422 17.070312 C 16.376953 17.675781 15.703125 18.194986 14.960938 18.62793 C 14.21875 19.060873 13.422852 19.396158 12.573242 19.633789 C 11.723633 19.87142 10.839844 19.990234 9.921875 19.990234 C 9.140625 19.990234 8.352864 19.890951 7.558594 19.692383 C 6.764323 19.493814 6.005859 19.208984 5.283203 18.837891 C 4.560547 18.466797 3.891602 18.014322 3.276367 17.480469 C 2.661133 16.946615 2.141927 16.3444 1.71875 15.673828 C 1.634115 15.54362 1.591797 15.400391 1.591797 15.244141 Z M 9.921875 18.730469 C 10.722656 18.730469 11.495768 18.626303 12.241211 18.417969 C 12.986652 18.209635 13.683268 17.918295 14.331055 17.543945 C 14.978841 17.169598 15.568033 16.717123 16.098633 16.186523 C 16.62923 15.655925 17.084961 15.068359 17.46582 14.423828 C 17.84668 13.779297 18.141275 13.084311 18.349609 12.338867 C 18.557941 11.593425 18.662109 10.820312 18.662109 10.019531 C 18.662109 9.290365 18.575846 8.583984 18.40332 7.900391 C 18.230793 7.216798 17.983398 6.569012 17.661133 5.957031 C 17.338867 5.345053 16.951496 4.778646 16.499023 4.257812 C 16.046549 3.73698 15.538736 3.276367 14.975586 2.875977 C 14.412435 2.475586 13.802083 2.145184 13.144531 1.884766 C 12.486979 1.62435 11.796874 1.448568 11.074219 1.357422 C 11.184896 1.897787 11.274414 2.439779 11.342773 2.983398 C 11.411133 3.52702 11.445312 4.075521 11.445312 4.628906 C 11.445312 5.579428 11.336263 6.500652 11.118164 7.392578 C 10.900064 8.284506 10.569661 9.150391 10.126953 9.990234 C 9.749349 10.706381 9.309896 11.342773 8.808594 11.899414 C 8.307291 12.456055 7.758789 12.954102 7.163086 13.393555 C 6.567382 13.833008 5.929361 14.222006 5.249023 14.560547 C 4.568685 14.899089 3.863932 15.208334 3.134766 15.488281 C 3.544922 16.002604 4.005534 16.461588 4.516602 16.865234 C 5.027669 17.268881 5.574544 17.609049 6.157227 17.885742 C 6.739908 18.162436 7.348632 18.372396 7.983398 18.515625 C 8.618164 18.658854 9.264322 18.730469 9.921875 18.730469 Z " />
|
||||
</controls:SettingsCard.HeaderIcon>
|
||||
</controls:SettingsCard>
|
||||
</StackPanel>
|
||||
<VisualStateManager.VisualStateGroups>
|
||||
<VisualStateGroup x:Name="StartupBehaviorStates">
|
||||
<VisualState x:Name="StartupEnabled" />
|
||||
<VisualState x:Name="StartupDisabled">
|
||||
<VisualState.Setters>
|
||||
<Setter Target="StartupEnabledToggleButton.Content" Value="{x:Bind domain:Translator.SettingsAppPreferences_StartupBehavior_Enable}" />
|
||||
</VisualState.Setters>
|
||||
<VisualState.StateTriggers>
|
||||
<StateTrigger IsActive="{x:Bind ViewModel.IsStartupBehaviorDisabled, Mode=OneWay}" />
|
||||
</VisualState.StateTriggers>
|
||||
</VisualState>
|
||||
</VisualStateGroup>
|
||||
</VisualStateManager.VisualStateGroups>
|
||||
</ScrollViewer>
|
||||
</abstract:AppPreferencesPageAbstract>
|
||||
12
Wino.Mail/Views/Settings/AppPreferencesPage.xaml.cs
Normal file
12
Wino.Mail/Views/Settings/AppPreferencesPage.xaml.cs
Normal file
@@ -0,0 +1,12 @@
|
||||
using Wino.Views.Abstract;
|
||||
|
||||
namespace Wino.Views.Settings
|
||||
{
|
||||
public sealed partial class AppPreferencesPage : AppPreferencesPageAbstract
|
||||
{
|
||||
public AppPreferencesPage()
|
||||
{
|
||||
this.InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
||||
File diff suppressed because one or more lines are too long
@@ -7,8 +7,8 @@ using Windows.UI.Xaml.Media.Animation;
|
||||
using Windows.UI.Xaml.Navigation;
|
||||
using Wino.Core.Domain;
|
||||
using Wino.Core.Domain.Enums;
|
||||
using Wino.Core.Messages.Navigation;
|
||||
using Wino.Mail.ViewModels.Data;
|
||||
using Wino.Messaging.Client.Navigation;
|
||||
using Wino.Views.Abstract;
|
||||
using Wino.Views.Settings;
|
||||
|
||||
@@ -53,6 +53,7 @@ namespace Wino.Views
|
||||
WinoPage.MessageListPage => typeof(MessageListPage),
|
||||
WinoPage.ReadComposePanePage => typeof(ReadComposePanePage),
|
||||
WinoPage.LanguageTimePage => typeof(LanguageTimePage),
|
||||
WinoPage.AppPreferencesPage => typeof(AppPreferencesPage),
|
||||
_ => null,
|
||||
};
|
||||
|
||||
|
||||
@@ -116,7 +116,7 @@
|
||||
<UseDotNetNativeToolchain>true</UseDotNetNativeToolchain>
|
||||
<UseDotNetNativeSharedAssemblyFrameworkPackage>false</UseDotNetNativeSharedAssemblyFrameworkPackage>
|
||||
<Use64BitCompiler>true</Use64BitCompiler>
|
||||
<OutOfProcPDB>true</OutOfProcPDB>
|
||||
<!--<OutOfProcPDB>true</OutOfProcPDB>-->
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
@@ -228,7 +228,6 @@
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Activation\ActivationHandler.cs" />
|
||||
<Compile Include="Activation\BackgroundActivationHandler.cs" />
|
||||
<Compile Include="Activation\DefaultActivationHandler.cs" />
|
||||
<Compile Include="Activation\FileActivationHandler.cs" />
|
||||
<Compile Include="Activation\ProtocolActivationHandler.cs" />
|
||||
@@ -243,6 +242,7 @@
|
||||
<Compile Include="Controls\ControlConstants.cs" />
|
||||
<Compile Include="Controls\SettingsMenuItemControl.cs" />
|
||||
<Compile Include="Controls\Advanced\WinoListView.cs" />
|
||||
<Compile Include="Controls\WinoExpander.cs" />
|
||||
<Compile Include="Controls\WinoFontIconSource.cs" />
|
||||
<Compile Include="Controls\WinoFontIcon.cs" />
|
||||
<Compile Include="Controls\WinoSwipeControlItems.cs" />
|
||||
@@ -336,9 +336,6 @@
|
||||
<Compile Include="Services\ApplicationResourceManager.cs" />
|
||||
<Compile Include="Services\DialogService.cs" />
|
||||
<Compile Include="Services\LaunchProtocolService.cs" />
|
||||
<Compile Include="Services\PreferencesService.cs" />
|
||||
<Compile Include="Services\StatePersistenceService.cs" />
|
||||
<Compile Include="Services\ToastActivationService.cs" />
|
||||
<Compile Include="Services\WinoNavigationService.cs" />
|
||||
<Compile Include="Styles\CommandBarItems.xaml.cs">
|
||||
<DependentUpon>CommandBarItems.xaml</DependentUpon>
|
||||
@@ -346,6 +343,7 @@
|
||||
<Compile Include="Views\Abstract\AboutPageAbstract.cs" />
|
||||
<Compile Include="Views\Abstract\AccountDetailsPageAbstract.cs" />
|
||||
<Compile Include="Views\Abstract\AccountManagementPageAbstract.cs" />
|
||||
<Compile Include="Views\Abstract\AppPreferencesPageAbstract.cs" />
|
||||
<Compile Include="Views\Abstract\AppShellAbstract.cs" />
|
||||
<Compile Include="Views\Abstract\ComposePageAbstract.cs" />
|
||||
<Compile Include="Views\Abstract\IdlePageAbstract.cs" />
|
||||
@@ -407,6 +405,9 @@
|
||||
<Compile Include="Views\Settings\AboutPage.xaml.cs">
|
||||
<DependentUpon>AboutPage.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Views\Settings\AppPreferencesPage.xaml.cs">
|
||||
<DependentUpon>AppPreferencesPage.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Views\Settings\LanguageTimePage.xaml.cs">
|
||||
<DependentUpon>LanguageTimePage.xaml</DependentUpon>
|
||||
</Compile>
|
||||
@@ -631,6 +632,10 @@
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="Views\Settings\AppPreferencesPage.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
</Page>
|
||||
<Page Include="Views\Settings\LanguageTimePage.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
@@ -770,7 +775,6 @@
|
||||
<Content Include="Assets\Square44x44Logo.scale-200.png" />
|
||||
<Content Include="Assets\Square44x44Logo.targetsize-24_altform-unplated.png" />
|
||||
<Content Include="Assets\Wide310x150Logo.scale-200.png" />
|
||||
<None Include="Wino.Mail_TemporaryKey.pfx" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="Assets\Thumbnails\uber.com.png" />
|
||||
@@ -802,6 +806,10 @@
|
||||
<Project>{d62f1c03-da57-4709-a640-0283296a8e66}</Project>
|
||||
<Name>Wino.Mail.ViewModels</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\Wino.Messages\Wino.Messaging.csproj">
|
||||
<Project>{0c307d7e-256f-448c-8265-5622a812fbcc}</Project>
|
||||
<Name>Wino.Messaging</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<SDKReference Include="WindowsDesktop, Version=10.0.22621.0">
|
||||
@@ -884,4 +892,4 @@
|
||||
<Target Name="AfterBuild">
|
||||
</Target>
|
||||
-->
|
||||
</Project>
|
||||
</Project>
|
||||
|
||||
Reference in New Issue
Block a user