* create "About" page in settings * add content to About page * Get latest version from GitHub * Add NotificationService to servies * Enable actions on notifications * Get latest version asynchroniously * Handle when latest version is not found and clean code * Remove old UpdateService * Remove old NotificationService * Add icon for about tab * Update About page styling * Make About menu item a footer menu item * Update About page layout Based on suggestions by @felixse * Instatiate temporary navigation item only once This seems to solve display issues when opening the "About" page multiple times where the main navigation list is being rerendered for no apparent reason. * Revert unintended changes * Added shortcut to about page in hamburger menu * Move About page properties to the AboutPageViewModel * Make "loading..." and "Not found" italic to indicate non-default behaviour * move update check back to systemtray * Made IUpdateService async
44 lines
2.2 KiB
C#
44 lines
2.2 KiB
C#
using FluentTerminal.App.Services;
|
|
using FluentTerminal.App.ViewModels.Settings;
|
|
using GalaSoft.MvvmLight;
|
|
using System;
|
|
|
|
namespace FluentTerminal.App.ViewModels
|
|
{
|
|
public class SettingsViewModel : ViewModelBase
|
|
{
|
|
public SettingsViewModel(ISettingsService settingsService, IDefaultValueProvider defaultValueProvider, IDialogService dialogService,
|
|
ITrayProcessCommunicationService trayProcessCommunicationService, IThemeParserFactory themeParserFactory, ISystemFontService systemFontService,
|
|
IFileSystemService fileSystemService, IStartupTaskService startupTaskService, IUpdateService updateService, IApplicationView applicationView)
|
|
{
|
|
About = new AboutPageViewModel(settingsService, updateService, applicationView);
|
|
KeyBindings = new KeyBindingsPageViewModel(settingsService, dialogService, defaultValueProvider, trayProcessCommunicationService);
|
|
General = new GeneralPageViewModel(settingsService, dialogService, defaultValueProvider, startupTaskService);
|
|
Shell = new ProfilesPageViewModel(settingsService, dialogService, defaultValueProvider, fileSystemService);
|
|
Terminal = new TerminalPageViewModel(settingsService, dialogService, defaultValueProvider, systemFontService);
|
|
Themes = new ThemesPageViewModel(settingsService, dialogService, defaultValueProvider, themeParserFactory, fileSystemService);
|
|
Mouse = new MousePageViewModel(settingsService, dialogService, defaultValueProvider);
|
|
}
|
|
|
|
public event EventHandler Closed;
|
|
public event EventHandler AboutPageRequested;
|
|
|
|
public GeneralPageViewModel General { get; }
|
|
public KeyBindingsPageViewModel KeyBindings { get; }
|
|
public ProfilesPageViewModel Shell { get; }
|
|
public TerminalPageViewModel Terminal { get; }
|
|
public ThemesPageViewModel Themes { get; }
|
|
public MousePageViewModel Mouse { get; }
|
|
public AboutPageViewModel About { get; }
|
|
|
|
public void NavigateToAboutPage()
|
|
{
|
|
AboutPageRequested?.Invoke(this, EventArgs.Empty);
|
|
}
|
|
|
|
public void Close()
|
|
{
|
|
Closed?.Invoke(this, EventArgs.Empty);
|
|
}
|
|
}
|
|
} |