diff --git a/i18n/en/Archive.resx b/i18n/en/Archive.resx
index 35b8275d..49dfd5a3 100644
--- a/i18n/en/Archive.resx
+++ b/i18n/en/Archive.resx
@@ -36,6 +36,7 @@
Folder to copy into the archivelongMove to trashNot moved: {0} · {1}long
+ Checking {0} of {1}…long{0:N0} sequence moved to the trashlong{0:N0} sequences moved to the trashlongThe sequences could not move to the trashlong
@@ -49,12 +50,18 @@
{0} and {1} ({2}) leave the library and move to the archive's trash; nothing is erased.long+ {0:N0} morelong+ {0:N0} morelong
+ Moving to the trash: {0} of {1}longNothing can move to the trashlong
+ Deleting {0:N0} sequencelong
+ Deleting {0:N0} sequenceslongits photos are the archive rootlonga job is working on itlongother sequences are inside its folderlong
+ its folder is missing; the Orphans check removes itlongits folder holds another sequence; scan the archive firstlongthe archive is offline or read-onlylong
+ {0:N0} empty sequence removedlong
+ {0:N0} empty sequences removedlongType {0} to confirmlongUndoCancel
diff --git a/i18n/en/Library.resx b/i18n/en/Library.resx
index 92208d8b..f0bc14cb 100644
--- a/i18n/en/Library.resx
+++ b/i18n/en/Library.resx
@@ -22,11 +22,13 @@
Adopt a folderMove works on the sequences of one archive at a time.longThe same on this PC and on the server: nothing to sync.long
+ No saved view is in use; choose one first.longYour server account cannot download originals.longThe library index is not open.longSelect one or more sequences first.longYour server account cannot change this sequence.longYour server account cannot upload.long
+ Save a view first.longSign in to a Titano Server first, on the Server screen.longThe selected sequences have nothing to fetch from the server.longThe server already has what the selected sequences hold.long
@@ -52,7 +54,7 @@
ShowExport the list toAll cameras
- This PC and server
+ All originsAny statusAll tagsAll years
@@ -64,8 +66,11 @@
AnalysedWithout proxiesNot analysed
+ Not renderedNot verifiedWith proxies
+ Rendered
+ SyncedVerifiedWith warningsTags
@@ -79,6 +84,7 @@
No rating{0:N0} star{0:N0} stars
+ The server cannot be reachedlongRescanSearch title, camera, tag{0:N0} selected
diff --git a/i18n/en/Tooltips.resx b/i18n/en/Tooltips.resx
index e3325b04..4f3f4e08 100644
--- a/i18n/en/Tooltips.resx
+++ b/i18n/en/Tooltips.resx
@@ -305,8 +305,10 @@
Index photos you already have, in place; choose their top folderDeep analysis of every frame · runs as a job in the backgroundDeep analysis of the selected sequences · runs as one job
+ Deep analysis of every frame on the server, where the originals are · the server runs it as a jobShow only one cameraClick selects · Ctrl+click adds · double-click opens · move over the picture to scrub
+ Click selects · Ctrl+click adds · double-click opens with proxies · on the server only, no scrubbing hereShow every sequence againDeselect every sequenceWork with the archive of a Titano Server
@@ -341,7 +343,7 @@
Build JPEG proxies for fast editing · runs as a jobBuild proxies of the selected sequences · runs as one jobQueue a render with {0}, this sequence's recommended or default preset · runs as a job
- Render with {0} on the server, where the originals are · the server or a render node runs it
+ Render with the sequence's own preset on the server, where the originals are · the server or a render node runs itFetch the server's originals this PC lacks, verified by hash · runs as a transfer jobFetch the server's renders this sequence lacks · runs as a transfer jobSettings changed here and on the server; choose what to keep on the Server screen
@@ -377,19 +379,19 @@
{0:N0} warnings; open the sequence for detailsShow only one tagYear bands with photos per month above the cards
- Click a month to show its year and scroll to its sequences
+ Click a month, or move with the arrow keys and press Enter, to show its year and scroll to its sequencesRe-read every file and compare its hash with the index · runs as a jobVerify the hashes of the selected sequences · runs as one jobShow the search, filters and sort saved under this name
- Forget the saved view on screen; no sequence is touched
- A short name, such as "Night, 4K, not analysed"
- Give the saved view on screen another name
+ Forget the saved view in use; no sequence is touched
+ A short name, such as "Night, 4K, not rendered"
+ Give the saved view in use another nameRename the view · Enter
- Save the search, filters and sort on screen as a named view
+ Save the search, filters and sort in use as a named viewSave the view · EnterSave the deleted view again
- Saved views: show one, or save the filters on screen
- Saved view on screen: {0}
+ Saved views: show one, or save the filters in use
+ Saved view in use: {0}Choose a saved view to showShow only one year of first captureVersion, diagnostics and links
diff --git a/i18n/it/Archive.it.resx b/i18n/it/Archive.it.resx
index 5a828515..42e52d74 100644
--- a/i18n/it/Archive.it.resx
+++ b/i18n/it/Archive.it.resx
@@ -33,6 +33,7 @@
Cartella da copiare nell'archivioSposta nel cestinoNon spostata: {0} · {1}
+ Controllo {0} di {1}…{0:N0} sequenza spostata nel cestino{0:N0} sequenze spostate nel cestinoImpossibile spostare le sequenze nel cestino
@@ -43,14 +44,20 @@
MantieniRestano nel cestino dell'archivio, ripristinabili da Manutenzione.{0} e {1} ({2}) escono dalla libreria e vanno nel cestino dell'archivio; non viene cancellato nulla.
- + {0:N0} altra
+ + un'altra+ altre {0:N0}
- Niente può andare nel cestino
+ Spostamento nel cestino: {0} di {1}
+ Nessuna sequenza può andare nel cestino
+ Eliminazione di {0:N0} sequenza
+ Eliminazione di {0:N0} sequenzele sue foto sono la radice dell'archivioun'attività ci sta lavorando
- altre sequenze stanno nella sua cartella
+ la sua cartella contiene altre sequenze
+ manca la sua cartella; la rimuove il controllo Orfanila sua cartella contiene un'altra sequenza; prima esegui una scansionel'archivio non è raggiungibile o è di sola lettura
+ {0:N0} sequenza vuota rimossa
+ {0:N0} sequenze vuote rimosseDigita {0} per confermareAnnullaAnnulla
diff --git a/i18n/it/Library.it.resx b/i18n/it/Library.it.resx
index 4265f7ad..0b464a7a 100644
--- a/i18n/it/Library.it.resx
+++ b/i18n/it/Library.it.resx
@@ -22,11 +22,13 @@
Adotta una cartellaLo spostamento agisce sulle sequenze di un solo archivio alla volta.Uguale su questo PC e sul server: niente da sincronizzare.
+ Nessuna vista salvata in uso; prima scegline una.Il tuo account sul server non può scaricare gli originali.L'indice della libreria non è aperto.Prima seleziona una o più sequenze.Il tuo account sul server non può modificare questa sequenza.Il tuo account sul server non può caricare.
+ Prima salva una vista.Prima accedi a un Titano Server, nella schermata Server.Le sequenze selezionate non hanno nulla da ricevere dal server.Il server ha già tutto ciò che contengono le sequenze selezionate.
@@ -52,7 +54,7 @@
MostraEsporta l'elenco inTutte le fotocamere
- Questo PC e server
+ Tutte le originiQualsiasi statoTutti i tagTutti gli anni
@@ -64,8 +66,11 @@
AnalizzateSenza proxyNon analizzate
+ Non renderizzateNon verificateCon proxy
+ Renderizzate
+ SincronizzateVerificateCon avvisiTag
@@ -79,6 +84,7 @@
Nessun voto{0:N0} stella{0:N0} stelle
+ Il server non è raggiungibileRipeti scansioneCerca titolo, fotocamera, tag{0:N0} selezionata
diff --git a/i18n/it/Tooltips.it.resx b/i18n/it/Tooltips.it.resx
index 55a8f822..eedf92dc 100644
--- a/i18n/it/Tooltips.it.resx
+++ b/i18n/it/Tooltips.it.resx
@@ -305,8 +305,10 @@
Indicizza le foto che hai già, dove si trovano; scegli la loro cartella principaleAnalisi approfondita di ogni fotogramma · viene eseguita come attività in backgroundAnalisi approfondita delle sequenze selezionate · un'unica attività
+ Analisi approfondita di ogni fotogramma sul server, dove sono gli originali · il server la esegue come attivitàMostra una sola fotocameraClic seleziona · Ctrl+clic aggiunge · doppio clic apre · scorri sull'immagine per sfogliare
+ Clic seleziona · Ctrl+clic aggiunge · doppio clic apre con i proxy · solo sul server, qui niente scorrimentoMostra di nuovo tutte le sequenzeDeseleziona tutte le sequenzeLavora con l'archivio di un Titano Server
@@ -331,8 +333,8 @@
Imposta il voto di {0:N0} sequenze, nei sidecar e nell'indiceAggiungi o rimuovi tag su {0:N0} sequenzaAggiungi o rimuovi tag su {0:N0} sequenze
- Invia ciò che manca al server di {0:N0} sequenza (originali e impostazioni, o render) · come attività di trasferimento
- Invia ciò che manca al server di {0:N0} sequenze (originali e impostazioni, o render) · come attività di trasferimento
+ Invia al server ciò che gli manca di {0:N0} sequenza (originali e impostazioni, o render) · come attività di trasferimento
+ Invia al server ciò che gli manca di {0:N0} sequenze (originali e impostazioni, o render) · come attività di trasferimentoRileggi {0:N0} sequenza e confronta ogni hash con l'indice · come attivitàRileggi {0:N0} sequenze e confronta ogni hash con l'indice · un'attività per archivioApre nell'editor della sequenza · Invio
@@ -341,7 +343,7 @@
Crea proxy JPEG per una modifica veloce · viene eseguita come attivitàCrea i proxy delle sequenze selezionate · un'unica attivitàMetti in coda un render con {0}, il preset consigliato o predefinito della sequenza · come attività
- Renderizza con {0} sul server, dove sono gli originali · lo esegue il server o un nodo di render
+ Renderizza con il preset della sequenza sul server, dove sono gli originali · lo esegue il server o un nodo di renderScarica gli originali del server che mancano su questo PC, verificati con l'hash · come attività di trasferimentoRicevi i render del server che mancano a questa sequenza · come attività di trasferimentoImpostazioni cambiate qui e sul server; scegli cosa tenere nella schermata Server
@@ -377,19 +379,19 @@
{0:N0} avvisi; apri la sequenza per i dettagliMostra un solo tagFasce per anno con le foto di ogni mese sopra le schede
- Fai clic su un mese per mostrarne l'anno e scorrere alle sue sequenze
+ Fai clic su un mese, o spostati con le frecce e premi Invio, per mostrarne l'anno e scorrere alle sue sequenzeRilegge ogni file e ne confronta l'hash con l'indice · viene eseguita come attivitàVerifica gli hash delle sequenze selezionate · un'unica attivitàMostra la ricerca, i filtri e l'ordinamento salvati con questo nome
- Dimentica la vista salvata sullo schermo; nessuna sequenza viene toccata
- Un nome breve, ad esempio "Notte, 4K, non analizzate"
- Dai un altro nome alla vista salvata sullo schermo
+ Dimentica la vista salvata in uso; nessuna sequenza viene toccata
+ Un nome breve, ad esempio "Notte, 4K, non renderizzate"
+ Dai un altro nome alla vista salvata in usoRinomina la vista · Invio
- Salva ricerca, filtri e ordinamento sullo schermo come vista con nome
+ Salva come vista con nome la ricerca, i filtri e l'ordinamento in usoSalva la vista · InvioSalva di nuovo la vista eliminata
- Viste salvate: mostrane una o salva i filtri sullo schermo
- Vista salvata sullo schermo: {0}
+ Viste salvate: mostrane una o salva i filtri in uso
+ Vista salvata in uso: {0}Scegli una vista salvata da mostrareMostra un solo anno del primo scattoVersione, diagnostica e collegamenti
diff --git a/src/Titano.App/Archive/ArchiveDialogs.xaml b/src/Titano.App/Archive/ArchiveDialogs.xaml
index 0c5a6f52..2f458b81 100644
--- a/src/Titano.App/Archive/ArchiveDialogs.xaml
+++ b/src/Titano.App/Archive/ArchiveDialogs.xaml
@@ -132,6 +132,23 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -144,7 +161,9 @@
-
+
+
+
+
@@ -93,7 +114,7 @@
-
+
@@ -103,33 +124,34 @@
-
-
+
+
-
-
-
+
+
-
-
-
-
-
-
-
+
+
+
+
+
-
-
-
+
+
+
+ ScrollViewer.HorizontalScrollBarVisibility="Disabled" ScrollViewer.ScrollChanged="OnScrollChanged" AutomationProperties.Name="{l:Loc Shell.Nav.Library}"
+ KeyboardNavigation.TabNavigation="Continue">
@@ -268,15 +291,14 @@
-
+
+ ToolTip="{Binding AnalyseToolTip}" AutomationProperties.Name="{l:Loc Library.Action.Analyse}" />
@@ -358,46 +380,57 @@
+ ToolTip="{Binding DataContext.RevealToolTip, RelativeSource={RelativeSource AncestorType=UserControl}}" ui:ButtonIcon.Glyph="{StaticResource Icon.FolderOpen}"
+ Margin="0,0,8,8" />
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
diff --git a/src/Titano.App/Sections/LibraryViewModel.cs b/src/Titano.App/Sections/LibraryViewModel.cs
index 7ae58ec7..690613fd 100644
--- a/src/Titano.App/Sections/LibraryViewModel.cs
+++ b/src/Titano.App/Sections/LibraryViewModel.cs
@@ -63,6 +63,7 @@ public sealed class LibraryViewModel : SectionViewModel
private IReadOnlyList _remote = [];
private Dictionary _entries = [];
private Dictionary _listing = [];
+ private ArchiveStats? _localStats;
private LibraryTimeline _timeline = LibraryTimeline.Empty;
private IReadOnlyList _timelineBands = [];
private (int Year, int Month)? _timelineMonth;
@@ -124,7 +125,7 @@ public sealed class LibraryViewModel : SectionViewModel
MoveCommand = Mass(MassAction.Move, OpenMoveAsync);
UploadCommand = Mass(MassAction.Upload, _ => TransferAsync(MassAction.Upload));
DownloadCommand = Mass(MassAction.Download, _ => TransferAsync(MassAction.Download));
- DeleteCommand = Mass(MassAction.Delete, t => SequenceDeletion.RunAsync(Shell, [.. t.Select(s => s.Id)]));
+ DeleteCommand = Mass(MassAction.Delete, t => DeleteAsync([.. t.Select(s => s.Id)]));
ExportListCommand = Mass(MassAction.ExportList, ExportListAsync);
ClearSelectionCommand = new RelayCommand(ClearSelection, () => SelectionCount > 0);
@@ -135,13 +136,16 @@ public sealed class LibraryViewModel : SectionViewModel
else if (p is string name && Enum.TryParse(name, out var parsed)) SelectedSort = Sorts.First(o => o.Value == parsed);
});
OpenItemCommand = new AsyncRelayCommand((p, _) => p is SequenceItem item ? OpenAsync(item) : Task.CompletedTask);
- AnalyseItemCommand = new AsyncRelayCommand((p, _) => p is SequenceItem item ? _actions.AnalyseAsync([item.Sequence]) : Task.CompletedTask);
- RenderItemCommand = new AsyncRelayCommand((p, _) => p is SequenceItem item ? _actions.RenderAsync(item.Sequence) : Task.CompletedTask);
+ AnalyseItemCommand = new AsyncRelayCommand((p, _) => p is SequenceItem item ? _actions.AnalyseAsync([item.Sequence]) : Task.CompletedTask,
+ p => p is SequenceItem { CanRunQuick: true });
+ RenderItemCommand = new AsyncRelayCommand((p, _) => p is SequenceItem item ? _actions.RenderAsync(item.Sequence) : Task.CompletedTask,
+ p => p is SequenceItem { CanRunQuick: true });
SyncItemCommand = new AsyncRelayCommand((p, _) => p is SequenceItem item ? SyncItemAsync(item) : Task.CompletedTask, p => p is SequenceItem { CanSync: true });
SaveViewCommand = new RelayCommand(() => OpenViewName(rename: false), () => _viewStore is not null);
RenameViewCommand = new RelayCommand(() => OpenViewName(rename: true), () => ActiveView is not null);
DeleteViewCommand = new AsyncRelayCommand(DeleteViewAsync, () => ActiveView is not null);
+ UndoDeleteViewCommand = new AsyncRelayCommand((p, _) => p is SavedView view ? UndoDeleteViewAsync(view) : Task.CompletedTask);
ImportCardCommand = new RelayCommand(() => Shell.Navigate(SectionKey.Import));
AdoptFolderCommand = new AsyncRelayCommand(AdoptFolderAsync);
@@ -182,6 +186,9 @@ public sealed class LibraryViewModel : SectionViewModel
public ICommand SaveViewCommand { get; }
public ICommand RenameViewCommand { get; }
public ICommand DeleteViewCommand { get; }
+
+ /// The Undo of a deleted view's toast (parameter: the view); a failure is reported like any command's.
+ public ICommand UndoDeleteViewCommand { get; }
public ICommand ImportCardCommand { get; }
public ICommand AdoptFolderCommand { get; }
public ICommand ConnectCommand { get; }
@@ -260,10 +267,27 @@ public sealed class LibraryViewModel : SectionViewModel
set => SetFilter(ref _tag, value ?? Tags[0], nameof(IsTagFiltered));
}
+ /// The origin also decides which sequences the Year and Camera choices and the timeline count.
public FilterOption SelectedOrigin
{
get => _origin;
- set => SetFilter(ref _origin, value ?? Origins[0], nameof(IsOriginFiltered));
+ set
+ {
+ var suppressed = _suppressReload;
+ _suppressReload = true;
+ try
+ {
+ if (!Set(ref _origin, value ?? Origins[0])) return;
+ ApplyFacets();
+ }
+ finally
+ {
+ _suppressReload = suppressed;
+ }
+ OnPropertyChanged(nameof(IsOriginFiltered));
+ RaiseViews();
+ Reload();
+ }
}
public FilterOption SelectedSort
@@ -332,6 +356,18 @@ public sealed class LibraryViewModel : SectionViewModel
/// "Saved views · Night, 4K" or what the menu does.
public string ViewsToolTip => ActiveView is { } active ? Loc.L("Tooltips.Library.ViewsActive", active.Name) : Loc.L("Tooltips.Library.Views");
+ /// "Show view": what it does, or that no view is saved yet.
+ public string ViewsApplyToolTip => HasViews ? Loc.L("Tooltips.Library.ViewsApply") : Loc.L("Library.Blocked.NoViews");
+
+ /// "Save view…": what it does, or that the index is not open.
+ public string ViewSaveToolTip => _viewStore is null ? Loc.L("Library.Blocked.NoIndex") : Loc.L("Tooltips.Library.ViewSave");
+
+ /// "Rename view…": what it does, or that no saved view is in use.
+ public string ViewRenameToolTip => IsViewActive ? Loc.L("Tooltips.Library.ViewRename") : Loc.L("Library.Blocked.NoActiveView");
+
+ /// "Delete view": what it does, or that no saved view is in use.
+ public string ViewDeleteToolTip => IsViewActive ? Loc.L("Tooltips.Library.ViewDelete") : Loc.L("Library.Blocked.NoActiveView");
+
// ---------------- Timeline ----------------
/// One band per capture year, newest first: photos per month.
@@ -398,9 +434,15 @@ public sealed class LibraryViewModel : SectionViewModel
public SequenceItem? Selected
{
get => _selected;
- private set => Set(ref _selected, value);
+ private set
+ {
+ if (Set(ref _selected, value)) OnPropertyChanged(nameof(RevealToolTip));
+ }
}
+ /// The details panel's "Folder": what it does, or why a remote card has no folder here.
+ public string RevealToolTip => _selected is { IsRemote: true } ? Loc.L("Library.Blocked.ServerOnly") : Loc.L("Tooltips.Library.Folder");
+
public int SelectionCount
{
get => _selectionCount;
@@ -458,7 +500,7 @@ public sealed class LibraryViewModel : SectionViewModel
// ---------------- Dialogs ----------------
- /// The open in-window dialog (tags, move, view name); null when none.
+ /// The open in-window dialog (tags, move, view name, delete); null when none.
public ArchiveDialogViewModel? Dialog
{
get => _dialog;
@@ -542,6 +584,20 @@ public sealed class LibraryViewModel : SectionViewModel
/// Opens Tags on the selection (capture, tests).
public void OpenRetag() => OpenRetag(Targets(MassAction.Tag));
+ /// Opens "Save view" on the filters on screen (capture, tests).
+ public void OpenSaveView() => OpenViewName(rename: false);
+
+ ///
+ /// Delete…: the archive engine's dry run, the typed confirmation and the move into the trash, in an in-window dialog
+ /// that says how far it is and stops on Cancel. True when something left the Library.
+ ///
+ public async Task DeleteAsync(IReadOnlyList sequenceIds)
+ {
+ var dialog = new DeleteDialogViewModel(Shell, sequenceIds, CloseDialog);
+ OpenDialog(dialog);
+ return await dialog.RunAsync();
+ }
+
private void Reload()
{
if (_suppressReload) return;
@@ -643,27 +699,13 @@ public sealed class LibraryViewModel : SectionViewModel
var tags = await _db.Tags.ListAsync();
_hasArchive = (await _db.Archives.ListAsync()).Count > 0;
Shell.SetLibraryTotals(stats.Sequences, stats.Photos, stats.Bytes);
- _timeline = LibraryTimeline.From(stats, DateTime.Today);
+ _localStats = stats;
_suppressReload = true;
- var year = _year.Value;
- var camera = _camera.Value;
var tag = _tag.Value;
- Years = [AnyYear(), .. stats.ByYear.OrderByDescending(y => y.Year).Select(y => new FilterOption(y.Year, YearText(y.Year), YearText(y.Year)))];
- Cameras =
- [
- AnyCamera(),
- .. stats.ByCamera.Where(c => !string.IsNullOrWhiteSpace(c.Model))
- .GroupBy(c => c.Model!, StringComparer.Ordinal)
- .Select(g => (Model: g.Key, Name: Core.Naming.PathTemplate.CameraName(g.First().Make, g.Key)))
- .OrderBy(c => c.Name, StringComparer.CurrentCultureIgnoreCase)
- .Select(c => new FilterOption(c.Model, c.Name, c.Name)),
- ];
Tags = [AnyTag(), .. tags.OrderBy(t => t.Name, StringComparer.CurrentCultureIgnoreCase).Select(t => new FilterOption(t.Name, t.Name, t.Name))];
- SelectedYear = Years.FirstOrDefault(o => o.Value == year) ?? Years[0];
- SelectedCamera = Cameras.FirstOrDefault(o => o.Value == camera) ?? Cameras[0];
SelectedTag = Tags.FirstOrDefault(o => o.Value == tag) ?? Tags[0];
- TimelineBands = [.. _timeline.Bands.Select(b => new ChartRow(b.Label, b.Values, b.ToolTips))];
+ ApplyFacets();
}
catch (DatabaseException ex)
{
@@ -675,6 +717,48 @@ public sealed class LibraryViewModel : SectionViewModel
}
}
+ ///
+ /// The Year and Camera choices and the timeline bands of the origins in view (BRIEF §4.4 mixed mode): the index's
+ /// figures and the remote cards'. A chosen year or camera that no sequence in view has stays chosen.
+ ///
+ private void ApplyFacets()
+ {
+ if (_localStats is not { } local) return;
+ var suppressed = _suppressReload;
+ _suppressReload = true;
+ try
+ {
+ var stats = LibraryFacets.Of(local, _remote, _origin.Value);
+ _timeline = LibraryTimeline.From(stats, DateTime.Today);
+ var year = _year.Value;
+ var camera = _camera.Value;
+ Years = WithChosen([AnyYear(), .. stats.ByYear.OrderByDescending(y => y.Year).Select(y => new FilterOption(y.Year, YearText(y.Year), YearText(y.Year)))],
+ year, YearText);
+ Cameras = WithChosen(
+ [
+ AnyCamera(),
+ .. stats.ByCamera.Where(c => !string.IsNullOrWhiteSpace(c.Model))
+ .GroupBy(c => c.Model!, StringComparer.Ordinal)
+ .Select(g => (Model: g.Key, Name: Core.Naming.PathTemplate.CameraName(g.First().Make, g.Key)))
+ .OrderBy(c => c.Name, StringComparer.CurrentCultureIgnoreCase)
+ .Select(c => new FilterOption(c.Model, c.Name, c.Name)),
+ ], camera, c => c ?? string.Empty);
+ SelectedYear = Years.First(o => o.Value == year);
+ SelectedCamera = Cameras.First(o => o.Value == camera);
+ TimelineBands = [.. _timeline.Bands.Select(b => new ChartRow(b.Label, b.Values, b.ToolTips))];
+ OnPropertyChanged(nameof(TimelineBand));
+ OnPropertyChanged(nameof(TimelineSlot));
+ }
+ finally
+ {
+ _suppressReload = suppressed;
+ }
+ }
+
+ /// , plus the chosen value when they lack it, so a filter never changes by itself.
+ private static IReadOnlyList> WithChosen(IReadOnlyList> options, T chosen, Func text) =>
+ chosen is null || options.Any(o => EqualityComparer.Default.Equals(o.Value, chosen)) ? options : [.. options, Option(options, chosen, text)];
+
///
/// Reads the sync table of the signed-in server: the server's sequences without a copy here become remote cards
/// (with the server's listing when a new one appears), and every card learns what its Sync quick action does.
@@ -710,6 +794,7 @@ public sealed class LibraryViewModel : SectionViewModel
_entries = entries;
var changed = !SameCards(_remote, remote);
_remote = remote;
+ if (changed) ApplyFacets();
foreach (var item in Items) ApplySync(item);
OnPropertyChanged(nameof(ShowsOrigin));
RaiseMass();
@@ -719,12 +804,15 @@ public sealed class LibraryViewModel : SectionViewModel
private static bool SameCards(IReadOnlyList a, IReadOnlyList b) =>
a.Count == b.Count && a.Zip(b).All(p => p.First.Id == p.Second.Id && p.First.UpdatedAt == p.Second.UpdatedAt && p.First.FrameCount == p.Second.FrameCount);
- /// The card's sync row and what its Sync quick action does now.
+ /// The card's sync row, what its Sync quick action does now, and whether Analyse and Render can start.
private void ApplySync(SequenceItem item)
{
var entry = _entries.GetValueOrDefault(item.Id);
var action = MassActions.QuickSync(new SelectedSequence(item.Sequence, entry), Context, out var blocker);
item.SetSync(entry, action is not null, action is { } a ? Loc.L("Tooltips.Library.QuickSync." + a) : blocker ?? string.Empty);
+ item.SetQuickBlocker(item.IsRemote
+ ? _actions.CanPost ? null : Loc.L("Library.Blocked.NotConnected")
+ : Context.HasEngine ? null : Loc.L("Library.Blocked.NoIndex"));
}
private SelectionContext Context => new(_db is not null && Shell.Services.Engine is not null, Shell.Services.Sync.Server is not null, _actions.Rights);
@@ -821,11 +909,12 @@ public sealed class LibraryViewModel : SectionViewModel
await store.DeleteAsync(view.Id);
await LoadViewsAsync();
Shell.Notify(Loc.L("Library.Views.Deleted", view.Name), actionText: Loc.L("Library.Views.Undo"), actionToolTip: Loc.L("Tooltips.Library.ViewUndo"),
- action: () => _ = UndoDeleteAsync(store, view));
+ action: () => UndoDeleteViewCommand.Execute(view));
}
- private async Task UndoDeleteAsync(SavedViewStore store, SavedView view)
+ private async Task UndoDeleteViewAsync(SavedView view)
{
+ if (_viewStore is not { } store) return;
await store.SaveAsync(view);
await LoadViewsAsync();
}
@@ -864,6 +953,10 @@ public sealed class LibraryViewModel : SectionViewModel
OnPropertyChanged(nameof(ActiveView));
OnPropertyChanged(nameof(IsViewActive));
OnPropertyChanged(nameof(ViewsToolTip));
+ OnPropertyChanged(nameof(ViewsApplyToolTip));
+ OnPropertyChanged(nameof(ViewSaveToolTip));
+ OnPropertyChanged(nameof(ViewRenameToolTip));
+ OnPropertyChanged(nameof(ViewDeleteToolTip));
CommandManager.InvalidateRequerySuggested();
}
diff --git a/src/Titano.App/Shell/ConfirmDialog.xaml b/src/Titano.App/Shell/ConfirmDialog.xaml
index 934a8896..d531860d 100644
--- a/src/Titano.App/Shell/ConfirmDialog.xaml
+++ b/src/Titano.App/Shell/ConfirmDialog.xaml
@@ -12,7 +12,7 @@
-
+
diff --git a/src/Titano.App/Shell/ConfirmDialog.xaml.cs b/src/Titano.App/Shell/ConfirmDialog.xaml.cs
index 025460db..1ba9ac05 100644
--- a/src/Titano.App/Shell/ConfirmDialog.xaml.cs
+++ b/src/Titano.App/Shell/ConfirmDialog.xaml.cs
@@ -12,6 +12,7 @@ public sealed partial class ConfirmDialog : TitanoWindow
DataContext = request;
InitializeComponent();
Action.SetResourceReference(StyleProperty, request.IsDestructive ? "Button.Destructive" : "Button.Primary");
+ if (!request.IsDetailMonospaced) DetailText.SetResourceReference(FontFamilyProperty, "Font.Ui");
if (request.TypedConfirmation is null) return;
Typing.Visibility = Visibility.Visible;
Loaded += (_, _) => Typed.Focus();
diff --git a/src/Titano.App/Shell/ScreenCapture.cs b/src/Titano.App/Shell/ScreenCapture.cs
index ec37b70e..4322cbec 100644
--- a/src/Titano.App/Shell/ScreenCapture.cs
+++ b/src/Titano.App/Shell/ScreenCapture.cs
@@ -154,8 +154,8 @@ public static class ScreenCapture
///
/// library-timeline, library-mass (the selection with the whole bar), library-delete (the dry run
- /// of deleting that selection, behind its typed confirmation) and library-remote (the server's sequences as
- /// remote cards), then the Library as it was.
+ /// of deleting that selection, behind its typed confirmation), library-remote (the server's sequences as
+ /// remote cards) and library-viewname (Save view), then the Library as it was.
///
private static async Task CaptureLibraryScenesAsync(MainWindow window, ShellViewModel shell, string directory, AppTheme theme)
{
@@ -168,6 +168,7 @@ public static class ScreenCapture
if (scene == "mass" && await LibraryScenes.DeleteRequestAsync(shell) is { } request)
written += await SaveDialogAsync(new ConfirmDialog(request), directory, "library-delete", theme);
}
+ shell.Library.Dialog?.CloseCommand.Execute(null);
shell.Library.ClearSelectionCommand.Execute(null);
shell.Library.ClearFiltersCommand.Execute(null);
shell.Library.LayoutIndex = 0;
diff --git a/src/Titano.Ui/Themes/Visuals.xaml b/src/Titano.Ui/Themes/Visuals.xaml
index c8cccf80..13595197 100644
--- a/src/Titano.Ui/Themes/Visuals.xaml
+++ b/src/Titano.Ui/Themes/Visuals.xaml
@@ -122,11 +122,16 @@
+
+
+
+
+
diff --git a/src/Titano.Ui/Visuals/SequenceCard.cs b/src/Titano.Ui/Visuals/SequenceCard.cs
index 636fdf8a..ba4dedcb 100644
--- a/src/Titano.Ui/Visuals/SequenceCard.cs
+++ b/src/Titano.Ui/Visuals/SequenceCard.cs
@@ -82,7 +82,7 @@ public class SequenceCard : Control
/// Tooltip of the selection check box.
public object? SelectToolTip { get => GetValue(SelectToolTipProperty); set => SetValue(SelectToolTipProperty, value); }
- /// Quick actions shown bottom-right of the thumbnail on hover (Open, Analyse, Render, Sync).
+ /// Quick actions shown bottom-right of the thumbnail on hover, while selected and while the keyboard is in them (Open, Analyse, Render, Sync).
public object? ActionsContent { get => GetValue(ActionsContentProperty); set => SetValue(ActionsContentProperty, value); }
/// Selection state; bind two-way to the container's IsSelected so the check box toggles it.
diff --git a/tests/Titano.App.Tests/Library/DeletePlansTests.cs b/tests/Titano.App.Tests/Library/DeletePlansTests.cs
index e23df155..e7847102 100644
--- a/tests/Titano.App.Tests/Library/DeletePlansTests.cs
+++ b/tests/Titano.App.Tests/Library/DeletePlansTests.cs
@@ -62,4 +62,19 @@ public sealed class DeletePlansTests
foreach (var reason in Enum.GetValues())
Assert.NotEqual("Archive.Delete.Reason." + reason, Loc.L("Archive.Delete.Reason." + reason), "every reason has words");
}
+
+ [Test]
+ public void TheConfirmationStaysShortEnoughForASmallScreen()
+ {
+ var steps = Enumerable.Range(1, 20).Select(i => Step("Sequence " + i.ToString(CultureInfo.InvariantCulture), 10, 10, 1_000)).ToList();
+ var blocked = Enumerable.Range(1, 9).Select(i => new BlockedDelete(Sequence("Busy " + i.ToString(CultureInfo.InvariantCulture), 5), DeleteBlock.Busy)).ToList();
+
+ var request = Assert.NotNull(DeletePlans.Request(new DeletePlan(steps, blocked)));
+ var lines = request.Detail!.Split(Environment.NewLine);
+
+ Assert.Equal(DeletePlans.ListedLines + 1 + DeletePlans.BlockedLines + 1, lines.Length, "named lines plus one count for each part");
+ Assert.Equal(Loc.Plural("Archive.Delete.More", 14), lines[DeletePlans.ListedLines]);
+ Assert.Equal(Loc.Plural("Archive.Delete.More", 6), lines[^1]);
+ Assert.False(request.IsDetailMonospaced, "names read in the UI font, not the fingerprint font");
+ }
}
diff --git a/tests/Titano.App.Tests/Library/LibraryFacetsTests.cs b/tests/Titano.App.Tests/Library/LibraryFacetsTests.cs
new file mode 100644
index 00000000..20963c57
--- /dev/null
+++ b/tests/Titano.App.Tests/Library/LibraryFacetsTests.cs
@@ -0,0 +1,74 @@
+using Titano.App.Library;
+using Titano.Core.Model;
+using Titano.Data.Repositories;
+using Titano.Testing;
+
+namespace Titano.App.Tests.Library;
+
+/// Mixed mode (BRIEF §4.4): the server's sequences without a copy here count in the Year and Camera choices and the timeline.
+public sealed class LibraryFacetsTests
+{
+ private static readonly ArchiveStats Local = new(3, 6_000, 60_000, [new YearBucket(2026, 3, 6_000, 60_000)],
+ [new MonthBucket(2026, 9, 2, 5_000), new MonthBucket(2026, 2, 1, 1_000)],
+ [new CameraBucket("Canon", "Canon EOS R5", 2, 5_000, 50_000), new CameraBucket("NIKON CORPORATION", "NIKON Z 8", 1, 1_000, 10_000)], [],
+ new ArchiveHealth(0, 0, 0, 0, 0, 0, 0));
+
+ private static Sequence Remote(DateTime? first, string? make, string? model, int frames) => new()
+ {
+ Id = Guid.CreateVersion7(),
+ ArchiveId = Guid.Empty,
+ Title = "Remote",
+ Folder = string.Empty,
+ Origin = SequenceOrigin.Server,
+ SyncState = SyncState.RemoteOnly,
+ FirstCapture = first,
+ CameraMake = make,
+ CameraModel = model,
+ FrameCount = frames,
+ TotalBytes = frames * 10L,
+ };
+
+ [Test]
+ public void RemoteCardsJoinTheYearsMonthsAndCameras()
+ {
+ Sequence[] remote =
+ [
+ Remote(new DateTime(2024, 5, 3), "SONY", "ILCE-7M4", 2_000),
+ Remote(new DateTime(2026, 9, 20), "Canon", "Canon EOS R5", 500),
+ Remote(null, null, null, 10),
+ ];
+
+ var stats = LibraryFacets.Of(Local, remote, OriginFilter.Any);
+
+ Assert.SequenceEqual([2024, 2026], stats.ByYear.Select(y => y.Year));
+ Assert.Equal(new YearBucket(2024, 1, 2_000, 20_000), stats.ByYear[0]);
+ Assert.Equal(new YearBucket(2026, 4, 6_500, 65_000), stats.ByYear[1]);
+ Assert.SequenceEqual([(2024, 5), (2026, 2), (2026, 9)], stats.ByMonth.Select(m => (m.Year, m.Month)));
+ Assert.Equal(new MonthBucket(2026, 9, 3, 5_500), stats.ByMonth[2]);
+ Assert.Equal(3, stats.ByCamera.Single(c => c.Model == "Canon EOS R5").Sequences);
+ Assert.Equal(1, stats.ByCamera.Single(c => c.Model == "ILCE-7M4").Sequences);
+ Assert.Equal(1, stats.ByCamera.Single(c => c.Model is null).Sequences, "a card without camera counts under none");
+ Assert.Equal(Local.Sequences, stats.Sequences, "the totals stay the index's own");
+
+ var timeline = LibraryTimeline.From(stats, new DateTime(2026, 10, 6));
+ Assert.SequenceEqual([2026, 2025, 2024], timeline.Years, "a year only the server has gets its band");
+ Assert.Equal(2_000.0, timeline.Bands[2].Values[4]);
+ }
+
+ [Test]
+ public void TheOriginFilterDecidesWhoCounts()
+ {
+ Sequence[] remote = [Remote(new DateTime(2024, 5, 3), "SONY", "ILCE-7M4", 2_000)];
+
+ var local = LibraryFacets.Of(Local, remote, OriginFilter.Local);
+ Assert.SequenceEqual([2026], local.ByYear.Select(y => y.Year), "on this PC: the index alone");
+ Assert.False(local.ByCamera.Any(c => c.Model == "ILCE-7M4"));
+
+ var server = LibraryFacets.Of(Local, remote, OriginFilter.Server);
+ Assert.SequenceEqual([2024], server.ByYear.Select(y => y.Year), "only on server: the remote cards alone");
+ Assert.SequenceEqual(["ILCE-7M4"], server.ByCamera.Select(c => c.Model));
+ Assert.SequenceEqual([(2024, 5)], server.ByMonth.Select(m => (m.Year, m.Month)));
+
+ Assert.SequenceEqual(Local.ByYear, LibraryFacets.Of(Local, [], OriginFilter.Any).ByYear, "signed out, nothing changes");
+ }
+}
diff --git a/tests/Titano.App.Tests/Library/LibraryFilterTests.cs b/tests/Titano.App.Tests/Library/LibraryFilterTests.cs
new file mode 100644
index 00000000..a5f9eb6c
--- /dev/null
+++ b/tests/Titano.App.Tests/Library/LibraryFilterTests.cs
@@ -0,0 +1,58 @@
+using Titano.App.Library;
+using Titano.Core.Model;
+using Titano.Testing;
+
+namespace Titano.App.Tests.Library;
+
+/// The Status choices of Main.html (analysed, proxies, rendered, synced): the index's query and the same test in memory agree.
+public sealed class LibraryFilterTests
+{
+ private static Sequence Sequence(int rendered, SyncState sync, SequenceStatus status = SequenceStatus.None) => new()
+ {
+ Id = Guid.CreateVersion7(),
+ ArchiveId = Guid.CreateVersion7(),
+ Folder = "2026/x",
+ RenderedCount = rendered,
+ SyncState = sync,
+ Status = status,
+ };
+
+ [Test]
+ public void RenderedAndSyncedAskTheIndexForRendersAndSyncStates()
+ {
+ Assert.Equal(true, new LibraryFilter { Status = StatusFilter.Rendered }.ToQuery(50, null).Rendered);
+ Assert.Equal(false, new LibraryFilter { Status = StatusFilter.NotRendered }.ToQuery(50, null).Rendered);
+ Assert.Null(new LibraryFilter { Status = StatusFilter.Analysed }.ToQuery(50, null).Rendered);
+ Assert.SequenceEqual([SyncState.InSync, SyncState.LocalAhead], new LibraryFilter { Status = StatusFilter.Synced }.ToQuery(50, null).SyncStates!);
+ Assert.Null(new LibraryFilter { Status = StatusFilter.Rendered }.ToQuery(50, null).SyncStates);
+ var (with, without) = LibraryFilter.Flags(StatusFilter.NotRendered);
+ Assert.Equal(SequenceStatus.None, with | without, "renders are counted, not flagged");
+ }
+
+ [Test]
+ public void TheSameChoicesMatchInMemory()
+ {
+ var rendered = Sequence(2, SyncState.InSync, SequenceStatus.AnalyzedLight);
+ var bare = Sequence(0, SyncState.LocalOnly);
+ var ahead = Sequence(0, SyncState.ServerAhead);
+
+ Assert.True(LibraryFilter.MatchesStatus(rendered, StatusFilter.Rendered));
+ Assert.False(LibraryFilter.MatchesStatus(bare, StatusFilter.Rendered));
+ Assert.True(LibraryFilter.MatchesStatus(bare, StatusFilter.NotRendered));
+ Assert.True(LibraryFilter.MatchesStatus(rendered, StatusFilter.Synced));
+ Assert.False(LibraryFilter.MatchesStatus(ahead, StatusFilter.Synced), "the server is ahead: not synced");
+ Assert.True(LibraryFilter.MatchesStatus(rendered, StatusFilter.Analysed));
+ Assert.True(LibraryFilter.MatchesStatus(bare, StatusFilter.Any));
+ Assert.False(new LibraryFilter { Status = StatusFilter.NotRendered }.Matches(rendered));
+ }
+
+ [Test]
+ public void TheBriefsExampleViewCanBeSaved()
+ {
+ var filter = new LibraryFilter { Status = StatusFilter.NotRendered, Text = "night" };
+ var view = SavedView.Of(Guid.CreateVersion7(), "Night, 4K, not rendered", filter);
+ Assert.Equal(StatusFilter.NotRendered, view.Status);
+ Assert.True(view.Matches(filter));
+ Assert.Equal(filter.Status, view.ToFilter().Status);
+ }
+}
diff --git a/tests/Titano.App.Tests/Library/LibraryScreenSmokeTests.cs b/tests/Titano.App.Tests/Library/LibraryScreenSmokeTests.cs
index 0b492f4a..e7296598 100644
--- a/tests/Titano.App.Tests/Library/LibraryScreenSmokeTests.cs
+++ b/tests/Titano.App.Tests/Library/LibraryScreenSmokeTests.cs
@@ -15,7 +15,7 @@ namespace Titano.App.Tests.Library;
///
/// The Library's new states of --capture () on the sample index while signed in to the
/// sample server, rendered in both themes in the real main window: the timeline, a selection with the whole mass actions
-/// bar and its delete dry run, the server's sequences as remote cards, and saved views.
+/// bar and its delete dry run, the server's sequences as remote cards, saved views and Save view, and the archive's trash.
///
[WindowsOnly]
[Serial]
@@ -34,11 +34,12 @@ public sealed class LibraryScreenSmokeTests
await LibraryScenes.ShowAsync(app.Shell, "timeline");
Assert.True(library.IsTimeline, "the timeline shows its bands");
Assert.True(library.IsGrid, "the cards stay under the bands");
- Assert.Equal(2, library.TimelineBands.Count, "one band per year, 2026 and 2025");
+ Assert.Equal(2, library.TimelineBands.Count, "one band per year, 2026 and 2025, the server's sequences included");
Assert.True(library.TimelineBand >= 0 && library.TimelineSlot >= 0, "the chosen month is outlined");
Assert.True(library.IsYearFiltered, "a month narrows the Library to its year");
await app.ExpectAsync("library-timeline", waitForThumbnails: true);
- Assert.True(app.FindAll().Any(t => t.IsVisible && t.ActualHeight > 0), "the bands are drawn");
+ var bands = Assert.NotNull(app.FindAll().FirstOrDefault(t => t.IsVisible && t.ActualHeight > 0), "the bands are drawn");
+ Assert.True(bands.Focusable, "the keyboard reaches the months");
await LibraryScenes.ShowAsync(app.Shell, "mass");
Assert.Equal(LibraryScenes.MassSelection, library.SelectionCount);
@@ -65,10 +66,13 @@ public sealed class LibraryScreenSmokeTests
{
dialog.Close();
}
- // The sample dialogs cancel every confirmation: nothing moves.
+ // The sample dialogs cancel every confirmation: the delete dialog closes and nothing moves.
var selected = library.SelectedItems().Select(i => i.Id).ToList();
- Assert.False(await SequenceDeletion.RunAsync(app.Shell, selected));
+ Assert.False(await library.DeleteAsync(selected));
+ Assert.Null(library.Dialog, "the delete dialog closes once it is answered");
foreach (var id in selected) Assert.NotNull(await app.Services.Database!.Sequences.GetAsync(id));
+ var first = library.Items.First(i => i.IsSelected);
+ Assert.True(library.AnalyseItemCommand.CanExecute(first) && library.RenderItemCommand.CanExecute(first), "the quick actions run on this PC's engine");
await LibraryScenes.ShowAsync(app.Shell, "remote");
Assert.True(library.ShowsOrigin, "signed in, the origin filter shows");
@@ -77,7 +81,10 @@ public sealed class LibraryScreenSmokeTests
Assert.True(library.IsSingleSelection);
Assert.False(library.DeleteCommand.CanExecute(null), "a remote card has nothing here to delete");
Assert.True(library.DownloadCommand.CanExecute(null), "its originals can come here");
+ Assert.False(library.RevealCommand.CanExecute(null), "a remote card has no folder here");
+ Assert.Equal(Core.Localization.Loc.L("Library.Blocked.ServerOnly"), library.RevealToolTip);
await app.ExpectAsync("library-remote");
+ Assert.True(library.Years.Count > 1, "the server's years are choices too");
library.ClearFiltersCommand.Execute(null);
await library.RefreshAsync();
@@ -86,6 +93,21 @@ public sealed class LibraryScreenSmokeTests
await library.RefreshAsync();
Assert.True(library.IsViewActive);
Assert.True(library.Items.Count > 0 && library.Items.All(i => i.Sequence.CameraModel == "NIKON Z 8"));
+
+ await LibraryScenes.ShowAsync(app.Shell, "viewname");
+ var naming = Assert.NotNull(library.Dialog as ViewNameDialogViewModel, "Save view asks a name");
+ Assert.True(naming.SaveCommand.CanExecute(null), "the status filter's label is a free name");
+ Assert.False(library.IsContentEnabled, "the screen behind a dialog takes no input");
+ await app.ExpectAsync("library-viewname");
+ naming.CloseCommand.Execute(null);
+ Assert.Null(library.Dialog);
+
+ await ArchiveScenes.ShowAsync(app.Shell, "trash");
+ var trash = Assert.NotNull(app.Shell.Archive.Dialog as TrashDialogViewModel, "Maintenance › Trash… opens the trash");
+ Assert.Equal(2, trash.Rows.Count, "the sample's deleted sequences");
+ Assert.True(trash.HasRows);
+ await app.ExpectAsync("archive-trash-sample");
+ trash.CloseCommand.Execute(null);
});
[Test]