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
@@ -578,7 +578,7 @@
<data name="Tooltips.Settings.MissingCodec" xml:space="preserve"><value>Without this extension some formats are read only from their embedded preview, or not at all, on this PC</value></data>
<data name="Tooltips.Settings.Night" xml:space="preserve"><value>Frames whose mean brightness is at most this share of white count as night (star fields, night presets) · Enter applies, Esc reverts</value></data>
<data name="Tooltips.Settings.OpenDataFolder" xml:space="preserve"><value>Open the data folder in Explorer</value></data>
<data name="Tooltips.Settings.Page.About" xml:space="preserve"><value>Version, build, system, licence, third-party code, translation</value></data>
<data name="Tooltips.Settings.Page.About" xml:space="preserve"><value>Version, build, system, licence, third-party code</value></data>
<data name="Tooltips.Settings.Page.Advanced" xml:space="preserve"><value>Portable mode, logs, diagnostics, database backup and restore, reset</value></data>
<data name="Tooltips.Settings.Page.Analysis" xml:space="preserve"><value>Analysis width, night and star thresholds, deep analysis</value></data>
<data name="Tooltips.Settings.Page.Archive" xml:space="preserve"><value>Archive folder, naming templates, proxy and thumbnail size, rescans</value></data>
+1 -1
View File
@@ -577,7 +577,7 @@
<data name="Tooltips.Settings.Night" xml:space="preserve"><value>I fotogrammi con luminosità media al massimo pari a questa quota del bianco contano come notturni (campi stellari, preset notturni) · Invio applica, Esc annulla</value></data>
<data name="Tooltips.Settings.OpenDataFolder" xml:space="preserve"><value>Apri la cartella dati in Esplora file</value></data>
<data name="Tooltips.Settings.OsNotifications" xml:space="preserve"><value>Quando Chronos è ridotto a icona o in secondo piano, schede inserite, attività finite e messaggi del server compaiono anche come notifiche di Windows</value></data>
<data name="Tooltips.Settings.Page.About" xml:space="preserve"><value>Versione, build, sistema, licenza, codice di terze parti, traduzione</value></data>
<data name="Tooltips.Settings.Page.About" xml:space="preserve"><value>Versione, build, sistema, licenza, codice di terze parti</value></data>
<data name="Tooltips.Settings.Page.Advanced" xml:space="preserve"><value>Modalità portatile, log, diagnostica, backup e ripristino del database, valori predefiniti</value></data>
<data name="Tooltips.Settings.Page.Analysis" xml:space="preserve"><value>Larghezza di analisi, soglie di notte e stelle, analisi profonda</value></data>
<data name="Tooltips.Settings.Page.Archive" xml:space="preserve"><value>Cartella dell'archivio, modelli dei nomi, dimensione di proxy e miniature, riscansioni</value></data>
+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();
}
@@ -308,6 +308,18 @@ public sealed class SettingsLogicTests
Assert.Equal(("Not supported", "—", "—", false), (none.TierText, none.DecoderText, none.NeedsText, none.HasNeeds));
}
[Test]
public void ASettingsPageIsFoundOnlyByTheRowsItShows()
{
// About's translation row shows outside English only: its keyword is read at each search, not once (owner review 2).
var shown = false;
var about = new SettingsPageItem(SettingsPage.About, () => shown ? ["About.Translation"] : []);
Assert.False(about.Matches(Loc.L("About.Translation")), "a hidden row does not match");
shown = true;
Assert.True(about.Matches(Loc.L("About.Translation")));
Assert.True(new SettingsPageItem(SettingsPage.About, ["About.Build"]).Matches(Loc.L("About.Build")));
}
[Test]
public void EnumDrivenKeysExistInEveryRequiredLanguage()
{
@@ -361,6 +361,8 @@ public sealed class SettingsScreenSmokeTests
Assert.Contains(settings.VisiblePages, p => p.Page == SettingsPage.About);
settings.SearchText = Loc.L("About.Releases");
Assert.Contains(settings.VisiblePages, p => p.Page == SettingsPage.Updates);
settings.SearchText = Loc.L("About.Translation");
Assert.False(settings.VisiblePages.Any(p => p.Page == SettingsPage.About), "the hidden translation row does not match");
settings.SearchText = string.Empty;
});