Merge branch 'review2-p1-fix-desktop' into claude/owner-review-2-p1

This commit is contained in:
Alby96 committed 2026-10-26 23:40:38 +01:00
commit 8e7357a974
8 files changed
+33 -8

No files matched your search

+1 -1
View File
@@ -34,7 +34,7 @@ public sealed record UpdateHost(
}
/// <summary>
/// The update notice of About and Settings › Updates (BRIEF §18): checks the latest release, downloads and verifies the
/// The update notice of Settings › Updates (BRIEF §18): checks the latest release, downloads and verifies the
/// package that upgrades this copy (<see cref="UpdateDownload"/>: the setup, or the portable zip for a portable copy)
/// and shows it in Explorer. Running it is left to the user because BRIEF §8.6 lets Chronos only open links and show
/// files. A release without that package or without <c>SHA256SUMS</c> only opens its page; a capture run never touches
@@ -13,7 +13,7 @@ using Chronos.Data.Sqlite;
namespace Chronos.App.Infrastructure;
/// <summary>
/// The diagnostics bundle of About and Settings › Advanced (BRIEF §12.9, §22 Phase 8): an environment report, the codec
/// The diagnostics bundle of Settings › Advanced (BRIEF §12.8, §12.9, §22 Phase 8): an environment report, the codec
/// and encoder inventory, the settings, the latest failed jobs and the log files, zipped into a folder the user chose.
/// Everything passes through <see cref="SecretScrubber"/> (the saved server token, passwords and keys never leave the
/// PC) and no photo or archive file is ever included.
@@ -85,7 +85,9 @@ public sealed class SettingsViewModel : SectionViewModel
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"]),
// The translation row shows outside English only, and the language changes while Settings is open.
new(SettingsPage.About, () => ["Shell.AppName", "About.Build", "About.Runtime", "About.System", "About.Licence", "About.ThirdParty",
.. Shell.About.IsTranslated ? (string[])["About.Translation"] : []]),
];
_visiblePages = AllPages;
+12 -3
View File
@@ -29,9 +29,18 @@ public enum SettingsPage
About,
}
/// <summary>An entry of the section list: name, tooltip (what is inside) and the words the search matches.</summary>
public sealed class SettingsPageItem(SettingsPage page, string[] keywordKeys) : ObservableObject
/// <summary>
/// An entry of the section list: name, tooltip (what is inside) and the words the search matches. The words are read at
/// each search, so a row shown only in some languages (About's translation row) is found only while it shows.
/// </summary>
public sealed class SettingsPageItem(SettingsPage page, Func<IEnumerable<string>> keywordKeys) : ObservableObject
{
/// <summary>An entry whose rows always show.</summary>
public SettingsPageItem(SettingsPage page, string[] keywordKeys)
: this(page, () => keywordKeys)
{
}
public SettingsPage Page { get; } = page;
public string Label => Loc.L("Settings.Page." + Page);
@@ -42,7 +51,7 @@ public sealed class SettingsPageItem(SettingsPage page, string[] keywordKeys) :
public bool Matches(string text) =>
Label.Contains(text, StringComparison.CurrentCultureIgnoreCase)
|| ToolTip.Contains(text, StringComparison.CurrentCultureIgnoreCase)
|| keywordKeys.Any(k => Loc.L(k).Contains(text, StringComparison.CurrentCultureIgnoreCase));
|| keywordKeys().Any(k => Loc.L(k).Contains(text, StringComparison.CurrentCultureIgnoreCase));
internal void Refresh() => OnAllPropertiesChanged();
}