Calendar account management page basics.

This commit is contained in:
Burak Kaan Köse
2024-11-11 01:09:05 +01:00
parent 5b0fcd77e5
commit 418eeb7317
34 changed files with 515 additions and 184 deletions

View File

@@ -1,4 +1,5 @@
using System;
using System.Collections.Generic;
using System.Threading;
using System.Threading.Tasks;
using CommunityToolkit.Mvvm.Messaging;
@@ -11,6 +12,8 @@ using Windows.UI.Xaml.Controls;
using Wino.Core.Domain;
using Wino.Core.Domain.Enums;
using Wino.Core.Domain.Interfaces;
using Wino.Core.Domain.Models.Accounts;
using Wino.Core.UWP.Dialogs;
using Wino.Core.UWP.Extensions;
using Wino.Dialogs;
using Wino.Messaging.Client.Shell;
@@ -54,6 +57,14 @@ namespace Wino.Core.UWP.Services
return file;
}
public virtual IAccountCreationDialog GetAccountCreationDialog(MailProviderType type)
{
return new AccountCreationDialog
{
RequestedTheme = ThemeService.RootTheme.ToWindowsElementTheme()
};
}
public async Task<byte[]> PickWindowsFileContentAsync(params object[] typeFilters)
{
var file = await PickFileAsync(typeFilters);
@@ -201,5 +212,18 @@ namespace Wino.Core.UWP.Services
return dialogResult == ContentDialogResult.Primary;
}
public async Task<AccountCreationDialogResult> ShowAccountProviderSelectionDialogAsync(List<IProviderDetail> availableProviders)
{
var dialog = new NewAccountDialog
{
Providers = availableProviders,
RequestedTheme = ThemeService.RootTheme.ToWindowsElementTheme()
};
await HandleDialogPresentationAsync(dialog);
return dialog.Result;
}
}
}

View File

@@ -288,6 +288,8 @@ namespace Wino.Core.UWP.Services
if (Status != WinoServerConnectionStatus.Connected)
await ConnectAsync();
if (Connection == null) return WinoServerResponse<TResponse>.CreateErrorResponse("Server connection is not established.");
string serializedMessage = string.Empty;
try