2024-04-27 15:27:02 +02:00
|
|
|
|
using System;
|
|
|
|
|
|
using CommunityToolkit.Mvvm.Input;
|
2024-04-18 01:44:37 +02:00
|
|
|
|
using CommunityToolkit.Mvvm.Messaging;
|
2024-04-27 15:27:02 +02:00
|
|
|
|
using Wino.Core.Domain;
|
2024-04-18 01:44:37 +02:00
|
|
|
|
using Wino.Core.Domain.Enums;
|
|
|
|
|
|
using Wino.Core.Domain.Interfaces;
|
2024-08-05 00:36:26 +02:00
|
|
|
|
using Wino.Messaging.Client.Navigation;
|
2024-04-18 01:44:37 +02:00
|
|
|
|
|
|
|
|
|
|
namespace Wino.Mail.ViewModels
|
|
|
|
|
|
{
|
2024-07-18 20:04:11 +02:00
|
|
|
|
public partial class SettingOptionsPageViewModel(IDialogService dialogService) : BaseViewModel(dialogService)
|
2024-04-18 01:44:37 +02:00
|
|
|
|
{
|
|
|
|
|
|
[RelayCommand]
|
|
|
|
|
|
private void GoAccountSettings() => Messenger.Send<NavigateSettingsRequested>();
|
|
|
|
|
|
|
|
|
|
|
|
[RelayCommand]
|
|
|
|
|
|
public void NavigateSubDetail(object type)
|
|
|
|
|
|
{
|
2024-04-27 15:27:02 +02:00
|
|
|
|
if (type is WinoPage pageType)
|
2024-04-18 01:44:37 +02:00
|
|
|
|
{
|
2024-04-27 15:27:02 +02:00
|
|
|
|
string pageTitle = pageType switch
|
|
|
|
|
|
{
|
|
|
|
|
|
WinoPage.PersonalizationPage => Translator.SettingsPersonalization_Title,
|
|
|
|
|
|
WinoPage.AboutPage => Translator.SettingsAbout_Title,
|
|
|
|
|
|
WinoPage.MessageListPage => Translator.SettingsMessageList_Title,
|
2024-07-18 20:04:11 +02:00
|
|
|
|
WinoPage.ReadComposePanePage => Translator.SettingsReadComposePane_Title,
|
2024-04-27 15:27:02 +02:00
|
|
|
|
WinoPage.LanguageTimePage => Translator.SettingsLanguageTime_Title,
|
2024-08-05 00:36:26 +02:00
|
|
|
|
WinoPage.AppPreferencesPage => Translator.SettingsAppPreferences_Title,
|
2024-04-27 15:27:02 +02:00
|
|
|
|
_ => throw new NotImplementedException()
|
|
|
|
|
|
};
|
2024-04-18 01:44:37 +02:00
|
|
|
|
|
|
|
|
|
|
Messenger.Send(new BreadcrumbNavigationRequested(pageTitle, pageType));
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|