Merge branch 'review2-p1-desktop-about' into claude/owner-review-2-p1
This commit is contained in:
commit
a11fe8d27a
143 files changed
+187
-498
No files matched your search
+5
-28
@@ -1,26 +1,24 @@
|
||||
using System.IO;
|
||||
using System.Reflection;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Windows.Input;
|
||||
using Chronos.App.About;
|
||||
using Chronos.App.Infrastructure;
|
||||
using Chronos.App.Shell;
|
||||
using Chronos.Core.Localization;
|
||||
using Chronos.Ui.Controls;
|
||||
using Chronos.Ui.Mvvm;
|
||||
|
||||
namespace Chronos.App.Sections;
|
||||
namespace Chronos.App.About;
|
||||
|
||||
/// <summary>
|
||||
/// About (BRIEF §12.9): version and build, licence link, third-party notice (none), translation notice,
|
||||
/// diagnostics bundle and the update notice of <see cref="UpdateFlow"/> (BRIEF §18), which Settings › Updates shows too.
|
||||
/// What Settings › About (BRIEF §12.9: version and build, licence link, third-party notice, translation notice) and
|
||||
/// Settings › Updates (the releases page and the update notice of <see cref="UpdateFlow"/>, BRIEF §18) show. The shell
|
||||
/// owns it, so the update check on start runs whatever screen is open; it is no section of the rail (owner review 2, R5).
|
||||
/// </summary>
|
||||
public sealed class AboutViewModel : SectionViewModel
|
||||
public sealed class AboutViewModel : LocalizedViewModel
|
||||
{
|
||||
private readonly UpdateFlow _update;
|
||||
|
||||
public AboutViewModel(ShellViewModel shell)
|
||||
: base(SectionKey.About, "Icon.About")
|
||||
{
|
||||
Shell = shell;
|
||||
var environment = shell.Services.Environment;
|
||||
@@ -37,8 +35,6 @@ public sealed class AboutViewModel : SectionViewModel
|
||||
OpenReleasesCommand = new RelayCommand(() => ShellActions.OpenUrl(ProductLinks.Releases));
|
||||
OpenLicenceCommand = new RelayCommand(() => ShellActions.OpenUrl(ProductLinks.Licence));
|
||||
ReviewTranslationCommand = new RelayCommand(() => ShellActions.OpenUrl(ProductLinks.Issues));
|
||||
OpenDataFolderCommand = new RelayCommand(() => ShellActions.Reveal(DataFolder));
|
||||
DiagnosticsCommand = new AsyncRelayCommand(DiagnosticsAsync);
|
||||
}
|
||||
|
||||
public ShellViewModel Shell { get; }
|
||||
@@ -53,8 +49,6 @@ public sealed class AboutViewModel : SectionViewModel
|
||||
|
||||
public string OperatingSystem => RuntimeInformation.OSDescription;
|
||||
|
||||
public string DataFolder => Shell.Services.Environment.DataDirectory;
|
||||
|
||||
/// <summary>Every language but English is machine-translated and open to review (BRIEF §16).</summary>
|
||||
public bool IsTranslated => !Loc.Culture.TwoLetterISOLanguageName.Equals("en", StringComparison.OrdinalIgnoreCase);
|
||||
|
||||
@@ -65,8 +59,6 @@ public sealed class AboutViewModel : SectionViewModel
|
||||
public ICommand OpenReleasesCommand { get; }
|
||||
public ICommand OpenLicenceCommand { get; }
|
||||
public ICommand ReviewTranslationCommand { get; }
|
||||
public ICommand OpenDataFolderCommand { get; }
|
||||
public ICommand DiagnosticsCommand { get; }
|
||||
|
||||
/// <summary>"Up to date", "Chronos 0.2.0 available", …; null before the first check.</summary>
|
||||
public string? UpdateText => _update.State switch
|
||||
@@ -123,21 +115,6 @@ public sealed class AboutViewModel : SectionViewModel
|
||||
actionToolTip: DownloadToolTip, action: () => DownloadCommand.Execute(null));
|
||||
}
|
||||
|
||||
private async Task DiagnosticsAsync()
|
||||
{
|
||||
var folder = Shell.Services.Dialogs.PickFolder(Loc.L("Settings.Advanced.DiagnosticsTitle"));
|
||||
if (folder is null) return;
|
||||
try
|
||||
{
|
||||
var path = await DiagnosticsBundle.CreateAsync(Shell.Services, folder);
|
||||
Shell.Notify(Loc.L("Settings.Advanced.DiagnosticsDone"), Path.GetFileName(path), Loc.L("Library.Export.Show"), Loc.L("Tooltips.Library.ShowExport"), () => ShellActions.Reveal(path));
|
||||
}
|
||||
catch (Exception ex) when (ex is IOException or UnauthorizedAccessException or Chronos.Data.DatabaseException)
|
||||
{
|
||||
Shell.ReportError(ex);
|
||||
}
|
||||
}
|
||||
|
||||
private void RaiseUpdate()
|
||||
{
|
||||
OnPropertyChanged(nameof(UpdateText));
|
||||
@@ -1,82 +0,0 @@
|
||||
<UserControl x:Class="Chronos.App.Sections.AboutView"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:ui="clr-namespace:Chronos.Ui.Controls;assembly=Chronos.Ui"
|
||||
xmlns:l="clr-namespace:Chronos.Ui.Localization;assembly=Chronos.Ui"
|
||||
xmlns:infra="clr-namespace:Chronos.App.Infrastructure">
|
||||
<!-- BRIEF §12.9 (no mockup): built from the kit — panel, label column, one primary action. -->
|
||||
<Grid Margin="20,16,20,20">
|
||||
<Border Style="{StaticResource Border.Panel}" Padding="28,24" HorizontalAlignment="Left" VerticalAlignment="Top" MinWidth="600">
|
||||
<StackPanel>
|
||||
<StackPanel Orientation="Horizontal" Margin="0,0,0,22">
|
||||
<ui:BrandMarkIcon Width="56" Height="56" ShowPlate="True" />
|
||||
<StackPanel Margin="16,0,0,0" VerticalAlignment="Center">
|
||||
<TextBlock Text="{l:Loc Shell.AppName}" Style="{StaticResource Text.PageTitle}" FontSize="22" />
|
||||
<TextBlock Text="{Binding Version}" Style="{StaticResource Text.Secondary}" Margin="0,2,0,0" Typography.NumeralAlignment="Tabular" />
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto" MinWidth="140" />
|
||||
<ColumnDefinition Width="*" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="28" />
|
||||
<RowDefinition Height="28" />
|
||||
<RowDefinition Height="28" />
|
||||
<RowDefinition Height="28" />
|
||||
<RowDefinition Height="28" />
|
||||
<RowDefinition Height="28" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="28" />
|
||||
</Grid.RowDefinitions>
|
||||
<TextBlock Style="{StaticResource Text.Label}" Text="{l:Loc About.Build}" />
|
||||
<TextBlock Grid.Column="1" Text="{Binding Build}" VerticalAlignment="Center" Typography.NumeralAlignment="Tabular" />
|
||||
<TextBlock Grid.Row="1" Style="{StaticResource Text.Label}" Text="{l:Loc About.Runtime}" />
|
||||
<TextBlock Grid.Row="1" Grid.Column="1" Text="{Binding Runtime}" VerticalAlignment="Center" />
|
||||
<TextBlock Grid.Row="2" Style="{StaticResource Text.Label}" Text="{l:Loc About.System}" />
|
||||
<TextBlock Grid.Row="2" Grid.Column="1" Text="{Binding OperatingSystem}" ToolTip="{Binding OperatingSystem}" VerticalAlignment="Center" TextTrimming="CharacterEllipsis" />
|
||||
<TextBlock Grid.Row="3" Style="{StaticResource Text.Label}" Text="{l:Loc About.Licence}" />
|
||||
<Button Grid.Row="3" Grid.Column="1" Style="{StaticResource Button.Link}" FontSize="13" HorizontalAlignment="Left" VerticalAlignment="Center"
|
||||
Content="{l:Loc About.LicenceLink}" Command="{Binding OpenLicenceCommand}" ToolTip="{l:Loc Tooltips.About.Licence}" />
|
||||
<TextBlock Grid.Row="4" Style="{StaticResource Text.Label}" Text="{l:Loc About.ThirdParty}" />
|
||||
<TextBlock Grid.Row="4" Grid.Column="1" Text="{l:Loc About.ThirdPartyNone}" VerticalAlignment="Center" ToolTip="{l:Loc Tooltips.About.ThirdParty}" />
|
||||
<TextBlock Grid.Row="5" Style="{StaticResource Text.Label}" Text="{l:Loc About.Data}" />
|
||||
<!-- A path reads left to right in every language and shows whole in its tooltip when cut. -->
|
||||
<TextBlock Grid.Row="5" Grid.Column="1" Text="{Binding DataFolder}" ToolTip="{Binding DataFolder}" VerticalAlignment="Center" HorizontalAlignment="Left"
|
||||
TextTrimming="CharacterEllipsis" FlowDirection="LeftToRight" />
|
||||
<TextBlock Grid.Row="6" Style="{StaticResource Text.Label}" Text="{l:Loc About.Translation}" Height="28"
|
||||
Visibility="{Binding IsTranslated, Converter={StaticResource BoolToVisibility}}" />
|
||||
<StackPanel Grid.Row="6" Grid.Column="1" Orientation="Horizontal" Height="28" Visibility="{Binding IsTranslated, Converter={StaticResource BoolToVisibility}}">
|
||||
<TextBlock Text="{l:Loc About.MachineTranslated}" VerticalAlignment="Center" />
|
||||
<Button Style="{StaticResource Button.Link}" FontSize="13" Margin="12,0,0,0" VerticalAlignment="Center" Content="{l:Loc About.Review}"
|
||||
Command="{Binding ReviewTranslationCommand}" ToolTip="{l:Loc Tooltips.About.Review}" />
|
||||
</StackPanel>
|
||||
<TextBlock Grid.Row="7" Style="{StaticResource Text.Label}" Text="{l:Loc About.Updates}" />
|
||||
<StackPanel Grid.Row="7" Grid.Column="1" Orientation="Horizontal">
|
||||
<ui:StatusGlyph Kind="{Binding UpdateKind}" Text="{Binding UpdateText}" FontSize="13" VerticalAlignment="Center"
|
||||
Visibility="{Binding HasUpdateText, Converter={StaticResource BoolToVisibility}}"
|
||||
AutomationProperties.LiveSetting="Polite" infra:LiveRegion.Text="{Binding UpdateAnnouncement}" />
|
||||
<Button Style="{StaticResource Button.Link}" FontSize="13" Margin="12,0,0,0" VerticalAlignment="Center" Content="{l:Loc About.Update.Download}"
|
||||
Command="{Binding DownloadCommand}" ToolTip="{Binding DownloadToolTip}"
|
||||
Visibility="{Binding IsUpdateAvailable, Converter={StaticResource BoolToVisibility}}" />
|
||||
<Button Style="{StaticResource Button.Link}" FontSize="13" Margin="12,0,0,0" VerticalAlignment="Center" Content="{l:Loc About.Update.Cancel}"
|
||||
Command="{Binding CancelDownloadCommand}" ToolTip="{l:Loc Tooltips.About.CancelDownload}"
|
||||
Visibility="{Binding IsDownloading, Converter={StaticResource BoolToVisibility}}" />
|
||||
<Button Style="{StaticResource Button.Link}" FontSize="13" Margin="12,0,0,0" VerticalAlignment="Center" Content="{l:Loc About.Update.ShowFile}"
|
||||
Command="{Binding ShowPackageCommand}" ToolTip="{Binding ShowPackageToolTip}"
|
||||
Visibility="{Binding IsPackageReady, Converter={StaticResource BoolToVisibility}}" />
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
|
||||
<WrapPanel Margin="0,22,0,0">
|
||||
<Button Style="{StaticResource Button.Primary}" Content="{l:Loc About.Update.Check}" Command="{Binding CheckCommand}" ToolTip="{l:Loc Tooltips.About.Check}" Margin="0,0,8,8" />
|
||||
<Button Content="{l:Loc About.Releases}" Command="{Binding OpenReleasesCommand}" ToolTip="{l:Loc Tooltips.About.Releases}" ui:ButtonIcon.Glyph="{StaticResource Icon.ExternalLink}" Margin="0,0,8,8" />
|
||||
<Button Content="{l:Loc About.Diagnostics}" Command="{Binding DiagnosticsCommand}" ToolTip="{l:Loc Tooltips.About.Diagnostics}" ui:ButtonIcon.Glyph="{StaticResource Icon.Export}" Margin="0,0,8,8" />
|
||||
<Button Content="{l:Loc About.OpenData}" Command="{Binding OpenDataFolderCommand}" ToolTip="{l:Loc Tooltips.About.OpenData}" ui:ButtonIcon.Glyph="{StaticResource Icon.FolderOpen}" Margin="0,0,8,8" />
|
||||
</WrapPanel>
|
||||
</StackPanel>
|
||||
</Border>
|
||||
</Grid>
|
||||
</UserControl>
|
||||
@@ -1,8 +0,0 @@
|
||||
using System.Windows.Controls;
|
||||
|
||||
namespace Chronos.App.Sections;
|
||||
|
||||
public partial class AboutView : UserControl
|
||||
{
|
||||
public AboutView() => InitializeComponent();
|
||||
}
|
||||
@@ -583,6 +583,8 @@
|
||||
<Button Style="{StaticResource Button.Link}" Content="{l:Loc About.Update.ShowFile}" Command="{Binding Shell.About.ShowPackageCommand}" ToolTip="{Binding Shell.About.ShowPackageToolTip}"
|
||||
VerticalAlignment="Center" Margin="12,0,0,0" FontSize="13"
|
||||
Visibility="{Binding Shell.About.IsPackageReady, Converter={StaticResource BoolToVisibility}}" />
|
||||
<Button Style="{StaticResource Button.Link}" Content="{l:Loc About.Releases}" Command="{Binding Shell.About.OpenReleasesCommand}" ToolTip="{l:Loc Tooltips.About.Releases}"
|
||||
VerticalAlignment="Center" Margin="12,0,0,0" FontSize="13" />
|
||||
</WrapPanel>
|
||||
</HeaderedContentControl>
|
||||
</StackPanel>
|
||||
@@ -646,6 +648,46 @@
|
||||
ToolTip="{l:Loc Tooltips.Settings.ResetAll}" />
|
||||
</HeaderedContentControl>
|
||||
</StackPanel>
|
||||
|
||||
<!-- ================= About ================= -->
|
||||
<!-- BRIEF §12.9, the last page (owner review 2, R5): this copy only. The update check is on Updates, the data folder and the
|
||||
diagnostics bundle on Advanced, so nothing is offered twice. Versions, names and paths read left to right (DESIGN §5). -->
|
||||
<StackPanel Style="{StaticResource Page}" Visibility="{Binding Page, Converter={x:Static shell:EqualsToVisibilityConverter.Instance}, ConverterParameter=About}">
|
||||
<StackPanel Orientation="Horizontal" Margin="0,0,0,18">
|
||||
<ui:BrandMarkIcon Width="40" Height="40" ShowPlate="True" />
|
||||
<StackPanel Margin="14,0,0,0" VerticalAlignment="Center">
|
||||
<TextBlock Text="{l:Loc Shell.AppName}" Style="{StaticResource Text.Title}" />
|
||||
<TextBlock Text="{Binding Shell.About.Version}" Style="{StaticResource Text.Secondary}" Margin="0,2,0,0" HorizontalAlignment="Left" FlowDirection="LeftToRight"
|
||||
Typography.NumeralAlignment="Tabular" />
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
<HeaderedContentControl Style="{StaticResource Setting.Row}" Header="{l:Loc About.Build}">
|
||||
<TextBlock Text="{Binding Shell.About.Build}" HorizontalAlignment="Left" FlowDirection="LeftToRight" Typography.NumeralAlignment="Tabular" />
|
||||
</HeaderedContentControl>
|
||||
<HeaderedContentControl Style="{StaticResource Setting.Row}" Header="{l:Loc About.Runtime}">
|
||||
<TextBlock Text="{Binding Shell.About.Runtime}" HorizontalAlignment="Left" FlowDirection="LeftToRight" />
|
||||
</HeaderedContentControl>
|
||||
<HeaderedContentControl Style="{StaticResource Setting.Row}" Header="{l:Loc About.System}">
|
||||
<TextBlock Text="{Binding Shell.About.OperatingSystem}" ToolTip="{Binding Shell.About.OperatingSystem}" HorizontalAlignment="Left" FlowDirection="LeftToRight"
|
||||
TextTrimming="CharacterEllipsis" />
|
||||
</HeaderedContentControl>
|
||||
<HeaderedContentControl Style="{StaticResource Setting.Row}" Header="{l:Loc About.Licence}">
|
||||
<Button Style="{StaticResource Button.Link}" FontSize="13" HorizontalAlignment="Left" Content="{l:Loc About.LicenceLink}" Command="{Binding Shell.About.OpenLicenceCommand}"
|
||||
ToolTip="{l:Loc Tooltips.About.Licence}" />
|
||||
</HeaderedContentControl>
|
||||
<HeaderedContentControl Style="{StaticResource Setting.Row}" Header="{l:Loc About.ThirdParty}">
|
||||
<TextBlock Text="{l:Loc About.ThirdPartyNone}" ToolTip="{l:Loc Tooltips.About.ThirdParty}" HorizontalAlignment="Left" />
|
||||
</HeaderedContentControl>
|
||||
<!-- Every language but English is machine-translated (BRIEF §16). -->
|
||||
<HeaderedContentControl Style="{StaticResource Setting.Row}" Header="{l:Loc About.Translation}"
|
||||
Visibility="{Binding Shell.About.IsTranslated, Converter={StaticResource BoolToVisibility}}">
|
||||
<WrapPanel>
|
||||
<TextBlock Text="{l:Loc About.MachineTranslated}" VerticalAlignment="Center" />
|
||||
<Button Style="{StaticResource Button.Link}" FontSize="13" Margin="12,0,0,0" VerticalAlignment="Center" Content="{l:Loc About.Review}"
|
||||
Command="{Binding Shell.About.ReviewTranslationCommand}" ToolTip="{l:Loc Tooltips.About.Review}" />
|
||||
</WrapPanel>
|
||||
</HeaderedContentControl>
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</ScrollViewer>
|
||||
|
||||
|
||||
@@ -30,7 +30,8 @@ namespace Chronos.App.Sections;
|
||||
/// Archive rows show and change the open archive's own settings (archive.json, through the archive engine) and are the
|
||||
/// defaults of new archives; Import and Analysis feed the defaults of new cards and the analysis jobs; Rendering feeds
|
||||
/// the jobs from the next one on; Formats lists the decode tier per format on this PC with the codec extensions to
|
||||
/// install; Advanced restores the index from a daily backup at the next start.
|
||||
/// install; Advanced restores the index from a daily backup at the next start; About, the last page, shows this copy
|
||||
/// (<see cref="ShellViewModel.About"/>, whose update notice Updates shows).
|
||||
/// </summary>
|
||||
public sealed class SettingsViewModel : SectionViewModel
|
||||
{
|
||||
@@ -81,9 +82,10 @@ public sealed class SettingsViewModel : SectionViewModel
|
||||
new(SettingsPage.Formats, ["Settings.Formats.Title", "Settings.Formats.Column.Tier", "Settings.Formats.Install"]),
|
||||
new(SettingsPage.Storage, ["Settings.Storage.Folder", "Settings.Storage.Thumbnails", "Settings.Storage.Limit"]),
|
||||
new(SettingsPage.Server, ["Settings.Server.Default", "Settings.Server.RenderNode", "Settings.Server.Certificates"]),
|
||||
new(SettingsPage.Updates, ["Settings.General.CheckOnStart"]),
|
||||
new(SettingsPage.Updates, ["Settings.General.CheckOnStart", "Settings.Updates.Latest", "About.Update.Check", "About.Releases"]),
|
||||
new(SettingsPage.Advanced, ["Settings.Advanced.DataFolder", "Settings.Advanced.Logs", "Settings.Advanced.Diagnostics", "Settings.Advanced.Backup",
|
||||
"Settings.Advanced.Restore", "Settings.Advanced.Reset"]),
|
||||
new(SettingsPage.About, ["Shell.AppName", "About.Build", "About.Runtime", "About.System", "About.Licence", "About.ThirdParty", "About.Translation"]),
|
||||
];
|
||||
_visiblePages = AllPages;
|
||||
|
||||
@@ -802,8 +804,11 @@ public sealed class SettingsViewModel : SectionViewModel
|
||||
|
||||
public ICommand ResetSectionCommand { get; }
|
||||
|
||||
/// <summary>Advanced holds no setting with a default (paths and actions only) and Formats only shows this PC: they have no Reset section.</summary>
|
||||
public bool CanResetSection => _page is not (SettingsPage.Advanced or SettingsPage.Formats);
|
||||
/// <summary>
|
||||
/// Advanced holds no setting with a default (paths and actions only), Formats only shows this PC and About only this
|
||||
/// copy: they have no Reset section.
|
||||
/// </summary>
|
||||
public bool CanResetSection => _page is not (SettingsPage.Advanced or SettingsPage.Formats or SettingsPage.About);
|
||||
public ICommand ExportSettingsCommand { get; }
|
||||
public ICommand ImportSettingsCommand { get; }
|
||||
|
||||
|
||||
@@ -24,6 +24,9 @@ public enum SettingsPage
|
||||
Server,
|
||||
Updates,
|
||||
Advanced,
|
||||
|
||||
/// <summary>Version, build, licence and links (BRIEF §12.9), formerly a section of the rail (owner review 2, R5).</summary>
|
||||
About,
|
||||
}
|
||||
|
||||
/// <summary>An entry of the section list: name, tooltip (what is inside) and the words the search matches.</summary>
|
||||
|
||||
@@ -75,6 +75,7 @@ public static class ScreenCapture
|
||||
await shell.Server.Sync.ReloadAsync();
|
||||
// The server's sequences without a copy here join the Library as remote cards.
|
||||
await shell.Library.RefreshAsync();
|
||||
// Settings › Updates shows the result of a check made without the network.
|
||||
shell.About.SetResult(null);
|
||||
await shell.Settings.DetectEncodersAsync();
|
||||
await shell.Settings.SelfTestAsync();
|
||||
@@ -106,6 +107,7 @@ public static class ScreenCapture
|
||||
shell.Navigate(SectionKey.Server);
|
||||
written += await SaveAsync(window, directory, "server", theme);
|
||||
|
||||
// Every page, About last (owner review 2, R5).
|
||||
shell.Navigate(SectionKey.Settings);
|
||||
foreach (var page in Enum.GetValues<SettingsPage>())
|
||||
{
|
||||
@@ -113,9 +115,6 @@ public static class ScreenCapture
|
||||
written += await SaveAsync(window, directory, "settings-" + page.ToString().ToLowerInvariant(), theme);
|
||||
}
|
||||
|
||||
shell.Navigate(SectionKey.About);
|
||||
written += await SaveAsync(window, directory, "about", theme);
|
||||
|
||||
// Edit with no sequence open: the picker (owner review 1, R7).
|
||||
shell.Navigate(SectionKey.Edit);
|
||||
await shell.Sequence.Picker.Loading;
|
||||
|
||||
@@ -9,5 +9,4 @@
|
||||
<DataTemplate DataType="{x:Type s:JobsViewModel}"><s:JobsView /></DataTemplate>
|
||||
<DataTemplate DataType="{x:Type s:ServerViewModel}"><s:ServerView /></DataTemplate>
|
||||
<DataTemplate DataType="{x:Type s:SettingsViewModel}"><s:SettingsView /></DataTemplate>
|
||||
<DataTemplate DataType="{x:Type s:AboutViewModel}"><s:AboutView /></DataTemplate>
|
||||
</ResourceDictionary>
|
||||
@@ -14,7 +14,6 @@ public enum SectionKey
|
||||
Jobs,
|
||||
Server,
|
||||
Settings,
|
||||
About,
|
||||
}
|
||||
|
||||
/// <summary>A top-level destination of the navigation rail.</summary>
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Shell;
|
||||
using Chronos.App.About;
|
||||
using Chronos.App.Infrastructure;
|
||||
using Chronos.App.Sections;
|
||||
using Chronos.Core.Diagnostics;
|
||||
@@ -46,7 +47,8 @@ public sealed class ShellViewModel : LocalizedViewModel
|
||||
Settings = new SettingsViewModel(this);
|
||||
About = new AboutViewModel(this);
|
||||
TopSections = [Library, Import, Sequence, Archive, Jobs, Server];
|
||||
BottomSections = [Settings, About];
|
||||
// About is the last page of Settings (owner review 2, R5): Settings alone docks at the bottom of the rail.
|
||||
BottomSections = [Settings];
|
||||
foreach (var section in AllSections) section.InCollapsedRail = _isRailCollapsed;
|
||||
_current = Library;
|
||||
Library.IsSelected = true;
|
||||
@@ -74,6 +76,8 @@ public sealed class ShellViewModel : LocalizedViewModel
|
||||
public JobsViewModel Jobs { get; }
|
||||
public ServerViewModel Server { get; }
|
||||
public SettingsViewModel Settings { get; }
|
||||
|
||||
/// <summary>Settings › About and the update notice of Settings › Updates; it runs the update check on start.</summary>
|
||||
public AboutViewModel About { get; }
|
||||
|
||||
public IReadOnlyList<SectionViewModel> TopSections { get; }
|
||||
|
||||
Reference in new issue
Block a user