UWP .NET9 (#555)
* Ground work for NET9 UWP switch. * Add launch settings for Wino.Mail * Added new test WAP project * fix platforms in slnx solution * ManagePackageVersionsCentrally set default * Fixing assets and couple issues with the new packaging project. * Add back markdown * Fix nuget warnings * FIx error in WAP about build tools * Add build.props with default language preview * Some AOT compilation progress. * More AOT stuff. * Remove deprecated protocol auth activation handler. * Fix remaining protocol handler for google auth. * Even more AOT * More more AOT fixes * Fix a few more AOT warnings * Fix signature editor AOT * Fix composer and renderer AOT JSON * Outlook Sync AOT * Fixing bundle generation and package signing. --------- Co-authored-by: Burak Kaan Köse <bkaankose@outlook.com>
This commit is contained in:
6
Directory.Build.Props
Normal file
6
Directory.Build.Props
Normal file
@@ -0,0 +1,6 @@
|
||||
<Project>
|
||||
<PropertyGroup>
|
||||
<LangVersion>preview</LangVersion>
|
||||
<IsAotCompatible>true</IsAotCompatible>
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
63
Directory.Packages.props
Normal file
63
Directory.Packages.props
Normal file
@@ -0,0 +1,63 @@
|
||||
<Project>
|
||||
<PropertyGroup>
|
||||
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<PackageVersion Include="ColorHashSharp" Version="1.0.0" />
|
||||
<PackageVersion Include="CommunityToolkit.Common" Version="8.4.0" />
|
||||
<PackageVersion Include="CommunityToolkit.Diagnostics" Version="8.4.0" />
|
||||
<PackageVersion Include="CommunityToolkit.Labs.Uwp.Controls.MarkdownTextBlock" Version="0.1.250206-build.2040" />
|
||||
<PackageVersion Include="CommunityToolkit.Mvvm" Version="8.4.0" />
|
||||
<PackageVersion Include="CommunityToolkit.Uwp.Animations" Version="8.2.250129-preview2" />
|
||||
<PackageVersion Include="CommunityToolkit.Uwp.Behaviors" Version="8.2.250129-preview2" />
|
||||
<PackageVersion Include="CommunityToolkit.Uwp.Controls.Segmented" Version="8.2.250129-preview2" />
|
||||
<PackageVersion Include="CommunityToolkit.Uwp.Controls.SettingsControls" Version="8.2.250129-preview2" />
|
||||
<PackageVersion Include="CommunityToolkit.Uwp.Controls.Sizers" Version="8.2.250129-preview2" />
|
||||
<PackageVersion Include="CommunityToolkit.Uwp.Controls.TabbedCommandBar" Version="8.2.250129-preview2" />
|
||||
<PackageVersion Include="CommunityToolkit.Uwp.Controls.TokenizingTextBox" Version="8.2.250129-preview2" />
|
||||
<PackageVersion Include="CommunityToolkit.Uwp.Extensions" Version="8.2.250129-preview2" />
|
||||
<PackageVersion Include="EmailValidation" Version="1.2.0" />
|
||||
<PackageVersion Include="HtmlAgilityPack" Version="1.11.72" />
|
||||
<PackageVersion Include="Ical.Net" Version="4.3.1" />
|
||||
<PackageVersion Include="IsExternalInit" Version="1.0.3" />
|
||||
<PackageVersion Include="Microsoft.AppCenter.Analytics" Version="5.0.6" />
|
||||
<PackageVersion Include="Microsoft.AppCenter.Crashes" Version="5.0.6" />
|
||||
<PackageVersion Include="Microsoft.CodeAnalysis.Analyzers" Version="3.11.0" />
|
||||
<PackageVersion Include="Microsoft.CodeAnalysis.CSharp" Version="4.12.0" />
|
||||
<PackageVersion Include="Microsoft.Extensions.DependencyInjection" Version="9.0.2" />
|
||||
<PackageVersion Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="9.0.2" />
|
||||
<PackageVersion Include="Microsoft.Graph" Version="5.69.0" />
|
||||
<PackageVersion Include="Microsoft.Identity.Client" Version="4.68.0" />
|
||||
<PackageVersion Include="Microsoft.Identity.Client.Broker" Version="4.68.0" />
|
||||
<PackageVersion Include="Microsoft.Identity.Client.Extensions.Msal" Version="4.68.0" />
|
||||
<PackageVersion Include="Microsoft.NETCore.UniversalWindowsPlatform" Version="6.2.14" />
|
||||
<PackageVersion Include="Microsoft.UI.Xaml" Version="2.8.7" />
|
||||
<PackageVersion Include="Microsoft.Xaml.Behaviors.Uwp.Managed" Version="3.0.0" />
|
||||
<PackageVersion Include="MimeKit" Version="4.10.0" />
|
||||
<PackageVersion Include="morelinq" Version="4.4.0" />
|
||||
<PackageVersion Include="Nito.AsyncEx" Version="5.1.2" />
|
||||
<PackageVersion Include="Nito.AsyncEx.Tasks" Version="5.1.2" />
|
||||
<PackageVersion Include="NodaTime" Version="3.2.1" />
|
||||
<PackageVersion Include="Serilog" Version="4.2.0" />
|
||||
<PackageVersion Include="Serilog.Exceptions" Version="8.4.0" />
|
||||
<PackageVersion Include="Serilog.Sinks.Debug" Version="3.0.0" />
|
||||
<PackageVersion Include="Serilog.Sinks.File" Version="6.0.0" />
|
||||
<PackageVersion Include="SkiaSharp" Version="3.116.1" />
|
||||
<PackageVersion Include="sqlite-net-pcl" Version="1.9.172" />
|
||||
<PackageVersion Include="SqlKata" Version="4.0.1" />
|
||||
<PackageVersion Include="System.Private.Uri" Version="4.3.2" />
|
||||
<PackageVersion Include="System.Text.Encoding.CodePages" Version="9.0.2" />
|
||||
<PackageVersion Include="System.Text.Json" Version="9.0.2" />
|
||||
<PackageVersion Include="Win2D.uwp" Version="1.28.2" />
|
||||
<PackageVersion Include="H.NotifyIcon.Wpf" Version="2.2.0" />
|
||||
<PackageVersion Include="CommunityToolkit.WinUI.Notifications" Version="7.1.2" />
|
||||
<PackageVersion Include="Google.Apis.Auth" Version="1.69.0" />
|
||||
<PackageVersion Include="Google.Apis.Calendar.v3" Version="1.69.0.3667" />
|
||||
<PackageVersion Include="Google.Apis.Gmail.v1" Version="1.68.0.3427" />
|
||||
<PackageVersion Include="Google.Apis.PeopleService.v1" Version="1.68.0.3359" />
|
||||
<PackageVersion Include="HtmlKit" Version="1.2.0" />
|
||||
<PackageVersion Include="MailKit" Version="4.10.0" />
|
||||
<PackageVersion Include="TimePeriodLibrary.NET" Version="2.1.5" />
|
||||
<PackageVersion Include="System.Reactive" Version="6.0.1" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
@@ -1,26 +1,23 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>netstandard2.0</TargetFramework>
|
||||
<TargetFramework>net9.0</TargetFramework>
|
||||
<RuntimeIdentifiers>win-x86;win-x64;win-arm64</RuntimeIdentifiers>
|
||||
<RootNamespace>Wino.Authentication</RootNamespace>
|
||||
<Configurations>Debug;Release</Configurations>
|
||||
<LangVersion>12</LangVersion>
|
||||
<Platforms>AnyCPU;x64;x86</Platforms>
|
||||
<Platforms>x86;x64;arm64</Platforms>
|
||||
<AccelerateBuildsInVisualStudio>true</AccelerateBuildsInVisualStudio>
|
||||
<ProduceReferenceAssembly>true</ProduceReferenceAssembly>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="CommunityToolkit.Diagnostics" Version="8.3.2" />
|
||||
<PackageReference Include="CommunityToolkit.Mvvm" Version="8.3.2" />
|
||||
<PackageReference Include="Google.Apis.Auth" Version="1.68.0" />
|
||||
<PackageReference Include="Microsoft.Identity.Client" Version="4.66.2" />
|
||||
<PackageReference Include="Microsoft.Identity.Client.Broker" Version="4.66.2" />
|
||||
<PackageReference Include="Microsoft.Identity.Client.Extensions.Msal" Version="4.66.2" />
|
||||
<PackageReference Include="CommunityToolkit.Diagnostics" />
|
||||
<PackageReference Include="CommunityToolkit.Mvvm" />
|
||||
<PackageReference Include="Google.Apis.Auth" />
|
||||
<PackageReference Include="Microsoft.Identity.Client" />
|
||||
<PackageReference Include="Microsoft.Identity.Client.Broker" />
|
||||
<PackageReference Include="Microsoft.Identity.Client.Extensions.Msal" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\Wino.Core.Domain\Wino.Core.Domain.csproj" />
|
||||
<ProjectReference Include="..\Wino.Messages\Wino.Messaging.csproj" />
|
||||
<ProjectReference Include="..\Wino.Core.Domain\Wino.Core.Domain.csproj" />
|
||||
<ProjectReference Include="..\Wino.Messages\Wino.Messaging.csproj" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
</Project>
|
||||
11
Wino.Core.Domain/BasicTypesJsonContext.cs
Normal file
11
Wino.Core.Domain/BasicTypesJsonContext.cs
Normal file
@@ -0,0 +1,11 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace Wino.Core.Domain;
|
||||
|
||||
[JsonSerializable(typeof(Dictionary<string, string>))]
|
||||
[JsonSerializable(typeof(string))]
|
||||
[JsonSerializable(typeof(int))]
|
||||
[JsonSerializable(typeof(List<string>))]
|
||||
[JsonSerializable(typeof(bool))]
|
||||
public partial class BasicTypesJsonContext : JsonSerializerContext;
|
||||
@@ -11,12 +11,6 @@ namespace Wino.Core.Domain.Interfaces
|
||||
Task LaunchFileAsync(string filePath);
|
||||
Task<bool> LaunchUriAsync(Uri uri);
|
||||
|
||||
/// <summary>
|
||||
/// Finalizes GetAuthorizationResponseUriAsync for current IAuthenticator.
|
||||
/// </summary>
|
||||
/// <param name="authorizationResponseUri"></param>
|
||||
void ContinueAuthorization(Uri authorizationResponseUri);
|
||||
|
||||
bool IsAppRunning();
|
||||
|
||||
string GetFullAppVersion();
|
||||
|
||||
@@ -1,11 +0,0 @@
|
||||
using System;
|
||||
using Wino.Core.Domain.Entities;
|
||||
|
||||
namespace Wino.Core.Domain.Interfaces
|
||||
{
|
||||
public interface IWinoSynchronizerFactory : IInitializeAsync
|
||||
{
|
||||
IBaseSynchronizer GetAccountSynchronizer(Guid accountId);
|
||||
IBaseSynchronizer CreateNewSynchronizer(MailAccount account);
|
||||
}
|
||||
}
|
||||
@@ -11,7 +11,7 @@ namespace Wino.Core.Domain.Models.Accounts
|
||||
|
||||
public string Description { get; }
|
||||
|
||||
public string ProviderImage => $"ms-appx:///Wino.Core.UWP/Assets/Providers/{Type}.png";
|
||||
public string ProviderImage => $"/Wino.Core.UWP/Assets/Providers/{Type}.png";
|
||||
|
||||
public bool IsSupported => Type == MailProviderType.Outlook || Type == MailProviderType.Gmail || Type == MailProviderType.IMAP4;
|
||||
|
||||
|
||||
11
Wino.Core.Domain/Models/DomainModelsJsonContext.cs
Normal file
11
Wino.Core.Domain/Models/DomainModelsJsonContext.cs
Normal file
@@ -0,0 +1,11 @@
|
||||
using System.Text.Json.Serialization;
|
||||
using Wino.Core.Domain.Models.AutoDiscovery;
|
||||
using Wino.Core.Domain.Models.Personalization;
|
||||
using Wino.Core.Domain.Models.Reader;
|
||||
|
||||
namespace Wino.Core.Domain.Models;
|
||||
|
||||
[JsonSerializable(typeof(AutoDiscoverySettings))]
|
||||
[JsonSerializable(typeof(CustomThemeMetadata))]
|
||||
[JsonSerializable(typeof(WebViewMessage))]
|
||||
public partial class DomainModelsJsonContext: JsonSerializerContext;
|
||||
@@ -10,12 +10,14 @@ namespace Wino.Core.Domain.Translations
|
||||
// Return the key itself in case of translation is not found.
|
||||
public string GetTranslatedString(string key) => TryGetValue(key, out string keyValue) ? keyValue : key;
|
||||
|
||||
public Stream GetLanguageStream(AppLanguage language)
|
||||
public static Stream GetLanguageStream(AppLanguage language)
|
||||
{
|
||||
var path = GetLanguageFileNameRelativePath(language);
|
||||
var executingAssembly = Assembly.GetExecutingAssembly();
|
||||
|
||||
string languageResourcePath = $"{executingAssembly.ManifestModule.Name.Replace(".dll", ".")}Translations.{path}.resources.json";
|
||||
// Use the assembly's name instead of the module name to construct the resource path
|
||||
string assemblyName = executingAssembly.GetName().Name;
|
||||
string languageResourcePath = $"{assemblyName}.Translations.{path}.resources.json";
|
||||
return executingAssembly.GetManifestResourceStream(languageResourcePath);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,88 +1,73 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>netstandard2.0</TargetFramework>
|
||||
<ProduceReferenceAssembly>true</ProduceReferenceAssembly>
|
||||
<LangVersion>12.0</LangVersion>
|
||||
<Platforms>AnyCPU;x64;x86</Platforms>
|
||||
<AccelerateBuildsInVisualStudio>true</AccelerateBuildsInVisualStudio>
|
||||
<ProduceReferenceAssembly>true</ProduceReferenceAssembly>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Compile Remove="Models\Communication\**" />
|
||||
<EmbeddedResource Remove="Models\Communication\**" />
|
||||
<None Remove="Models\Communication\**" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Compile Remove="Interfaces\IWinoSynchronizerFactory.cs" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<None Remove="Translations\ca_ES\resources.json" />
|
||||
<None Remove="Translations\cs_CZ\resources.json" />
|
||||
<None Remove="Translations\da_DK\resources.json" />
|
||||
<None Remove="Translations\el_GR\resources.json" />
|
||||
<None Remove="Translations\es_ES\resources.json" />
|
||||
<None Remove="Translations\fr_FR\resources.json" />
|
||||
<None Remove="Translations\id_ID\resources.json" />
|
||||
<None Remove="Translations\it_IT\resources.json" />
|
||||
<None Remove="Translations\ja_JP\resources.json" />
|
||||
<None Remove="Translations\nl_NL\resources.json" />
|
||||
<None Remove="Translations\pl_PL\resources.json" />
|
||||
<None Remove="Translations\pt_BR\resources.json" />
|
||||
<None Remove="Translations\ro_RO\resources.json" />
|
||||
<None Remove="Translations\ru_RU\resources.json" />
|
||||
<None Remove="Translations\uk_UA\resources.json" />
|
||||
<None Remove="Translations\zh_CN\resources.json" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="Translations\ca_ES\resources.json" />
|
||||
<EmbeddedResource Include="Translations\cs_CZ\resources.json" />
|
||||
<EmbeddedResource Include="Translations\da_DK\resources.json" />
|
||||
<EmbeddedResource Include="Translations\el_GR\resources.json" />
|
||||
<EmbeddedResource Include="Translations\en_US\resources.json" />
|
||||
<EmbeddedResource Include="Translations\de_DE\resources.json" />
|
||||
<EmbeddedResource Include="Translations\es_ES\resources.json" />
|
||||
<EmbeddedResource Include="Translations\fr_FR\resources.json" />
|
||||
<EmbeddedResource Include="Translations\id_ID\resources.json" />
|
||||
<EmbeddedResource Include="Translations\it_IT\resources.json" />
|
||||
<EmbeddedResource Include="Translations\ja_JP\resources.json" />
|
||||
<EmbeddedResource Include="Translations\nl_NL\resources.json" />
|
||||
<EmbeddedResource Include="Translations\pl_PL\resources.json" />
|
||||
<EmbeddedResource Include="Translations\pt_BR\resources.json" />
|
||||
<EmbeddedResource Include="Translations\ro_RO\resources.json" />
|
||||
<EmbeddedResource Include="Translations\ru_RU\resources.json" />
|
||||
<EmbeddedResource Include="Translations\tr_TR\resources.json" />
|
||||
<EmbeddedResource Include="Translations\uk_UA\resources.json" />
|
||||
<EmbeddedResource Include="Translations\zh_CN\resources.json" />
|
||||
</ItemGroup>
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net9.0</TargetFramework>
|
||||
<RuntimeIdentifiers>win-x86;win-x64;win-arm64</RuntimeIdentifiers>
|
||||
<ProduceReferenceAssembly>true</ProduceReferenceAssembly>
|
||||
<Platforms>x86;x64;arm64</Platforms>
|
||||
<AccelerateBuildsInVisualStudio>true</AccelerateBuildsInVisualStudio>
|
||||
<ProduceReferenceAssembly>true</ProduceReferenceAssembly>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="CommunityToolkit.Diagnostics" Version="8.3.2" />
|
||||
<PackageReference Include="CommunityToolkit.Mvvm" Version="8.3.2" />
|
||||
<PackageReference Include="IsExternalInit" Version="1.0.3">
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||
</PackageReference>
|
||||
<PackageReference Include="MimeKit" Version="4.9.0" />
|
||||
<PackageReference Include="MailKit" Version="4.9.0" />
|
||||
<PackageReference Include="sqlite-net-pcl" Version="1.9.172" />
|
||||
<PackageReference Include="System.Text.Json" Version="8.0.5" />
|
||||
<PackageReference Include="TimePeriodLibrary.NET" Version="2.1.5" />
|
||||
<Compile Remove="Models\Communication\**" />
|
||||
<EmbeddedResource Remove="Models\Communication\**" />
|
||||
<None Remove="Models\Communication\**" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Service Include="{508349b6-6b84-4df5-91f0-309beebad82d}" />
|
||||
<None Remove="Translations\ca_ES\resources.json" />
|
||||
<None Remove="Translations\cs_CZ\resources.json" />
|
||||
<None Remove="Translations\da_DK\resources.json" />
|
||||
<None Remove="Translations\el_GR\resources.json" />
|
||||
<None Remove="Translations\es_ES\resources.json" />
|
||||
<None Remove="Translations\fr_FR\resources.json" />
|
||||
<None Remove="Translations\id_ID\resources.json" />
|
||||
<None Remove="Translations\it_IT\resources.json" />
|
||||
<None Remove="Translations\ja_JP\resources.json" />
|
||||
<None Remove="Translations\nl_NL\resources.json" />
|
||||
<None Remove="Translations\pl_PL\resources.json" />
|
||||
<None Remove="Translations\pt_BR\resources.json" />
|
||||
<None Remove="Translations\ro_RO\resources.json" />
|
||||
<None Remove="Translations\ru_RU\resources.json" />
|
||||
<None Remove="Translations\uk_UA\resources.json" />
|
||||
<None Remove="Translations\zh_CN\resources.json" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="Translations\ca_ES\resources.json" />
|
||||
<EmbeddedResource Include="Translations\cs_CZ\resources.json" />
|
||||
<EmbeddedResource Include="Translations\da_DK\resources.json" />
|
||||
<EmbeddedResource Include="Translations\el_GR\resources.json" />
|
||||
<EmbeddedResource Include="Translations\en_US\resources.json" />
|
||||
<EmbeddedResource Include="Translations\de_DE\resources.json" />
|
||||
<EmbeddedResource Include="Translations\es_ES\resources.json" />
|
||||
<EmbeddedResource Include="Translations\fr_FR\resources.json" />
|
||||
<EmbeddedResource Include="Translations\id_ID\resources.json" />
|
||||
<EmbeddedResource Include="Translations\it_IT\resources.json" />
|
||||
<EmbeddedResource Include="Translations\ja_JP\resources.json" />
|
||||
<EmbeddedResource Include="Translations\nl_NL\resources.json" />
|
||||
<EmbeddedResource Include="Translations\pl_PL\resources.json" />
|
||||
<EmbeddedResource Include="Translations\pt_BR\resources.json" />
|
||||
<EmbeddedResource Include="Translations\ro_RO\resources.json" />
|
||||
<EmbeddedResource Include="Translations\ru_RU\resources.json" />
|
||||
<EmbeddedResource Include="Translations\tr_TR\resources.json" />
|
||||
<EmbeddedResource Include="Translations\uk_UA\resources.json" />
|
||||
<EmbeddedResource Include="Translations\zh_CN\resources.json" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="CommunityToolkit.Diagnostics" />
|
||||
<PackageReference Include="CommunityToolkit.Mvvm" />
|
||||
<PackageReference Include="MimeKit" />
|
||||
<PackageReference Include="MailKit" />
|
||||
<PackageReference Include="sqlite-net-pcl" />
|
||||
<PackageReference Include="System.Text.Json" />
|
||||
<PackageReference Include="TimePeriodLibrary.NET" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Service Include="{508349b6-6b84-4df5-91f0-309beebad82d}" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<AdditionalFiles Include="Translations\en_US\resources.json" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<!-- Source Generators -->
|
||||
<ProjectReference Include="..\Wino.SourceGenerators\Wino.SourceGenerators.csproj" OutputItemType="Analyzer" ReferenceOutputAssembly="false" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
</Project>
|
||||
@@ -10,7 +10,7 @@ using Wino.Messaging.Client.Shell;
|
||||
|
||||
namespace Wino.Core.UWP
|
||||
{
|
||||
public class BasePage : Page, IRecipient<LanguageChanged>
|
||||
public partial class BasePage : Page, IRecipient<LanguageChanged>
|
||||
{
|
||||
public UIElement ShellContent
|
||||
{
|
||||
|
||||
@@ -8,7 +8,7 @@ namespace Wino.Core.UWP.Controls
|
||||
|
||||
namespace CustomControls
|
||||
{
|
||||
public class CustomWrapPanel : Panel
|
||||
public partial class CustomWrapPanel : Panel
|
||||
{
|
||||
protected override Size MeasureOverride(Size availableSize)
|
||||
{
|
||||
|
||||
@@ -4,7 +4,7 @@ using Windows.UI.Xaml.Controls;
|
||||
|
||||
namespace Wino.Core.UWP.Controls
|
||||
{
|
||||
public class EqualGridPanel : Panel
|
||||
public partial class EqualGridPanel : Panel
|
||||
{
|
||||
public int Rows
|
||||
{
|
||||
|
||||
@@ -120,14 +120,14 @@
|
||||
Grid.Column="1"
|
||||
Margin="4,0,0,0"
|
||||
HorizontalAlignment="Left"
|
||||
ToolTipService.ToolTip="{x:Bind domain:Translator.TitleBarServerDisconnectedButton_Description, Mode=OneWay}"
|
||||
ToolTipService.ToolTip="{x:Bind domain:Translator.TitleBarServerDisconnectedButton_Description}"
|
||||
Visibility="Collapsed">
|
||||
<Button.Flyout>
|
||||
<Flyout x:Name="ReconnectFlyout" Placement="Bottom">
|
||||
<StackPanel Spacing="12">
|
||||
<TextBlock
|
||||
Width="250"
|
||||
Text="{x:Bind domain:Translator.TitleBarServerDisconnectedButton_Description, Mode=OneWay}"
|
||||
Text="{x:Bind domain:Translator.TitleBarServerDisconnectedButton_Description}"
|
||||
TextWrapping="Wrap" />
|
||||
<Button
|
||||
HorizontalAlignment="Right"
|
||||
@@ -156,7 +156,7 @@
|
||||
<TextBlock
|
||||
x:Name="ConnectionStatusTextBlock"
|
||||
VerticalAlignment="Center"
|
||||
Text="{x:Bind domain:Translator.TitleBarServerDisconnectedButton_Title, Mode=OneWay}" />
|
||||
Text="{x:Bind domain:Translator.TitleBarServerDisconnectedButton_Title}" />
|
||||
</StackPanel>
|
||||
</Button>
|
||||
</Grid>
|
||||
@@ -170,7 +170,7 @@
|
||||
<Setter Target="ReconnectingProgressRing.Visibility" Value="Visible" />
|
||||
<Setter Target="ConnectionStatusButton.Visibility" Value="Visible" />
|
||||
<Setter Target="DisconnectedPathIcon.Visibility" Value="Collapsed" />
|
||||
<Setter Target="ConnectionStatusTextBlock.Text" Value="{x:Bind domain:Translator.TitleBarServerReconnectingButton_Title, Mode=OneWay}" />
|
||||
<Setter Target="ConnectionStatusTextBlock.Text" Value="{x:Bind domain:Translator.TitleBarServerReconnectingButton_Title}" />
|
||||
</VisualState.Setters>
|
||||
<VisualState.StateTriggers>
|
||||
<StateTrigger IsActive="{x:Bind helpers:XamlHelpers.ConnectionStatusEquals(ConnectionStatus, enums:WinoServerConnectionStatus.Connecting), Mode=OneWay}" />
|
||||
@@ -181,7 +181,7 @@
|
||||
<Setter Target="ConnectionStatusButton.Visibility" Value="Visible" />
|
||||
<Setter Target="DisconnectedPathIcon.Visibility" Value="Visible" />
|
||||
<Setter Target="ReconnectingProgressRing.Visibility" Value="Collapsed" />
|
||||
<Setter Target="ConnectionStatusTextBlock.Text" Value="{x:Bind domain:Translator.TitleBarServerDisconnectedButton_Title, Mode=OneWay}" />
|
||||
<Setter Target="ConnectionStatusTextBlock.Text" Value="{x:Bind domain:Translator.TitleBarServerDisconnectedButton_Title}" />
|
||||
</VisualState.Setters>
|
||||
<VisualState.StateTriggers>
|
||||
<StateTrigger IsActive="{x:Bind helpers:XamlHelpers.ConnectionStatusEquals(ConnectionStatus, enums:WinoServerConnectionStatus.Disconnected), Mode=OneWay}" />
|
||||
|
||||
@@ -102,7 +102,7 @@ namespace Wino.Core.UWP.Controls
|
||||
ViewMessageSource,
|
||||
}
|
||||
|
||||
public class WinoFontIcon : FontIcon
|
||||
public partial class WinoFontIcon : FontIcon
|
||||
{
|
||||
public WinoIconGlyph Icon
|
||||
{
|
||||
|
||||
@@ -3,7 +3,7 @@ using Wino.Core.UWP.Controls;
|
||||
|
||||
namespace Wino.Controls
|
||||
{
|
||||
public class WinoFontIconSource : Microsoft.UI.Xaml.Controls.FontIconSource
|
||||
public partial class WinoFontIconSource : Microsoft.UI.Xaml.Controls.FontIconSource
|
||||
{
|
||||
public WinoIconGlyph Icon
|
||||
{
|
||||
|
||||
@@ -7,7 +7,7 @@ using Wino.Core.Domain.Enums;
|
||||
|
||||
namespace Wino.Core.UWP.Controls
|
||||
{
|
||||
public class WinoInfoBar : InfoBar
|
||||
public partial class WinoInfoBar : InfoBar
|
||||
{
|
||||
public static readonly DependencyProperty AnimationTypeProperty = DependencyProperty.Register(nameof(AnimationType), typeof(InfoBarAnimationType), typeof(WinoInfoBar), new PropertyMetadata(InfoBarAnimationType.SlideFromRightToLeft));
|
||||
public static readonly DependencyProperty DismissIntervalProperty = DependencyProperty.Register(nameof(DismissInterval), typeof(int), typeof(WinoInfoBar), new PropertyMetadata(5, new PropertyChangedCallback(OnDismissIntervalChanged)));
|
||||
|
||||
@@ -5,7 +5,7 @@ using Windows.UI.Xaml.Hosting;
|
||||
|
||||
namespace Wino.Core.UWP.Controls
|
||||
{
|
||||
public class WinoNavigationViewItem : NavigationViewItem
|
||||
public partial class WinoNavigationViewItem : NavigationViewItem
|
||||
{
|
||||
public bool IsDraggingItemOver
|
||||
{
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
using System;
|
||||
using Windows.UI.Xaml.Data;
|
||||
using Windows.UI.Xaml;
|
||||
using Windows.UI.Xaml.Data;
|
||||
|
||||
namespace Wino.Converters
|
||||
{
|
||||
public class GridLengthConverter : IValueConverter
|
||||
public partial class GridLengthConverter : IValueConverter
|
||||
{
|
||||
public object Convert(object value, Type targetType, object parameter, string language)
|
||||
{
|
||||
|
||||
@@ -1,13 +1,9 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Windows.UI.Xaml.Data;
|
||||
|
||||
namespace Wino.Converters
|
||||
{
|
||||
public class ReverseBooleanConverter : IValueConverter
|
||||
public partial class ReverseBooleanConverter : IValueConverter
|
||||
{
|
||||
public object Convert(object value, Type targetType, object parameter, string language)
|
||||
{
|
||||
|
||||
@@ -1,14 +1,10 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Windows.UI.Xaml;
|
||||
using Windows.UI.Xaml.Data;
|
||||
|
||||
namespace Wino.Converters
|
||||
{
|
||||
public class ReverseBooleanToVisibilityConverter : IValueConverter
|
||||
public partial class ReverseBooleanToVisibilityConverter : IValueConverter
|
||||
{
|
||||
public object Convert(object value, Type targetType, object parameter, string language)
|
||||
{
|
||||
|
||||
@@ -6,7 +6,7 @@ namespace Wino.Dialogs
|
||||
public partial class CustomMessageDialogInformationContainer : ObservableObject
|
||||
{
|
||||
[ObservableProperty]
|
||||
private bool isDontAskChecked;
|
||||
public partial bool IsDontAskChecked { get; set; }
|
||||
|
||||
public CustomMessageDialogInformationContainer(string title, string description, WinoCustomMessageDialogIcon icon, bool isDontAskAgainEnabled)
|
||||
{
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.Toolkit.Uwp.Helpers;
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Threading.Tasks;
|
||||
using Windows.Storage;
|
||||
using Wino.Core.Domain.Models.Common;
|
||||
|
||||
namespace Wino.Core.UWP.Extensions
|
||||
@@ -8,9 +10,22 @@ namespace Wino.Core.UWP.Extensions
|
||||
{
|
||||
public static async Task<SharedFile> ToSharedFileAsync(this Windows.Storage.StorageFile storageFile)
|
||||
{
|
||||
var content = await storageFile.ReadBytesAsync();
|
||||
var content = await storageFile.ToByteArrayAsync();
|
||||
|
||||
return new SharedFile(storageFile.Path, content);
|
||||
}
|
||||
|
||||
public static async Task<byte[]> ToByteArrayAsync(this StorageFile file)
|
||||
{
|
||||
if (file == null)
|
||||
throw new ArgumentNullException(nameof(file));
|
||||
|
||||
using (var stream = await file.OpenReadAsync())
|
||||
using (var memoryStream = new MemoryStream())
|
||||
{
|
||||
await stream.AsStreamForRead().CopyToAsync(memoryStream);
|
||||
return memoryStream.ToArray();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -103,6 +103,6 @@ namespace Wino.Extensions
|
||||
}
|
||||
|
||||
|
||||
public static IEnumerable<T> GetValues<T>() => Enum.GetValues(typeof(T)).Cast<T>();
|
||||
public static T[] GetValues<T>() where T : struct, Enum => Enum.GetValues<T>();
|
||||
}
|
||||
}
|
||||
|
||||
32
Wino.Core.UWP/Extensions/WebViewExtensions.cs
Normal file
32
Wino.Core.UWP/Extensions/WebViewExtensions.cs
Normal file
@@ -0,0 +1,32 @@
|
||||
using System;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Wino.Core.UWP.Extensions;
|
||||
|
||||
public static class WebViewExtensions
|
||||
{
|
||||
/// <summary>
|
||||
/// Executes a script function in the WebView2 control.
|
||||
/// </summary>
|
||||
/// <param name="isChromiumDisposed">Weird parameter that needed in mailRendering page. TODO: should be reconsidered.</param>
|
||||
/// <param name="parameters">Parameters should be serialized to json</param>
|
||||
public static async Task<string> ExecuteScriptFunctionAsync(this Microsoft.UI.Xaml.Controls.WebView2 Chromium, string functionName, bool isChromiumDisposed = false, params string[] parameters)
|
||||
{
|
||||
string script = functionName + "(" + string.Join(", ", parameters) + ");";
|
||||
|
||||
return isChromiumDisposed ? string.Empty : await Chromium.ExecuteScriptAsync(script);
|
||||
}
|
||||
|
||||
public static async Task<string> ExecuteScriptFunctionSafeAsync(this Microsoft.UI.Xaml.Controls.WebView2 Chromium, string functionName, params string[] parameters)
|
||||
{
|
||||
if (Chromium == null) return string.Empty;
|
||||
|
||||
try
|
||||
{
|
||||
return await Chromium.ExecuteScriptFunctionAsync(functionName, parameters: parameters);
|
||||
}
|
||||
catch { }
|
||||
|
||||
return string.Empty;
|
||||
}
|
||||
}
|
||||
@@ -1,7 +1,7 @@
|
||||
using System;
|
||||
using System.Globalization;
|
||||
using System.Linq;
|
||||
using Microsoft.Toolkit.Uwp.Helpers;
|
||||
using CommunityToolkit.WinUI.Helpers;
|
||||
using Microsoft.UI.Xaml.Controls;
|
||||
using Windows.UI;
|
||||
using Windows.UI.Text;
|
||||
|
||||
@@ -1,29 +0,0 @@
|
||||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// General Information about an assembly is controlled through the following
|
||||
// set of attributes. Change these attribute values to modify the information
|
||||
// associated with an assembly.
|
||||
[assembly: AssemblyTitle("Wino.Core.UWP")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyProduct("Wino.Core.UWP")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2023")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
// Version information for an assembly consists of the following four values:
|
||||
//
|
||||
// Major Version
|
||||
// Minor Version
|
||||
// Build Number
|
||||
// Revision
|
||||
//
|
||||
// You can specify all the values or you can default the Build and Revision Numbers
|
||||
// by using the '*' as shown below:
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("1.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
||||
[assembly: ComVisible(false)]
|
||||
@@ -1,33 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
This file contains Runtime Directives, specifications about types your application accesses
|
||||
through reflection and other dynamic code patterns. Runtime Directives are used to control the
|
||||
.NET Native optimizer and ensure that it does not remove code accessed by your library. If your
|
||||
library does not do any reflection, then you generally do not need to edit this file. However,
|
||||
if your library reflects over types, especially types passed to it or derived from its types,
|
||||
then you should write Runtime Directives.
|
||||
|
||||
The most common use of reflection in libraries is to discover information about types passed
|
||||
to the library. Runtime Directives have three ways to express requirements on types passed to
|
||||
your library.
|
||||
|
||||
1. Parameter, GenericParameter, TypeParameter, TypeEnumerableParameter
|
||||
Use these directives to reflect over types passed as a parameter.
|
||||
|
||||
2. SubTypes
|
||||
Use a SubTypes directive to reflect over types derived from another type.
|
||||
|
||||
3. AttributeImplies
|
||||
Use an AttributeImplies directive to indicate that your library needs to reflect over
|
||||
types or methods decorated with an attribute.
|
||||
|
||||
For more information on writing Runtime Directives for libraries, please visit
|
||||
https://go.microsoft.com/fwlink/?LinkID=391919
|
||||
-->
|
||||
<Directives xmlns="http://schemas.microsoft.com/netfx/2013/01/metadata">
|
||||
<Library Name="Wino.Core.UWP">
|
||||
|
||||
<!-- add directives for your library here -->
|
||||
|
||||
</Library>
|
||||
</Directives>
|
||||
@@ -4,7 +4,7 @@ using Wino.Core.UWP.Models.Personalization;
|
||||
|
||||
namespace Wino.Core.UWP.Selectors
|
||||
{
|
||||
public class AppThemePreviewTemplateSelector : DataTemplateSelector
|
||||
public partial class AppThemePreviewTemplateSelector : DataTemplateSelector
|
||||
{
|
||||
public DataTemplate SystemThemeTemplate { get; set; }
|
||||
public DataTemplate PreDefinedThemeTemplate { get; set; }
|
||||
|
||||
@@ -5,7 +5,7 @@ using Wino.Core.Domain.Enums;
|
||||
|
||||
namespace Wino.Core.UWP.Selectors
|
||||
{
|
||||
public class CustomWinoMessageDialogIconSelector : DataTemplateSelector
|
||||
public partial class CustomWinoMessageDialogIconSelector : DataTemplateSelector
|
||||
{
|
||||
public DataTemplate InfoIconTemplate { get; set; }
|
||||
public DataTemplate WarningIconTemplate { get; set; }
|
||||
|
||||
@@ -4,7 +4,7 @@ using Wino.Core.Domain.Enums;
|
||||
|
||||
namespace Wino.Core.UWP.Selectors
|
||||
{
|
||||
public class FileAttachmentTypeSelector : DataTemplateSelector
|
||||
public partial class FileAttachmentTypeSelector : DataTemplateSelector
|
||||
{
|
||||
public DataTemplate None { get; set; }
|
||||
public DataTemplate Executable { get; set; }
|
||||
|
||||
@@ -4,7 +4,7 @@ using Wino.Core.Domain.MenuItems;
|
||||
|
||||
namespace Wino.Core.UWP.Selectors
|
||||
{
|
||||
public class NavigationMenuTemplateSelector : DataTemplateSelector
|
||||
public partial class NavigationMenuTemplateSelector : DataTemplateSelector
|
||||
{
|
||||
public DataTemplate MenuItemTemplate { get; set; }
|
||||
public DataTemplate AccountManagementTemplate { get; set; }
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
using System;
|
||||
using System.ComponentModel;
|
||||
using System.Globalization;
|
||||
using Windows.Foundation.Collections;
|
||||
using Windows.Storage;
|
||||
using Wino.Core.Domain.Interfaces;
|
||||
@@ -20,32 +21,32 @@ namespace Wino.Core.UWP.Services
|
||||
public void SetRoaming(string key, object value)
|
||||
=> SetInternal(key, value, ApplicationData.Current.RoamingSettings.Values);
|
||||
|
||||
private T GetInternal<T>(string key, IPropertySet collection, T defaultValue = default)
|
||||
private static T GetInternal<T>(string key, IPropertySet collection, T defaultValue = default)
|
||||
{
|
||||
if (collection.ContainsKey(key))
|
||||
if (collection.TryGetValue(key, out object value))
|
||||
{
|
||||
var value = collection[key]?.ToString();
|
||||
var stringValue = value?.ToString();
|
||||
|
||||
if (typeof(T).IsEnum)
|
||||
return (T)Enum.Parse(typeof(T), value);
|
||||
return (T)Enum.Parse(typeof(T), stringValue);
|
||||
|
||||
if (typeof(T) == typeof(Guid?) && Guid.TryParse(value, out Guid guidResult))
|
||||
if ((typeof(T) == typeof(Guid?) || typeof(T) == typeof(Guid)) && Guid.TryParse(stringValue, out Guid guidResult))
|
||||
{
|
||||
return (T)TypeDescriptor.GetConverter(typeof(T)).ConvertFromInvariantString(value);
|
||||
return (T)(object)guidResult;
|
||||
}
|
||||
|
||||
if (typeof(T) == typeof(TimeSpan))
|
||||
{
|
||||
return (T)(object)TimeSpan.Parse(value);
|
||||
return (T)(object)TimeSpan.Parse(stringValue);
|
||||
}
|
||||
|
||||
return (T)Convert.ChangeType(value, typeof(T));
|
||||
return (T)Convert.ChangeType(stringValue, typeof(T));
|
||||
}
|
||||
|
||||
return defaultValue;
|
||||
}
|
||||
|
||||
private void SetInternal(string key, object value, IPropertySet collection)
|
||||
private static void SetInternal(string key, object value, IPropertySet collection)
|
||||
=> collection[key] = value?.ToString();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,7 +3,6 @@ using System.Collections.Generic;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using CommunityToolkit.Mvvm.Messaging;
|
||||
using Microsoft.Toolkit.Uwp.Helpers;
|
||||
using Serilog;
|
||||
using Windows.Storage;
|
||||
using Windows.Storage.AccessCache;
|
||||
@@ -146,7 +145,7 @@ namespace Wino.Core.UWP.Services
|
||||
|
||||
if (file == null) return [];
|
||||
|
||||
return await file.ReadBytesAsync();
|
||||
return await file.ToByteArrayAsync();
|
||||
}
|
||||
|
||||
public Task ShowMessageAsync(string message, string title, WinoCustomMessageDialogIcon icon = WinoCustomMessageDialogIcon.Information)
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
using System.Threading.Tasks;
|
||||
using Windows.ApplicationModel;
|
||||
using Windows.Foundation.Metadata;
|
||||
using Windows.Security.Authentication.Web;
|
||||
using Windows.Storage;
|
||||
using Windows.System;
|
||||
using Windows.UI.Shell;
|
||||
@@ -21,7 +20,6 @@ namespace Wino.Services
|
||||
{
|
||||
private string _mimeMessagesFolder;
|
||||
private string _editorBundlePath;
|
||||
private TaskCompletionSource<Uri> authorizationCompletedTaskSource;
|
||||
|
||||
public Func<IntPtr> GetCoreWindowHwnd { get; set; }
|
||||
|
||||
@@ -107,13 +105,5 @@ namespace Wino.Services
|
||||
|
||||
await taskbarManager.RequestPinCurrentAppAsync();
|
||||
}
|
||||
|
||||
public void ContinueAuthorization(Uri authorizationResponseUri)
|
||||
{
|
||||
if (authorizationCompletedTaskSource != null)
|
||||
{
|
||||
authorizationCompletedTaskSource.TrySetResult(authorizationResponseUri);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,7 +7,7 @@ using System.Runtime.InteropServices.WindowsRuntime;
|
||||
using System.Text.Json;
|
||||
using System.Threading.Tasks;
|
||||
using CommunityToolkit.Mvvm.Messaging;
|
||||
using Microsoft.Toolkit.Uwp.Helpers;
|
||||
using CommunityToolkit.WinUI.Helpers;
|
||||
using Windows.Storage;
|
||||
using Windows.UI;
|
||||
using Windows.UI.ViewManagement;
|
||||
@@ -19,6 +19,7 @@ using Wino.Core.Domain;
|
||||
using Wino.Core.Domain.Enums;
|
||||
using Wino.Core.Domain.Exceptions;
|
||||
using Wino.Core.Domain.Interfaces;
|
||||
using Wino.Core.Domain.Models;
|
||||
using Wino.Core.Domain.Models.Personalization;
|
||||
using Wino.Core.UWP.Extensions;
|
||||
using Wino.Core.UWP.Models.Personalization;
|
||||
@@ -168,9 +169,7 @@ namespace Wino.Services
|
||||
AccentColor = _configurationService.Get(AccentColorKey, string.Empty);
|
||||
|
||||
// Set the current theme id. Default to Mica.
|
||||
var applicationThemeGuid = _configurationService.Get(CurrentApplicationThemeKey, _micaThemeId);
|
||||
|
||||
currentApplicationThemeId = Guid.Parse(applicationThemeGuid);
|
||||
currentApplicationThemeId = _configurationService.Get(CurrentApplicationThemeKey, Guid.Parse(_micaThemeId));
|
||||
|
||||
await ApplyCustomThemeAsync(true);
|
||||
|
||||
@@ -235,7 +234,7 @@ namespace Wino.Services
|
||||
// Change accent color if specified.
|
||||
if (!string.IsNullOrEmpty(hex))
|
||||
{
|
||||
var color = Microsoft.Toolkit.Uwp.Helpers.ColorHelper.ToColor(hex);
|
||||
var color = CommunityToolkit.WinUI.Helpers.ColorHelper.ToColor(hex);
|
||||
var brush = new SolidColorBrush(color);
|
||||
|
||||
if (_applicationResourceManager.ContainsResourceKey("SystemAccentColor"))
|
||||
@@ -412,7 +411,7 @@ namespace Wino.Services
|
||||
{
|
||||
byte[] bytes = new byte[readerStream.Length];
|
||||
|
||||
await readerStream.ReadAsync(bytes, 0, bytes.Length);
|
||||
await readerStream.ReadExactlyAsync(bytes);
|
||||
|
||||
var buffer = bytes.AsBuffer();
|
||||
|
||||
@@ -422,7 +421,7 @@ namespace Wino.Services
|
||||
// Save metadata.
|
||||
var metadataFile = await themeFolder.CreateFileAsync($"{newTheme.Id}.json", CreationCollisionOption.ReplaceExisting);
|
||||
|
||||
var serialized = JsonSerializer.Serialize(newTheme);
|
||||
var serialized = JsonSerializer.Serialize(newTheme, DomainModelsJsonContext.Default.CustomThemeMetadata);
|
||||
await FileIO.WriteTextAsync(metadataFile, serialized);
|
||||
|
||||
return newTheme;
|
||||
@@ -454,7 +453,7 @@ namespace Wino.Services
|
||||
{
|
||||
var fileContent = await FileIO.ReadTextAsync(file);
|
||||
|
||||
return JsonSerializer.Deserialize<CustomThemeMetadata>(fileContent);
|
||||
return JsonSerializer.Deserialize(fileContent, DomainModelsJsonContext.Default.CustomThemeMetadata);
|
||||
}
|
||||
|
||||
public string GetSystemAccentColorHex()
|
||||
|
||||
@@ -200,61 +200,61 @@ namespace Wino.Core.UWP.Services
|
||||
switch (typeName)
|
||||
{
|
||||
case nameof(MailAddedMessage):
|
||||
WeakReferenceMessenger.Default.Send(JsonSerializer.Deserialize<MailAddedMessage>(messageJson));
|
||||
WeakReferenceMessenger.Default.Send(JsonSerializer.Deserialize(messageJson, CommunicationMessagesContext.Default.MailAddedMessage));
|
||||
break;
|
||||
case nameof(MailDownloadedMessage):
|
||||
WeakReferenceMessenger.Default.Send(JsonSerializer.Deserialize<MailDownloadedMessage>(messageJson));
|
||||
WeakReferenceMessenger.Default.Send(JsonSerializer.Deserialize(messageJson, CommunicationMessagesContext.Default.MailDownloadedMessage));
|
||||
break;
|
||||
case nameof(MailRemovedMessage):
|
||||
WeakReferenceMessenger.Default.Send(JsonSerializer.Deserialize<MailRemovedMessage>(messageJson));
|
||||
WeakReferenceMessenger.Default.Send(JsonSerializer.Deserialize(messageJson, CommunicationMessagesContext.Default.MailRemovedMessage));
|
||||
break;
|
||||
case nameof(MailUpdatedMessage):
|
||||
WeakReferenceMessenger.Default.Send(JsonSerializer.Deserialize<MailUpdatedMessage>(messageJson));
|
||||
WeakReferenceMessenger.Default.Send(JsonSerializer.Deserialize(messageJson, CommunicationMessagesContext.Default.MailUpdatedMessage));
|
||||
break;
|
||||
case nameof(AccountCreatedMessage):
|
||||
WeakReferenceMessenger.Default.Send(JsonSerializer.Deserialize<AccountCreatedMessage>(messageJson));
|
||||
WeakReferenceMessenger.Default.Send(JsonSerializer.Deserialize(messageJson, CommunicationMessagesContext.Default.AccountCreatedMessage));
|
||||
break;
|
||||
case nameof(AccountRemovedMessage):
|
||||
WeakReferenceMessenger.Default.Send(JsonSerializer.Deserialize<AccountRemovedMessage>(messageJson));
|
||||
WeakReferenceMessenger.Default.Send(JsonSerializer.Deserialize(messageJson, CommunicationMessagesContext.Default.AccountRemovedMessage));
|
||||
break;
|
||||
case nameof(AccountUpdatedMessage):
|
||||
WeakReferenceMessenger.Default.Send(JsonSerializer.Deserialize<AccountUpdatedMessage>(messageJson));
|
||||
WeakReferenceMessenger.Default.Send(JsonSerializer.Deserialize(messageJson, CommunicationMessagesContext.Default.AccountUpdatedMessage));
|
||||
break;
|
||||
case nameof(DraftCreated):
|
||||
WeakReferenceMessenger.Default.Send(JsonSerializer.Deserialize<DraftCreated>(messageJson));
|
||||
WeakReferenceMessenger.Default.Send(JsonSerializer.Deserialize(messageJson, CommunicationMessagesContext.Default.DraftCreated));
|
||||
break;
|
||||
case nameof(DraftFailed):
|
||||
WeakReferenceMessenger.Default.Send(JsonSerializer.Deserialize<DraftFailed>(messageJson));
|
||||
WeakReferenceMessenger.Default.Send(JsonSerializer.Deserialize(messageJson, CommunicationMessagesContext.Default.DraftFailed));
|
||||
break;
|
||||
case nameof(DraftMapped):
|
||||
WeakReferenceMessenger.Default.Send(JsonSerializer.Deserialize<DraftMapped>(messageJson));
|
||||
WeakReferenceMessenger.Default.Send(JsonSerializer.Deserialize(messageJson, CommunicationMessagesContext.Default.DraftMapped));
|
||||
break;
|
||||
case nameof(FolderRenamed):
|
||||
WeakReferenceMessenger.Default.Send(JsonSerializer.Deserialize<FolderRenamed>(messageJson));
|
||||
WeakReferenceMessenger.Default.Send(JsonSerializer.Deserialize(messageJson, CommunicationMessagesContext.Default.FolderRenamed));
|
||||
break;
|
||||
case nameof(FolderSynchronizationEnabled):
|
||||
WeakReferenceMessenger.Default.Send(JsonSerializer.Deserialize<FolderSynchronizationEnabled>(messageJson));
|
||||
WeakReferenceMessenger.Default.Send(JsonSerializer.Deserialize(messageJson, CommunicationMessagesContext.Default.FolderSynchronizationEnabled));
|
||||
break;
|
||||
case nameof(MergedInboxRenamed):
|
||||
WeakReferenceMessenger.Default.Send(JsonSerializer.Deserialize<MergedInboxRenamed>(messageJson));
|
||||
WeakReferenceMessenger.Default.Send(JsonSerializer.Deserialize(messageJson, CommunicationMessagesContext.Default.MergedInboxRenamed));
|
||||
break;
|
||||
case nameof(AccountSynchronizationCompleted):
|
||||
WeakReferenceMessenger.Default.Send(JsonSerializer.Deserialize<AccountSynchronizationCompleted>(messageJson));
|
||||
WeakReferenceMessenger.Default.Send(JsonSerializer.Deserialize(messageJson, CommunicationMessagesContext.Default.AccountSynchronizationCompleted));
|
||||
break;
|
||||
case nameof(RefreshUnreadCountsMessage):
|
||||
WeakReferenceMessenger.Default.Send(JsonSerializer.Deserialize<RefreshUnreadCountsMessage>(messageJson));
|
||||
WeakReferenceMessenger.Default.Send(JsonSerializer.Deserialize(messageJson, CommunicationMessagesContext.Default.RefreshUnreadCountsMessage));
|
||||
break;
|
||||
case nameof(AccountSynchronizerStateChanged):
|
||||
WeakReferenceMessenger.Default.Send(JsonSerializer.Deserialize<AccountSynchronizerStateChanged>(messageJson));
|
||||
WeakReferenceMessenger.Default.Send(JsonSerializer.Deserialize(messageJson, CommunicationMessagesContext.Default.AccountSynchronizerStateChanged));
|
||||
break;
|
||||
case nameof(AccountSynchronizationProgressUpdatedMessage):
|
||||
WeakReferenceMessenger.Default.Send(JsonSerializer.Deserialize<AccountSynchronizationProgressUpdatedMessage>(messageJson));
|
||||
WeakReferenceMessenger.Default.Send(JsonSerializer.Deserialize(messageJson, CommunicationMessagesContext.Default.AccountSynchronizationProgressUpdatedMessage));
|
||||
break;
|
||||
case nameof(AccountFolderConfigurationUpdated):
|
||||
WeakReferenceMessenger.Default.Send(JsonSerializer.Deserialize<AccountFolderConfigurationUpdated>(messageJson));
|
||||
WeakReferenceMessenger.Default.Send(JsonSerializer.Deserialize(messageJson, CommunicationMessagesContext.Default.AccountFolderConfigurationUpdated));
|
||||
break;
|
||||
case nameof(CopyAuthURLRequested):
|
||||
WeakReferenceMessenger.Default.Send(JsonSerializer.Deserialize<CopyAuthURLRequested>(messageJson));
|
||||
WeakReferenceMessenger.Default.Send(JsonSerializer.Deserialize(messageJson, CommunicationMessagesContext.Default.CopyAuthURLRequested));
|
||||
break;
|
||||
default:
|
||||
throw new Exception("Invalid data type name passed to client.");
|
||||
|
||||
@@ -4,7 +4,7 @@ using Wino.Core.ViewModels;
|
||||
|
||||
namespace Wino.Views.Abstract
|
||||
{
|
||||
public class SettingsPageBase<T> : BasePage<T> where T : CoreBaseViewModel
|
||||
public partial class SettingsPageBase<T> : BasePage<T> where T : CoreBaseViewModel
|
||||
{
|
||||
public string Title
|
||||
{
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
xmlns:settings="using:Wino.Core.Domain.Models.Settings"
|
||||
xmlns:translations="using:Wino.Core.Domain.Models.Translations"
|
||||
x:Name="root"
|
||||
Title="{x:Bind domain:Translator.SettingsOptions_Title, Mode=OneWay}"
|
||||
Title="{x:Bind domain:Translator.SettingsOptions_Title}"
|
||||
mc:Ignorable="d">
|
||||
|
||||
<ScrollViewer VerticalScrollBarVisibility="Hidden">
|
||||
|
||||
@@ -1,432 +1,107 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="15.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProjectGuid>{395F19BA-1E42-495C-9DB5-1A6F537FCCB8}</ProjectGuid>
|
||||
<OutputType>Library</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>Wino.Core.UWP</RootNamespace>
|
||||
<AssemblyName>Wino.Core.UWP</AssemblyName>
|
||||
<DefaultLanguage>en-US</DefaultLanguage>
|
||||
<TargetPlatformIdentifier>UAP</TargetPlatformIdentifier>
|
||||
<TargetPlatformVersion Condition=" '$(TargetPlatformVersion)' == '' ">10.0.22621.0</TargetPlatformVersion>
|
||||
<TargetPlatformMinVersion>10.0.17763.0</TargetPlatformMinVersion>
|
||||
<MinimumVisualStudioVersion>14</MinimumVisualStudioVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<ProjectTypeGuids>{A5A43C5B-DE2A-4C0C-9213-0A381AF9435A};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<OutputPath>bin\x86\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP</DefineConstants>
|
||||
<NoWarn>;2008</NoWarn>
|
||||
<DebugType>full</DebugType>
|
||||
<UseVSHostingProcess>false</UseVSHostingProcess>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'">
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
<OutputPath>bin\x86\Release\</OutputPath>
|
||||
<DefineConstants>TRACE;NETFX_CORE;WINDOWS_UWP</DefineConstants>
|
||||
<Optimize>true</Optimize>
|
||||
<NoWarn>;2008</NoWarn>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<UseVSHostingProcess>false</UseVSHostingProcess>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|ARM64'">
|
||||
<PlatformTarget>ARM64</PlatformTarget>
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<OutputPath>bin\ARM64\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP</DefineConstants>
|
||||
<NoWarn>;2008</NoWarn>
|
||||
<DebugType>full</DebugType>
|
||||
<UseVSHostingProcess>false</UseVSHostingProcess>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|ARM64'">
|
||||
<PlatformTarget>ARM64</PlatformTarget>
|
||||
<OutputPath>bin\ARM64\Release\</OutputPath>
|
||||
<DefineConstants>TRACE;NETFX_CORE;WINDOWS_UWP</DefineConstants>
|
||||
<Optimize>true</Optimize>
|
||||
<NoWarn>;2008</NoWarn>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<UseVSHostingProcess>false</UseVSHostingProcess>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
|
||||
<PlatformTarget>x64</PlatformTarget>
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<OutputPath>bin\x64\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP</DefineConstants>
|
||||
<NoWarn>;2008</NoWarn>
|
||||
<DebugType>full</DebugType>
|
||||
<UseVSHostingProcess>false</UseVSHostingProcess>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
|
||||
<PlatformTarget>x64</PlatformTarget>
|
||||
<OutputPath>bin\x64\Release\</OutputPath>
|
||||
<DefineConstants>TRACE;NETFX_CORE;WINDOWS_UWP</DefineConstants>
|
||||
<Optimize>true</Optimize>
|
||||
<NoWarn>;2008</NoWarn>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<UseVSHostingProcess>false</UseVSHostingProcess>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<RestoreProjectStyle>PackageReference</RestoreProjectStyle>
|
||||
<LangVersion>12.0</LangVersion>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Activation\ActivationHandler.cs" />
|
||||
<Compile Include="BasePage.cs" />
|
||||
<Compile Include="Controls\ControlConstants.cs" />
|
||||
<Compile Include="Controls\CustomWrapPanel.cs" />
|
||||
<Compile Include="Controls\EqualGridPanel.cs" />
|
||||
<Compile Include="Controls\WinoAppTitleBar.xaml.cs">
|
||||
<DependentUpon>WinoAppTitleBar.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Controls\WinoFontIcon.cs" />
|
||||
<Compile Include="Controls\WinoFontIconSource.cs" />
|
||||
<Compile Include="Controls\WinoInfoBar.cs" />
|
||||
<Compile Include="Controls\WinoNavigationViewItem.cs" />
|
||||
<Compile Include="Converters\GridLengthConverter.cs" />
|
||||
<Compile Include="Converters\ReverseBooleanConverter.cs" />
|
||||
<Compile Include="Converters\ReverseBooleanToVisibilityConverter.cs" />
|
||||
<Compile Include="CoreUWPContainerSetup.cs" />
|
||||
<Compile Include="Dialogs\NewAccountDialog.xaml.cs">
|
||||
<DependentUpon>NewAccountDialog.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Extensions\StorageFileExtensions.cs" />
|
||||
<Compile Include="Selectors\NavigationMenuTemplateSelector.cs" />
|
||||
<Compile Include="Services\ApplicationResourceManager.cs" />
|
||||
<Compile Include="Services\DialogServiceBase.cs" />
|
||||
<Compile Include="Services\NavigationServiceBase.cs" />
|
||||
<Compile Include="Dialogs\AccountCreationDialog.xaml.cs">
|
||||
<DependentUpon>AccountCreationDialog.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Dialogs\AccountEditDialog.xaml.cs">
|
||||
<DependentUpon>AccountEditDialog.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Dialogs\AccountPickerDialog.xaml.cs">
|
||||
<DependentUpon>AccountPickerDialog.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Dialogs\BaseAccountCreationDialog.cs" />
|
||||
<Compile Include="Dialogs\CustomMessageDialogInformationContainer.cs" />
|
||||
<Compile Include="Dialogs\CustomThemeBuilderDialog.xaml.cs">
|
||||
<DependentUpon>CustomThemeBuilderDialog.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Dialogs\TextInputDialog.xaml.cs">
|
||||
<DependentUpon>TextInputDialog.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Dispatcher.cs" />
|
||||
<Compile Include="Extensions\AnimationExtensions.cs" />
|
||||
<Compile Include="Extensions\CompositionEnums.cs" />
|
||||
<Compile Include="Extensions\CompositionExtensions.Implicit.cs" />
|
||||
<Compile Include="Extensions\CompositionExtensions.Size.cs" />
|
||||
<Compile Include="Extensions\ElementThemeExtensions.cs" />
|
||||
<Compile Include="Extensions\StartupTaskStateExtensions.cs" />
|
||||
<Compile Include="Extensions\UIExtensions.cs" />
|
||||
<Compile Include="Extensions\UtilExtensions.cs" />
|
||||
<Compile Include="Helpers\WinoVisualTreeHelper.cs" />
|
||||
<Compile Include="Helpers\XamlHelpers.cs" />
|
||||
<Compile Include="Models\Personalization\CustomAppTheme.cs" />
|
||||
<Compile Include="Models\Personalization\PreDefinedAppTheme.cs" />
|
||||
<Compile Include="Models\Personalization\SystemAppTheme.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="Selectors\AppThemePreviewTemplateSelector.cs" />
|
||||
<Compile Include="Selectors\CustomWinoMessageDialogIconSelector.cs" />
|
||||
<Compile Include="Selectors\FileAttachmentTypeSelector.cs" />
|
||||
<Compile Include="Services\PreferencesService.cs" />
|
||||
<Compile Include="Services\PrintService.cs" />
|
||||
<Compile Include="Services\StartupBehaviorService.cs" />
|
||||
<Compile Include="Services\StatePersistenceService.cs" />
|
||||
<Compile Include="Services\ThumbnailService.cs" />
|
||||
<Compile Include="Services\WinoServerConnectionManager.cs" />
|
||||
<Compile Include="Services\BackgroundTaskService.cs" />
|
||||
<Compile Include="Services\ClipboardService.cs" />
|
||||
<Compile Include="Services\ConfigurationService.cs" />
|
||||
<Compile Include="Services\FileService.cs" />
|
||||
<Compile Include="Services\KeyPressService.cs" />
|
||||
<Compile Include="Services\NativeAppService.cs" />
|
||||
<Compile Include="Services\NotificationBuilder.cs" />
|
||||
<Compile Include="Services\StoreManagementService.cs" />
|
||||
<Compile Include="Services\StoreRatingService.cs" />
|
||||
<Compile Include="Services\ThemeService.cs" />
|
||||
<Compile Include="Services\UnderlyingThemeService.cs" />
|
||||
<Compile Include="CoreGeneric.xaml.cs">
|
||||
<DependentUpon>CoreGeneric.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Styles\CustomMessageDialogStyles.xaml.cs">
|
||||
<DependentUpon>CustomMessageDialogStyles.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Styles\DataTemplates.xaml.cs">
|
||||
<DependentUpon>DataTemplates.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Views\Abstract\ManageAccountsPageAbstract.cs" />
|
||||
<Compile Include="Views\Abstract\SettingOptionsPageAbstract.cs" />
|
||||
<Compile Include="Views\Abstract\SettingsPageAbstract.cs" />
|
||||
<Compile Include="Views\Abstract\SettingsPageBase.cs" />
|
||||
<Compile Include="Views\ManageAccountsPage.xaml.cs">
|
||||
<DependentUpon>ManageAccountsPage.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Views\SettingOptionsPage.xaml.cs">
|
||||
<DependentUpon>SettingOptionsPage.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Views\SettingsPage.xaml.cs">
|
||||
<DependentUpon>SettingsPage.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="WinoApplication.cs" />
|
||||
<EmbeddedResource Include="Properties\Wino.Core.UWP.rd.xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="CommunityToolkit.Common">
|
||||
<Version>8.3.2</Version>
|
||||
</PackageReference>
|
||||
<PackageReference Include="CommunityToolkit.Diagnostics">
|
||||
<Version>8.3.2</Version>
|
||||
</PackageReference>
|
||||
<PackageReference Include="CommunityToolkit.Mvvm">
|
||||
<Version>8.3.2</Version>
|
||||
</PackageReference>
|
||||
<PackageReference Include="CommunityToolkit.Uwp.Animations">
|
||||
<Version>8.1.240916</Version>
|
||||
</PackageReference>
|
||||
<PackageReference Include="CommunityToolkit.Uwp.Behaviors">
|
||||
<Version>8.1.240916</Version>
|
||||
</PackageReference>
|
||||
<PackageReference Include="CommunityToolkit.Uwp.Controls.Segmented">
|
||||
<Version>8.1.240916</Version>
|
||||
</PackageReference>
|
||||
<PackageReference Include="CommunityToolkit.Uwp.Controls.SettingsControls">
|
||||
<Version>8.1.240916</Version>
|
||||
</PackageReference>
|
||||
<PackageReference Include="CommunityToolkit.Uwp.Controls.Sizers">
|
||||
<Version>8.1.240916</Version>
|
||||
</PackageReference>
|
||||
<PackageReference Include="CommunityToolkit.Uwp.Extensions">
|
||||
<Version>8.1.240916</Version>
|
||||
</PackageReference>
|
||||
<PackageReference Include="CommunityToolkit.WinUI.Notifications" Version="7.1.2" />
|
||||
<PackageReference Include="CommunityToolkit.Uwp.Controls.TabbedCommandBar">
|
||||
<Version>8.1.240916</Version>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Microsoft.AppCenter.Analytics">
|
||||
<Version>5.0.6</Version>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Microsoft.Identity.Client">
|
||||
<Version>4.66.2</Version>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Microsoft.NETCore.UniversalWindowsPlatform">
|
||||
<Version>6.2.14</Version>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Microsoft.Toolkit.Uwp">
|
||||
<Version>7.1.3</Version>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Microsoft.UI.Xaml">
|
||||
<Version>2.8.6</Version>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Win2D.uwp">
|
||||
<Version>1.28.0</Version>
|
||||
</PackageReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\Wino.Core.Domain\Wino.Core.Domain.csproj">
|
||||
<Project>{cf3312e5-5da0-4867-9945-49ea7598af1f}</Project>
|
||||
<Name>Wino.Core.Domain</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\Wino.Core.ViewModels\Wino.Core.ViewModels.csproj">
|
||||
<Project>{53723ae8-7e7e-4d54-adab-0a6033255cc8}</Project>
|
||||
<Name>Wino.Core.ViewModels</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\Wino.Core\Wino.Core.csproj">
|
||||
<Project>{e6b1632a-8901-41e8-9ddf-6793c7698b0b}</Project>
|
||||
<Name>Wino.Core</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\Wino.Messages\Wino.Messaging.csproj">
|
||||
<Project>{0c307d7e-256f-448c-8265-5622a812fbcc}</Project>
|
||||
<Name>Wino.Messaging</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\Wino.Services\Wino.Services.csproj">
|
||||
<Project>{4000a374-59fe-4400-acf6-d40473becd73}</Project>
|
||||
<Name>Wino.Services</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<SDKReference Include="WindowsDesktop, Version=10.0.22621.0">
|
||||
<Name>Windows Desktop Extensions for the UWP</Name>
|
||||
</SDKReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="Assets\WinoIcons.ttf" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="Assets\FileTypes\type_archive.png" />
|
||||
<Content Include="Assets\FileTypes\type_audio.png" />
|
||||
<Content Include="Assets\FileTypes\type_executable.png" />
|
||||
<Content Include="Assets\FileTypes\type_html.png" />
|
||||
<Content Include="Assets\FileTypes\type_image.png" />
|
||||
<Content Include="Assets\FileTypes\type_none.png" />
|
||||
<Content Include="Assets\FileTypes\type_other.png" />
|
||||
<Content Include="Assets\FileTypes\type_pdf.png" />
|
||||
<Content Include="Assets\FileTypes\type_rar.png" />
|
||||
<Content Include="Assets\FileTypes\type_video.png" />
|
||||
<Content Include="Assets\Providers\Gmail.png" />
|
||||
<Content Include="Assets\Providers\IMAP4.png" />
|
||||
<Content Include="Assets\Providers\Office 365.png" />
|
||||
<Content Include="Assets\Providers\Outlook.png" />
|
||||
<Content Include="Assets\Providers\Yahoo.png" />
|
||||
<Content Include="BackgroundImages\Acrylic.jpg" />
|
||||
<Content Include="BackgroundImages\Clouds.jpg" />
|
||||
<Content Include="BackgroundImages\Forest.jpg" />
|
||||
<Content Include="BackgroundImages\Garden.jpg" />
|
||||
<Content Include="BackgroundImages\Mica.jpg" />
|
||||
<Content Include="BackgroundImages\Nighty.jpg" />
|
||||
<Content Include="BackgroundImages\Snowflake.jpg" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="AppThemes\Acrylic.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
</Content>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="AppThemes\Clouds.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
</Content>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="AppThemes\Custom.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
</Content>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="AppThemes\Forest.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
</Content>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="AppThemes\Garden.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
</Content>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="AppThemes\Mica.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
</Content>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="AppThemes\Nighty.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
</Content>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="AppThemes\Snowflake.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
</Content>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Page Include="Controls\WinoAppTitleBar.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
</Page>
|
||||
<Page Include="Dialogs\AccountCreationDialog.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
</Page>
|
||||
<Page Include="Dialogs\AccountEditDialog.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
</Page>
|
||||
<Page Include="Dialogs\AccountPickerDialog.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
</Page>
|
||||
<Page Include="Dialogs\CustomThemeBuilderDialog.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
</Page>
|
||||
<Page Include="Dialogs\NewAccountDialog.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
</Page>
|
||||
<Page Include="Dialogs\TextInputDialog.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
</Page>
|
||||
<Page Include="CoreGeneric.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
</Page>
|
||||
<Page Include="Styles\Colors.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
</Page>
|
||||
<Page Include="Styles\ContentPresenters.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
</Page>
|
||||
<Page Include="Styles\Converters.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
</Page>
|
||||
<Page Include="Styles\CustomMessageDialogStyles.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
</Page>
|
||||
<Page Include="Styles\FontIcons.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
</Page>
|
||||
<Page Include="Styles\IconTemplates.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="Styles\DataTemplates.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="Styles\SharedStyles.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="Styles\WinoInfoBar.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
</Page>
|
||||
<Page Include="Views\ManageAccountsPage.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
</Page>
|
||||
<Page Include="Views\SettingOptionsPage.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
</Page>
|
||||
<Page Include="Views\SettingsPage.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
</Page>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Condition=" '$(VisualStudioVersion)' == '' or '$(VisualStudioVersion)' < '14.0' ">
|
||||
<VisualStudioVersion>14.0</VisualStudioVersion>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(MSBuildExtensionsPath)\Microsoft\WindowsXaml\v$(VisualStudioVersion)\Microsoft.Windows.UI.Xaml.CSharp.targets" />
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
<Target Name="BeforeBuild">
|
||||
</Target>
|
||||
<Target Name="AfterBuild">
|
||||
</Target>
|
||||
-->
|
||||
</Project>
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net9.0-windows10.0.26100.0</TargetFramework>
|
||||
<TargetPlatformMinVersion>10.0.17763.0</TargetPlatformMinVersion>
|
||||
<Platforms>x86;x64;arm64</Platforms>
|
||||
<RuntimeIdentifiers>win-x86;win-x64;win-arm64</RuntimeIdentifiers>
|
||||
<Nullable>disable</Nullable>
|
||||
<UseUwp>true</UseUwp>
|
||||
<DefaultLanguage>en-US</DefaultLanguage>
|
||||
<IsAotCompatible>true</IsAotCompatible>
|
||||
<DisableRuntimeMarshalling>true</DisableRuntimeMarshalling>
|
||||
<SupportedOSPlatformVersion>10.0.18362.0</SupportedOSPlatformVersion>
|
||||
<AllowUnsafeBlocks>True</AllowUnsafeBlocks>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<None Remove="Assets\FileTypes\type_archive.png" />
|
||||
<None Remove="Assets\FileTypes\type_audio.png" />
|
||||
<None Remove="Assets\FileTypes\type_executable.png" />
|
||||
<None Remove="Assets\FileTypes\type_html.png" />
|
||||
<None Remove="Assets\FileTypes\type_image.png" />
|
||||
<None Remove="Assets\FileTypes\type_none.png" />
|
||||
<None Remove="Assets\FileTypes\type_other.png" />
|
||||
<None Remove="Assets\FileTypes\type_pdf.png" />
|
||||
<None Remove="Assets\FileTypes\type_rar.png" />
|
||||
<None Remove="Assets\FileTypes\type_video.png" />
|
||||
<None Remove="Assets\Providers\Gmail.png" />
|
||||
<None Remove="Assets\Providers\IMAP4.png" />
|
||||
<None Remove="Assets\Providers\Office 365.png" />
|
||||
<None Remove="Assets\Providers\Outlook.png" />
|
||||
<None Remove="Assets\Providers\Yahoo.png" />
|
||||
<None Remove="Assets\WinoIcons.ttf" />
|
||||
<None Remove="BackgroundImages\Acrylic.jpg" />
|
||||
<None Remove="BackgroundImages\Clouds.jpg" />
|
||||
<None Remove="BackgroundImages\Forest.jpg" />
|
||||
<None Remove="BackgroundImages\Garden.jpg" />
|
||||
<None Remove="BackgroundImages\Mica.jpg" />
|
||||
<None Remove="BackgroundImages\Nighty.jpg" />
|
||||
<None Remove="BackgroundImages\Snowflake.jpg" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Page Remove="AppThemes\Acrylic.xaml" />
|
||||
<Page Remove="AppThemes\Clouds.xaml" />
|
||||
<Page Remove="AppThemes\Custom.xaml" />
|
||||
<Page Remove="AppThemes\Forest.xaml" />
|
||||
<Page Remove="AppThemes\Garden.xaml" />
|
||||
<Page Remove="AppThemes\Mica.xaml" />
|
||||
<Page Remove="AppThemes\Nighty.xaml" />
|
||||
<Page Remove="AppThemes\Snowflake.xaml" />
|
||||
<Page Remove="AppThemes\TestTheme.xaml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="AppThemes\Acrylic.xaml" />
|
||||
<Content Include="AppThemes\Clouds.xaml" />
|
||||
<Content Include="AppThemes\Custom.xaml" />
|
||||
<Content Include="AppThemes\Forest.xaml" />
|
||||
<Content Include="AppThemes\Garden.xaml" />
|
||||
<Content Include="AppThemes\Mica.xaml" />
|
||||
<Content Include="AppThemes\Nighty.xaml" />
|
||||
<Content Include="AppThemes\Snowflake.xaml" />
|
||||
<Content Include="AppThemes\TestTheme.xaml" />
|
||||
<Content Include="Assets\FileTypes\type_archive.png" />
|
||||
<Content Include="Assets\FileTypes\type_audio.png" />
|
||||
<Content Include="Assets\FileTypes\type_executable.png" />
|
||||
<Content Include="Assets\FileTypes\type_html.png" />
|
||||
<Content Include="Assets\FileTypes\type_image.png" />
|
||||
<Content Include="Assets\FileTypes\type_none.png" />
|
||||
<Content Include="Assets\FileTypes\type_other.png" />
|
||||
<Content Include="Assets\FileTypes\type_pdf.png" />
|
||||
<Content Include="Assets\FileTypes\type_rar.png" />
|
||||
<Content Include="Assets\FileTypes\type_video.png" />
|
||||
<Content Include="Assets\Providers\Gmail.png" />
|
||||
<Content Include="Assets\Providers\IMAP4.png" />
|
||||
<Content Include="Assets\Providers\Office 365.png" />
|
||||
<Content Include="Assets\Providers\Outlook.png" />
|
||||
<Content Include="Assets\Providers\Yahoo.png" />
|
||||
<Content Include="Assets\WinoIcons.ttf" />
|
||||
<Content Include="BackgroundImages\Acrylic.jpg" />
|
||||
<Content Include="BackgroundImages\Clouds.jpg" />
|
||||
<Content Include="BackgroundImages\Forest.jpg" />
|
||||
<Content Include="BackgroundImages\Garden.jpg" />
|
||||
<Content Include="BackgroundImages\Mica.jpg" />
|
||||
<Content Include="BackgroundImages\Nighty.jpg" />
|
||||
<Content Include="BackgroundImages\Snowflake.jpg" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.Identity.Client" />
|
||||
<PackageReference Include="Microsoft.UI.Xaml" />
|
||||
<PackageReference Include="CommunityToolkit.Common" />
|
||||
<PackageReference Include="CommunityToolkit.Diagnostics" />
|
||||
<PackageReference Include="CommunityToolkit.Mvvm" />
|
||||
<PackageReference Include="CommunityToolkit.Uwp.Animations" />
|
||||
<PackageReference Include="CommunityToolkit.Uwp.Behaviors" />
|
||||
<PackageReference Include="CommunityToolkit.Uwp.Controls.Segmented" />
|
||||
<PackageReference Include="CommunityToolkit.Uwp.Controls.SettingsControls" />
|
||||
<PackageReference Include="CommunityToolkit.Uwp.Controls.Sizers" />
|
||||
<PackageReference Include="CommunityToolkit.Uwp.Extensions" />
|
||||
<PackageReference Include="CommunityToolkit.WinUI.Notifications" />
|
||||
<PackageReference Include="CommunityToolkit.Uwp.Controls.TabbedCommandBar" />
|
||||
<PackageReference Include="Microsoft.AppCenter.Analytics" />
|
||||
<PackageReference Include="Microsoft.NETCore.UniversalWindowsPlatform" />
|
||||
<PackageReference Include="Win2D.uwp" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\Wino.Core.Domain\Wino.Core.Domain.csproj" />
|
||||
<ProjectReference Include="..\Wino.Core.ViewModels\Wino.Core.ViewModels.csproj" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
|
||||
@@ -11,12 +11,11 @@ using Wino.Core.Domain.Interfaces;
|
||||
using Wino.Core.Domain.Models.Navigation;
|
||||
using Wino.Core.Domain.Models.Store;
|
||||
using Wino.Mail.ViewModels.Data;
|
||||
using Wino.Messaging.Client.Authorization;
|
||||
using Wino.Messaging.Client.Navigation;
|
||||
|
||||
namespace Wino.Core.ViewModels
|
||||
{
|
||||
public abstract partial class AccountManagementPageViewModelBase : CoreBaseViewModel, IRecipient<ProtocolAuthorizationCallbackReceived>
|
||||
public abstract partial class AccountManagementPageViewModelBase : CoreBaseViewModel
|
||||
{
|
||||
public ObservableCollection<IAccountProviderDetailViewModel> Accounts { get; set; } = [];
|
||||
|
||||
@@ -94,12 +93,6 @@ namespace Wino.Core.ViewModels
|
||||
}
|
||||
}
|
||||
|
||||
public async void Receive(ProtocolAuthorizationCallbackReceived message)
|
||||
{
|
||||
// Authorization must be completed in the server.
|
||||
await WinoServerConnectionManager.GetResponseAsync<bool, ProtocolAuthorizationCallbackReceived>(message);
|
||||
}
|
||||
|
||||
public async Task ManageStorePurchasesAsync()
|
||||
{
|
||||
await ExecuteUIThread(async () =>
|
||||
|
||||
@@ -1,26 +1,19 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>netstandard2.0</TargetFramework>
|
||||
<LangVersion>12</LangVersion>
|
||||
<Platforms>AnyCPU;x64;x86</Platforms>
|
||||
<TargetFramework>net9.0</TargetFramework>
|
||||
<Platforms>x86;x64;arm64</Platforms>
|
||||
<RuntimeIdentifiers>win-x86;win-x64;win-arm64</RuntimeIdentifiers>
|
||||
<AccelerateBuildsInVisualStudio>true</AccelerateBuildsInVisualStudio>
|
||||
<ProduceReferenceAssembly>true</ProduceReferenceAssembly>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="IsExternalInit" Version="1.0.3">
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Microsoft.AppCenter.Crashes" Version="5.0.6" />
|
||||
<PackageReference Include="Microsoft.Identity.Client" Version="4.66.2" />
|
||||
<PackageReference Include="System.Reactive" Version="6.0.1" />
|
||||
<PackageReference Include="Microsoft.AppCenter.Crashes" />
|
||||
<PackageReference Include="Microsoft.Identity.Client" />
|
||||
<PackageReference Include="System.Reactive" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\Wino.Core.Domain\Wino.Core.Domain.csproj" />
|
||||
<ProjectReference Include="..\Wino.Core\Wino.Core.csproj" />
|
||||
<ProjectReference Include="..\Wino.Messages\Wino.Messaging.csproj" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
</Project>
|
||||
@@ -4,6 +4,7 @@ using System.Text.Json;
|
||||
using System.Threading.Tasks;
|
||||
using Serilog;
|
||||
using Wino.Core.Domain.Interfaces;
|
||||
using Wino.Core.Domain.Models;
|
||||
using Wino.Core.Domain.Models.AutoDiscovery;
|
||||
|
||||
namespace Wino.Core.Services
|
||||
@@ -22,7 +23,7 @@ namespace Wino.Core.Services
|
||||
public Task<AutoDiscoverySettings> GetAutoDiscoverySettings(AutoDiscoveryMinimalSettings autoDiscoveryMinimalSettings)
|
||||
=> GetSettingsFromFiretrustAsync(autoDiscoveryMinimalSettings.Email);
|
||||
|
||||
private async Task<AutoDiscoverySettings> GetSettingsFromFiretrustAsync(string mailAddress)
|
||||
private static async Task<AutoDiscoverySettings> GetSettingsFromFiretrustAsync(string mailAddress)
|
||||
{
|
||||
using var client = new HttpClient();
|
||||
var response = await client.GetAsync($"{FiretrustURL}{mailAddress}");
|
||||
@@ -37,13 +38,13 @@ namespace Wino.Core.Services
|
||||
}
|
||||
}
|
||||
|
||||
private async Task<AutoDiscoverySettings> DeserializeFiretrustResponse(HttpResponseMessage response)
|
||||
private static async Task<AutoDiscoverySettings> DeserializeFiretrustResponse(HttpResponseMessage response)
|
||||
{
|
||||
try
|
||||
{
|
||||
var content = await response.Content.ReadAsStringAsync();
|
||||
|
||||
return JsonSerializer.Deserialize<AutoDiscoverySettings>(content);
|
||||
return JsonSerializer.Deserialize(content, DomainModelsJsonContext.Default.AutoDiscoverySettings);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
||||
@@ -7,6 +7,7 @@ using System.Net;
|
||||
using System.Text;
|
||||
using System.Text.Json;
|
||||
using System.Text.Json.Nodes;
|
||||
using System.Text.Json.Serialization;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
@@ -39,6 +40,10 @@ using Wino.Core.Requests.Mail;
|
||||
|
||||
namespace Wino.Core.Synchronizers.Mail
|
||||
{
|
||||
[JsonSerializable(typeof(Microsoft.Graph.Me.Messages.Item.Move.MovePostRequestBody))]
|
||||
[JsonSerializable(typeof(OutlookFileAttachment))]
|
||||
public partial class OutlookSynchronizerJsonContext: JsonSerializerContext;
|
||||
|
||||
public class OutlookSynchronizer : WinoSynchronizer<RequestInformation, Message, Event>
|
||||
{
|
||||
public override uint BatchModificationSize => 20;
|
||||
@@ -98,9 +103,6 @@ namespace Wino.Core.Synchronizers.Mail
|
||||
_graphClient = new GraphServiceClient(httpClient, new BaseBearerTokenAuthenticationProvider(tokenProvider));
|
||||
|
||||
_outlookChangeProcessor = outlookChangeProcessor;
|
||||
|
||||
// Specify to use TLS 1.2 as default connection
|
||||
ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12;
|
||||
}
|
||||
|
||||
#region MS Graph Handlers
|
||||
@@ -558,11 +560,11 @@ namespace Wino.Core.Synchronizers.Mail
|
||||
/// <param name="requestInformation">Post request information.</param>
|
||||
/// <param name="content">Content object to serialize.</param>
|
||||
/// <returns>Updated post request information.</returns>
|
||||
private RequestInformation PreparePostRequestInformation(RequestInformation requestInformation, object content = null)
|
||||
private RequestInformation PreparePostRequestInformation(RequestInformation requestInformation, Microsoft.Graph.Me.Messages.Item.Move.MovePostRequestBody content = null)
|
||||
{
|
||||
requestInformation.Headers.Clear();
|
||||
|
||||
string contentJson = content == null ? "{}" : JsonSerializer.Serialize(content);
|
||||
string contentJson = content == null ? "{}" : JsonSerializer.Serialize(content, OutlookSynchronizerJsonContext.Default.MovePostRequestBody);
|
||||
|
||||
requestInformation.Content = new MemoryStream(Encoding.UTF8.GetBytes(contentJson));
|
||||
requestInformation.HttpMethod = Method.POST;
|
||||
@@ -584,7 +586,7 @@ namespace Wino.Core.Synchronizers.Mail
|
||||
DestinationId = item.ToFolder.RemoteFolderId
|
||||
};
|
||||
|
||||
return PreparePostRequestInformation(_graphClient.Me.Messages[item.Item.Id.ToString()].Move.ToPostRequestInformation(requestBody),
|
||||
return PreparePostRequestInformation(_graphClient.Me.Messages[item.Item.Id].Move.ToPostRequestInformation(requestBody),
|
||||
requestBody);
|
||||
});
|
||||
}
|
||||
@@ -598,7 +600,7 @@ namespace Wino.Core.Synchronizers.Mail
|
||||
Flag = new FollowupFlag() { FlagStatus = item.IsFlagged ? FollowupFlagStatus.Flagged : FollowupFlagStatus.NotFlagged }
|
||||
};
|
||||
|
||||
return _graphClient.Me.Messages[item.Item.Id.ToString()].ToPatchRequestInformation(message);
|
||||
return _graphClient.Me.Messages[item.Item.Id].ToPatchRequestInformation(message);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -759,11 +761,11 @@ namespace Wino.Core.Synchronizers.Mail
|
||||
allAttachments.Add(attachment);
|
||||
}
|
||||
|
||||
RequestInformation PrepareUploadAttachmentRequest(RequestInformation requestInformation, OutlookFileAttachment outlookFileAttachment)
|
||||
static RequestInformation PrepareUploadAttachmentRequest(RequestInformation requestInformation, OutlookFileAttachment outlookFileAttachment)
|
||||
{
|
||||
requestInformation.Headers.Clear();
|
||||
|
||||
string contentJson = JsonSerializer.Serialize(outlookFileAttachment);
|
||||
string contentJson = JsonSerializer.Serialize(outlookFileAttachment, OutlookSynchronizerJsonContext.Default.OutlookFileAttachment);
|
||||
|
||||
requestInformation.Content = new MemoryStream(Encoding.UTF8.GetBytes(contentJson));
|
||||
requestInformation.HttpMethod = Method.POST;
|
||||
@@ -1056,7 +1058,7 @@ namespace Wino.Core.Synchronizers.Mail
|
||||
await _handleItemRetrievalSemaphore.WaitAsync();
|
||||
await _outlookChangeProcessor.ManageCalendarEventAsync(item, calendar, Account).ConfigureAwait(false);
|
||||
}
|
||||
catch (Exception ex)
|
||||
catch (Exception)
|
||||
{
|
||||
// _logger.Error(ex, "Error occurred while handling item {Id} for calendar {Name}", item.Id, calendar.Name);
|
||||
}
|
||||
|
||||
@@ -1,55 +1,43 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>netstandard2.0</TargetFramework>
|
||||
<RootNamespace>Wino.Core</RootNamespace>
|
||||
<Configurations>Debug;Release</Configurations>
|
||||
<LangVersion>12</LangVersion>
|
||||
<Platforms>AnyCPU;x64;x86</Platforms>
|
||||
<AccelerateBuildsInVisualStudio>true</AccelerateBuildsInVisualStudio>
|
||||
<ProduceReferenceAssembly>true</ProduceReferenceAssembly>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Compile Remove="WinoSynchronizerFactory.cs" />
|
||||
</ItemGroup>
|
||||
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="CommunityToolkit.Diagnostics" Version="8.3.2" />
|
||||
<PackageReference Include="CommunityToolkit.Mvvm" Version="8.3.2" />
|
||||
<PackageReference Include="Google.Apis.Calendar.v3" Version="1.68.0.3592" />
|
||||
<PackageReference Include="Google.Apis.Gmail.v1" Version="1.68.0.3427" />
|
||||
<PackageReference Include="Google.Apis.PeopleService.v1" Version="1.68.0.3359" />
|
||||
<PackageReference Include="HtmlAgilityPack" Version="1.11.70" />
|
||||
<PackageReference Include="HtmlKit" Version="1.1.0" />
|
||||
<PackageReference Include="IsExternalInit" Version="1.0.3">
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||
</PackageReference>
|
||||
<PackageReference Include="MailKit" Version="4.9.0" />
|
||||
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="8.0.1" />
|
||||
<PackageReference Include="Microsoft.Graph" Version="5.67.0" />
|
||||
<PackageReference Include="Microsoft.Identity.Client" Version="4.66.2" />
|
||||
<PackageReference Include="Microsoft.Identity.Client.Broker" Version="4.66.2" />
|
||||
<PackageReference Include="Microsoft.Identity.Client.Extensions.Msal" Version="4.66.2" />
|
||||
<PackageReference Include="MimeKit" Version="4.9.0" />
|
||||
<PackageReference Include="morelinq" Version="4.3.0" />
|
||||
<PackageReference Include="Nito.AsyncEx.Tasks" Version="5.1.2" />
|
||||
<PackageReference Include="NodaTime" Version="3.2.0" />
|
||||
<PackageReference Include="Serilog" Version="4.1.0" />
|
||||
<PackageReference Include="Serilog.Exceptions" Version="8.4.0" />
|
||||
<PackageReference Include="Serilog.Sinks.Debug" Version="3.0.0" />
|
||||
<PackageReference Include="Serilog.Sinks.File" Version="6.0.0" />
|
||||
<PackageReference Include="SkiaSharp" Version="2.88.9" />
|
||||
<PackageReference Include="SqlKata" Version="2.4.0" />
|
||||
<PackageReference Include="System.Text.Encoding.CodePages" Version="8.0.0" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\Wino.Authentication\Wino.Authentication.csproj" />
|
||||
<ProjectReference Include="..\Wino.Core.Domain\Wino.Core.Domain.csproj" />
|
||||
<ProjectReference Include="..\Wino.Messages\Wino.Messaging.csproj" />
|
||||
<ProjectReference Include="..\Wino.Services\Wino.Services.csproj" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net9.0</TargetFramework>
|
||||
<RuntimeIdentifiers>win-x86;win-x64;win-arm64</RuntimeIdentifiers>
|
||||
<RootNamespace>Wino.Core</RootNamespace>
|
||||
<Configurations>Debug;Release</Configurations>
|
||||
<Platforms>x86;x64;arm64</Platforms>
|
||||
<AccelerateBuildsInVisualStudio>true</AccelerateBuildsInVisualStudio>
|
||||
<ProduceReferenceAssembly>true</ProduceReferenceAssembly>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="CommunityToolkit.Diagnostics" />
|
||||
<PackageReference Include="CommunityToolkit.Mvvm" />
|
||||
<PackageReference Include="Google.Apis.Calendar.v3" />
|
||||
<PackageReference Include="Google.Apis.Gmail.v1" />
|
||||
<PackageReference Include="Google.Apis.PeopleService.v1" />
|
||||
<PackageReference Include="HtmlAgilityPack" />
|
||||
<PackageReference Include="HtmlKit" />
|
||||
<PackageReference Include="MailKit" />
|
||||
<PackageReference Include="Microsoft.Extensions.DependencyInjection" />
|
||||
<PackageReference Include="Microsoft.Graph" />
|
||||
<PackageReference Include="Microsoft.Identity.Client" />
|
||||
<PackageReference Include="Microsoft.Identity.Client.Broker" />
|
||||
<PackageReference Include="Microsoft.Identity.Client.Extensions.Msal" />
|
||||
<PackageReference Include="MimeKit" />
|
||||
<PackageReference Include="morelinq" />
|
||||
<PackageReference Include="Nito.AsyncEx.Tasks" />
|
||||
<PackageReference Include="NodaTime" />
|
||||
<PackageReference Include="Serilog" />
|
||||
<PackageReference Include="Serilog.Exceptions" />
|
||||
<PackageReference Include="Serilog.Sinks.Debug" />
|
||||
<PackageReference Include="Serilog.Sinks.File" />
|
||||
<PackageReference Include="SkiaSharp" />
|
||||
<PackageReference Include="SqlKata" />
|
||||
<PackageReference Include="System.Text.Encoding.CodePages" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\Wino.Authentication\Wino.Authentication.csproj" />
|
||||
<ProjectReference Include="..\Wino.Core.Domain\Wino.Core.Domain.csproj" />
|
||||
<ProjectReference Include="..\Wino.Messages\Wino.Messaging.csproj" />
|
||||
<ProjectReference Include="..\Wino.Services\Wino.Services.csproj" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
@@ -1,124 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
using Wino.Core.Authenticators;
|
||||
using Wino.Core.Domain.Entities;
|
||||
using Wino.Core.Domain.Interfaces;
|
||||
using Wino.Core.Integration.Processors;
|
||||
using Wino.Core.Services;
|
||||
using Wino.Core.Synchronizers;
|
||||
|
||||
namespace Wino.Core
|
||||
{
|
||||
/// <summary>
|
||||
/// Factory that keeps track of all integrator with associated mail accounts.
|
||||
/// Synchronizer per-account makes sense because re-generating synchronizers are not ideal.
|
||||
/// Users might interact with multiple accounts in 1 app session.
|
||||
/// </summary>
|
||||
public class WinoSynchronizerFactory : IWinoSynchronizerFactory
|
||||
{
|
||||
private readonly List<IBaseSynchronizer> synchronizerCache = new List<IBaseSynchronizer>();
|
||||
|
||||
private bool isInitialized = false;
|
||||
private readonly INativeAppService _nativeAppService;
|
||||
private readonly ITokenService _tokenService;
|
||||
private readonly IFolderService _folderService;
|
||||
private readonly IAccountService _accountService;
|
||||
private readonly IContactService _contactService;
|
||||
|
||||
private readonly INotificationBuilder _notificationBuilder;
|
||||
private readonly ISignatureService _signatureService;
|
||||
private readonly IDatabaseService _databaseService;
|
||||
private readonly IMimeFileService _mimeFileService;
|
||||
private readonly IOutlookChangeProcessor _outlookChangeProcessor;
|
||||
private readonly IGmailChangeProcessor _gmailChangeProcessor;
|
||||
private readonly IImapChangeProcessor _imapChangeProcessor;
|
||||
|
||||
public WinoSynchronizerFactory(INativeAppService nativeAppService,
|
||||
ITokenService tokenService,
|
||||
IFolderService folderService,
|
||||
IAccountService accountService,
|
||||
IContactService contactService,
|
||||
INotificationBuilder notificationBuilder,
|
||||
ISignatureService signatureService,
|
||||
IDatabaseService databaseService,
|
||||
IMimeFileService mimeFileService,
|
||||
IOutlookChangeProcessor outlookChangeProcessor,
|
||||
IGmailChangeProcessor gmailChangeProcessor,
|
||||
IImapChangeProcessor imapChangeProcessor)
|
||||
{
|
||||
_contactService = contactService;
|
||||
_notificationBuilder = notificationBuilder;
|
||||
_nativeAppService = nativeAppService;
|
||||
_tokenService = tokenService;
|
||||
_folderService = folderService;
|
||||
_accountService = accountService;
|
||||
_signatureService = signatureService;
|
||||
_databaseService = databaseService;
|
||||
_mimeFileService = mimeFileService;
|
||||
_outlookChangeProcessor = outlookChangeProcessor;
|
||||
_gmailChangeProcessor = gmailChangeProcessor;
|
||||
_imapChangeProcessor = imapChangeProcessor;
|
||||
}
|
||||
|
||||
public IBaseSynchronizer GetAccountSynchronizer(Guid accountId)
|
||||
=> synchronizerCache.Find(a => a.Account.Id == accountId);
|
||||
|
||||
private IBaseSynchronizer CreateIntegratorWithDefaultProcessor(MailAccount mailAccount)
|
||||
{
|
||||
var providerType = mailAccount.ProviderType;
|
||||
|
||||
switch (providerType)
|
||||
{
|
||||
case Domain.Enums.MailProviderType.Outlook:
|
||||
var outlookAuthenticator = new OutlookAuthenticator(_tokenService, _nativeAppService);
|
||||
return new OutlookSynchronizer(mailAccount, outlookAuthenticator, _outlookChangeProcessor);
|
||||
case Domain.Enums.MailProviderType.Gmail:
|
||||
var gmailAuthenticator = new GmailAuthenticator(_tokenService, _nativeAppService);
|
||||
return new GmailSynchronizer(mailAccount, gmailAuthenticator, _gmailChangeProcessor);
|
||||
case Domain.Enums.MailProviderType.Office365:
|
||||
break;
|
||||
case Domain.Enums.MailProviderType.Yahoo:
|
||||
break;
|
||||
case Domain.Enums.MailProviderType.IMAP4:
|
||||
return new ImapSynchronizer(mailAccount, _imapChangeProcessor);
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
public void DeleteSynchronizer(MailAccount account)
|
||||
{
|
||||
var synchronizer = GetAccountSynchronizer(account.Id);
|
||||
|
||||
if (synchronizer == null) return;
|
||||
|
||||
synchronizerCache.Remove(synchronizer);
|
||||
}
|
||||
|
||||
public async Task InitializeAsync()
|
||||
{
|
||||
if (isInitialized) return;
|
||||
|
||||
var accounts = await _accountService.GetAccountsAsync();
|
||||
|
||||
foreach (var account in accounts)
|
||||
{
|
||||
CreateNewSynchronizer(account);
|
||||
}
|
||||
|
||||
isInitialized = true;
|
||||
}
|
||||
|
||||
public IBaseSynchronizer CreateNewSynchronizer(MailAccount account)
|
||||
{
|
||||
var synchronizer = CreateIntegratorWithDefaultProcessor(account);
|
||||
|
||||
synchronizerCache.Add(synchronizer);
|
||||
|
||||
return synchronizer;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -142,7 +142,7 @@ namespace Wino.Mail.ViewModels
|
||||
{
|
||||
await NativeAppService.LaunchFileAsync(attachmentViewModel.FilePath);
|
||||
}
|
||||
catch (Exception ex)
|
||||
catch
|
||||
{
|
||||
_dialogService.InfoBarMessage(Translator.Info_FailedToOpenFileTitle, Translator.Info_FailedToOpenFileMessage, InfoBarMessageType.Error);
|
||||
}
|
||||
@@ -159,7 +159,7 @@ namespace Wino.Mail.ViewModels
|
||||
{
|
||||
await _fileService.CopyFileAsync(attachmentViewModel.FilePath, pickedFilePath);
|
||||
}
|
||||
catch (Exception ex)
|
||||
catch
|
||||
{
|
||||
_dialogService.InfoBarMessage(Translator.Info_FailedToOpenFileTitle, Translator.Info_FailedToOpenFileMessage, InfoBarMessageType.Error);
|
||||
}
|
||||
|
||||
@@ -21,7 +21,7 @@ namespace Wino.Mail.ViewModels
|
||||
{
|
||||
if (value >= 0)
|
||||
{
|
||||
PreferencesService.MarkAsPreference = (MailMarkAsOption)Enum.GetValues(typeof(MailMarkAsOption)).GetValue(value);
|
||||
PreferencesService.MarkAsPreference = (MailMarkAsOption)Enum.GetValues<MailMarkAsOption>().GetValue(value);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -101,7 +101,7 @@ namespace Wino.Mail.ViewModels
|
||||
centerHoverActionIndex = availableHoverActions.IndexOf(PreferencesService.CenterHoverAction);
|
||||
rightHoverActionIndex = availableHoverActions.IndexOf(PreferencesService.RightHoverAction);
|
||||
|
||||
SelectedMarkAsOptionIndex = Array.IndexOf(Enum.GetValues(typeof(MailMarkAsOption)), PreferencesService.MarkAsPreference);
|
||||
SelectedMarkAsOptionIndex = Array.IndexOf(Enum.GetValues<MailMarkAsOption>(), PreferencesService.MarkAsPreference);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,31 +1,22 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>netstandard2.0</TargetFramework>
|
||||
<LangVersion>12</LangVersion>
|
||||
<Platforms>AnyCPU;x64;x86</Platforms>
|
||||
|
||||
<AccelerateBuildsInVisualStudio>true</AccelerateBuildsInVisualStudio>
|
||||
<ProduceReferenceAssembly>true</ProduceReferenceAssembly>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="EmailValidation" Version="1.2.0" />
|
||||
<PackageReference Include="IsExternalInit" Version="1.0.3">
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Microsoft.AppCenter.Crashes" Version="5.0.6" />
|
||||
<PackageReference Include="Microsoft.Identity.Client" Version="4.66.2" />
|
||||
<PackageReference Include="System.Reactive" Version="6.0.1" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\Wino.Core.Domain\Wino.Core.Domain.csproj" />
|
||||
<ProjectReference Include="..\Wino.Core.ViewModels\Wino.Core.ViewModels.csproj" />
|
||||
<ProjectReference Include="..\Wino.Core\Wino.Core.csproj" />
|
||||
<ProjectReference Include="..\Wino.Messages\Wino.Messaging.csproj" />
|
||||
<ProjectReference Include="..\Wino.Services\Wino.Services.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net9.0</TargetFramework>
|
||||
<Platforms>x86;x64;arm64</Platforms>
|
||||
<RuntimeIdentifiers>win-x86;win-x64;win-arm64</RuntimeIdentifiers>
|
||||
<AccelerateBuildsInVisualStudio>true</AccelerateBuildsInVisualStudio>
|
||||
<ProduceReferenceAssembly>true</ProduceReferenceAssembly>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="EmailValidation" />
|
||||
<PackageReference Include="Microsoft.AppCenter.Crashes" />
|
||||
<PackageReference Include="Microsoft.Identity.Client" />
|
||||
<PackageReference Include="System.Reactive" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\Wino.Core.Domain\Wino.Core.Domain.csproj" />
|
||||
<ProjectReference Include="..\Wino.Core.ViewModels\Wino.Core.ViewModels.csproj" />
|
||||
<ProjectReference Include="..\Wino.Core\Wino.Core.csproj" />
|
||||
<ProjectReference Include="..\Wino.Messages\Wino.Messaging.csproj" />
|
||||
<ProjectReference Include="..\Wino.Services\Wino.Services.csproj" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
@@ -2,7 +2,6 @@
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.Toolkit.Uwp.Helpers;
|
||||
using Windows.ApplicationModel.Activation;
|
||||
using Windows.Storage;
|
||||
using Windows.UI.Xaml;
|
||||
@@ -10,6 +9,7 @@ using Windows.UI.Xaml.Controls;
|
||||
using Windows.UI.Xaml.Media.Animation;
|
||||
using Wino.Core.Domain.Enums;
|
||||
using Wino.Core.Domain.Interfaces;
|
||||
using Wino.Core.UWP.Extensions;
|
||||
using Wino.Views;
|
||||
|
||||
namespace Wino.Activation
|
||||
@@ -44,7 +44,7 @@ namespace Wino.Activation
|
||||
|
||||
if (string.Equals(fileExtension, ".eml", StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
var fileBytes = await file.ReadBytesAsync();
|
||||
var fileBytes = await file.ToByteArrayAsync();
|
||||
var directoryName = Path.GetDirectoryName(file.Path);
|
||||
|
||||
var messageInformation = await _mimeFileService.GetMimeMessageInformationAsync(fileBytes, directoryName).ConfigureAwait(false);
|
||||
|
||||
@@ -4,14 +4,12 @@ using CommunityToolkit.Mvvm.Messaging;
|
||||
using Windows.ApplicationModel.Activation;
|
||||
using Wino.Core.Domain.Interfaces;
|
||||
using Wino.Core.Domain.Models.Launch;
|
||||
using Wino.Messaging.Client.Authorization;
|
||||
using Wino.Messaging.Client.Shell;
|
||||
|
||||
namespace Wino.Activation
|
||||
{
|
||||
internal class ProtocolActivationHandler : ActivationHandler<ProtocolActivatedEventArgs>
|
||||
{
|
||||
private const string GoogleAuthorizationProtocolTag = "google.pw.oauth2";
|
||||
private const string MailtoProtocolTag = "mailto:";
|
||||
|
||||
private readonly INativeAppService _nativeAppService;
|
||||
@@ -28,13 +26,7 @@ namespace Wino.Activation
|
||||
// Check URI prefix.
|
||||
var protocolString = args.Uri.AbsoluteUri;
|
||||
|
||||
// Google OAuth Response
|
||||
if (protocolString.StartsWith(GoogleAuthorizationProtocolTag))
|
||||
{
|
||||
// App must be working already. No need to check for running state.
|
||||
WeakReferenceMessenger.Default.Send(new ProtocolAuthorizationCallbackReceived(args.Uri));
|
||||
}
|
||||
else if (protocolString.StartsWith(MailtoProtocolTag))
|
||||
if (protocolString.StartsWith(MailtoProtocolTag))
|
||||
{
|
||||
// mailto activation. Try to parse params.
|
||||
_launchProtocolService.MailToUri = new MailToUri(protocolString);
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
using System;
|
||||
using System.Threading.Tasks;
|
||||
using CommunityToolkit.Mvvm.Messaging;
|
||||
using CommunityToolkit.WinUI.Notifications;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Microsoft.Toolkit.Uwp.Notifications;
|
||||
using Serilog;
|
||||
using Windows.ApplicationModel.Activation;
|
||||
using Wino.Core.Domain;
|
||||
|
||||
@@ -6,7 +6,7 @@ using Wino.Core.UWP.Controls;
|
||||
|
||||
namespace Wino.Controls
|
||||
{
|
||||
public class AccountNavigationItem : WinoNavigationViewItem
|
||||
public partial class AccountNavigationItem : WinoNavigationViewItem
|
||||
{
|
||||
|
||||
public static readonly DependencyProperty IsActiveAccountProperty = DependencyProperty.Register(nameof(IsActiveAccount), typeof(bool), typeof(AccountNavigationItem), new PropertyMetadata(false, new PropertyChangedCallback(OnIsActiveAccountChanged)));
|
||||
|
||||
@@ -19,7 +19,7 @@ namespace Wino.Controls.Advanced
|
||||
/// Custom ListView control that handles multiple selection with Extended/Multiple selection mode
|
||||
/// and supports threads.
|
||||
/// </summary>
|
||||
public class WinoListView : ListView, IDisposable
|
||||
public partial class WinoListView : ListView, IDisposable
|
||||
{
|
||||
private ILogger logger = Log.ForContext<WinoListView>();
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@ using Wino.Core.UWP.Services;
|
||||
|
||||
namespace Wino.Controls
|
||||
{
|
||||
public class ImagePreviewControl : Control
|
||||
public partial class ImagePreviewControl : Control
|
||||
{
|
||||
private const string PART_EllipseInitialsGrid = "EllipseInitialsGrid";
|
||||
private const string PART_InitialsTextBlock = "InitialsTextBlock";
|
||||
|
||||
@@ -8,7 +8,7 @@ namespace Wino.Controls
|
||||
/// <summary>
|
||||
/// Templated button for each setting in Settings Dialog.
|
||||
/// </summary>
|
||||
public class SettingsMenuItemControl : Control
|
||||
public partial class SettingsMenuItemControl : Control
|
||||
{
|
||||
public string Title
|
||||
{
|
||||
|
||||
@@ -7,7 +7,7 @@ using Windows.UI.Xaml.Markup;
|
||||
namespace Wino.Controls
|
||||
{
|
||||
[ContentProperty(Name = nameof(Content))]
|
||||
public class WinoExpander : Control
|
||||
public partial class WinoExpander : Control
|
||||
{
|
||||
private const string PART_HeaderGrid = "HeaderGrid";
|
||||
private const string PART_ContentAreaWrapper = "ContentAreaWrapper";
|
||||
|
||||
@@ -8,7 +8,7 @@ using Wino.Mail.ViewModels.Data;
|
||||
|
||||
namespace Wino.Controls
|
||||
{
|
||||
public class WinoSwipeControlItems : SwipeItems
|
||||
public partial class WinoSwipeControlItems : SwipeItems
|
||||
{
|
||||
public static readonly DependencyProperty SwipeOperationProperty = DependencyProperty.Register(nameof(SwipeOperation), typeof(MailOperation), typeof(WinoSwipeControlItems), new PropertyMetadata(default(MailOperation), new PropertyChangedCallback(OnItemsChanged)));
|
||||
public static readonly DependencyProperty MailItemProperty = DependencyProperty.Register(nameof(MailItem), typeof(IMailItem), typeof(WinoSwipeControlItems), new PropertyMetadata(null));
|
||||
|
||||
@@ -10,7 +10,9 @@ using Windows.UI.Xaml.Controls;
|
||||
using Wino.Core.Domain;
|
||||
using Wino.Core.Domain.Entities.Mail;
|
||||
using Wino.Core.Domain.Interfaces;
|
||||
using Wino.Core.Domain.Models;
|
||||
using Wino.Core.Domain.Models.Reader;
|
||||
using Wino.Core.UWP.Extensions;
|
||||
using Wino.Views.Settings;
|
||||
|
||||
namespace Wino.Dialogs
|
||||
@@ -76,9 +78,9 @@ namespace Wino.Dialogs
|
||||
|
||||
_getHTMLBodyFunction = new Func<Task<string>>(async () =>
|
||||
{
|
||||
var editorContent = await InvokeScriptSafeAsync("GetHTMLContent();");
|
||||
var editorContent = await Chromium.ExecuteScriptFunctionSafeAsync("GetHTMLContent");
|
||||
|
||||
return JsonSerializer.Deserialize<string>(editorContent);
|
||||
return JsonSerializer.Deserialize(editorContent, BasicTypesJsonContext.Default.String);
|
||||
});
|
||||
|
||||
var underlyingThemeService = App.Current.Services.GetService<IUnderlyingThemeService>();
|
||||
@@ -188,22 +190,6 @@ namespace Wino.Dialogs
|
||||
}
|
||||
}
|
||||
|
||||
public async Task<string> ExecuteScriptFunctionAsync(string functionName, params object[] parameters)
|
||||
{
|
||||
string script = functionName + "(";
|
||||
for (int i = 0; i < parameters.Length; i++)
|
||||
{
|
||||
script += JsonSerializer.Serialize(parameters[i]);
|
||||
if (i < parameters.Length - 1)
|
||||
{
|
||||
script += ", ";
|
||||
}
|
||||
}
|
||||
script += ");";
|
||||
|
||||
return await Chromium.ExecuteScriptAsync(script);
|
||||
}
|
||||
|
||||
private async Task<string> InvokeScriptSafeAsync(string function)
|
||||
{
|
||||
if (Chromium == null) return string.Empty;
|
||||
@@ -283,11 +269,11 @@ namespace Wino.Dialogs
|
||||
|
||||
if (string.IsNullOrEmpty(htmlBody))
|
||||
{
|
||||
await ExecuteScriptFunctionAsync("RenderHTML", " ");
|
||||
await Chromium.ExecuteScriptFunctionAsync("RenderHTML", parameters: JsonSerializer.Serialize(" ", BasicTypesJsonContext.Default.String));
|
||||
}
|
||||
else
|
||||
{
|
||||
await ExecuteScriptFunctionAsync("RenderHTML", htmlBody);
|
||||
await Chromium.ExecuteScriptFunctionAsync("RenderHTML", parameters: JsonSerializer.Serialize(htmlBody, BasicTypesJsonContext.Default.String));
|
||||
|
||||
await FocusEditorAsync();
|
||||
}
|
||||
@@ -300,7 +286,12 @@ namespace Wino.Dialogs
|
||||
int composerFontSize = _preferencesService.ComposerFontSize;
|
||||
var readerFont = _preferencesService.ReaderFont;
|
||||
int readerFontSize = _preferencesService.ReaderFontSize;
|
||||
return await ExecuteScriptFunctionAsync("initializeJodit", fonts, composerFont, composerFontSize, readerFont, readerFontSize);
|
||||
return await Chromium.ExecuteScriptFunctionAsync("initializeJodit", false,
|
||||
JsonSerializer.Serialize(fonts, BasicTypesJsonContext.Default.ListString),
|
||||
JsonSerializer.Serialize(composerFont, BasicTypesJsonContext.Default.String),
|
||||
JsonSerializer.Serialize(composerFontSize, BasicTypesJsonContext.Default.Int32),
|
||||
JsonSerializer.Serialize(readerFont, BasicTypesJsonContext.Default.String),
|
||||
JsonSerializer.Serialize(readerFontSize, BasicTypesJsonContext.Default.Int32));
|
||||
}
|
||||
|
||||
private async void ChromiumInitialized(Microsoft.UI.Xaml.Controls.WebView2 sender, Microsoft.UI.Xaml.Controls.CoreWebView2InitializedEventArgs args)
|
||||
@@ -327,7 +318,7 @@ namespace Wino.Dialogs
|
||||
|
||||
private void ScriptMessageReceived(CoreWebView2 sender, CoreWebView2WebMessageReceivedEventArgs args)
|
||||
{
|
||||
var change = JsonSerializer.Deserialize<WebViewMessage>(args.WebMessageAsJson);
|
||||
var change = JsonSerializer.Deserialize(args.WebMessageAsJson, DomainModelsJsonContext.Default.WebViewMessage);
|
||||
|
||||
if (change.Type == "bold")
|
||||
{
|
||||
|
||||
@@ -10,7 +10,7 @@ using Wino.Helpers;
|
||||
|
||||
namespace Wino.MenuFlyouts
|
||||
{
|
||||
public class AccountSelectorFlyout : MenuFlyout, IDisposable
|
||||
public partial class AccountSelectorFlyout : MenuFlyout, IDisposable
|
||||
{
|
||||
private readonly IEnumerable<MailAccount> _accounts;
|
||||
private readonly Func<MailAccount, Task> _onItemSelection;
|
||||
|
||||
@@ -3,14 +3,13 @@ using System.Linq;
|
||||
using CommunityToolkit.Mvvm.Input;
|
||||
using Windows.UI.Xaml;
|
||||
using Windows.UI.Xaml.Controls;
|
||||
using Wino.Controls;
|
||||
using Wino.Core.Domain.Models.Reader;
|
||||
using Wino.Core.UWP.Controls;
|
||||
using Wino.Helpers;
|
||||
|
||||
namespace Wino.MenuFlyouts
|
||||
{
|
||||
public class FilterMenuFlyout : MenuFlyout
|
||||
public partial class FilterMenuFlyout : MenuFlyout
|
||||
{
|
||||
public static readonly DependencyProperty SelectedFilterChangedCommandProperty = DependencyProperty.Register(nameof(SelectedFilterChangedCommand), typeof(IRelayCommand<FilterOption>), typeof(FilterMenuFlyout), new PropertyMetadata(null));
|
||||
public static readonly DependencyProperty FilterOptionsProperty = DependencyProperty.Register(nameof(FilterOptions), typeof(List<FilterOption>), typeof(FilterMenuFlyout), new PropertyMetadata(null, new PropertyChangedCallback(OnOptionsChanged)));
|
||||
|
||||
@@ -6,7 +6,7 @@ using Wino.Core.Domain.Models.Folders;
|
||||
|
||||
namespace Wino.MenuFlyouts.Context
|
||||
{
|
||||
public class FolderOperationFlyout : WinoOperationFlyout<FolderOperationMenuItem>
|
||||
public partial class FolderOperationFlyout : WinoOperationFlyout<FolderOperationMenuItem>
|
||||
{
|
||||
public FolderOperationFlyout(IEnumerable<FolderOperationMenuItem> availableActions, TaskCompletionSource<FolderOperationMenuItem> completionSource) : base(availableActions, completionSource)
|
||||
{
|
||||
|
||||
@@ -3,7 +3,7 @@ using Wino.Core.Domain.Models.Folders;
|
||||
|
||||
namespace Wino.MenuFlyouts
|
||||
{
|
||||
public class FolderOperationMenuFlyoutItem : WinoOperationFlyoutItem<FolderOperationMenuItem>
|
||||
public partial class FolderOperationMenuFlyoutItem : WinoOperationFlyoutItem<FolderOperationMenuItem>
|
||||
{
|
||||
public FolderOperationMenuFlyoutItem(FolderOperationMenuItem operationMenuItem, Action<FolderOperationMenuItem> clicked) : base(operationMenuItem, clicked)
|
||||
{
|
||||
|
||||
@@ -6,7 +6,7 @@ using Wino.Core.Domain.Models.Menus;
|
||||
|
||||
namespace Wino.MenuFlyouts.Context
|
||||
{
|
||||
public class MailOperationFlyout : WinoOperationFlyout<MailOperationMenuItem>
|
||||
public partial class MailOperationFlyout : WinoOperationFlyout<MailOperationMenuItem>
|
||||
{
|
||||
public MailOperationFlyout(IEnumerable<MailOperationMenuItem> availableActions, TaskCompletionSource<MailOperationMenuItem> completionSource) : base(availableActions, completionSource)
|
||||
{
|
||||
|
||||
@@ -3,7 +3,7 @@ using Wino.Core.Domain.Models.Menus;
|
||||
|
||||
namespace Wino.MenuFlyouts.Context
|
||||
{
|
||||
public class MailOperationMenuFlyoutItem : WinoOperationFlyoutItem<MailOperationMenuItem>
|
||||
public partial class MailOperationMenuFlyoutItem : WinoOperationFlyoutItem<MailOperationMenuItem>
|
||||
{
|
||||
public MailOperationMenuFlyoutItem(MailOperationMenuItem operationMenuItem, Action<MailOperationMenuItem> clicked) : base(operationMenuItem, clicked)
|
||||
{
|
||||
|
||||
@@ -13,7 +13,7 @@ namespace Wino.MenuFlyouts
|
||||
public Guid ClickedFolderId { get; set; }
|
||||
}
|
||||
|
||||
public class MoveButtonFlyout : MenuFlyout
|
||||
public partial class MoveButtonFlyout : MenuFlyout
|
||||
{
|
||||
public event TypedEventHandler<MoveButtonFlyout, MoveButtonMenuItemClickedEventArgs> MenuItemClick;
|
||||
public static readonly DependencyProperty FoldersProperty = DependencyProperty.Register(nameof(Folders), typeof(List<MailItemFolder>), typeof(MoveButtonFlyout), new PropertyMetadata(null, new PropertyChangedCallback(OnFoldersChanged)));
|
||||
|
||||
@@ -5,7 +5,7 @@ using Windows.UI.Xaml.Controls;
|
||||
|
||||
namespace Wino.MenuFlyouts
|
||||
{
|
||||
public class WinoOperationFlyout<TActionType> : MenuFlyout, IDisposable where TActionType : class
|
||||
public partial class WinoOperationFlyout<TActionType> : MenuFlyout, IDisposable where TActionType : class
|
||||
{
|
||||
public TActionType ClickedOperation { get; set; }
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ using Wino.Helpers;
|
||||
|
||||
namespace Wino.MenuFlyouts
|
||||
{
|
||||
public class WinoOperationFlyoutItem<TOperationMenuItem> : MenuFlyoutItem, IDisposable where TOperationMenuItem : IMenuOperation
|
||||
public partial class WinoOperationFlyoutItem<TOperationMenuItem> : MenuFlyoutItem, IDisposable where TOperationMenuItem : IMenuOperation
|
||||
{
|
||||
private const double CustomHeight = 35;
|
||||
|
||||
|
||||
@@ -1,30 +0,0 @@
|
||||
using System;
|
||||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// General Information about an assembly is controlled through the following
|
||||
// set of attributes. Change these attribute values to modify the information
|
||||
// associated with an assembly.
|
||||
[assembly: AssemblyTitle("Wino")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyProduct("Wino")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2021")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
// Version information for an assembly consists of the following four values:
|
||||
//
|
||||
// Major Version
|
||||
// Minor Version
|
||||
// Build Number
|
||||
// Revision
|
||||
//
|
||||
// You can specify all the values or you can default the Build and Revision Numbers
|
||||
// by using the '*' as shown below:
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("1.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
||||
[assembly: ComVisible(false)]
|
||||
@@ -1,44 +0,0 @@
|
||||
<!--
|
||||
This file contains Runtime Directives used by .NET Native. The defaults here are suitable for most
|
||||
developers. However, you can modify these parameters to modify the behavior of the .NET Native
|
||||
optimizer.
|
||||
|
||||
Runtime Directives are documented at https://go.microsoft.com/fwlink/?LinkID=391919
|
||||
|
||||
To fully enable reflection for App1.MyClass and all of its public/private members
|
||||
<Type Name="App1.MyClass" Dynamic="Required All"/>
|
||||
|
||||
To enable dynamic creation of the specific instantiation of AppClass<T> over System.Int32
|
||||
<TypeInstantiation Name="App1.AppClass" Arguments="System.Int32" Activate="Required Public" />
|
||||
|
||||
Using the Namespace directive to apply reflection policy to all the types in a particular namespace
|
||||
<Namespace Name="DataClasses.ViewModels" Serialize="All" />
|
||||
-->
|
||||
|
||||
<Directives xmlns="http://schemas.microsoft.com/netfx/2013/01/metadata">
|
||||
<Application>
|
||||
<!--
|
||||
An Assembly element with Name="*Application*" applies to all assemblies in
|
||||
the application package. The asterisks are not wildcards.
|
||||
-->
|
||||
<Assembly Name="*Application*" Dynamic="Required All" />
|
||||
|
||||
<!-- Reduce memory footprint when building with Microsoft.Graph -->
|
||||
|
||||
<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" />
|
||||
<Assembly Name="Microsoft.Kiota.Serialization.Form" Dynamic="Public" />
|
||||
<Assembly Name="Microsoft.Kiota.Serialization.Json" Dynamic="Public" />
|
||||
<Assembly Name="Microsoft.Kiota.Serialization.Multipart" Dynamic="Public" />
|
||||
|
||||
<!-- Add your application specific runtime directives here. -->
|
||||
<Type Name="Windows.Foundation.TypedEventHandler{Microsoft.UI.Xaml.Controls.NavigationView,Microsoft.UI.Xaml.Controls.NavigationViewItemInvokedEventArgs}" MarshalObject="Public" />
|
||||
|
||||
<Type Name="Microsoft.UI.Xaml.Controls.NavigationView">
|
||||
<Event Name="ItemInvoked" Dynamic="Required"/>
|
||||
</Type>
|
||||
</Application>
|
||||
</Directives>
|
||||
7
Wino.Mail/Properties/launchSettings.json
Normal file
7
Wino.Mail/Properties/launchSettings.json
Normal file
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"profiles": {
|
||||
"App1": {
|
||||
"commandName": "MsixPackage"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -4,7 +4,7 @@ using Wino.Core.ViewModels.Data;
|
||||
|
||||
namespace Wino.Selectors
|
||||
{
|
||||
public class AccountProviderViewModelTemplateSelector : DataTemplateSelector
|
||||
public partial class AccountProviderViewModelTemplateSelector : DataTemplateSelector
|
||||
{
|
||||
public DataTemplate RootAccountTemplate { get; set; }
|
||||
public DataTemplate MergedAccountTemplate { get; set; }
|
||||
|
||||
@@ -4,7 +4,7 @@ using Wino.Core.ViewModels.Data;
|
||||
|
||||
namespace Wino.Selectors
|
||||
{
|
||||
public class AccountReorderTemplateSelector : DataTemplateSelector
|
||||
public partial class AccountReorderTemplateSelector : DataTemplateSelector
|
||||
{
|
||||
public DataTemplate MergedAccountReorderTemplate { get; set; }
|
||||
public DataTemplate RootAccountReorderTemplate { get; set; }
|
||||
|
||||
@@ -4,7 +4,7 @@ using Wino.Mail.ViewModels.Data;
|
||||
|
||||
namespace Wino.Selectors
|
||||
{
|
||||
public class MailItemContainerStyleSelector : StyleSelector
|
||||
public partial class MailItemContainerStyleSelector : StyleSelector
|
||||
{
|
||||
public Style Thread { get; set; }
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ namespace Wino.Selectors
|
||||
/// <summary>
|
||||
/// Template selector for previewing mail item display modes in Settings->Personalization page.
|
||||
/// </summary>
|
||||
public class MailItemDisplayModePreviewTemplateSelector : DataTemplateSelector
|
||||
public partial class MailItemDisplayModePreviewTemplateSelector : DataTemplateSelector
|
||||
{
|
||||
public DataTemplate CompactTemplate { get; set; }
|
||||
public DataTemplate MediumTemplate { get; set; }
|
||||
|
||||
@@ -4,7 +4,7 @@ using Wino.Mail.ViewModels.Data;
|
||||
|
||||
namespace Wino.Selectors
|
||||
{
|
||||
public class MailItemDisplaySelector : DataTemplateSelector
|
||||
public partial class MailItemDisplaySelector : DataTemplateSelector
|
||||
{
|
||||
public DataTemplate SingleMailItemTemplate { get; set; }
|
||||
public DataTemplate ThreadMailItemTemplate { get; set; }
|
||||
|
||||
@@ -1,10 +1,6 @@
|
||||
using Wino.Core.UWP;
|
||||
using Wino.Mail.ViewModels;
|
||||
|
||||
namespace Wino.Views.Abstract
|
||||
{
|
||||
public class MailListPageAbstract : BasePage<MailListPageViewModel>
|
||||
{
|
||||
namespace Wino.Views.Abstract;
|
||||
|
||||
}
|
||||
}
|
||||
public partial class MailListPageAbstract : BasePage<MailListPageViewModel>;
|
||||
|
||||
@@ -4,13 +4,13 @@ using System.Collections.ObjectModel;
|
||||
using System.Linq;
|
||||
using System.Reactive.Linq;
|
||||
using System.Text.Json;
|
||||
using System.Text.Json.Serialization;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using CommunityToolkit.Mvvm.Messaging;
|
||||
using CommunityToolkit.WinUI.Controls;
|
||||
using EmailValidation;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Microsoft.Toolkit.Uwp.Helpers;
|
||||
using Microsoft.UI.Xaml.Controls;
|
||||
using Microsoft.Web.WebView2.Core;
|
||||
using MimeKit;
|
||||
@@ -27,6 +27,7 @@ using Windows.UI.Xaml.Navigation;
|
||||
using Wino.Core.Domain;
|
||||
using Wino.Core.Domain.Entities.Shared;
|
||||
using Wino.Core.Domain.Interfaces;
|
||||
using Wino.Core.Domain.Models;
|
||||
using Wino.Core.Domain.Models.Reader;
|
||||
using Wino.Core.UWP.Extensions;
|
||||
using Wino.Mail.ViewModels.Data;
|
||||
@@ -215,7 +216,7 @@ namespace Wino.Views
|
||||
}
|
||||
}
|
||||
|
||||
await InvokeScriptSafeAsync($"insertImages({JsonSerializer.Serialize(imagesInformation)});");
|
||||
await InvokeScriptSafeAsync($"insertImages({JsonSerializer.Serialize(imagesInformation, ComposerPageJsonContext.Default.ListImageInfo)});");
|
||||
}
|
||||
}
|
||||
// State should be reset even when an exception occurs, otherwise the UI will be stuck in a dragging state.
|
||||
@@ -227,7 +228,7 @@ namespace Wino.Views
|
||||
|
||||
static async Task<string> GetDataURL(StorageFile file)
|
||||
{
|
||||
return $"data:image/{file.FileType.Replace(".", "")};base64,{Convert.ToBase64String(await file.ReadBytesAsync())}";
|
||||
return $"data:image/{file.FileType.Replace(".", "")};base64,{Convert.ToBase64String(await file.ToByteArrayAsync())}";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -320,22 +321,6 @@ namespace Wino.Views
|
||||
await InvokeScriptSafeAsync($"toggleToolbar('{enable}');");
|
||||
}
|
||||
|
||||
public async Task<string> ExecuteScriptFunctionAsync(string functionName, params object[] parameters)
|
||||
{
|
||||
string script = functionName + "(";
|
||||
for (int i = 0; i < parameters.Length; i++)
|
||||
{
|
||||
script += JsonSerializer.Serialize(parameters[i]);
|
||||
if (i < parameters.Length - 1)
|
||||
{
|
||||
script += ", ";
|
||||
}
|
||||
}
|
||||
script += ");";
|
||||
|
||||
return await Chromium.ExecuteScriptAsync(script);
|
||||
}
|
||||
|
||||
private async Task<string> InvokeScriptSafeAsync(string function)
|
||||
{
|
||||
if (Chromium == null) return string.Empty;
|
||||
@@ -404,11 +389,11 @@ namespace Wino.Views
|
||||
|
||||
if (string.IsNullOrEmpty(htmlBody))
|
||||
{
|
||||
await ExecuteScriptFunctionAsync("RenderHTML", " ");
|
||||
await Chromium.ExecuteScriptFunctionAsync("RenderHTML", parameters: JsonSerializer.Serialize(" ", BasicTypesJsonContext.Default.String));
|
||||
}
|
||||
else
|
||||
{
|
||||
await ExecuteScriptFunctionAsync("RenderHTML", htmlBody);
|
||||
await Chromium.ExecuteScriptFunctionAsync("RenderHTML", parameters: JsonSerializer.Serialize(htmlBody, BasicTypesJsonContext.Default.String));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -419,7 +404,13 @@ namespace Wino.Views
|
||||
int composerFontSize = ViewModel.PreferencesService.ComposerFontSize;
|
||||
var readerFont = ViewModel.PreferencesService.ReaderFont;
|
||||
int readerFontSize = ViewModel.PreferencesService.ReaderFontSize;
|
||||
return await ExecuteScriptFunctionAsync("initializeJodit", fonts, composerFont, composerFontSize, readerFont, readerFontSize);
|
||||
return await Chromium.ExecuteScriptFunctionAsync("initializeJodit",
|
||||
false,
|
||||
JsonSerializer.Serialize(fonts, BasicTypesJsonContext.Default.ListString),
|
||||
JsonSerializer.Serialize(composerFont, BasicTypesJsonContext.Default.String),
|
||||
JsonSerializer.Serialize(composerFontSize, BasicTypesJsonContext.Default.Int32),
|
||||
JsonSerializer.Serialize(readerFont, BasicTypesJsonContext.Default.String),
|
||||
JsonSerializer.Serialize(readerFontSize, BasicTypesJsonContext.Default.Int32));
|
||||
}
|
||||
|
||||
private void DisposeWebView2()
|
||||
@@ -468,7 +459,7 @@ namespace Wino.Views
|
||||
{
|
||||
var editorContent = await InvokeScriptSafeAsync("GetHTMLContent();");
|
||||
|
||||
return JsonSerializer.Deserialize<string>(editorContent);
|
||||
return JsonSerializer.Deserialize(editorContent, BasicTypesJsonContext.Default.String);
|
||||
});
|
||||
|
||||
var underlyingThemeService = App.Current.Services.GetService<IUnderlyingThemeService>();
|
||||
@@ -492,7 +483,7 @@ namespace Wino.Views
|
||||
|
||||
private void ScriptMessageReceived(CoreWebView2 sender, CoreWebView2WebMessageReceivedEventArgs args)
|
||||
{
|
||||
var change = JsonSerializer.Deserialize<WebViewMessage>(args.WebMessageAsJson);
|
||||
var change = JsonSerializer.Deserialize(args.WebMessageAsJson, DomainModelsJsonContext.Default.WebViewMessage);
|
||||
|
||||
if (change.Type == "bold")
|
||||
{
|
||||
@@ -698,4 +689,7 @@ namespace Wino.Views
|
||||
finally { deferral.Complete(); }
|
||||
}
|
||||
}
|
||||
|
||||
[JsonSerializable(typeof(List<ImageInfo>))]
|
||||
public partial class ComposerPageJsonContext: JsonSerializerContext;
|
||||
}
|
||||
|
||||
@@ -12,7 +12,6 @@
|
||||
xmlns:enums="using:Wino.Core.Domain.Enums"
|
||||
xmlns:helpers="using:Wino.Helpers"
|
||||
xmlns:i="using:Microsoft.Xaml.Interactivity"
|
||||
xmlns:ic="using:Microsoft.Xaml.Interactions.Core"
|
||||
xmlns:interactivity="using:Microsoft.Xaml.Interactivity"
|
||||
xmlns:listview="using:Wino.Controls.Advanced"
|
||||
xmlns:local="using:Wino.Behaviors"
|
||||
@@ -219,9 +218,9 @@
|
||||
Text="{x:Bind ViewModel.SearchQuery, Mode=TwoWay}"
|
||||
TextChanged="SearchBar_TextChanged">
|
||||
<i:Interaction.Behaviors>
|
||||
<ic:EventTriggerBehavior EventName="QuerySubmitted">
|
||||
<ic:InvokeCommandAction Command="{x:Bind ViewModel.PerformSearchCommand}" />
|
||||
</ic:EventTriggerBehavior>
|
||||
<i:EventTriggerBehavior EventName="QuerySubmitted">
|
||||
<i:InvokeCommandAction Command="{x:Bind ViewModel.PerformSearchCommand}" />
|
||||
</i:EventTriggerBehavior>
|
||||
</i:Interaction.Behaviors>
|
||||
</AutoSuggestBox>
|
||||
</Grid>
|
||||
|
||||
@@ -11,7 +11,9 @@ using Windows.UI.Xaml;
|
||||
using Windows.UI.Xaml.Controls;
|
||||
using Windows.UI.Xaml.Media.Animation;
|
||||
using Windows.UI.Xaml.Navigation;
|
||||
using Wino.Core.Domain;
|
||||
using Wino.Core.Domain.Interfaces;
|
||||
using Wino.Core.UWP.Extensions;
|
||||
using Wino.Mail.ViewModels.Data;
|
||||
using Wino.Messaging.Client.Mails;
|
||||
using Wino.Messaging.Client.Shell;
|
||||
@@ -65,22 +67,6 @@ namespace Wino.Views
|
||||
return string.Empty;
|
||||
}
|
||||
|
||||
public async Task<string> ExecuteScriptFunctionAsync(string functionName, params object[] parameters)
|
||||
{
|
||||
string script = functionName + "(";
|
||||
for (int i = 0; i < parameters.Length; i++)
|
||||
{
|
||||
script += JsonSerializer.Serialize(parameters[i]);
|
||||
if (i < parameters.Length - 1)
|
||||
{
|
||||
script += ", ";
|
||||
}
|
||||
}
|
||||
script += ");";
|
||||
|
||||
return isChromiumDisposed ? string.Empty : await Chromium.ExecuteScriptAsync(script);
|
||||
}
|
||||
|
||||
private async Task RenderInternalAsync(string htmlBody)
|
||||
{
|
||||
isRenderingInProgress = true;
|
||||
@@ -92,12 +78,14 @@ namespace Wino.Views
|
||||
|
||||
if (string.IsNullOrEmpty(htmlBody))
|
||||
{
|
||||
await ExecuteScriptFunctionAsync("RenderHTML", " ");
|
||||
await Chromium.ExecuteScriptFunctionAsync("RenderHTML", isChromiumDisposed, JsonSerializer.Serialize(" ", BasicTypesJsonContext.Default.String));
|
||||
}
|
||||
else
|
||||
{
|
||||
var shouldLinkifyText = ViewModel.CurrentRenderModel?.MailRenderingOptions?.RenderPlaintextLinks ?? true;
|
||||
await ExecuteScriptFunctionAsync("RenderHTML", htmlBody, shouldLinkifyText);
|
||||
await Chromium.ExecuteScriptFunctionAsync("RenderHTML", isChromiumDisposed,
|
||||
JsonSerializer.Serialize(htmlBody, BasicTypesJsonContext.Default.String),
|
||||
JsonSerializer.Serialize(shouldLinkifyText, BasicTypesJsonContext.Default.Boolean));
|
||||
}
|
||||
|
||||
isRenderingInProgress = false;
|
||||
@@ -133,8 +121,6 @@ namespace Wino.Views
|
||||
{
|
||||
base.OnNavigatedFrom(e);
|
||||
|
||||
WeakReferenceMessenger.Default.Send(new CancelRenderingContentRequested());
|
||||
|
||||
// Disposing the page.
|
||||
// Make sure the WebView2 is disposed properly.
|
||||
|
||||
@@ -263,7 +249,7 @@ namespace Wino.Views
|
||||
|
||||
private async Task UpdateReaderFontPropertiesAsync()
|
||||
{
|
||||
await ExecuteScriptFunctionAsync("ChangeFontSize", _preferencesService.ReaderFontSize);
|
||||
await Chromium.ExecuteScriptFunctionAsync("ChangeFontSize", isChromiumDisposed, JsonSerializer.Serialize(_preferencesService.ReaderFontSize, BasicTypesJsonContext.Default.Int32));
|
||||
|
||||
// Prepare font family name with fallback to sans-serif by default.
|
||||
var fontName = _preferencesService.ReaderFont;
|
||||
@@ -271,7 +257,7 @@ namespace Wino.Views
|
||||
// If font family name is not supported by the browser, fallback to sans-serif.
|
||||
fontName += ", sans-serif";
|
||||
|
||||
await ExecuteScriptFunctionAsync("ChangeFontFamily", fontName);
|
||||
await Chromium.ExecuteScriptFunctionAsync("ChangeFontFamily", isChromiumDisposed, JsonSerializer.Serialize(fontName, BasicTypesJsonContext.Default.String));
|
||||
}
|
||||
|
||||
void IRecipient<ApplicationThemeChanged>.Receive(ApplicationThemeChanged message)
|
||||
|
||||
@@ -1,17 +1,16 @@
|
||||
using CommunityToolkit.Labs.WinUI.MarkdownTextBlock;
|
||||
using Wino.Views.Abstract;
|
||||
|
||||
namespace Wino.Views
|
||||
namespace Wino.Views;
|
||||
|
||||
public sealed partial class WelcomePage : WelcomePageAbstract
|
||||
{
|
||||
public sealed partial class WelcomePage : WelcomePageAbstract
|
||||
private readonly MarkdownConfig _config;
|
||||
|
||||
public WelcomePage()
|
||||
{
|
||||
private readonly MarkdownConfig _config;
|
||||
InitializeComponent();
|
||||
|
||||
public WelcomePage()
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
_config = new MarkdownConfig();
|
||||
}
|
||||
_config = new MarkdownConfig();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,638 +1,112 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="15.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||
<PropertyGroup>
|
||||
<LangVersion>8.0</LangVersion>
|
||||
<RestoreProjectStyle>PackageReference</RestoreProjectStyle>
|
||||
<!-- UWP WAM Authentication on Xbox needs this. -->
|
||||
<UseDotNetNativeSharedAssemblyFrameworkPackage>false</UseDotNetNativeSharedAssemblyFrameworkPackage>
|
||||
<PackageCertificateThumbprint>3B34414D49FBF00A35A040085092D8699459EA8E</PackageCertificateThumbprint>
|
||||
<PackageCertificateKeyFile>Wino.Mail_TemporaryKey.pfx</PackageCertificateKeyFile>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">x86</Platform>
|
||||
<ProjectGuid>{68A432B8-C1B7-494C-8D6D-230788EA683E}</ProjectGuid>
|
||||
<OutputType>AppContainerExe</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>Wino.Mail</RootNamespace>
|
||||
<AssemblyName>Wino.Mail</AssemblyName>
|
||||
<DefaultLanguage>en-US</DefaultLanguage>
|
||||
<TargetPlatformIdentifier>UAP</TargetPlatformIdentifier>
|
||||
<TargetPlatformVersion Condition=" '$(TargetPlatformVersion)' == '' ">10.0.22621.0</TargetPlatformVersion>
|
||||
<TargetPlatformMinVersion>10.0.17763.0</TargetPlatformMinVersion>
|
||||
<MinimumVisualStudioVersion>14</MinimumVisualStudioVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<ProjectTypeGuids>{A5A43C5B-DE2A-4C0C-9213-0A381AF9435A};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
|
||||
<WindowsXamlEnableOverview>true</WindowsXamlEnableOverview>
|
||||
<GenerateAppInstallerFile>False</GenerateAppInstallerFile>
|
||||
<AppxPackageSigningTimestampDigestAlgorithm>SHA256</AppxPackageSigningTimestampDigestAlgorithm>
|
||||
<AppxAutoIncrementPackageRevision>False</AppxAutoIncrementPackageRevision>
|
||||
<GenerateTestArtifacts>True</GenerateTestArtifacts>
|
||||
<AppxBundle>Always</AppxBundle>
|
||||
<AppxBundlePlatforms>x86|x64|arm64</AppxBundlePlatforms>
|
||||
<HoursBetweenUpdateChecks>0</HoursBetweenUpdateChecks>
|
||||
<GenerateTemporaryStoreCertificate>True</GenerateTemporaryStoreCertificate>
|
||||
<AppxSymbolPackageEnabled>True</AppxSymbolPackageEnabled>
|
||||
<AppxPackageDir>C:\Users\bkaan\Desktop\Packages\</AppxPackageDir>
|
||||
<AppxPackageSigningEnabled>True</AppxPackageSigningEnabled>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<OutputPath>bin\x86\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP</DefineConstants>
|
||||
<NoWarn>;2008</NoWarn>
|
||||
<DebugType>full</DebugType>
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
<UseVSHostingProcess>false</UseVSHostingProcess>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<Prefer32Bit>true</Prefer32Bit>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'">
|
||||
<OutputPath>bin\x86\Release\</OutputPath>
|
||||
<DefineConstants>TRACE;NETFX_CORE;WINDOWS_UWP</DefineConstants>
|
||||
<Optimize>true</Optimize>
|
||||
<NoWarn>;2008</NoWarn>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
<UseVSHostingProcess>false</UseVSHostingProcess>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<Prefer32Bit>true</Prefer32Bit>
|
||||
<!-- .NET Native Shit -->
|
||||
<UseDotNetNativeToolchain>true</UseDotNetNativeToolchain>
|
||||
<UseDotNetNativeSharedAssemblyFrameworkPackage>false</UseDotNetNativeSharedAssemblyFrameworkPackage>
|
||||
<Use64BitCompiler>true</Use64BitCompiler>
|
||||
<OutOfProcPDB>true</OutOfProcPDB>
|
||||
<!-- Opt-in to generate PDB's out of process -->
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|ARM64'">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<OutputPath>bin\ARM64\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP</DefineConstants>
|
||||
<NoWarn>;2008</NoWarn>
|
||||
<DebugType>full</DebugType>
|
||||
<PlatformTarget>ARM64</PlatformTarget>
|
||||
<UseVSHostingProcess>false</UseVSHostingProcess>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<Prefer32Bit>true</Prefer32Bit>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|ARM64'">
|
||||
<OutputPath>bin\ARM64\Release\</OutputPath>
|
||||
<DefineConstants>TRACE;NETFX_CORE;WINDOWS_UWP</DefineConstants>
|
||||
<Optimize>true</Optimize>
|
||||
<NoWarn>;2008</NoWarn>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<PlatformTarget>ARM64</PlatformTarget>
|
||||
<UseVSHostingProcess>false</UseVSHostingProcess>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<Prefer32Bit>false</Prefer32Bit>
|
||||
<!-- .NET Native Shit -->
|
||||
<UseDotNetNativeToolchain>true</UseDotNetNativeToolchain>
|
||||
<UseDotNetNativeSharedAssemblyFrameworkPackage>false</UseDotNetNativeSharedAssemblyFrameworkPackage>
|
||||
<Use64BitCompiler>true</Use64BitCompiler>
|
||||
<ShortcutGenericAnalysis>true</ShortcutGenericAnalysis>
|
||||
<OutOfProcPDB>true</OutOfProcPDB>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<OutputPath>bin\x64\Debug\</OutputPath>
|
||||
<DefineConstants>TRACE;DEBUG;NETFX_CORE;WINDOWS_UWP;CODE_ANALYSIS;CODE_ANALYSIS;MAIL</DefineConstants>
|
||||
<NoWarn>
|
||||
</NoWarn>
|
||||
<DebugType>full</DebugType>
|
||||
<PlatformTarget>x64</PlatformTarget>
|
||||
<UseVSHostingProcess>false</UseVSHostingProcess>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<Prefer32Bit>true</Prefer32Bit>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
|
||||
<OutputPath>bin\x64\Release\</OutputPath>
|
||||
<DefineConstants>TRACE;NETFX_CORE;WINDOWS_UWP</DefineConstants>
|
||||
<Optimize>true</Optimize>
|
||||
<NoWarn>;2008</NoWarn>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<PlatformTarget>x64</PlatformTarget>
|
||||
<UseVSHostingProcess>false</UseVSHostingProcess>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<!-- .NET Native Shit -->
|
||||
<UseDotNetNativeToolchain>true</UseDotNetNativeToolchain>
|
||||
<UseDotNetNativeSharedAssemblyFrameworkPackage>false</UseDotNetNativeSharedAssemblyFrameworkPackage>
|
||||
<Use64BitCompiler>true</Use64BitCompiler>
|
||||
<OutOfProcPDB>true</OutOfProcPDB>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="AdaptiveTriggerLibrary">
|
||||
<Version>1.2.2</Version>
|
||||
</PackageReference>
|
||||
<PackageReference Include="ColorHashSharp">
|
||||
<Version>1.0.0</Version>
|
||||
</PackageReference>
|
||||
<PackageReference Include="CommunityToolkit.Common">
|
||||
<Version>8.3.2</Version>
|
||||
</PackageReference>
|
||||
<PackageReference Include="CommunityToolkit.Diagnostics">
|
||||
<Version>8.3.2</Version>
|
||||
</PackageReference>
|
||||
<PackageReference Include="CommunityToolkit.Labs.Uwp.Controls.MarkdownTextBlock">
|
||||
<Version>0.1.240917-build.1755</Version>
|
||||
</PackageReference>
|
||||
<PackageReference Include="CommunityToolkit.Mvvm">
|
||||
<Version>8.3.2</Version>
|
||||
</PackageReference>
|
||||
<PackageReference Include="CommunityToolkit.Uwp.Animations">
|
||||
<Version>8.1.240916</Version>
|
||||
</PackageReference>
|
||||
<PackageReference Include="CommunityToolkit.Uwp.Behaviors">
|
||||
<Version>8.1.240916</Version>
|
||||
</PackageReference>
|
||||
<PackageReference Include="CommunityToolkit.Uwp.Controls.Segmented">
|
||||
<Version>8.1.240916</Version>
|
||||
</PackageReference>
|
||||
<PackageReference Include="CommunityToolkit.Uwp.Controls.SettingsControls">
|
||||
<Version>8.1.240916</Version>
|
||||
</PackageReference>
|
||||
<PackageReference Include="CommunityToolkit.Uwp.Controls.Sizers">
|
||||
<Version>8.1.240916</Version>
|
||||
</PackageReference>
|
||||
<PackageReference Include="CommunityToolkit.Uwp.Controls.TabbedCommandBar">
|
||||
<Version>8.1.240916</Version>
|
||||
</PackageReference>
|
||||
<PackageReference Include="CommunityToolkit.Uwp.Controls.TokenizingTextBox">
|
||||
<Version>8.1.240916</Version>
|
||||
</PackageReference>
|
||||
<PackageReference Include="CommunityToolkit.Uwp.Extensions">
|
||||
<Version>8.1.240916</Version>
|
||||
</PackageReference>
|
||||
<PackageReference Include="EmailValidation">
|
||||
<Version>1.2.0</Version>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Microsoft.AppCenter.Analytics">
|
||||
<Version>5.0.6</Version>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Microsoft.AppCenter.Crashes">
|
||||
<Version>5.0.6</Version>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Microsoft.Extensions.DependencyInjection">
|
||||
<Version>8.0.1</Version>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Microsoft.Identity.Client">
|
||||
<Version>4.66.2</Version>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Microsoft.Net.Native.Compiler">
|
||||
<Version>2.2.12-rel-33220-00</Version>
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Microsoft.NETCore.UniversalWindowsPlatform">
|
||||
<Version>6.2.14</Version>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Microsoft.UI.Xaml">
|
||||
<Version>2.8.6</Version>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Microsoft.Xaml.Behaviors.Uwp.Managed">
|
||||
<Version>2.0.1</Version>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Nito.AsyncEx">
|
||||
<Version>5.1.2</Version>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Serilog">
|
||||
<Version>4.1.0</Version>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Serilog.Exceptions">
|
||||
<Version>8.4.0</Version>
|
||||
</PackageReference>
|
||||
<PackageReference Include="sqlite-net-pcl">
|
||||
<Version>1.9.172</Version>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Win2D.uwp">
|
||||
<Version>1.28.0</Version>
|
||||
</PackageReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Activation\DefaultActivationHandler.cs" />
|
||||
<Compile Include="Activation\FileActivationHandler.cs" />
|
||||
<Compile Include="Activation\ProtocolActivationHandler.cs" />
|
||||
<Compile Include="Activation\ToastNotificationActivationHandler.cs" />
|
||||
<Compile Include="Behaviors\BindableCommandBarBehavior.cs" />
|
||||
<Compile Include="Behaviors\CreateMailNavigationItemBehavior.cs" />
|
||||
<Compile Include="Controls\AccountNavigationItem.cs" />
|
||||
<Compile Include="Controls\SettingsMenuItemControl.cs" />
|
||||
<Compile Include="Controls\Advanced\WinoListView.cs" />
|
||||
<Compile Include="Controls\WinoExpander.cs" />
|
||||
<Compile Include="Controls\WinoSwipeControlItems.cs" />
|
||||
<Compile Include="Dialogs\AccountReorderDialog.xaml.cs">
|
||||
<DependentUpon>AccountReorderDialog.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Dialogs\MessageSourceDialog.xaml.cs">
|
||||
<DependentUpon>MessageSourceDialog.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Dialogs\MoveMailDialog.xaml.cs">
|
||||
<DependentUpon>MoveMailDialog.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Dialogs\SignatureEditorDialog.xaml.cs">
|
||||
<DependentUpon>SignatureEditorDialog.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Dialogs\NewImapSetupDialog.xaml.cs">
|
||||
<DependentUpon>NewImapSetupDialog.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Dialogs\CreateAccountAliasDialog.xaml.cs">
|
||||
<DependentUpon>CreateAccountAliasDialog.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Dialogs\SystemFolderConfigurationDialog.xaml.cs">
|
||||
<DependentUpon>SystemFolderConfigurationDialog.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="GlobalSuppressions.cs" />
|
||||
<Compile Include="MenuFlyouts\AccountSelectorFlyout.cs" />
|
||||
<Compile Include="MenuFlyouts\FolderOperationFlyout.cs" />
|
||||
<Compile Include="MenuFlyouts\FolderOperationMenuFlyoutItem.cs" />
|
||||
<Compile Include="MenuFlyouts\MailOperationFlyout.cs" />
|
||||
<Compile Include="MenuFlyouts\MailOperationMenuFlyoutItem.cs" />
|
||||
<Compile Include="MenuFlyouts\WinoOperationFlyout.cs" />
|
||||
<Compile Include="MenuFlyouts\WinoOperationFlyoutItem.cs" />
|
||||
<Compile Include="MenuFlyouts\FilterMenuFlyout.cs" />
|
||||
<Compile Include="Controls\ImagePreviewControl.cs" />
|
||||
<Compile Include="Controls\MailItemDisplayInformationControl.xaml.cs">
|
||||
<DependentUpon>MailItemDisplayInformationControl.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="MenuFlyouts\MoveButtonFlyout.cs" />
|
||||
<Compile Include="Selectors\AccountProviderViewModelTemplateSelector.cs" />
|
||||
<Compile Include="Selectors\AccountReorderTemplateSelector.cs" />
|
||||
<Compile Include="Selectors\MailItemContainerStyleSelector.cs" />
|
||||
<Compile Include="Selectors\MailItemDisplayModePreviewTemplateSelector.cs" />
|
||||
<Compile Include="Selectors\MailItemDisplaySelector.cs" />
|
||||
<Compile Include="Services\DialogService.cs" />
|
||||
<Compile Include="Services\MailAuthenticatorConfiguration.cs" />
|
||||
<Compile Include="Services\NavigationService.cs" />
|
||||
<Compile Include="Services\ProviderService.cs" />
|
||||
<Compile Include="Services\SettingsBuilderService.cs" />
|
||||
<Compile Include="Styles\WinoExpanderStyle.xaml.cs">
|
||||
<DependentUpon>WinoExpanderStyle.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Views\AboutPage.xaml.cs">
|
||||
<DependentUpon>AboutPage.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Views\Abstract\AboutPageAbstract.cs" />
|
||||
<Compile Include="Views\Abstract\AccountDetailsPageAbstract.cs" />
|
||||
<Compile Include="Views\Abstract\AccountManagementPageAbstract.cs" />
|
||||
<Compile Include="Views\Abstract\AliasManagementPageAbstract.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" />
|
||||
<Compile Include="Views\Abstract\LanguageTimePageAbstract.cs" />
|
||||
<Compile Include="Views\Abstract\MailListPageAbstract.cs" />
|
||||
<Compile Include="Views\Abstract\MailRenderingPageAbstract.cs" />
|
||||
<Compile Include="Views\Abstract\MergedAccountDetailsPageAbstract.cs" />
|
||||
<Compile Include="Views\Abstract\MessageListPageAbstract.cs" />
|
||||
<Compile Include="Views\Abstract\PersonalizationPageAbstract.cs" />
|
||||
<Compile Include="Views\Abstract\ReadComposePanePageAbstract.cs" />
|
||||
<Compile Include="Views\Abstract\SignatureManagementPageAbstract.cs" />
|
||||
<Compile Include="Views\Abstract\WelcomePageAbstract.cs" />
|
||||
<Compile Include="Views\Account\AccountDetailsPage.xaml.cs">
|
||||
<DependentUpon>AccountDetailsPage.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Views\Account\AccountManagementPage.xaml.cs">
|
||||
<DependentUpon>AccountManagementPage.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Views\Account\MergedAccountDetailsPage.xaml.cs">
|
||||
<DependentUpon>MergedAccountDetailsPage.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Views\ComposePage.xaml.cs">
|
||||
<DependentUpon>ComposePage.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Views\IdlePage.xaml.cs">
|
||||
<DependentUpon>IdlePage.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Views\ImapSetup\AdvancedImapSetupPage.xaml.cs">
|
||||
<DependentUpon>AdvancedImapSetupPage.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Views\ImapSetup\ImapConnectionFailedPage.xaml.cs">
|
||||
<DependentUpon>ImapConnectionFailedPage.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Views\ImapSetup\PreparingImapFoldersPage.xaml.cs">
|
||||
<DependentUpon>PreparingImapFoldersPage.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Views\ImapSetup\TestingImapConnectionPage.xaml.cs">
|
||||
<DependentUpon>TestingImapConnectionPage.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Views\ImapSetup\WelcomeImapSetupPage.xaml.cs">
|
||||
<DependentUpon>WelcomeImapSetupPage.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Views\MailListPage.xaml.cs">
|
||||
<DependentUpon>MailListPage.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Views\MailRenderingPage.xaml.cs">
|
||||
<DependentUpon>MailRenderingPage.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Views\PersonalizationPage.xaml.cs">
|
||||
<DependentUpon>PersonalizationPage.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>
|
||||
<Compile Include="Views\Settings\MessageListPage.xaml.cs">
|
||||
<DependentUpon>MessageListPage.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="AppShell.xaml.cs">
|
||||
<DependentUpon>AppShell.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Views\Settings\ReadComposePanePage.xaml.cs">
|
||||
<DependentUpon>ReadComposePanePage.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Views\Settings\AliasManagementPage.xaml.cs">
|
||||
<DependentUpon>AliasManagementPage.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Views\Settings\SignatureManagementPage.xaml.cs">
|
||||
<DependentUpon>SignatureManagementPage.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Views\WelcomePage.xaml.cs">
|
||||
<DependentUpon>WelcomePage.xaml</DependentUpon>
|
||||
</Compile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="App.xaml.cs">
|
||||
<DependentUpon>App.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Page Include="Controls\MailItemDisplayInformationControl.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="Dialogs\AccountReorderDialog.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="Dialogs\MessageSourceDialog.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="Dialogs\MoveMailDialog.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="Dialogs\SignatureEditorDialog.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
</Page>
|
||||
<Page Include="Dialogs\NewImapSetupDialog.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="Dialogs\CreateAccountAliasDialog.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
</Page>
|
||||
<Page Include="Dialogs\SystemFolderConfigurationDialog.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="Styles\ImagePreviewControl.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="Styles\ItemContainerStyles.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="Styles\WinoExpanderStyle.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
</Page>
|
||||
<Page Include="Views\AboutPage.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
</Page>
|
||||
<Page Include="Views\Account\AccountDetailsPage.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="Views\Account\AccountManagementPage.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
</Page>
|
||||
<Page Include="Views\Account\MergedAccountDetailsPage.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="Views\ComposePage.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="Views\IdlePage.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
</Page>
|
||||
<Page Include="Views\ImapSetup\AdvancedImapSetupPage.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="Views\ImapSetup\ImapConnectionFailedPage.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="Views\ImapSetup\PreparingImapFoldersPage.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="Views\ImapSetup\TestingImapConnectionPage.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="Views\ImapSetup\WelcomeImapSetupPage.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="Views\MailListPage.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
</Page>
|
||||
<Page Include="Views\MailRenderingPage.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="Views\PersonalizationPage.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
</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>
|
||||
</Page>
|
||||
<Page Include="Views\Settings\MessageListPage.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="AppShell.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
</Page>
|
||||
<Page Include="Views\Settings\ReadComposePanePage.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="Views\Settings\AliasManagementPage.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
</Page>
|
||||
<Page Include="Views\Settings\SignatureManagementPage.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="Views\WelcomePage.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<AppxManifest Include="Package.appxmanifest">
|
||||
<SubType>Designer</SubType>
|
||||
</AppxManifest>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="Assets\BadgeLogo.scale-100.png" />
|
||||
<Content Include="Assets\BadgeLogo.scale-125.png" />
|
||||
<Content Include="Assets\BadgeLogo.scale-150.png" />
|
||||
<Content Include="Assets\BadgeLogo.scale-200.png" />
|
||||
<Content Include="Assets\BadgeLogo.scale-400.png" />
|
||||
<Content Include="Assets\EML\eml.png" />
|
||||
<Content Include="Assets\LargeTile.scale-100.png" />
|
||||
<Content Include="Assets\LargeTile.scale-125.png" />
|
||||
<Content Include="Assets\LargeTile.scale-150.png" />
|
||||
<Content Include="Assets\LargeTile.scale-200.png" />
|
||||
<Content Include="Assets\LargeTile.scale-400.png" />
|
||||
<Content Include="Assets\NotificationIcons\delete.png" />
|
||||
<Content Include="Assets\NotificationIcons\dismiss.png" />
|
||||
<Content Include="Assets\NotificationIcons\markread.png" />
|
||||
<Content Include="Assets\NotificationIcons\profile-dark.png" />
|
||||
<Content Include="Assets\NotificationIcons\profile-light.png" />
|
||||
<Content Include="Assets\SmallTile.scale-100.png" />
|
||||
<Content Include="Assets\SmallTile.scale-125.png" />
|
||||
<Content Include="Assets\SmallTile.scale-150.png" />
|
||||
<Content Include="Assets\SmallTile.scale-200.png" />
|
||||
<Content Include="Assets\SmallTile.scale-400.png" />
|
||||
<Content Include="Assets\SplashScreen.scale-100.png" />
|
||||
<Content Include="Assets\SplashScreen.scale-125.png" />
|
||||
<Content Include="Assets\SplashScreen.scale-150.png" />
|
||||
<Content Include="Assets\SplashScreen.scale-400.png" />
|
||||
<Content Include="Assets\Square150x150Logo.scale-100.png" />
|
||||
<Content Include="Assets\Square150x150Logo.scale-125.png" />
|
||||
<Content Include="Assets\Square150x150Logo.scale-150.png" />
|
||||
<Content Include="Assets\Square150x150Logo.scale-400.png" />
|
||||
<Content Include="Assets\Square44x44Logo.altform-lightunplated_targetsize-16.png" />
|
||||
<Content Include="Assets\Square44x44Logo.altform-lightunplated_targetsize-24.png" />
|
||||
<Content Include="Assets\Square44x44Logo.altform-lightunplated_targetsize-256.png" />
|
||||
<Content Include="Assets\Square44x44Logo.altform-lightunplated_targetsize-32.png" />
|
||||
<Content Include="Assets\Square44x44Logo.altform-lightunplated_targetsize-48.png" />
|
||||
<Content Include="Assets\Square44x44Logo.altform-unplated_targetsize-16.png" />
|
||||
<Content Include="Assets\Square44x44Logo.altform-unplated_targetsize-256.png" />
|
||||
<Content Include="Assets\Square44x44Logo.altform-unplated_targetsize-32.png" />
|
||||
<Content Include="Assets\Square44x44Logo.altform-unplated_targetsize-48.png" />
|
||||
<Content Include="Assets\Square44x44Logo.scale-100.png" />
|
||||
<Content Include="Assets\Square44x44Logo.scale-125.png" />
|
||||
<Content Include="Assets\Square44x44Logo.scale-150.png" />
|
||||
<Content Include="Assets\Square44x44Logo.scale-400.png" />
|
||||
<Content Include="Assets\Square44x44Logo.targetsize-16.png" />
|
||||
<Content Include="Assets\Square44x44Logo.targetsize-24.png" />
|
||||
<Content Include="Assets\Square44x44Logo.targetsize-256.png" />
|
||||
<Content Include="Assets\Square44x44Logo.targetsize-32.png" />
|
||||
<Content Include="Assets\Square44x44Logo.targetsize-48.png" />
|
||||
<Content Include="Assets\StoreLogo.scale-100.png" />
|
||||
<Content Include="Assets\StoreLogo.scale-125.png" />
|
||||
<Content Include="Assets\StoreLogo.scale-150.png" />
|
||||
<Content Include="Assets\StoreLogo.scale-200.png" />
|
||||
<Content Include="Assets\StoreLogo.scale-400.png" />
|
||||
<Content Include="Assets\Thumbnails\airbnb.com.png" />
|
||||
<Content Include="Assets\Thumbnails\apple.com.png" />
|
||||
<Content Include="Assets\Thumbnails\google.com.png" />
|
||||
<Content Include="Assets\Thumbnails\microsoft.com.png" />
|
||||
<Content Include="Assets\Thumbnails\steampowered.com.png" />
|
||||
<Content Include="Assets\Thumbnails\youtube.com.png" />
|
||||
<Content Include="Assets\Wide310x150Logo.scale-100.png" />
|
||||
<Content Include="Assets\Wide310x150Logo.scale-125.png" />
|
||||
<Content Include="Assets\Wide310x150Logo.scale-150.png" />
|
||||
<Content Include="Assets\Wide310x150Logo.scale-400.png" />
|
||||
<Content Include="JS\libs\darkreader.js" />
|
||||
<Content Include="JS\editor.html" />
|
||||
<Content Include="JS\editor.js" />
|
||||
<Content Include="JS\global.css" />
|
||||
<Content Include="JS\libs\jodit.min.css" />
|
||||
<Content Include="JS\libs\jodit.min.js" />
|
||||
<Content Include="JS\libs\linkify-element.min.js" />
|
||||
<Content Include="JS\libs\linkify.min.js" />
|
||||
<Content Include="JS\reader.html" />
|
||||
<Content Include="Assets\ReleaseNotes\190.md" />
|
||||
<None Include="Package.StoreAssociation.xml" />
|
||||
<Content Include="Properties\Default.rd.xml" />
|
||||
<Content Include="Assets\SplashScreen.scale-200.png" />
|
||||
<Content Include="Assets\Square150x150Logo.scale-200.png" />
|
||||
<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" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ApplicationDefinition Include="App.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
</ApplicationDefinition>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\Wino.BackgroundTasks\Wino.BackgroundTasks.csproj">
|
||||
<Project>{d9ef0f59-f5f2-4d6c-a5ba-84043d8f3e08}</Project>
|
||||
<Name>Wino.BackgroundTasks</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\Wino.Core.Domain\Wino.Core.Domain.csproj">
|
||||
<Project>{CF3312E5-5DA0-4867-9945-49EA7598AF1F}</Project>
|
||||
<Name>Wino.Core.Domain</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\Wino.Core.UWP\Wino.Core.UWP.csproj">
|
||||
<Project>{395f19ba-1e42-495c-9db5-1a6f537fccb8}</Project>
|
||||
<Name>Wino.Core.UWP</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\Wino.Core.ViewModels\Wino.Core.ViewModels.csproj">
|
||||
<Project>{53723ae8-7e7e-4d54-adab-0a6033255cc8}</Project>
|
||||
<Name>Wino.Core.ViewModels</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\Wino.Mail.ViewModels\Wino.Mail.ViewModels.csproj">
|
||||
<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>
|
||||
<ProjectReference Include="..\Wino.Services\Wino.Services.csproj">
|
||||
<Project>{4000a374-59fe-4400-acf6-d40473becd73}</Project>
|
||||
<Name>Wino.Services</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<SDKReference Include="WindowsDesktop, Version=10.0.22621.0">
|
||||
<Name>Windows Desktop Extensions for the UWP</Name>
|
||||
</SDKReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup />
|
||||
<PropertyGroup Condition=" '$(VisualStudioVersion)' == '' or '$(VisualStudioVersion)' < '14.0' ">
|
||||
<VisualStudioVersion>14.0</VisualStudioVersion>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(MSBuildExtensionsPath)\Microsoft\WindowsXaml\v$(VisualStudioVersion)\Microsoft.Windows.UI.Xaml.CSharp.targets" />
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
<Target Name="BeforeBuild">
|
||||
</Target>
|
||||
<Target Name="AfterBuild">
|
||||
</Target>
|
||||
-->
|
||||
</Project>
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<PropertyGroup>
|
||||
<OutputType>WinExe</OutputType>
|
||||
<TargetFramework>net9.0-windows10.0.26100.0</TargetFramework>
|
||||
<TargetPlatformMinVersion>10.0.18362.0</TargetPlatformMinVersion>
|
||||
<UseUwp>true</UseUwp>
|
||||
<Platforms>x86;x64;arm64</Platforms>
|
||||
<RuntimeIdentifiers>win-x86;win-x64;win-arm64</RuntimeIdentifiers>
|
||||
<DefaultLanguage>en-US</DefaultLanguage>
|
||||
<!--<PublishAot>true</PublishAot>-->
|
||||
<PublishProfile>win-$(Platform).pubxml</PublishProfile>
|
||||
<DisableRuntimeMarshalling>true</DisableRuntimeMarshalling>
|
||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||
|
||||
<GenerateAppInstallerFile>True</GenerateAppInstallerFile>
|
||||
<AppxPackageSigningEnabled>True</AppxPackageSigningEnabled>
|
||||
<AppxPackageSigningTimestampDigestAlgorithm>SHA256</AppxPackageSigningTimestampDigestAlgorithm>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Compile Remove="BundleArtifacts\**" />
|
||||
<EmbeddedResource Remove="BundleArtifacts\**" />
|
||||
<None Remove="BundleArtifacts\**" />
|
||||
<Page Remove="BundleArtifacts\**" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<PRIResource Remove="BundleArtifacts\**" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Remove="Assets\EML\eml.png" />
|
||||
<None Remove="Assets\NotificationIcons\delete.png" />
|
||||
<None Remove="Assets\NotificationIcons\dismiss.png" />
|
||||
<None Remove="Assets\NotificationIcons\markread.png" />
|
||||
<None Remove="Assets\NotificationIcons\profile-dark.png" />
|
||||
<None Remove="Assets\NotificationIcons\profile-light.png" />
|
||||
<None Remove="Assets\ReleaseNotes\190.md" />
|
||||
<None Remove="Assets\Thumbnails\airbnb.com.png" />
|
||||
<None Remove="Assets\Thumbnails\apple.com.png" />
|
||||
<None Remove="Assets\Thumbnails\google.com.png" />
|
||||
<None Remove="Assets\Thumbnails\microsoft.com.png" />
|
||||
<None Remove="Assets\Thumbnails\steampowered.com.png" />
|
||||
<None Remove="Assets\Thumbnails\uber.com.png" />
|
||||
<None Remove="Assets\Thumbnails\youtube.com.png" />
|
||||
<None Remove="JS\editor.html" />
|
||||
<None Remove="JS\editor.js" />
|
||||
<None Remove="JS\global.css" />
|
||||
<None Remove="JS\libs\darkreader.js" />
|
||||
<None Remove="JS\libs\jodit.min.css" />
|
||||
<None Remove="JS\libs\jodit.min.js" />
|
||||
<None Remove="JS\libs\linkify-element.min.js" />
|
||||
<None Remove="JS\libs\linkify.min.js" />
|
||||
<None Remove="JS\reader.html" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="Assets\EML\eml.png" />
|
||||
<Content Include="Assets\NotificationIcons\delete.png" />
|
||||
<Content Include="Assets\NotificationIcons\dismiss.png" />
|
||||
<Content Include="Assets\NotificationIcons\markread.png" />
|
||||
<Content Include="Assets\NotificationIcons\profile-dark.png" />
|
||||
<Content Include="Assets\NotificationIcons\profile-light.png" />
|
||||
<Content Include="Assets\ReleaseNotes\190.md" />
|
||||
<Content Include="Assets\Thumbnails\airbnb.com.png" />
|
||||
<Content Include="Assets\Thumbnails\apple.com.png" />
|
||||
<Content Include="Assets\Thumbnails\google.com.png" />
|
||||
<Content Include="Assets\Thumbnails\microsoft.com.png" />
|
||||
<Content Include="Assets\Thumbnails\steampowered.com.png" />
|
||||
<Content Include="Assets\Thumbnails\uber.com.png" />
|
||||
<Content Include="Assets\Thumbnails\youtube.com.png" />
|
||||
<Content Include="JS\editor.html" />
|
||||
<Content Include="JS\editor.js" />
|
||||
<Content Include="JS\global.css" />
|
||||
<Content Include="JS\libs\darkreader.js" />
|
||||
<Content Include="JS\libs\jodit.min.css" />
|
||||
<Content Include="JS\libs\jodit.min.js" />
|
||||
<Content Include="JS\libs\linkify-element.min.js" />
|
||||
<Content Include="JS\libs\linkify.min.js" />
|
||||
<Content Include="JS\reader.html" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="ColorHashSharp" />
|
||||
<PackageReference Include="CommunityToolkit.Common" />
|
||||
<PackageReference Include="CommunityToolkit.Diagnostics" />
|
||||
<PackageReference Include="CommunityToolkit.Labs.Uwp.Controls.MarkdownTextBlock" />
|
||||
<PackageReference Include="CommunityToolkit.Mvvm" />
|
||||
<PackageReference Include="CommunityToolkit.Uwp.Animations" />
|
||||
<PackageReference Include="CommunityToolkit.Uwp.Behaviors" />
|
||||
<PackageReference Include="CommunityToolkit.Uwp.Controls.Segmented" />
|
||||
<PackageReference Include="CommunityToolkit.Uwp.Controls.SettingsControls" />
|
||||
<PackageReference Include="CommunityToolkit.Uwp.Controls.Sizers" />
|
||||
<PackageReference Include="CommunityToolkit.Uwp.Controls.TabbedCommandBar" />
|
||||
<PackageReference Include="CommunityToolkit.Uwp.Controls.TokenizingTextBox" />
|
||||
<PackageReference Include="CommunityToolkit.Uwp.Extensions" />
|
||||
<PackageReference Include="EmailValidation" />
|
||||
<PackageReference Include="Microsoft.AppCenter.Analytics" />
|
||||
<PackageReference Include="Microsoft.AppCenter.Crashes" />
|
||||
<PackageReference Include="Microsoft.Extensions.DependencyInjection" />
|
||||
<PackageReference Include="Microsoft.Identity.Client" />
|
||||
<PackageReference Include="Microsoft.UI.Xaml" />
|
||||
<PackageReference Include="Microsoft.Xaml.Behaviors.Uwp.Managed" />
|
||||
<PackageReference Include="Nito.AsyncEx" />
|
||||
<PackageReference Include="Serilog" />
|
||||
<PackageReference Include="Serilog.Exceptions" />
|
||||
<PackageReference Include="sqlite-net-pcl" />
|
||||
<PackageReference Include="Win2D.uwp" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\Wino.Core.Domain\Wino.Core.Domain.csproj" />
|
||||
<ProjectReference Include="..\Wino.Core.UWP\Wino.Core.UWP.csproj" />
|
||||
<ProjectReference Include="..\Wino.Core.ViewModels\Wino.Core.ViewModels.csproj" />
|
||||
<ProjectReference Include="..\Wino.Mail.ViewModels\Wino.Mail.ViewModels.csproj" />
|
||||
<ProjectReference Include="..\Wino.Services\Wino.Services.csproj" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
|
||||
@@ -1,25 +0,0 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio Version 17
|
||||
VisualStudioVersion = 17.5.002.0
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Wino.Mail", "Wino.Mail.csproj", "{0B5C02DC-6B11-437C-9C46-EAB6430C3155}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
Release|Any CPU = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{0B5C02DC-6B11-437C-9C46-EAB6430C3155}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{0B5C02DC-6B11-437C-9C46-EAB6430C3155}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{0B5C02DC-6B11-437C-9C46-EAB6430C3155}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{0B5C02DC-6B11-437C-9C46-EAB6430C3155}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {0254B19E-9B52-4594-9F8A-8616BE750243}
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
@@ -1,12 +0,0 @@
|
||||
using System;
|
||||
using Wino.Core.Domain.Interfaces;
|
||||
|
||||
namespace Wino.Messaging.Client.Authorization
|
||||
{
|
||||
/// <summary>
|
||||
/// When Google authentication makes a callback to the app via protocol activation to the app.
|
||||
/// App will send this message back to server to continue authorization there.
|
||||
/// </summary>
|
||||
/// <param name="AuthorizationResponseUri">Callback Uri that Google returned.</param>
|
||||
public record ProtocolAuthorizationCallbackReceived(Uri AuthorizationResponseUri) : IClientMessage;
|
||||
}
|
||||
26
Wino.Messages/CommunicationMessagesContext.cs
Normal file
26
Wino.Messages/CommunicationMessagesContext.cs
Normal file
@@ -0,0 +1,26 @@
|
||||
using System.Text.Json.Serialization;
|
||||
using Wino.Messaging.UI;
|
||||
|
||||
namespace Wino.Messaging;
|
||||
|
||||
[JsonSourceGenerationOptions(WriteIndented = true)]
|
||||
[JsonSerializable(typeof(MailAddedMessage))]
|
||||
[JsonSerializable(typeof(MailDownloadedMessage))]
|
||||
[JsonSerializable(typeof(MailRemovedMessage))]
|
||||
[JsonSerializable(typeof(MailUpdatedMessage))]
|
||||
[JsonSerializable(typeof(AccountCreatedMessage))]
|
||||
[JsonSerializable(typeof(AccountRemovedMessage))]
|
||||
[JsonSerializable(typeof(AccountUpdatedMessage))]
|
||||
[JsonSerializable(typeof(DraftCreated))]
|
||||
[JsonSerializable(typeof(DraftFailed))]
|
||||
[JsonSerializable(typeof(DraftMapped))]
|
||||
[JsonSerializable(typeof(FolderRenamed))]
|
||||
[JsonSerializable(typeof(FolderSynchronizationEnabled))]
|
||||
[JsonSerializable(typeof(MergedInboxRenamed))]
|
||||
[JsonSerializable(typeof(AccountSynchronizationCompleted))]
|
||||
[JsonSerializable(typeof(RefreshUnreadCountsMessage))]
|
||||
[JsonSerializable(typeof(AccountSynchronizerStateChanged))]
|
||||
[JsonSerializable(typeof(AccountSynchronizationProgressUpdatedMessage))]
|
||||
[JsonSerializable(typeof(AccountFolderConfigurationUpdated))]
|
||||
[JsonSerializable(typeof(CopyAuthURLRequested))]
|
||||
public partial class CommunicationMessagesContext : JsonSerializerContext;
|
||||
@@ -1,24 +1,18 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>netstandard2.0</TargetFramework>
|
||||
<LangVersion>12</LangVersion>
|
||||
<Platforms>AnyCPU;x64;x86</Platforms>
|
||||
|
||||
<AccelerateBuildsInVisualStudio>true</AccelerateBuildsInVisualStudio>
|
||||
<ProduceReferenceAssembly>true</ProduceReferenceAssembly>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\Wino.Core.Domain\Wino.Core.Domain.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net9.0</TargetFramework>
|
||||
<Platforms>x86;x64;arm64</Platforms>
|
||||
<RuntimeIdentifiers>win-x86;win-x64;win-arm64</RuntimeIdentifiers>
|
||||
<AccelerateBuildsInVisualStudio>true</AccelerateBuildsInVisualStudio>
|
||||
<ProduceReferenceAssembly>true</ProduceReferenceAssembly>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="IsExternalInit" Version="1.0.3">
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||
</PackageReference>
|
||||
<PackageReference Include="System.Text.Json" Version="8.0.5" />
|
||||
<ProjectReference Include="..\Wino.Core.Domain\Wino.Core.Domain.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="System.Text.Json" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Folder Include="Client\Authorization\" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
@@ -1,6 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="15.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup Condition="'$(VisualStudioVersion)' == '' or '$(VisualStudioVersion)' < '15.0'">
|
||||
|
||||
<VisualStudioVersion>15.0</VisualStudioVersion>
|
||||
</PropertyGroup>
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
@@ -30,13 +31,17 @@
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<PropertyGroup>
|
||||
<DebuggerFlavor>AppHostLocalDebugger</DebuggerFlavor>
|
||||
<RemoteDebugEnabled>False</RemoteDebugEnabled>
|
||||
<DebuggerType>CoreClr</DebuggerType>
|
||||
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
|
||||
<WapProjPath Condition="'$(WapProjPath)'==''">$(MSBuildExtensionsPath)\Microsoft\DesktopBridge\</WapProjPath>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(WapProjPath)\Microsoft.DesktopBridge.props" />
|
||||
<PropertyGroup>
|
||||
<ProjectGuid>760f5f31-8ee3-4b83-80f3-0e4ffbcc737c</ProjectGuid>
|
||||
<TargetPlatformVersion>10.0.22621.0</TargetPlatformVersion>
|
||||
<TargetPlatformMinVersion>10.0.17763.0</TargetPlatformMinVersion>
|
||||
<TargetPlatformMinVersion>10.0.18362.0</TargetPlatformMinVersion>
|
||||
<DefaultLanguage>en-US</DefaultLanguage>
|
||||
<AppxPackageSigningEnabled>false</AppxPackageSigningEnabled>
|
||||
<NoWarn>$(NoWarn);NU1702</NoWarn>
|
||||
@@ -129,10 +134,13 @@
|
||||
</ItemGroup>
|
||||
<Import Project="$(WapProjPath)\Microsoft.DesktopBridge.targets" />
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\Wino.Mail\Wino.Mail.csproj" />
|
||||
<ProjectReference Include="..\Wino.Mail\Wino.Mail.csproj">
|
||||
<UseLowTrustEntryPoint>True</UseLowTrustEntryPoint>
|
||||
<SkipGetTargetFrameworkProperties>True</SkipGetTargetFrameworkProperties>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\Wino.Server\Wino.Server.csproj" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.Identity.Client" Version="4.66.2" />
|
||||
<PackageReference Include="Microsoft.Identity.Client" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
@@ -2,7 +2,6 @@
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Wino.Core.Domain.Models.Requests;
|
||||
using Wino.Core.Domain.Models.Synchronization;
|
||||
using Wino.Messaging.Client.Authorization;
|
||||
using Wino.Messaging.Server;
|
||||
using Wino.Server.MessageHandlers;
|
||||
|
||||
@@ -19,7 +18,6 @@ namespace Wino.Server.Core
|
||||
nameof(ServerRequestPackage) => App.Current.Services.GetService<UserActionRequestHandler>(),
|
||||
nameof(DownloadMissingMessageRequested) => App.Current.Services.GetService<SingleMimeDownloadHandler>(),
|
||||
nameof(AuthorizationRequested) => App.Current.Services.GetService<AuthenticationHandler>(),
|
||||
nameof(ProtocolAuthorizationCallbackReceived) => App.Current.Services.GetService<ProtocolAuthActivationHandler>(),
|
||||
nameof(SynchronizationExistenceCheckRequest) => App.Current.Services.GetService<SyncExistenceHandler>(),
|
||||
nameof(ServerTerminationModeChanged) => App.Current.Services.GetService<ServerTerminationModeHandler>(),
|
||||
nameof(TerminateServerRequested) => App.Current.Services.GetService<TerminateServerRequestHandler>(),
|
||||
@@ -37,7 +35,6 @@ namespace Wino.Server.Core
|
||||
serviceCollection.AddTransient<UserActionRequestHandler>();
|
||||
serviceCollection.AddTransient<SingleMimeDownloadHandler>();
|
||||
serviceCollection.AddTransient<AuthenticationHandler>();
|
||||
serviceCollection.AddTransient<ProtocolAuthActivationHandler>();
|
||||
serviceCollection.AddTransient<SyncExistenceHandler>();
|
||||
serviceCollection.AddTransient<ServerTerminationModeHandler>();
|
||||
serviceCollection.AddTransient<TerminateServerRequestHandler>();
|
||||
|
||||
@@ -1,29 +0,0 @@
|
||||
using System;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using Wino.Core.Domain.Interfaces;
|
||||
using Wino.Core.Domain.Models.Server;
|
||||
using Wino.Messaging.Client.Authorization;
|
||||
using Wino.Server.Core;
|
||||
|
||||
namespace Wino.Server.MessageHandlers
|
||||
{
|
||||
public class ProtocolAuthActivationHandler : ServerMessageHandler<ProtocolAuthorizationCallbackReceived, bool>
|
||||
{
|
||||
public override WinoServerResponse<bool> FailureDefaultResponse(Exception ex) => WinoServerResponse<bool>.CreateErrorResponse(ex.Message);
|
||||
|
||||
private readonly INativeAppService _nativeAppService;
|
||||
|
||||
public ProtocolAuthActivationHandler(INativeAppService nativeAppService)
|
||||
{
|
||||
_nativeAppService = nativeAppService;
|
||||
}
|
||||
|
||||
protected override Task<WinoServerResponse<bool>> HandleAsync(ProtocolAuthorizationCallbackReceived message, CancellationToken cancellationToken = default)
|
||||
{
|
||||
_nativeAppService.ContinueAuthorization(message.AuthorizationResponseUri);
|
||||
|
||||
return Task.FromResult(WinoServerResponse<bool>.CreateSuccessResponse(true));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -14,7 +14,6 @@ using Wino.Core.Domain.Models.Requests;
|
||||
using Wino.Core.Domain.Models.Synchronization;
|
||||
using Wino.Core.Integration.Json;
|
||||
using Wino.Messaging;
|
||||
using Wino.Messaging.Client.Authorization;
|
||||
using Wino.Messaging.Enums;
|
||||
using Wino.Messaging.Server;
|
||||
using Wino.Messaging.UI;
|
||||
@@ -306,12 +305,6 @@ namespace Wino.Server
|
||||
|
||||
await ExecuteServerMessageSafeAsync(args, JsonSerializer.Deserialize<AuthorizationRequested>(messageJson, _jsonSerializerOptions));
|
||||
break;
|
||||
case nameof(ProtocolAuthorizationCallbackReceived):
|
||||
Debug.WriteLine($"Continuing authorization from protocol activation.");
|
||||
|
||||
await ExecuteServerMessageSafeAsync(args, JsonSerializer.Deserialize<ProtocolAuthorizationCallbackReceived>(messageJson, _jsonSerializerOptions));
|
||||
break;
|
||||
|
||||
case nameof(SynchronizationExistenceCheckRequest):
|
||||
|
||||
await ExecuteServerMessageSafeAsync(args, JsonSerializer.Deserialize<SynchronizationExistenceCheckRequest>(messageJson, _jsonSerializerOptions));
|
||||
|
||||
@@ -1,49 +1,49 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net8.0-windows10.0.22621.0</TargetFramework>
|
||||
<TargetPlatformMinVersion>10.0.19041.0</TargetPlatformMinVersion>
|
||||
<OutputType>WinExe</OutputType>
|
||||
<GenerateAssemblyInfo>true</GenerateAssemblyInfo>
|
||||
<UseWPF>true</UseWPF>
|
||||
<ImportWindowsDesktopTargets>true</ImportWindowsDesktopTargets>
|
||||
|
||||
<CsWinRTComponent>true</CsWinRTComponent>
|
||||
<CsWinRTWindowsMetadata>10.0.22621.0</CsWinRTWindowsMetadata>
|
||||
<Platforms>x64;x86;ARM32;ARM64</Platforms>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<StartupObject>Wino.Server.App</StartupObject>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<None Remove="Images\Wino_Icon.ico" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="..\Wino.Mail\Services\MailAuthenticatorConfiguration.cs" Link="Services\MailAuthenticatorConfiguration.cs" />
|
||||
<Compile Include="..\Wino.Calendar\Services\CalendarAuthenticatorConfig.cs" Link="Services\CalendarAuthenticatorConfig.cs" />
|
||||
<Compile Include="..\Wino.Core.UWP\Services\ConfigurationService.cs" Link="Services\ConfigurationService.cs" />
|
||||
<Compile Include="..\Wino.Core.UWP\Services\NativeAppService.cs" Link="Services\NativeAppService.cs" />
|
||||
<Compile Include="..\Wino.Core.UWP\Services\PreferencesService.cs" Link="Services\PreferencesService.cs" />
|
||||
<Compile Include="..\Wino.Core.UWP\Services\NotificationBuilder.cs" Link="Services\NotificationBuilder.cs" />
|
||||
<Compile Include="..\Wino.Core.UWP\Services\UnderlyingThemeService.cs" Link="Services\UnderlyingThemeService.cs" />
|
||||
<Compile Include="..\Wino.Core.UWP\Services\ThumbnailService.cs" Link="Services\ThumbnailService.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Images\Wino_Icon.ico">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</Resource>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="CommunityToolkit.Mvvm" Version="8.3.2" />
|
||||
<PackageReference Include="H.NotifyIcon.Wpf" Version="2.1.4" />
|
||||
<PackageReference Include="CommunityToolkit.WinUI.Notifications" Version="7.1.2" />
|
||||
<PackageReference Include="Microsoft.Identity.Client" Version="4.66.2" />
|
||||
<PackageReference Include="System.Text.Encoding.CodePages" Version="8.0.0" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\Wino.Authentication\Wino.Authentication.csproj" />
|
||||
<ProjectReference Include="..\Wino.Core.Domain\Wino.Core.Domain.csproj" />
|
||||
<ProjectReference Include="..\Wino.Core\Wino.Core.csproj" />
|
||||
<ProjectReference Include="..\Wino.Messages\Wino.Messaging.csproj" />
|
||||
<ProjectReference Include="..\Wino.Services\Wino.Services.csproj" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net9.0-windows10.0.19041.0</TargetFramework>
|
||||
<TargetPlatformMinVersion>10.0.19041.0</TargetPlatformMinVersion>
|
||||
<OutputType>WinExe</OutputType>
|
||||
<GenerateAssemblyInfo>true</GenerateAssemblyInfo>
|
||||
<UseWPF>true</UseWPF>
|
||||
<ImportWindowsDesktopTargets>true</ImportWindowsDesktopTargets>
|
||||
<CsWinRTComponent>true</CsWinRTComponent>
|
||||
<CsWinRTWindowsMetadata>10.0.22621.0</CsWinRTWindowsMetadata>
|
||||
<Platforms>x64;x86;ARM64</Platforms>
|
||||
<IsAotCompatible>false</IsAotCompatible>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<StartupObject>Wino.Server.App</StartupObject>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<None Remove="Images\Wino_Icon.ico" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="..\Wino.Mail\Services\MailAuthenticatorConfiguration.cs" Link="Services\MailAuthenticatorConfiguration.cs" />
|
||||
<Compile Include="..\Wino.Calendar\Services\CalendarAuthenticatorConfig.cs" Link="Services\CalendarAuthenticatorConfig.cs" />
|
||||
<Compile Include="..\Wino.Core.UWP\Services\ConfigurationService.cs" Link="Services\ConfigurationService.cs" />
|
||||
<Compile Include="..\Wino.Core.UWP\Services\NativeAppService.cs" Link="Services\NativeAppService.cs" />
|
||||
<Compile Include="..\Wino.Core.UWP\Services\PreferencesService.cs" Link="Services\PreferencesService.cs" />
|
||||
<Compile Include="..\Wino.Core.UWP\Services\NotificationBuilder.cs" Link="Services\NotificationBuilder.cs" />
|
||||
<Compile Include="..\Wino.Core.UWP\Services\UnderlyingThemeService.cs" Link="Services\UnderlyingThemeService.cs" />
|
||||
<Compile Include="..\Wino.Core.UWP\Services\ThumbnailService.cs" Link="Services\ThumbnailService.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Images\Wino_Icon.ico">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</Resource>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="CommunityToolkit.Mvvm" />
|
||||
<PackageReference Include="H.NotifyIcon.Wpf" />
|
||||
<PackageReference Include="CommunityToolkit.WinUI.Notifications" />
|
||||
<PackageReference Include="Microsoft.Identity.Client" />
|
||||
<PackageReference Include="System.Text.Encoding.CodePages" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\Wino.Authentication\Wino.Authentication.csproj" />
|
||||
<ProjectReference Include="..\Wino.Core.Domain\Wino.Core.Domain.csproj" />
|
||||
<ProjectReference Include="..\Wino.Core\Wino.Core.csproj" />
|
||||
<ProjectReference Include="..\Wino.Messages\Wino.Messaging.csproj" />
|
||||
<ProjectReference Include="..\Wino.Services\Wino.Services.csproj" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
@@ -303,7 +303,7 @@ namespace Wino.Services
|
||||
|
||||
private HashSet<SpecialFolderType> FindCommonFolders(List<List<MailItemFolder>> lists)
|
||||
{
|
||||
var allSpecialTypesExceptOther = Enum.GetValues(typeof(SpecialFolderType)).Cast<SpecialFolderType>().Where(a => a != SpecialFolderType.Other).ToList();
|
||||
var allSpecialTypesExceptOther = Enum.GetValues<SpecialFolderType>().Cast<SpecialFolderType>().Where(a => a != SpecialFolderType.Other).ToList();
|
||||
|
||||
// Start with all special folder types from the first list
|
||||
var commonSpecialFolderTypes = new HashSet<SpecialFolderType>(allSpecialTypesExceptOther);
|
||||
|
||||
@@ -40,11 +40,11 @@ namespace Wino.Services
|
||||
if (ignoreCurrentLanguageCheck && isInitialized) return;
|
||||
|
||||
var currentDictionary = Translator.Resources;
|
||||
using var resourceStream = currentDictionary.GetLanguageStream(language);
|
||||
await using var resourceStream = Core.Domain.Translations.WinoTranslationDictionary.GetLanguageStream(language);
|
||||
|
||||
var stremValue = await new StreamReader(resourceStream).ReadToEndAsync().ConfigureAwait(false);
|
||||
var streamValue = await new StreamReader(resourceStream).ReadToEndAsync().ConfigureAwait(false);
|
||||
|
||||
var translationLookups = JsonSerializer.Deserialize<Dictionary<string, string>>(stremValue);
|
||||
var translationLookups = JsonSerializer.Deserialize(streamValue, BasicTypesJsonContext.Default.DictionaryStringString);
|
||||
|
||||
// Insert new translation key-value pairs.
|
||||
// Overwrite existing values for the same keys.
|
||||
@@ -52,14 +52,7 @@ namespace Wino.Services
|
||||
foreach (var pair in translationLookups)
|
||||
{
|
||||
// Replace existing value.
|
||||
if (currentDictionary.ContainsKey(pair.Key))
|
||||
{
|
||||
currentDictionary[pair.Key] = pair.Value;
|
||||
}
|
||||
else
|
||||
{
|
||||
currentDictionary.Add(pair.Key, pair.Value);
|
||||
}
|
||||
currentDictionary[pair.Key] = pair.Value;
|
||||
}
|
||||
|
||||
_preferencesService.CurrentLanguage = language;
|
||||
|
||||
@@ -1,25 +1,22 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>netstandard2.0</TargetFramework>
|
||||
<LangVersion>12.0</LangVersion>
|
||||
<ProduceReferenceAssembly>true</ProduceReferenceAssembly>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="HtmlAgilityPack" Version="1.11.70" />
|
||||
<PackageReference Include="Ical.Net" Version="4.3.1" />
|
||||
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="8.0.2" />
|
||||
<PackageReference Include="Serilog" Version="4.1.0" />
|
||||
<PackageReference Include="Serilog.Sinks.Debug" Version="3.0.0" />
|
||||
<PackageReference Include="Serilog.Sinks.File" Version="6.0.0" />
|
||||
<PackageReference Include="Serilog.Exceptions" Version="8.4.0" />
|
||||
<PackageReference Include="SqlKata" Version="2.4.0" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\Wino.Core.Domain\Wino.Core.Domain.csproj" />
|
||||
<ProjectReference Include="..\Wino.Messages\Wino.Messaging.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net9.0</TargetFramework>
|
||||
<Platforms>x86;x64;arm64</Platforms>
|
||||
<RuntimeIdentifiers>win-x86;win-x64;win-arm64</RuntimeIdentifiers>
|
||||
<ProduceReferenceAssembly>true</ProduceReferenceAssembly>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="HtmlAgilityPack" />
|
||||
<PackageReference Include="Ical.Net" />
|
||||
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" />
|
||||
<PackageReference Include="Serilog" />
|
||||
<PackageReference Include="Serilog.Sinks.Debug" />
|
||||
<PackageReference Include="Serilog.Sinks.File" />
|
||||
<PackageReference Include="Serilog.Exceptions" />
|
||||
<PackageReference Include="SqlKata" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\Wino.Core.Domain\Wino.Core.Domain.csproj" />
|
||||
<ProjectReference Include="..\Wino.Messages\Wino.Messaging.csproj" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
@@ -2,11 +2,11 @@
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>netstandard2.0</TargetFramework>
|
||||
<LangVersion>latest</LangVersion>
|
||||
<Nullable>enable</Nullable>
|
||||
<IncludeBuildOutput>false</IncludeBuildOutput>
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<EnforceExtendedAnalyzerRules>true</EnforceExtendedAnalyzerRules>
|
||||
<IsAotCompatible>false</IsAotCompatible>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup Condition="'$(Configuration)' == 'Debug'">
|
||||
@@ -18,9 +18,9 @@
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="4.11.0" PrivateAssets="all" />
|
||||
<PackageReference Include="Microsoft.CodeAnalysis.Analyzers" Version="3.11.0" PrivateAssets="all" />
|
||||
<PackageReference Include="System.Text.Json" Version="8.0.5" PrivateAssets="all" />
|
||||
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" PrivateAssets="all" />
|
||||
<PackageReference Include="Microsoft.CodeAnalysis.Analyzers" PrivateAssets="all" />
|
||||
<PackageReference Include="System.Text.Json" PrivateAssets="all" />
|
||||
</ItemGroup>
|
||||
|
||||
<PropertyGroup>
|
||||
|
||||
BIN
WinoMail.Packaging/Images/LargeTile.scale-100.png
Normal file
BIN
WinoMail.Packaging/Images/LargeTile.scale-100.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 8.9 KiB |
BIN
WinoMail.Packaging/Images/LargeTile.scale-125.png
Normal file
BIN
WinoMail.Packaging/Images/LargeTile.scale-125.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 12 KiB |
BIN
WinoMail.Packaging/Images/LargeTile.scale-150.png
Normal file
BIN
WinoMail.Packaging/Images/LargeTile.scale-150.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 17 KiB |
BIN
WinoMail.Packaging/Images/LargeTile.scale-200.png
Normal file
BIN
WinoMail.Packaging/Images/LargeTile.scale-200.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 26 KiB |
BIN
WinoMail.Packaging/Images/LargeTile.scale-400.png
Normal file
BIN
WinoMail.Packaging/Images/LargeTile.scale-400.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 100 KiB |
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user