fix(app): archive tooltips say why a command is disabled; the rename dialog stops planning when closed
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012iLMBNwBE2GnphAsu4cjaC
This commit is contained in:
3 files changed
+24
-7
No files matched your search
@@ -126,6 +126,13 @@ public sealed class ArchiveViewModel : SectionViewModel
|
||||
/// <summary>"Last scan 29/09/2026 07:12 · 14 min".</summary>
|
||||
public string LastScanText { get => _lastScanText; private set => Set(ref _lastScanText, value); }
|
||||
|
||||
public string ScanToolTip => WhenOnline("Tooltips.Archive.Scan");
|
||||
public string VerifyToolTip => WhenOnline("Tooltips.Archive.Verify");
|
||||
public string OrphansToolTip => WhenOnline("Tooltips.Archive.Orphans");
|
||||
public string RenameSetToolTip => WhenOnline("Tooltips.Archive.SetRename");
|
||||
public string MoveSetToolTip => WhenOnline("Tooltips.Archive.SetMove");
|
||||
public string RetagSetToolTip => WhenOnline("Tooltips.Archive.SetRetag");
|
||||
|
||||
public ICommand ScanCommand { get; }
|
||||
public ICommand RebuildCommand { get; }
|
||||
public ICommand VerifyCommand { get; }
|
||||
@@ -404,6 +411,9 @@ public sealed class ArchiveViewModel : SectionViewModel
|
||||
|
||||
private bool IsOnline() => _archive is not null && _availability == ArchiveAvailability.Online;
|
||||
|
||||
/// <summary>A command's tooltip, or why it is disabled: these commands write to the archive or read all of it.</summary>
|
||||
private string WhenOnline(string key) => _archive is null || IsOnline() ? Loc.L(key) : Loc.L("Archive.Blocked.NotOnline");
|
||||
|
||||
private bool HasSet() => _archive is not null && _tree is not null && Set().Count > 0;
|
||||
|
||||
private IReadOnlyList<Sequence> Set() => _tree is null ? [] : ArchiveTree.SetOf(_tree, _selection);
|
||||
|
||||
Reference in new issue
Block a user