Titano: Library completion, remote editing, accessibility and RTL pass, remaining translations #3
No files matched your search
@@ -36,6 +36,7 @@
|
||||
<data name="Archive.Copy.Title" xml:space="preserve"><value>Folder to copy into the archive</value><comment>long</comment></data>
|
||||
<data name="Archive.Delete.Action" xml:space="preserve"><value>Move to trash</value></data>
|
||||
<data name="Archive.Delete.Blocked" xml:space="preserve"><value>Not moved: {0} · {1}</value><comment>long</comment></data>
|
||||
<data name="Archive.Delete.Checking" xml:space="preserve"><value>Checking {0} of {1}…</value><comment>long</comment></data>
|
||||
<data name="Archive.Delete.Done.one" xml:space="preserve"><value>{0:N0} sequence moved to the trash</value><comment>long</comment></data>
|
||||
<data name="Archive.Delete.Done.other" xml:space="preserve"><value>{0:N0} sequences moved to the trash</value><comment>long</comment></data>
|
||||
<data name="Archive.Delete.Failed" xml:space="preserve"><value>The sequences could not move to the trash</value><comment>long</comment></data>
|
||||
@@ -49,12 +50,18 @@
|
||||
<data name="Archive.Delete.Message" xml:space="preserve"><value>{0} and {1} ({2}) leave the library and move to the archive's trash; nothing is erased.</value><comment>long</comment></data>
|
||||
<data name="Archive.Delete.More.one" xml:space="preserve"><value>+ {0:N0} more</value><comment>long</comment></data>
|
||||
<data name="Archive.Delete.More.other" xml:space="preserve"><value>+ {0:N0} more</value><comment>long</comment></data>
|
||||
<data name="Archive.Delete.Moving" xml:space="preserve"><value>Moving to the trash: {0} of {1}</value><comment>long</comment></data>
|
||||
<data name="Archive.Delete.Nothing" xml:space="preserve"><value>Nothing can move to the trash</value><comment>long</comment></data>
|
||||
<data name="Archive.Delete.Progress.one" xml:space="preserve"><value>Deleting {0:N0} sequence</value><comment>long</comment></data>
|
||||
<data name="Archive.Delete.Progress.other" xml:space="preserve"><value>Deleting {0:N0} sequences</value><comment>long</comment></data>
|
||||
<data name="Archive.Delete.Reason.ArchiveRoot" xml:space="preserve"><value>its photos are the archive root</value><comment>long</comment></data>
|
||||
<data name="Archive.Delete.Reason.Busy" xml:space="preserve"><value>a job is working on it</value><comment>long</comment></data>
|
||||
<data name="Archive.Delete.Reason.ContainsSequences" xml:space="preserve"><value>other sequences are inside its folder</value><comment>long</comment></data>
|
||||
<data name="Archive.Delete.Reason.FolderMissing" xml:space="preserve"><value>its folder is missing; the Orphans check removes it</value><comment>long</comment></data>
|
||||
<data name="Archive.Delete.Reason.ForeignSidecar" xml:space="preserve"><value>its folder holds another sequence; scan the archive first</value><comment>long</comment></data>
|
||||
<data name="Archive.Delete.Reason.Offline" xml:space="preserve"><value>the archive is offline or read-only</value><comment>long</comment></data>
|
||||
<data name="Archive.Delete.Removed.one" xml:space="preserve"><value>{0:N0} empty sequence removed</value><comment>long</comment></data>
|
||||
<data name="Archive.Delete.Removed.other" xml:space="preserve"><value>{0:N0} empty sequences removed</value><comment>long</comment></data>
|
||||
<data name="Archive.Delete.Type" xml:space="preserve"><value>Type {0} to confirm</value><comment>long</comment></data>
|
||||
<data name="Archive.Delete.Undo" xml:space="preserve"><value>Undo</value></data>
|
||||
<data name="Archive.Dialog.Cancel" xml:space="preserve"><value>Cancel</value></data>
|
||||
|
||||
@@ -22,11 +22,13 @@
|
||||
<data name="Library.Adopt.Title" xml:space="preserve"><value>Adopt a folder</value></data>
|
||||
<data name="Library.Blocked.Archives" xml:space="preserve"><value>Move works on the sequences of one archive at a time.</value><comment>long</comment></data>
|
||||
<data name="Library.Blocked.InSync" xml:space="preserve"><value>The same on this PC and on the server: nothing to sync.</value><comment>long</comment></data>
|
||||
<data name="Library.Blocked.NoActiveView" xml:space="preserve"><value>No saved view is in use; choose one first.</value><comment>long</comment></data>
|
||||
<data name="Library.Blocked.NoDownloadRight" xml:space="preserve"><value>Your server account cannot download originals.</value><comment>long</comment></data>
|
||||
<data name="Library.Blocked.NoIndex" xml:space="preserve"><value>The library index is not open.</value><comment>long</comment></data>
|
||||
<data name="Library.Blocked.NoSelection" xml:space="preserve"><value>Select one or more sequences first.</value><comment>long</comment></data>
|
||||
<data name="Library.Blocked.NoSyncRight" xml:space="preserve"><value>Your server account cannot change this sequence.</value><comment>long</comment></data>
|
||||
<data name="Library.Blocked.NoUploadRight" xml:space="preserve"><value>Your server account cannot upload.</value><comment>long</comment></data>
|
||||
<data name="Library.Blocked.NoViews" xml:space="preserve"><value>Save a view first.</value><comment>long</comment></data>
|
||||
<data name="Library.Blocked.NotConnected" xml:space="preserve"><value>Sign in to a Titano Server first, on the Server screen.</value><comment>long</comment></data>
|
||||
<data name="Library.Blocked.NothingToDownload" xml:space="preserve"><value>The selected sequences have nothing to fetch from the server.</value><comment>long</comment></data>
|
||||
<data name="Library.Blocked.NothingToUpload" xml:space="preserve"><value>The server already has what the selected sequences hold.</value><comment>long</comment></data>
|
||||
@@ -52,7 +54,7 @@
|
||||
<data name="Library.Export.Show" xml:space="preserve"><value>Show</value></data>
|
||||
<data name="Library.Export.Title" xml:space="preserve"><value>Export the list to</value></data>
|
||||
<data name="Library.Filter.AnyCamera" xml:space="preserve"><value>All cameras</value></data>
|
||||
<data name="Library.Filter.AnyOrigin" xml:space="preserve"><value>This PC and server</value></data>
|
||||
<data name="Library.Filter.AnyOrigin" xml:space="preserve"><value>All origins</value></data>
|
||||
<data name="Library.Filter.AnyStatus" xml:space="preserve"><value>Any status</value></data>
|
||||
<data name="Library.Filter.AnyTag" xml:space="preserve"><value>All tags</value></data>
|
||||
<data name="Library.Filter.AnyYear" xml:space="preserve"><value>All years</value></data>
|
||||
@@ -64,8 +66,11 @@
|
||||
<data name="Library.Filter.Status.Analysed" xml:space="preserve"><value>Analysed</value></data>
|
||||
<data name="Library.Filter.Status.NoProxies" xml:space="preserve"><value>Without proxies</value></data>
|
||||
<data name="Library.Filter.Status.NotAnalysed" xml:space="preserve"><value>Not analysed</value></data>
|
||||
<data name="Library.Filter.Status.NotRendered" xml:space="preserve"><value>Not rendered</value></data>
|
||||
<data name="Library.Filter.Status.NotVerified" xml:space="preserve"><value>Not verified</value></data>
|
||||
<data name="Library.Filter.Status.Proxies" xml:space="preserve"><value>With proxies</value></data>
|
||||
<data name="Library.Filter.Status.Rendered" xml:space="preserve"><value>Rendered</value></data>
|
||||
<data name="Library.Filter.Status.Synced" xml:space="preserve"><value>Synced</value></data>
|
||||
<data name="Library.Filter.Status.Verified" xml:space="preserve"><value>Verified</value></data>
|
||||
<data name="Library.Filter.Status.Warnings" xml:space="preserve"><value>With warnings</value></data>
|
||||
<data name="Library.Filter.Tags" xml:space="preserve"><value>Tags</value></data>
|
||||
@@ -79,6 +84,7 @@
|
||||
<data name="Library.Rate.None" xml:space="preserve"><value>No rating</value></data>
|
||||
<data name="Library.Rate.Stars.one" xml:space="preserve"><value>{0:N0} star</value></data>
|
||||
<data name="Library.Rate.Stars.other" xml:space="preserve"><value>{0:N0} stars</value></data>
|
||||
<data name="Library.Remote.Unavailable" xml:space="preserve"><value>The server cannot be reached</value><comment>long</comment></data>
|
||||
<data name="Library.Rescan" xml:space="preserve"><value>Rescan</value></data>
|
||||
<data name="Library.Search" xml:space="preserve"><value>Search title, camera, tag</value></data>
|
||||
<data name="Library.Selection.Count.one" xml:space="preserve"><value>{0:N0} selected</value></data>
|
||||
|
||||
+10
-8
@@ -305,8 +305,10 @@
|
||||
<data name="Tooltips.Library.Adopt" xml:space="preserve"><value>Index photos you already have, in place; choose their top folder</value></data>
|
||||
<data name="Tooltips.Library.Analyse" xml:space="preserve"><value>Deep analysis of every frame · runs as a job in the background</value></data>
|
||||
<data name="Tooltips.Library.AnalyseAll" xml:space="preserve"><value>Deep analysis of the selected sequences · runs as one job</value></data>
|
||||
<data name="Tooltips.Library.AnalyseServer" xml:space="preserve"><value>Deep analysis of every frame on the server, where the originals are · the server runs it as a job</value></data>
|
||||
<data name="Tooltips.Library.Camera" xml:space="preserve"><value>Show only one camera</value></data>
|
||||
<data name="Tooltips.Library.Card" xml:space="preserve"><value>Click selects · Ctrl+click adds · double-click opens · move over the picture to scrub</value></data>
|
||||
<data name="Tooltips.Library.CardRemote" xml:space="preserve"><value>Click selects · Ctrl+click adds · double-click opens with proxies · on the server only, no scrubbing here</value></data>
|
||||
<data name="Tooltips.Library.ClearFilters" xml:space="preserve"><value>Show every sequence again</value></data>
|
||||
<data name="Tooltips.Library.ClearSelection" xml:space="preserve"><value>Deselect every sequence</value></data>
|
||||
<data name="Tooltips.Library.Connect" xml:space="preserve"><value>Work with the archive of a Titano Server</value></data>
|
||||
@@ -341,7 +343,7 @@
|
||||
<data name="Tooltips.Library.Proxies" xml:space="preserve"><value>Build JPEG proxies for fast editing · runs as a job</value></data>
|
||||
<data name="Tooltips.Library.ProxiesAll" xml:space="preserve"><value>Build proxies of the selected sequences · runs as one job</value></data>
|
||||
<data name="Tooltips.Library.QuickRender" xml:space="preserve"><value>Queue a render with {0}, this sequence's recommended or default preset · runs as a job</value></data>
|
||||
<data name="Tooltips.Library.QuickRenderServer" xml:space="preserve"><value>Render with {0} on the server, where the originals are · the server or a render node runs it</value></data>
|
||||
<data name="Tooltips.Library.QuickRenderServer" xml:space="preserve"><value>Render with the sequence's own preset on the server, where the originals are · the server or a render node runs it</value></data>
|
||||
<data name="Tooltips.Library.QuickSync.DownloadOriginals" xml:space="preserve"><value>Fetch the server's originals this PC lacks, verified by hash · runs as a transfer job</value></data>
|
||||
<data name="Tooltips.Library.QuickSync.GetExports" xml:space="preserve"><value>Fetch the server's renders this sequence lacks · runs as a transfer job</value></data>
|
||||
<data name="Tooltips.Library.QuickSync.KeepMine" xml:space="preserve"><value>Settings changed here and on the server; choose what to keep on the Server screen</value></data>
|
||||
@@ -377,19 +379,19 @@
|
||||
<data name="Tooltips.Library.Status.Warnings.other" xml:space="preserve"><value>{0:N0} warnings; open the sequence for details</value></data>
|
||||
<data name="Tooltips.Library.Tags" xml:space="preserve"><value>Show only one tag</value></data>
|
||||
<data name="Tooltips.Library.Timeline" xml:space="preserve"><value>Year bands with photos per month above the cards</value></data>
|
||||
<data name="Tooltips.Library.TimelineBands" xml:space="preserve"><value>Click a month to show its year and scroll to its sequences</value></data>
|
||||
<data name="Tooltips.Library.TimelineBands" xml:space="preserve"><value>Click a month, or move with the arrow keys and press Enter, to show its year and scroll to its sequences</value></data>
|
||||
<data name="Tooltips.Library.Verify" xml:space="preserve"><value>Re-read every file and compare its hash with the index · runs as a job</value></data>
|
||||
<data name="Tooltips.Library.VerifyAll" xml:space="preserve"><value>Verify the hashes of the selected sequences · runs as one job</value></data>
|
||||
<data name="Tooltips.Library.ViewChoice" xml:space="preserve"><value>Show the search, filters and sort saved under this name</value></data>
|
||||
<data name="Tooltips.Library.ViewDelete" xml:space="preserve"><value>Forget the saved view on screen; no sequence is touched</value></data>
|
||||
<data name="Tooltips.Library.ViewName" xml:space="preserve"><value>A short name, such as "Night, 4K, not analysed"</value></data>
|
||||
<data name="Tooltips.Library.ViewRename" xml:space="preserve"><value>Give the saved view on screen another name</value></data>
|
||||
<data name="Tooltips.Library.ViewDelete" xml:space="preserve"><value>Forget the saved view in use; no sequence is touched</value></data>
|
||||
<data name="Tooltips.Library.ViewName" xml:space="preserve"><value>A short name, such as "Night, 4K, not rendered"</value></data>
|
||||
<data name="Tooltips.Library.ViewRename" xml:space="preserve"><value>Give the saved view in use another name</value></data>
|
||||
<data name="Tooltips.Library.ViewRenameApply" xml:space="preserve"><value>Rename the view · Enter</value></data>
|
||||
<data name="Tooltips.Library.ViewSave" xml:space="preserve"><value>Save the search, filters and sort on screen as a named view</value></data>
|
||||
<data name="Tooltips.Library.ViewSave" xml:space="preserve"><value>Save the search, filters and sort in use as a named view</value></data>
|
||||
<data name="Tooltips.Library.ViewSaveApply" xml:space="preserve"><value>Save the view · Enter</value></data>
|
||||
<data name="Tooltips.Library.ViewUndo" xml:space="preserve"><value>Save the deleted view again</value></data>
|
||||
<data name="Tooltips.Library.Views" xml:space="preserve"><value>Saved views: show one, or save the filters on screen</value></data>
|
||||
<data name="Tooltips.Library.ViewsActive" xml:space="preserve"><value>Saved view on screen: {0}</value></data>
|
||||
<data name="Tooltips.Library.Views" xml:space="preserve"><value>Saved views: show one, or save the filters in use</value></data>
|
||||
<data name="Tooltips.Library.ViewsActive" xml:space="preserve"><value>Saved view in use: {0}</value></data>
|
||||
<data name="Tooltips.Library.ViewsApply" xml:space="preserve"><value>Choose a saved view to show</value></data>
|
||||
<data name="Tooltips.Library.Year" xml:space="preserve"><value>Show only one year of first capture</value></data>
|
||||
<data name="Tooltips.Nav.About" xml:space="preserve"><value>Version, diagnostics and links</value></data>
|
||||
|
||||
+10
-3
@@ -33,6 +33,7 @@
|
||||
<data name="Archive.Copy.Title" xml:space="preserve"><value>Cartella da copiare nell'archivio</value></data>
|
||||
<data name="Archive.Delete.Action" xml:space="preserve"><value>Sposta nel cestino</value></data>
|
||||
<data name="Archive.Delete.Blocked" xml:space="preserve"><value>Non spostata: {0} · {1}</value></data>
|
||||
<data name="Archive.Delete.Checking" xml:space="preserve"><value>Controllo {0} di {1}…</value></data>
|
||||
<data name="Archive.Delete.Done.one" xml:space="preserve"><value>{0:N0} sequenza spostata nel cestino</value></data>
|
||||
<data name="Archive.Delete.Done.other" xml:space="preserve"><value>{0:N0} sequenze spostate nel cestino</value></data>
|
||||
<data name="Archive.Delete.Failed" xml:space="preserve"><value>Impossibile spostare le sequenze nel cestino</value></data>
|
||||
@@ -43,14 +44,20 @@
|
||||
<data name="Archive.Delete.Keep" xml:space="preserve"><value>Mantieni</value></data>
|
||||
<data name="Archive.Delete.Kept" xml:space="preserve"><value>Restano nel cestino dell'archivio, ripristinabili da Manutenzione.</value></data>
|
||||
<data name="Archive.Delete.Message" xml:space="preserve"><value>{0} e {1} ({2}) escono dalla libreria e vanno nel cestino dell'archivio; non viene cancellato nulla.</value></data>
|
||||
<data name="Archive.Delete.More.one" xml:space="preserve"><value>+ {0:N0} altra</value></data>
|
||||
<data name="Archive.Delete.More.one" xml:space="preserve"><value>+ un'altra</value></data>
|
||||
<data name="Archive.Delete.More.other" xml:space="preserve"><value>+ altre {0:N0}</value></data>
|
||||
<data name="Archive.Delete.Nothing" xml:space="preserve"><value>Niente può andare nel cestino</value></data>
|
||||
<data name="Archive.Delete.Moving" xml:space="preserve"><value>Spostamento nel cestino: {0} di {1}</value></data>
|
||||
<data name="Archive.Delete.Nothing" xml:space="preserve"><value>Nessuna sequenza può andare nel cestino</value></data>
|
||||
<data name="Archive.Delete.Progress.one" xml:space="preserve"><value>Eliminazione di {0:N0} sequenza</value></data>
|
||||
<data name="Archive.Delete.Progress.other" xml:space="preserve"><value>Eliminazione di {0:N0} sequenze</value></data>
|
||||
<data name="Archive.Delete.Reason.ArchiveRoot" xml:space="preserve"><value>le sue foto sono la radice dell'archivio</value></data>
|
||||
<data name="Archive.Delete.Reason.Busy" xml:space="preserve"><value>un'attività ci sta lavorando</value></data>
|
||||
<data name="Archive.Delete.Reason.ContainsSequences" xml:space="preserve"><value>altre sequenze stanno nella sua cartella</value></data>
|
||||
<data name="Archive.Delete.Reason.ContainsSequences" xml:space="preserve"><value>la sua cartella contiene altre sequenze</value></data>
|
||||
<data name="Archive.Delete.Reason.FolderMissing" xml:space="preserve"><value>manca la sua cartella; la rimuove il controllo Orfani</value></data>
|
||||
<data name="Archive.Delete.Reason.ForeignSidecar" xml:space="preserve"><value>la sua cartella contiene un'altra sequenza; prima esegui una scansione</value></data>
|
||||
<data name="Archive.Delete.Reason.Offline" xml:space="preserve"><value>l'archivio non è raggiungibile o è di sola lettura</value></data>
|
||||
<data name="Archive.Delete.Removed.one" xml:space="preserve"><value>{0:N0} sequenza vuota rimossa</value></data>
|
||||
<data name="Archive.Delete.Removed.other" xml:space="preserve"><value>{0:N0} sequenze vuote rimosse</value></data>
|
||||
<data name="Archive.Delete.Type" xml:space="preserve"><value>Digita {0} per confermare</value></data>
|
||||
<data name="Archive.Delete.Undo" xml:space="preserve"><value>Annulla</value></data>
|
||||
<data name="Archive.Dialog.Cancel" xml:space="preserve"><value>Annulla</value></data>
|
||||
|
||||
@@ -22,11 +22,13 @@
|
||||
<data name="Library.Adopt.Title" xml:space="preserve"><value>Adotta una cartella</value></data>
|
||||
<data name="Library.Blocked.Archives" xml:space="preserve"><value>Lo spostamento agisce sulle sequenze di un solo archivio alla volta.</value></data>
|
||||
<data name="Library.Blocked.InSync" xml:space="preserve"><value>Uguale su questo PC e sul server: niente da sincronizzare.</value></data>
|
||||
<data name="Library.Blocked.NoActiveView" xml:space="preserve"><value>Nessuna vista salvata in uso; prima scegline una.</value></data>
|
||||
<data name="Library.Blocked.NoDownloadRight" xml:space="preserve"><value>Il tuo account sul server non può scaricare gli originali.</value></data>
|
||||
<data name="Library.Blocked.NoIndex" xml:space="preserve"><value>L'indice della libreria non è aperto.</value></data>
|
||||
<data name="Library.Blocked.NoSelection" xml:space="preserve"><value>Prima seleziona una o più sequenze.</value></data>
|
||||
<data name="Library.Blocked.NoSyncRight" xml:space="preserve"><value>Il tuo account sul server non può modificare questa sequenza.</value></data>
|
||||
<data name="Library.Blocked.NoUploadRight" xml:space="preserve"><value>Il tuo account sul server non può caricare.</value></data>
|
||||
<data name="Library.Blocked.NoViews" xml:space="preserve"><value>Prima salva una vista.</value></data>
|
||||
<data name="Library.Blocked.NotConnected" xml:space="preserve"><value>Prima accedi a un Titano Server, nella schermata Server.</value></data>
|
||||
<data name="Library.Blocked.NothingToDownload" xml:space="preserve"><value>Le sequenze selezionate non hanno nulla da ricevere dal server.</value></data>
|
||||
<data name="Library.Blocked.NothingToUpload" xml:space="preserve"><value>Il server ha già tutto ciò che contengono le sequenze selezionate.</value></data>
|
||||
@@ -52,7 +54,7 @@
|
||||
<data name="Library.Export.Show" xml:space="preserve"><value>Mostra</value></data>
|
||||
<data name="Library.Export.Title" xml:space="preserve"><value>Esporta l'elenco in</value></data>
|
||||
<data name="Library.Filter.AnyCamera" xml:space="preserve"><value>Tutte le fotocamere</value></data>
|
||||
<data name="Library.Filter.AnyOrigin" xml:space="preserve"><value>Questo PC e server</value></data>
|
||||
<data name="Library.Filter.AnyOrigin" xml:space="preserve"><value>Tutte le origini</value></data>
|
||||
<data name="Library.Filter.AnyStatus" xml:space="preserve"><value>Qualsiasi stato</value></data>
|
||||
<data name="Library.Filter.AnyTag" xml:space="preserve"><value>Tutti i tag</value></data>
|
||||
<data name="Library.Filter.AnyYear" xml:space="preserve"><value>Tutti gli anni</value></data>
|
||||
@@ -64,8 +66,11 @@
|
||||
<data name="Library.Filter.Status.Analysed" xml:space="preserve"><value>Analizzate</value></data>
|
||||
<data name="Library.Filter.Status.NoProxies" xml:space="preserve"><value>Senza proxy</value></data>
|
||||
<data name="Library.Filter.Status.NotAnalysed" xml:space="preserve"><value>Non analizzate</value></data>
|
||||
<data name="Library.Filter.Status.NotRendered" xml:space="preserve"><value>Non renderizzate</value></data>
|
||||
<data name="Library.Filter.Status.NotVerified" xml:space="preserve"><value>Non verificate</value></data>
|
||||
<data name="Library.Filter.Status.Proxies" xml:space="preserve"><value>Con proxy</value></data>
|
||||
<data name="Library.Filter.Status.Rendered" xml:space="preserve"><value>Renderizzate</value></data>
|
||||
<data name="Library.Filter.Status.Synced" xml:space="preserve"><value>Sincronizzate</value></data>
|
||||
<data name="Library.Filter.Status.Verified" xml:space="preserve"><value>Verificate</value></data>
|
||||
<data name="Library.Filter.Status.Warnings" xml:space="preserve"><value>Con avvisi</value></data>
|
||||
<data name="Library.Filter.Tags" xml:space="preserve"><value>Tag</value></data>
|
||||
@@ -79,6 +84,7 @@
|
||||
<data name="Library.Rate.None" xml:space="preserve"><value>Nessun voto</value></data>
|
||||
<data name="Library.Rate.Stars.one" xml:space="preserve"><value>{0:N0} stella</value></data>
|
||||
<data name="Library.Rate.Stars.other" xml:space="preserve"><value>{0:N0} stelle</value></data>
|
||||
<data name="Library.Remote.Unavailable" xml:space="preserve"><value>Il server non è raggiungibile</value></data>
|
||||
<data name="Library.Rescan" xml:space="preserve"><value>Ripeti scansione</value></data>
|
||||
<data name="Library.Search" xml:space="preserve"><value>Cerca titolo, fotocamera, tag</value></data>
|
||||
<data name="Library.Selection.Count.one" xml:space="preserve"><value>{0:N0} selezionata</value></data>
|
||||
|
||||
+12
-10
@@ -305,8 +305,10 @@
|
||||
<data name="Tooltips.Library.Adopt" xml:space="preserve"><value>Indicizza le foto che hai già, dove si trovano; scegli la loro cartella principale</value></data>
|
||||
<data name="Tooltips.Library.Analyse" xml:space="preserve"><value>Analisi approfondita di ogni fotogramma · viene eseguita come attività in background</value></data>
|
||||
<data name="Tooltips.Library.AnalyseAll" xml:space="preserve"><value>Analisi approfondita delle sequenze selezionate · un'unica attività</value></data>
|
||||
<data name="Tooltips.Library.AnalyseServer" xml:space="preserve"><value>Analisi approfondita di ogni fotogramma sul server, dove sono gli originali · il server la esegue come attività</value></data>
|
||||
<data name="Tooltips.Library.Camera" xml:space="preserve"><value>Mostra una sola fotocamera</value></data>
|
||||
<data name="Tooltips.Library.Card" xml:space="preserve"><value>Clic seleziona · Ctrl+clic aggiunge · doppio clic apre · scorri sull'immagine per sfogliare</value></data>
|
||||
<data name="Tooltips.Library.CardRemote" xml:space="preserve"><value>Clic seleziona · Ctrl+clic aggiunge · doppio clic apre con i proxy · solo sul server, qui niente scorrimento</value></data>
|
||||
<data name="Tooltips.Library.ClearFilters" xml:space="preserve"><value>Mostra di nuovo tutte le sequenze</value></data>
|
||||
<data name="Tooltips.Library.ClearSelection" xml:space="preserve"><value>Deseleziona tutte le sequenze</value></data>
|
||||
<data name="Tooltips.Library.Connect" xml:space="preserve"><value>Lavora con l'archivio di un Titano Server</value></data>
|
||||
@@ -331,8 +333,8 @@
|
||||
<data name="Tooltips.Library.Mass.Rate.other" xml:space="preserve"><value>Imposta il voto di {0:N0} sequenze, nei sidecar e nell'indice</value></data>
|
||||
<data name="Tooltips.Library.Mass.Tag.one" xml:space="preserve"><value>Aggiungi o rimuovi tag su {0:N0} sequenza</value></data>
|
||||
<data name="Tooltips.Library.Mass.Tag.other" xml:space="preserve"><value>Aggiungi o rimuovi tag su {0:N0} sequenze</value></data>
|
||||
<data name="Tooltips.Library.Mass.Upload.one" xml:space="preserve"><value>Invia ciò che manca al server di {0:N0} sequenza (originali e impostazioni, o render) · come attività di trasferimento</value></data>
|
||||
<data name="Tooltips.Library.Mass.Upload.other" xml:space="preserve"><value>Invia ciò che manca al server di {0:N0} sequenze (originali e impostazioni, o render) · come attività di trasferimento</value></data>
|
||||
<data name="Tooltips.Library.Mass.Upload.one" xml:space="preserve"><value>Invia al server ciò che gli manca di {0:N0} sequenza (originali e impostazioni, o render) · come attività di trasferimento</value></data>
|
||||
<data name="Tooltips.Library.Mass.Upload.other" xml:space="preserve"><value>Invia al server ciò che gli manca di {0:N0} sequenze (originali e impostazioni, o render) · come attività di trasferimento</value></data>
|
||||
<data name="Tooltips.Library.Mass.Verify.one" xml:space="preserve"><value>Rileggi {0:N0} sequenza e confronta ogni hash con l'indice · come attività</value></data>
|
||||
<data name="Tooltips.Library.Mass.Verify.other" xml:space="preserve"><value>Rileggi {0:N0} sequenze e confronta ogni hash con l'indice · un'attività per archivio</value></data>
|
||||
<data name="Tooltips.Library.Open" xml:space="preserve"><value>Apre nell'editor della sequenza · Invio</value></data>
|
||||
@@ -341,7 +343,7 @@
|
||||
<data name="Tooltips.Library.Proxies" xml:space="preserve"><value>Crea proxy JPEG per una modifica veloce · viene eseguita come attività</value></data>
|
||||
<data name="Tooltips.Library.ProxiesAll" xml:space="preserve"><value>Crea i proxy delle sequenze selezionate · un'unica attività</value></data>
|
||||
<data name="Tooltips.Library.QuickRender" xml:space="preserve"><value>Metti in coda un render con {0}, il preset consigliato o predefinito della sequenza · come attività</value></data>
|
||||
<data name="Tooltips.Library.QuickRenderServer" xml:space="preserve"><value>Renderizza con {0} sul server, dove sono gli originali · lo esegue il server o un nodo di render</value></data>
|
||||
<data name="Tooltips.Library.QuickRenderServer" xml:space="preserve"><value>Renderizza con il preset della sequenza sul server, dove sono gli originali · lo esegue il server o un nodo di render</value></data>
|
||||
<data name="Tooltips.Library.QuickSync.DownloadOriginals" xml:space="preserve"><value>Scarica gli originali del server che mancano su questo PC, verificati con l'hash · come attività di trasferimento</value></data>
|
||||
<data name="Tooltips.Library.QuickSync.GetExports" xml:space="preserve"><value>Ricevi i render del server che mancano a questa sequenza · come attività di trasferimento</value></data>
|
||||
<data name="Tooltips.Library.QuickSync.KeepMine" xml:space="preserve"><value>Impostazioni cambiate qui e sul server; scegli cosa tenere nella schermata Server</value></data>
|
||||
@@ -377,19 +379,19 @@
|
||||
<data name="Tooltips.Library.Status.Warnings.other" xml:space="preserve"><value>{0:N0} avvisi; apri la sequenza per i dettagli</value></data>
|
||||
<data name="Tooltips.Library.Tags" xml:space="preserve"><value>Mostra un solo tag</value></data>
|
||||
<data name="Tooltips.Library.Timeline" xml:space="preserve"><value>Fasce per anno con le foto di ogni mese sopra le schede</value></data>
|
||||
<data name="Tooltips.Library.TimelineBands" xml:space="preserve"><value>Fai clic su un mese per mostrarne l'anno e scorrere alle sue sequenze</value></data>
|
||||
<data name="Tooltips.Library.TimelineBands" xml:space="preserve"><value>Fai clic su un mese, o spostati con le frecce e premi Invio, per mostrarne l'anno e scorrere alle sue sequenze</value></data>
|
||||
<data name="Tooltips.Library.Verify" xml:space="preserve"><value>Rilegge ogni file e ne confronta l'hash con l'indice · viene eseguita come attività</value></data>
|
||||
<data name="Tooltips.Library.VerifyAll" xml:space="preserve"><value>Verifica gli hash delle sequenze selezionate · un'unica attività</value></data>
|
||||
<data name="Tooltips.Library.ViewChoice" xml:space="preserve"><value>Mostra la ricerca, i filtri e l'ordinamento salvati con questo nome</value></data>
|
||||
<data name="Tooltips.Library.ViewDelete" xml:space="preserve"><value>Dimentica la vista salvata sullo schermo; nessuna sequenza viene toccata</value></data>
|
||||
<data name="Tooltips.Library.ViewName" xml:space="preserve"><value>Un nome breve, ad esempio "Notte, 4K, non analizzate"</value></data>
|
||||
<data name="Tooltips.Library.ViewRename" xml:space="preserve"><value>Dai un altro nome alla vista salvata sullo schermo</value></data>
|
||||
<data name="Tooltips.Library.ViewDelete" xml:space="preserve"><value>Dimentica la vista salvata in uso; nessuna sequenza viene toccata</value></data>
|
||||
<data name="Tooltips.Library.ViewName" xml:space="preserve"><value>Un nome breve, ad esempio "Notte, 4K, non renderizzate"</value></data>
|
||||
<data name="Tooltips.Library.ViewRename" xml:space="preserve"><value>Dai un altro nome alla vista salvata in uso</value></data>
|
||||
<data name="Tooltips.Library.ViewRenameApply" xml:space="preserve"><value>Rinomina la vista · Invio</value></data>
|
||||
<data name="Tooltips.Library.ViewSave" xml:space="preserve"><value>Salva ricerca, filtri e ordinamento sullo schermo come vista con nome</value></data>
|
||||
<data name="Tooltips.Library.ViewSave" xml:space="preserve"><value>Salva come vista con nome la ricerca, i filtri e l'ordinamento in uso</value></data>
|
||||
<data name="Tooltips.Library.ViewSaveApply" xml:space="preserve"><value>Salva la vista · Invio</value></data>
|
||||
<data name="Tooltips.Library.ViewUndo" xml:space="preserve"><value>Salva di nuovo la vista eliminata</value></data>
|
||||
<data name="Tooltips.Library.Views" xml:space="preserve"><value>Viste salvate: mostrane una o salva i filtri sullo schermo</value></data>
|
||||
<data name="Tooltips.Library.ViewsActive" xml:space="preserve"><value>Vista salvata sullo schermo: {0}</value></data>
|
||||
<data name="Tooltips.Library.Views" xml:space="preserve"><value>Viste salvate: mostrane una o salva i filtri in uso</value></data>
|
||||
<data name="Tooltips.Library.ViewsActive" xml:space="preserve"><value>Vista salvata in uso: {0}</value></data>
|
||||
<data name="Tooltips.Library.ViewsApply" xml:space="preserve"><value>Scegli una vista salvata da mostrare</value></data>
|
||||
<data name="Tooltips.Library.Year" xml:space="preserve"><value>Mostra un solo anno del primo scatto</value></data>
|
||||
<data name="Tooltips.Nav.About" xml:space="preserve"><value>Versione, diagnostica e collegamenti</value></data>
|
||||
|
||||
@@ -132,6 +132,23 @@
|
||||
</Border>
|
||||
</DataTemplate>
|
||||
|
||||
<!-- Delete…: how far the dry run, then the move into the trash, has got; Cancel stops between two sequences. -->
|
||||
<DataTemplate DataType="{x:Type ar:DeleteDialogViewModel}">
|
||||
<Border Style="{StaticResource Border.Dialog}" Width="460">
|
||||
<StackPanel>
|
||||
<TextBlock Text="{Binding Heading}" Style="{StaticResource Text.Title}" TextTrimming="CharacterEllipsis" />
|
||||
<ProgressBar Maximum="1" Value="{Binding Progress, Mode=OneWay}" Margin="0,16,0,0" AutomationProperties.Name="{Binding Heading}"
|
||||
AutomationProperties.HelpText="{Binding BusyText}" />
|
||||
<DockPanel Margin="0,18,0,0">
|
||||
<Button DockPanel.Dock="Right" Content="{l:Loc Archive.Dialog.Cancel}" Command="{Binding CloseCommand}" ToolTip="{Binding CloseToolTip}" IsCancel="True"
|
||||
IsDefault="True" MinWidth="96" />
|
||||
<TextBlock Text="{Binding BusyText}" Foreground="{DynamicResource Brush.TextMuted}" VerticalAlignment="Center" TextTrimming="CharacterEllipsis"
|
||||
Typography.NumeralAlignment="Tabular" Margin="0,0,12,0" />
|
||||
</DockPanel>
|
||||
</StackPanel>
|
||||
</Border>
|
||||
</DataTemplate>
|
||||
|
||||
<!-- The archive's trash: deleted sequences, newest first, each with Restore. -->
|
||||
<DataTemplate DataType="{x:Type ar:TrashDialogViewModel}">
|
||||
<Border Style="{StaticResource Border.Dialog}" Width="640" MaxHeight="520">
|
||||
@@ -144,7 +161,9 @@
|
||||
</Grid.RowDefinitions>
|
||||
<TextBlock Text="{Binding Heading}" Style="{StaticResource Text.Title}" TextTrimming="CharacterEllipsis" />
|
||||
<TextBlock Grid.Row="1" Text="{Binding SummaryText}" Foreground="{DynamicResource Brush.TextMuted}" Margin="0,8,0,8" Typography.NumeralAlignment="Tabular" />
|
||||
<ListBox Grid.Row="2" ItemsSource="{Binding Rows}" MinHeight="120" AutomationProperties.Name="{l:Loc Archive.Trash.List}" KeyboardNavigation.TabNavigation="Continue">
|
||||
<!-- An empty trash is the summary sentence alone. -->
|
||||
<ListBox Grid.Row="2" ItemsSource="{Binding Rows}" MinHeight="120" AutomationProperties.Name="{l:Loc Archive.Trash.List}" KeyboardNavigation.TabNavigation="Continue"
|
||||
Visibility="{Binding HasRows, Converter={StaticResource BoolToVisibility}}">
|
||||
<ListBox.ItemContainerStyle>
|
||||
<Style TargetType="ListBoxItem" BasedOn="{StaticResource ListBoxItem.PlainRow}">
|
||||
<Setter Property="AutomationProperties.Name" Value="{Binding Title}" />
|
||||
|
||||
@@ -5,11 +5,11 @@ namespace Titano.App.Archiving;
|
||||
/// <summary>
|
||||
/// The Archive views that <c>--capture</c> renders (<c>archive-<view>-<theme>.png</c>) and the screen smoke
|
||||
/// tests check, on the sample archive: the tree with figures and charts, the maintenance view with its reports, the
|
||||
/// rebuild dialog, and the Move dialog with its dry run.
|
||||
/// rebuild dialog, the Move dialog with its dry run, and the trash (Maintenance › Trash…) with deleted sequences.
|
||||
/// </summary>
|
||||
public static class ArchiveScenes
|
||||
{
|
||||
public static readonly IReadOnlyList<string> Views = ["overview", "maintenance", "rebuild", "move"];
|
||||
public static readonly IReadOnlyList<string> Views = ["overview", "maintenance", "rebuild", "move", "trash"];
|
||||
|
||||
public static async Task ShowAsync(ShellViewModel shell, string view)
|
||||
{
|
||||
@@ -41,6 +41,11 @@ public static class ArchiveScenes
|
||||
await move.PlanAsync();
|
||||
}
|
||||
break;
|
||||
case "trash":
|
||||
archive.ViewIndex = 1;
|
||||
await archive.OpenTrashAsync();
|
||||
if (archive.Dialog is TrashDialogViewModel trash && archive.SelectedArchive is { } shown) trash.Show(SampleReports.Trash(shown.Id, locations));
|
||||
break;
|
||||
default:
|
||||
throw new ArgumentOutOfRangeException(nameof(view), view, "Unknown Archive view.");
|
||||
}
|
||||
|
||||
@@ -29,6 +29,7 @@ public static class DeletePlans
|
||||
Message = Loc.L("Archive.Delete.Message", Loc.Plural("Shell.Status.Photos", plan.Frames), Loc.Plural("Archive.Delete.Files", plan.Files),
|
||||
Formatting.Bytes(plan.Bytes)),
|
||||
Detail = string.Join(Environment.NewLine, lines),
|
||||
IsDetailMonospaced = false,
|
||||
DetailToolTip = Loc.L("Tooltips.Archive.DeletePlan"),
|
||||
SafeText = Loc.L("Archive.Delete.Keep"),
|
||||
SafeToolTip = Loc.L("Tooltips.Archive.DeleteKeep"),
|
||||
|
||||
@@ -5,7 +5,7 @@ using Titano.Data.Repositories;
|
||||
namespace Titano.App.Archiving;
|
||||
|
||||
/// <summary>
|
||||
/// Capture and smoke-test data ONLY: maintenance reports and rebuild counts over the sample archive's sequences
|
||||
/// Capture and smoke-test data ONLY: maintenance reports, rebuild counts and trash rows over the sample archive's sequences
|
||||
/// (the sample index has no sidecars on disk, so the real searches would find nothing to show).
|
||||
/// </summary>
|
||||
public static class SampleReports
|
||||
@@ -31,6 +31,17 @@ public static class SampleReports
|
||||
? new OrphanReport([], [], [])
|
||||
: new OrphanReport([new SequenceOrphans(sequences[2].Folder, ["IMG_0412.CR2", "IMG_0413.CR2"], [])], [sequences[3]], ["2024/2024-12-31 Unsorted"]);
|
||||
|
||||
/// <summary>The trash dialog's rows: the first two sample sequences, deleted an hour and a day ago (nothing moves on disk).</summary>
|
||||
public static IReadOnlyList<TrashEntry> Trash(Guid archiveId, IReadOnlyList<SequenceLocation> sequences)
|
||||
{
|
||||
var now = DateTimeOffset.UtcNow;
|
||||
return
|
||||
[
|
||||
.. sequences.Take(2).Select((s, i) => new TrashEntry(archiveId, s.Id.ToString("N"), s.Id, s.Title ?? s.Folder, s.Folder, 1_200 * (i + 1), 1_206 * (i + 1),
|
||||
31_457_280L * 1_200 * (i + 1), now.AddHours(-1 - (23 * i)), Environment.UserName)),
|
||||
];
|
||||
}
|
||||
|
||||
/// <summary>What the rebuild dialog counts: a sidecar in every sequence folder but the last two, read by metadata instead.</summary>
|
||||
public static IReadOnlyList<SequenceFolder> Folders(IReadOnlyList<SequenceLocation> sequences)
|
||||
{
|
||||
|
||||
@@ -52,12 +52,16 @@ public sealed class TrashDialogViewModel : ArchiveDialogViewModel
|
||||
{
|
||||
if (!Set(ref _rows, value)) return;
|
||||
OnPropertyChanged(nameof(IsEmpty));
|
||||
OnPropertyChanged(nameof(HasRows));
|
||||
OnPropertyChanged(nameof(SummaryText));
|
||||
}
|
||||
}
|
||||
|
||||
public bool IsEmpty => _rows.Count == 0;
|
||||
|
||||
/// <summary>The list shows; an empty trash is its summary sentence alone.</summary>
|
||||
public bool HasRows => _rows.Count > 0;
|
||||
|
||||
/// <summary>"3 sequences · 182 GB", or "The trash is empty".</summary>
|
||||
public string SummaryText => _rows.Count == 0 ? Loc.L("Archive.Trash.Empty")
|
||||
: Loc.Plural("Shell.Status.Sequences", _rows.Count) + " · " + Formatting.Bytes(_rows.Sum(r => r.Entry.Bytes));
|
||||
|
||||
@@ -172,7 +172,8 @@ public sealed class SampleData
|
||||
|
||||
/// <summary>
|
||||
/// The server's side: six sequences this PC also holds (two the same, one with settings changed on both sides, one
|
||||
/// with more originals on the server, one with more here, one with renders this PC lacks) and two only on the server;
|
||||
/// with more originals on the server, one with more here, one with renders this PC lacks) and two only on the server
|
||||
/// (captured in the months the local sample spans, so they join the Library's year choices and timeline);
|
||||
/// the others are only here.
|
||||
/// </summary>
|
||||
private async Task FillServerAsync(TitanoDatabase db, IReadOnlyList<Sequence> local)
|
||||
@@ -201,6 +202,11 @@ public sealed class SampleData
|
||||
ArchiveId = Guid.Empty,
|
||||
Title = "Sunrise over Superga",
|
||||
Folder = "2026/2026-07-02 Sony ILCE-7M4",
|
||||
CameraMake = "SONY",
|
||||
CameraModel = "ILCE-7M4",
|
||||
FirstCapture = DateTime.Today.AddDays(-96).AddHours(5.2),
|
||||
LastCapture = DateTime.Today.AddDays(-96).AddHours(6.8),
|
||||
MedianInterval = 2,
|
||||
FrameCount = 2_880,
|
||||
TotalBytes = 2_880 * 21_000_000L,
|
||||
Status = SequenceStatus.ProxiesBuilt | SequenceStatus.ThumbsBuilt,
|
||||
@@ -213,6 +219,11 @@ public sealed class SampleData
|
||||
ArchiveId = Guid.Empty,
|
||||
Title = "Lake Como storm",
|
||||
Folder = "2026/2026-08-21 Canon EOS R5",
|
||||
CameraMake = "Canon",
|
||||
CameraModel = "Canon EOS R5",
|
||||
FirstCapture = DateTime.Today.AddDays(-46).AddHours(16.5),
|
||||
LastCapture = DateTime.Today.AddDays(-46).AddHours(17.3),
|
||||
MedianInterval = 2,
|
||||
FrameCount = 1_450,
|
||||
TotalBytes = 1_450 * 45_000_000L,
|
||||
Status = SequenceStatus.ThumbsBuilt,
|
||||
|
||||
@@ -6,9 +6,12 @@ public sealed record ConfirmRequest
|
||||
public required string Heading { get; init; }
|
||||
public required string Message { get; init; }
|
||||
|
||||
/// <summary>Monospaced detail (certificate fingerprint); null hides it.</summary>
|
||||
/// <summary>Detail block (certificate fingerprint, list of what changes); null hides it.</summary>
|
||||
public string? Detail { get; init; }
|
||||
|
||||
/// <summary>The detail is set in the monospaced font (fingerprints, values to compare); false sets it in the UI font (names, sentences).</summary>
|
||||
public bool IsDetailMonospaced { get; init; } = true;
|
||||
|
||||
public string? DetailToolTip { get; init; }
|
||||
public required string SafeText { get; init; }
|
||||
public required string SafeToolTip { get; init; }
|
||||
|
||||
@@ -74,7 +74,11 @@ public sealed class LibraryActions(ShellViewModel shell)
|
||||
{
|
||||
if (sequence is { Origin: SequenceOrigin.Server, SyncState: SyncState.RemoteOnly })
|
||||
{
|
||||
if (Remote() is not { } remote) return;
|
||||
if (Remote() is not { } remote)
|
||||
{
|
||||
NotConnected();
|
||||
return;
|
||||
}
|
||||
await PostAsync(async () =>
|
||||
{
|
||||
var (project, width, height) = await RemoteProjectAsync(remote, sequence.Id);
|
||||
@@ -127,7 +131,11 @@ public sealed class LibraryActions(ShellViewModel shell)
|
||||
/// </summary>
|
||||
public async Task<Guid?> OpenRemoteAsync(Sequence sequence)
|
||||
{
|
||||
if (Remote() is not { } remote || Services.Engine is not { } engine) return null;
|
||||
if (Remote() is not { } remote || Services.Engine is not { } engine)
|
||||
{
|
||||
NotConnected();
|
||||
return null;
|
||||
}
|
||||
if (remote.Service.OpenRemote(remote.Server, sequence.Id) is not null)
|
||||
{
|
||||
shell.OpenSequence(sequence.Id);
|
||||
@@ -173,7 +181,12 @@ public sealed class LibraryActions(ShellViewModel shell)
|
||||
|
||||
private async Task QueueAsync(ArchiveJobRequest request)
|
||||
{
|
||||
if (Services.Engine is not { } engine || request.Targets.Count == 0) return;
|
||||
if (request.Targets.Count == 0) return;
|
||||
if (Services.Engine is not { } engine)
|
||||
{
|
||||
shell.Notify(Loc.L("Library.Blocked.NoIndex"));
|
||||
return;
|
||||
}
|
||||
await engine.EnqueueAsync(request);
|
||||
Queued(request.Kind, request.Label ?? string.Empty);
|
||||
}
|
||||
@@ -182,7 +195,11 @@ public sealed class LibraryActions(ShellViewModel shell)
|
||||
private async Task PostAsync(Func<Task<CreateJobRequest>> build, JobKind kind, string label)
|
||||
{
|
||||
var session = Services.Server;
|
||||
if (!CanPost || session.Flow is not { Address: { } address, Token: { } token }) return;
|
||||
if (!CanPost || session.Flow is not { Address: { } address, Token: { } token })
|
||||
{
|
||||
NotConnected();
|
||||
return;
|
||||
}
|
||||
try
|
||||
{
|
||||
var request = await build();
|
||||
@@ -197,6 +214,9 @@ public sealed class LibraryActions(ShellViewModel shell)
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>A remote card's action could not start: the session ended since the card was drawn.</summary>
|
||||
private void NotConnected() => shell.Notify(Loc.L("Library.Remote.Unavailable"), Loc.L("Library.Blocked.NotConnected"));
|
||||
|
||||
/// <summary>The project of a remote card: from its proxy cache when it was opened here, else from the server's manifest; and its frame size when cached.</summary>
|
||||
private static async Task<(ProjectSettings Project, int Width, int Height)> RemoteProjectAsync(RemoteSource remote, Guid id)
|
||||
{
|
||||
|
||||
@@ -7,11 +7,12 @@ namespace Titano.App.Library;
|
||||
/// <summary>
|
||||
/// The Library states that <c>--capture</c> renders (<c>library-<scene>-<theme>.png</c>) and the screen smoke
|
||||
/// tests check, on the sample index while signed in to the sample server: the timeline with a month chosen, a selection
|
||||
/// with the whole mass actions bar, and the server's sequences without a copy here as remote cards.
|
||||
/// with the whole mass actions bar, the server's sequences without a copy here as remote cards, and "Save view" naming
|
||||
/// the filters on screen.
|
||||
/// </summary>
|
||||
public static class LibraryScenes
|
||||
{
|
||||
public static readonly IReadOnlyList<string> Scenes = ["timeline", "mass", "remote"];
|
||||
public static readonly IReadOnlyList<string> Scenes = ["timeline", "mass", "remote", "viewname"];
|
||||
|
||||
/// <summary>Sequences selected for the mass actions bar.</summary>
|
||||
public const int MassSelection = 3;
|
||||
@@ -20,6 +21,7 @@ public static class LibraryScenes
|
||||
{
|
||||
var library = shell.Library;
|
||||
shell.Navigate(SectionKey.Library);
|
||||
library.Dialog?.CloseCommand.Execute(null);
|
||||
library.ClearSelectionCommand.Execute(null);
|
||||
library.ClearFiltersCommand.Execute(null);
|
||||
library.LayoutIndex = 0;
|
||||
@@ -45,6 +47,12 @@ public static class LibraryScenes
|
||||
// Remote thumbnails come through the sync engine's connection, not the local thumbnail service.
|
||||
for (var i = 0; i < 60 && library.Items.Any(item => item.Thumbnail is null); i++) await Task.Delay(50);
|
||||
break;
|
||||
case "viewname":
|
||||
library.SelectedStatus = library.Statuses.First(o => o.Value == StatusFilter.NotRendered);
|
||||
await library.RefreshAsync();
|
||||
library.OpenSaveView();
|
||||
if (library.Dialog is ViewNameDialogViewModel naming) naming.Name.Text = library.SelectedStatus.Label;
|
||||
break;
|
||||
default:
|
||||
throw new ArgumentOutOfRangeException(nameof(scene), scene, "Unknown Library scene.");
|
||||
}
|
||||
|
||||
@@ -6,7 +6,7 @@ using Titano.Data.Repositories;
|
||||
|
||||
namespace Titano.App.Library;
|
||||
|
||||
/// <summary>A named set of Library filters and sort ("Night, 4K, not analysed"), BRIEF §12.2.</summary>
|
||||
/// <summary>A named set of Library filters and sort ("Night, 4K, not rendered"), BRIEF §12.2.</summary>
|
||||
public sealed record SavedView
|
||||
{
|
||||
public const int MaxName = 40;
|
||||
|
||||
@@ -358,43 +358,50 @@
|
||||
</Grid>
|
||||
</Grid>
|
||||
|
||||
<!-- ===================== Mass operations on the selected, filtered set ===================== -->
|
||||
<!-- ===================== Mass operations on the selected, filtered set; Delete… apart at the far right (Archive.html) ===================== -->
|
||||
<Border Grid.Row="3" Style="{StaticResource Border.Panel}" Padding="14,8,6,0" Margin="0,14,0,0" MinHeight="48"
|
||||
Visibility="{Binding IsOverview, Converter={StaticResource BoolToVisibility}}">
|
||||
<WrapPanel VerticalAlignment="Center">
|
||||
<TextBlock Text="{l:Loc Archive.Set.Label}" Foreground="{DynamicResource Brush.TextMuted}" VerticalAlignment="Center" Margin="0,0,10,8" />
|
||||
<Button Style="{StaticResource Button.Bar}" Margin="0,0,8,8" BorderBrush="{DynamicResource Brush.Accent}" Click="OnOpenMenu" ToolTip="{l:Loc Tooltips.Archive.Set}"
|
||||
AutomationProperties.Name="{l:Loc Archive.Set.Filter}">
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<TextBlock Text="{Binding SetText}" VerticalAlignment="Center" Typography.NumeralAlignment="Tabular" MaxWidth="260" TextTrimming="CharacterEllipsis" />
|
||||
<ui:Icon Glyph="{StaticResource Icon.ChevronDown}" Margin="6,0,0,0" />
|
||||
</StackPanel>
|
||||
<Button.ContextMenu>
|
||||
<ContextMenu>
|
||||
<MenuItem Header="{l:Loc Library.Filter.Camera}" ItemsSource="{Binding CameraChoices}" ItemContainerStyle="{StaticResource MenuItem.Choice}"
|
||||
ToolTip="{l:Loc Tooltips.Archive.FilterCamera}" />
|
||||
<MenuItem Header="{l:Loc Library.Filter.Status}" ItemsSource="{Binding StatusChoices}" ItemContainerStyle="{StaticResource MenuItem.Choice}"
|
||||
ToolTip="{l:Loc Tooltips.Archive.FilterStatus}" />
|
||||
<MenuItem Header="{l:Loc Library.Filter.Tags}" ItemsSource="{Binding TagChoices}" ItemContainerStyle="{StaticResource MenuItem.Choice}"
|
||||
ToolTip="{l:Loc Tooltips.Archive.FilterTag}" />
|
||||
<Separator />
|
||||
<MenuItem Header="{l:Loc Archive.Set.ClearFilter}" Command="{Binding ClearFilterCommand}" ToolTip="{l:Loc Tooltips.Archive.ClearFilter}" ToolTipService.ShowOnDisabled="True" />
|
||||
</ContextMenu>
|
||||
</Button.ContextMenu>
|
||||
</Button>
|
||||
<Border Width="1" Height="22" Background="{DynamicResource Brush.Stroke}" Margin="4,0,12,8" />
|
||||
<Button Style="{StaticResource Button.Bar}" Margin="0,0,8,8" Content="{l:Loc Archive.Set.Analyse}" Command="{Binding AnalyseSetCommand}" ToolTip="{Binding AnalyseSetToolTip}" />
|
||||
<Button Style="{StaticResource Button.Bar}" Margin="0,0,8,8" Content="{l:Loc Archive.Set.Proxies}" Command="{Binding ProxiesSetCommand}" ToolTip="{Binding ProxiesSetToolTip}" />
|
||||
<Button Style="{StaticResource Button.Bar}" Margin="0,0,8,8" Content="{l:Loc Archive.Set.Thumbnails}" Command="{Binding ThumbnailsSetCommand}"
|
||||
ToolTip="{Binding ThumbnailsSetToolTip}" />
|
||||
<Button Style="{StaticResource Button.Bar}" Margin="0,0,8,8" Content="{l:Loc Archive.Set.Verify}" Command="{Binding VerifySetCommand}" ToolTip="{Binding VerifySetToolTip}" />
|
||||
<Button Style="{StaticResource Button.Bar}" Margin="0,0,8,8" Content="{l:Loc Archive.Set.Rename}" Command="{Binding RenameSetCommand}" ToolTip="{Binding RenameSetToolTip}" />
|
||||
<Button Style="{StaticResource Button.Bar}" Margin="0,0,8,8" Content="{l:Loc Archive.Set.Move}" Command="{Binding MoveSetCommand}" ToolTip="{Binding MoveSetToolTip}" />
|
||||
<Button Style="{StaticResource Button.Bar}" Margin="0,0,8,8" Content="{l:Loc Archive.Set.Retag}" Command="{Binding RetagSetCommand}" ToolTip="{Binding RetagSetToolTip}" />
|
||||
<Button Style="{StaticResource Button.Bar}" Margin="0,0,8,8" Content="{l:Loc Archive.Set.Export}" Command="{Binding ExportSetCommand}" ToolTip="{Binding ExportSetToolTip}" />
|
||||
<Button Style="{StaticResource Button.Destructive}" Height="30" Margin="0,0,8,8" Content="{l:Loc Archive.Set.Delete}" Command="{Binding DeleteSetCommand}"
|
||||
ToolTip="{Binding DeleteSetToolTip}" />
|
||||
</WrapPanel>
|
||||
<!-- Delete… last in the tab order too. -->
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<WrapPanel VerticalAlignment="Center">
|
||||
<TextBlock Text="{l:Loc Archive.Set.Label}" Foreground="{DynamicResource Brush.TextMuted}" VerticalAlignment="Center" Margin="0,0,10,8" />
|
||||
<Button Style="{StaticResource Button.Bar}" Margin="0,0,8,8" BorderBrush="{DynamicResource Brush.Accent}" Click="OnOpenMenu" ToolTip="{l:Loc Tooltips.Archive.Set}"
|
||||
AutomationProperties.Name="{l:Loc Archive.Set.Filter}">
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<TextBlock Text="{Binding SetText}" VerticalAlignment="Center" Typography.NumeralAlignment="Tabular" MaxWidth="260" TextTrimming="CharacterEllipsis" />
|
||||
<ui:Icon Glyph="{StaticResource Icon.ChevronDown}" Margin="6,0,0,0" />
|
||||
</StackPanel>
|
||||
<Button.ContextMenu>
|
||||
<ContextMenu>
|
||||
<MenuItem Header="{l:Loc Library.Filter.Camera}" ItemsSource="{Binding CameraChoices}" ItemContainerStyle="{StaticResource MenuItem.Choice}"
|
||||
ToolTip="{l:Loc Tooltips.Archive.FilterCamera}" />
|
||||
<MenuItem Header="{l:Loc Library.Filter.Status}" ItemsSource="{Binding StatusChoices}" ItemContainerStyle="{StaticResource MenuItem.Choice}"
|
||||
ToolTip="{l:Loc Tooltips.Archive.FilterStatus}" />
|
||||
<MenuItem Header="{l:Loc Library.Filter.Tags}" ItemsSource="{Binding TagChoices}" ItemContainerStyle="{StaticResource MenuItem.Choice}"
|
||||
ToolTip="{l:Loc Tooltips.Archive.FilterTag}" />
|
||||
<Separator />
|
||||
<MenuItem Header="{l:Loc Archive.Set.ClearFilter}" Command="{Binding ClearFilterCommand}" ToolTip="{l:Loc Tooltips.Archive.ClearFilter}" ToolTipService.ShowOnDisabled="True" />
|
||||
</ContextMenu>
|
||||
</Button.ContextMenu>
|
||||
</Button>
|
||||
<Border Width="1" Height="22" Background="{DynamicResource Brush.Stroke}" Margin="4,0,12,8" />
|
||||
<Button Style="{StaticResource Button.Bar}" Margin="0,0,8,8" Content="{l:Loc Archive.Set.Analyse}" Command="{Binding AnalyseSetCommand}" ToolTip="{Binding AnalyseSetToolTip}" />
|
||||
<Button Style="{StaticResource Button.Bar}" Margin="0,0,8,8" Content="{l:Loc Archive.Set.Proxies}" Command="{Binding ProxiesSetCommand}" ToolTip="{Binding ProxiesSetToolTip}" />
|
||||
<Button Style="{StaticResource Button.Bar}" Margin="0,0,8,8" Content="{l:Loc Archive.Set.Thumbnails}" Command="{Binding ThumbnailsSetCommand}"
|
||||
ToolTip="{Binding ThumbnailsSetToolTip}" />
|
||||
<Button Style="{StaticResource Button.Bar}" Margin="0,0,8,8" Content="{l:Loc Archive.Set.Verify}" Command="{Binding VerifySetCommand}" ToolTip="{Binding VerifySetToolTip}" />
|
||||
<Button Style="{StaticResource Button.Bar}" Margin="0,0,8,8" Content="{l:Loc Archive.Set.Rename}" Command="{Binding RenameSetCommand}" ToolTip="{Binding RenameSetToolTip}" />
|
||||
<Button Style="{StaticResource Button.Bar}" Margin="0,0,8,8" Content="{l:Loc Archive.Set.Move}" Command="{Binding MoveSetCommand}" ToolTip="{Binding MoveSetToolTip}" />
|
||||
<Button Style="{StaticResource Button.Bar}" Margin="0,0,8,8" Content="{l:Loc Archive.Set.Retag}" Command="{Binding RetagSetCommand}" ToolTip="{Binding RetagSetToolTip}" />
|
||||
<Button Style="{StaticResource Button.Bar}" Margin="0,0,8,8" Content="{l:Loc Archive.Set.Export}" Command="{Binding ExportSetCommand}" ToolTip="{Binding ExportSetToolTip}" />
|
||||
</WrapPanel>
|
||||
<Button Grid.Column="1" Style="{StaticResource Button.Destructive}" Height="30" Margin="8,0,8,8" VerticalAlignment="Top" Content="{l:Loc Archive.Set.Delete}"
|
||||
Command="{Binding DeleteSetCommand}" ToolTip="{Binding DeleteSetToolTip}" />
|
||||
</Grid>
|
||||
</Border>
|
||||
|
||||
<ui:EmptyState Grid.Row="2" Message="{l:Loc Archive.Empty}" Visibility="{Binding IsEmpty, Converter={StaticResource BoolToVisibility}}">
|
||||
|
||||
@@ -97,7 +97,7 @@ public sealed class ArchiveViewModel : SectionViewModel
|
||||
MoveSetCommand = new AsyncRelayCommand(() => OpenRenameDialogAsync(RenameMode.Folders), () => HasSet() && IsOnline());
|
||||
RetagSetCommand = new RelayCommand(OpenRetag, () => HasSet() && IsOnline());
|
||||
ExportSetCommand = new AsyncRelayCommand(ExportAsync, HasSet);
|
||||
DeleteSetCommand = new AsyncRelayCommand(() => SequenceDeletion.RunAsync(Shell, [.. Set().Select(s => s.Id)]), () => HasSet() && IsOnline());
|
||||
DeleteSetCommand = new AsyncRelayCommand(DeleteSetAsync, () => HasSet() && IsOnline());
|
||||
TrashCommand = new AsyncRelayCommand(OpenTrashAsync, () => _archive is not null);
|
||||
|
||||
FindDuplicatesCommand = new AsyncRelayCommand(FindDuplicatesAsync, () => _archive is not null && _search is null);
|
||||
@@ -636,6 +636,17 @@ public sealed class ArchiveViewModel : SectionViewModel
|
||||
await dialog.PlanAsync();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Delete… on the set: the dry run, the typed confirmation and the move into the trash, in the in-window dialog the
|
||||
/// Library shares, which says how far it is and stops on Cancel. True when something left the archive.
|
||||
/// </summary>
|
||||
public async Task<bool> DeleteSetAsync()
|
||||
{
|
||||
var dialog = new DeleteDialogViewModel(Shell, [.. Set().Select(s => s.Id)], CloseDialog);
|
||||
OpenDialog(dialog);
|
||||
return await dialog.RunAsync();
|
||||
}
|
||||
|
||||
/// <summary>Opens the trash of the archive and reads it.</summary>
|
||||
public async Task OpenTrashAsync()
|
||||
{
|
||||
|
||||
@@ -59,6 +59,27 @@
|
||||
<DataTemplate x:Key="Template.Status" DataType="{x:Type v:CardStatus}">
|
||||
<ui:StatusGlyph Kind="{Binding Kind}" Text="{Binding Text}" ToolTip="{Binding ToolTip}" Margin="0,0,8,0" />
|
||||
</DataTemplate>
|
||||
<!-- A row's quick actions: on the hovered row, on selected rows and while the keyboard is in the row (Tab reaches them). -->
|
||||
<Style x:Key="Border.RowActions" TargetType="Border">
|
||||
<Setter Property="Visibility" Value="Collapsed" />
|
||||
<Style.Triggers>
|
||||
<DataTrigger Binding="{Binding IsMouseOver, RelativeSource={RelativeSource AncestorType=ListBoxItem}}" Value="True">
|
||||
<Setter Property="Visibility" Value="Visible" />
|
||||
</DataTrigger>
|
||||
<DataTrigger Binding="{Binding IsSelected, RelativeSource={RelativeSource AncestorType=ListBoxItem}}" Value="True">
|
||||
<Setter Property="Visibility" Value="Visible" />
|
||||
</DataTrigger>
|
||||
<DataTrigger Binding="{Binding IsKeyboardFocusWithin, RelativeSource={RelativeSource AncestorType=ListBoxItem}}" Value="True">
|
||||
<Setter Property="Visibility" Value="Visible" />
|
||||
</DataTrigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
<!-- The toolbar's filters: each capped and trimmed; they wrap to a second line rather than push the right-hand group out. -->
|
||||
<Style x:Key="ComboBox.ToolbarFilter" TargetType="ComboBox" BasedOn="{StaticResource ComboBox.Filter}">
|
||||
<Setter Property="Margin" Value="10,4,0,4" />
|
||||
<Setter Property="MaxWidth" Value="170" />
|
||||
<Setter Property="ItemTemplate" Value="{StaticResource Template.FilterOption}" />
|
||||
</Style>
|
||||
<ItemsPanelTemplate x:Key="Panel.Row">
|
||||
<StackPanel Orientation="Horizontal" />
|
||||
</ItemsPanelTemplate>
|
||||
@@ -93,7 +114,7 @@
|
||||
<Grid>
|
||||
<Grid IsEnabled="{Binding IsContentEnabled}">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="56" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="*" />
|
||||
<RowDefinition Height="Auto" />
|
||||
@@ -103,33 +124,34 @@
|
||||
<ColumnDefinition Width="Auto" />
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<!-- Toolbar (Main.html): search, filters, sort · saved views, layout switch, rescan. The search box gives way first. -->
|
||||
<Grid Grid.ColumnSpan="2" Margin="20,0">
|
||||
<!--
|
||||
Toolbar (Main.html): search, filters, sort · saved views, layout switch, rescan. The search box gives way first
|
||||
(down to 160 px); filters that still do not fit wrap to a second line, so the right-hand group is never cut.
|
||||
-->
|
||||
<Grid Grid.ColumnSpan="2" Margin="20,0" MinHeight="56">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*" MinWidth="140" MaxWidth="260" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="*" />
|
||||
<ColumnDefinition Width="*" MinWidth="160" MaxWidth="260" />
|
||||
<ColumnDefinition Width="3*" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<TextBox VerticalAlignment="Center" Text="{Binding SearchText, UpdateSourceTrigger=PropertyChanged}" ui:Field.Glyph="{StaticResource Icon.Search}"
|
||||
<TextBox VerticalAlignment="Top" Margin="0,12,0,0" Text="{Binding SearchText, UpdateSourceTrigger=PropertyChanged}" ui:Field.Glyph="{StaticResource Icon.Search}"
|
||||
ui:Field.Placeholder="{l:Loc Library.Search}" ToolTip="{l:Loc Tooltips.Library.Search}" AutomationProperties.Name="{l:Loc Library.Search}" />
|
||||
<StackPanel Grid.Column="1" Orientation="Horizontal" VerticalAlignment="Center">
|
||||
<ComboBox Style="{StaticResource ComboBox.Filter}" Margin="10,0,0,0" ItemsSource="{Binding Years}" SelectedItem="{Binding SelectedYear}" Tag="{Binding IsYearFiltered}"
|
||||
ItemTemplate="{StaticResource Template.FilterOption}" ToolTip="{l:Loc Tooltips.Library.Year}" AutomationProperties.Name="{l:Loc Library.Filter.Year}" />
|
||||
<ComboBox Style="{StaticResource ComboBox.Filter}" Margin="10,0,0,0" MaxWidth="170" ItemsSource="{Binding Cameras}" SelectedItem="{Binding SelectedCamera}"
|
||||
Tag="{Binding IsCameraFiltered}" ItemTemplate="{StaticResource Template.FilterOption}" ToolTip="{l:Loc Tooltips.Library.Camera}"
|
||||
AutomationProperties.Name="{l:Loc Library.Filter.Camera}" />
|
||||
<ComboBox Style="{StaticResource ComboBox.Filter}" Margin="10,0,0,0" ItemsSource="{Binding Statuses}" SelectedItem="{Binding SelectedStatus}" Tag="{Binding IsStatusFiltered}"
|
||||
ItemTemplate="{StaticResource Template.FilterOption}" ToolTip="{l:Loc Tooltips.Library.Status}" AutomationProperties.Name="{l:Loc Library.Filter.Status}" />
|
||||
<ComboBox Style="{StaticResource ComboBox.Filter}" Margin="10,0,0,0" MaxWidth="170" ItemsSource="{Binding Tags}" SelectedItem="{Binding SelectedTag}" Tag="{Binding IsTagFiltered}"
|
||||
ItemTemplate="{StaticResource Template.FilterOption}" ToolTip="{l:Loc Tooltips.Library.Tags}" AutomationProperties.Name="{l:Loc Library.Filter.Tags}" />
|
||||
<ComboBox Style="{StaticResource ComboBox.Filter}" Margin="10,0,0,0" ItemsSource="{Binding Origins}" SelectedItem="{Binding SelectedOrigin}" Tag="{Binding IsOriginFiltered}"
|
||||
ItemTemplate="{StaticResource Template.FilterOption}" ToolTip="{l:Loc Tooltips.Library.Origin}" AutomationProperties.Name="{l:Loc Library.Filter.Origin}"
|
||||
<WrapPanel Grid.Column="1" VerticalAlignment="Top" Margin="0,8">
|
||||
<ComboBox Style="{StaticResource ComboBox.ToolbarFilter}" ItemsSource="{Binding Years}" SelectedItem="{Binding SelectedYear}" Tag="{Binding IsYearFiltered}"
|
||||
ToolTip="{l:Loc Tooltips.Library.Year}" AutomationProperties.Name="{l:Loc Library.Filter.Year}" />
|
||||
<ComboBox Style="{StaticResource ComboBox.ToolbarFilter}" ItemsSource="{Binding Cameras}" SelectedItem="{Binding SelectedCamera}" Tag="{Binding IsCameraFiltered}"
|
||||
ToolTip="{l:Loc Tooltips.Library.Camera}" AutomationProperties.Name="{l:Loc Library.Filter.Camera}" />
|
||||
<ComboBox Style="{StaticResource ComboBox.ToolbarFilter}" ItemsSource="{Binding Statuses}" SelectedItem="{Binding SelectedStatus}" Tag="{Binding IsStatusFiltered}"
|
||||
ToolTip="{l:Loc Tooltips.Library.Status}" AutomationProperties.Name="{l:Loc Library.Filter.Status}" />
|
||||
<ComboBox Style="{StaticResource ComboBox.ToolbarFilter}" ItemsSource="{Binding Tags}" SelectedItem="{Binding SelectedTag}" Tag="{Binding IsTagFiltered}"
|
||||
ToolTip="{l:Loc Tooltips.Library.Tags}" AutomationProperties.Name="{l:Loc Library.Filter.Tags}" />
|
||||
<ComboBox Style="{StaticResource ComboBox.ToolbarFilter}" ItemsSource="{Binding Origins}" SelectedItem="{Binding SelectedOrigin}" Tag="{Binding IsOriginFiltered}"
|
||||
ToolTip="{l:Loc Tooltips.Library.Origin}" AutomationProperties.Name="{l:Loc Library.Filter.Origin}"
|
||||
Visibility="{Binding ShowsOrigin, Converter={StaticResource BoolToVisibility}}" />
|
||||
<ComboBox Style="{StaticResource ComboBox.Filter}" Margin="10,0,0,0" ItemsSource="{Binding Sorts}" SelectedItem="{Binding SelectedSort}"
|
||||
ItemTemplate="{StaticResource Template.FilterOption}" ToolTip="{l:Loc Tooltips.Library.Sort}" AutomationProperties.Name="{l:Loc Library.Sort}" />
|
||||
</StackPanel>
|
||||
<StackPanel Grid.Column="3" Orientation="Horizontal" VerticalAlignment="Center" Margin="10,0,0,0">
|
||||
<ComboBox Style="{StaticResource ComboBox.ToolbarFilter}" ItemsSource="{Binding Sorts}" SelectedItem="{Binding SelectedSort}"
|
||||
ToolTip="{l:Loc Tooltips.Library.Sort}" AutomationProperties.Name="{l:Loc Library.Sort}" />
|
||||
</WrapPanel>
|
||||
<StackPanel Grid.Column="2" Orientation="Horizontal" VerticalAlignment="Top" Margin="10,12,0,0">
|
||||
<Button x:Name="ViewsButton" Click="OnOpenMenu" ui:ButtonIcon.Glyph="{StaticResource Icon.Filter}" ToolTip="{Binding ViewsToolTip}"
|
||||
AutomationProperties.Name="{l:Loc Library.Views}" Margin="0,0,10,0">
|
||||
<Button.Style>
|
||||
@@ -145,12 +167,12 @@
|
||||
<Button.ContextMenu>
|
||||
<ContextMenu>
|
||||
<MenuItem Header="{l:Loc Library.Views.Apply}" ItemsSource="{Binding ViewChoices}" ItemContainerStyle="{StaticResource MenuItem.View}"
|
||||
IsEnabled="{Binding HasViews}" ToolTip="{l:Loc Tooltips.Library.ViewsApply}" ToolTipService.ShowOnDisabled="True" />
|
||||
IsEnabled="{Binding HasViews}" ToolTip="{Binding ViewsApplyToolTip}" ToolTipService.ShowOnDisabled="True" />
|
||||
<Separator />
|
||||
<MenuItem Header="{l:Loc Library.Views.SaveMenu}" Command="{Binding SaveViewCommand}" ToolTip="{l:Loc Tooltips.Library.ViewSave}" ToolTipService.ShowOnDisabled="True" />
|
||||
<MenuItem Header="{l:Loc Library.Views.RenameMenu}" Command="{Binding RenameViewCommand}" ToolTip="{l:Loc Tooltips.Library.ViewRename}"
|
||||
<MenuItem Header="{l:Loc Library.Views.SaveMenu}" Command="{Binding SaveViewCommand}" ToolTip="{Binding ViewSaveToolTip}" ToolTipService.ShowOnDisabled="True" />
|
||||
<MenuItem Header="{l:Loc Library.Views.RenameMenu}" Command="{Binding RenameViewCommand}" ToolTip="{Binding ViewRenameToolTip}"
|
||||
ToolTipService.ShowOnDisabled="True" />
|
||||
<MenuItem Header="{l:Loc Library.Views.Delete}" Command="{Binding DeleteViewCommand}" ToolTip="{l:Loc Tooltips.Library.ViewDelete}"
|
||||
<MenuItem Header="{l:Loc Library.Views.Delete}" Command="{Binding DeleteViewCommand}" ToolTip="{Binding ViewDeleteToolTip}"
|
||||
ToolTipService.ShowOnDisabled="True" />
|
||||
</ContextMenu>
|
||||
</Button.ContextMenu>
|
||||
@@ -178,7 +200,7 @@
|
||||
<!-- Grid view (also under the timeline): virtualised, recycling card grid. -->
|
||||
<ListBox x:Name="CardGrid" Grid.Row="2" Style="{StaticResource ListBox.Cards}" ItemsSource="{Binding Items}" ItemContainerStyle="{StaticResource ListBoxItem.LibraryCard}"
|
||||
Visibility="{Binding IsGrid, Converter={StaticResource BoolToVisibility}}" AutomationProperties.Name="{l:Loc Shell.Nav.Library}"
|
||||
ScrollViewer.ScrollChanged="OnScrollChanged">
|
||||
ScrollViewer.ScrollChanged="OnScrollChanged" KeyboardNavigation.TabNavigation="Continue">
|
||||
<ListBox.InputBindings>
|
||||
<MouseBinding Gesture="LeftDoubleClick" Command="{Binding OpenCommand}" />
|
||||
<KeyBinding Key="Enter" Command="{Binding OpenCommand}" />
|
||||
@@ -188,7 +210,7 @@
|
||||
<v:SequenceCard Title="{Binding Title}" Subtitle="{Binding Subtitle}" Statuses="{Binding Statuses}" Thumbnail="{Binding Thumbnail}"
|
||||
ScrubSource="{Binding ScrubSource}" lib:ThumbnailLoading.Width="236"
|
||||
IsSelected="{Binding IsSelected, RelativeSource={RelativeSource AncestorType=ListBoxItem}, Mode=TwoWay}"
|
||||
SelectToolTip="{l:Loc Tooltips.Library.Select}" ToolTip="{l:Loc Tooltips.Library.Card}">
|
||||
SelectToolTip="{l:Loc Tooltips.Library.Select}" ToolTip="{Binding CardToolTip}">
|
||||
<v:SequenceCard.ActionsContent>
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<Button Style="{StaticResource Button.Quick}" ui:ButtonIcon.Glyph="{StaticResource Icon.Sequence}"
|
||||
@@ -196,7 +218,7 @@
|
||||
ToolTip="{l:Loc Tooltips.Library.Open}" AutomationProperties.Name="{l:Loc Library.Action.Open}" />
|
||||
<Button Style="{StaticResource Button.Quick}" ui:ButtonIcon.Glyph="{StaticResource Icon.Analyse}"
|
||||
Command="{Binding DataContext.AnalyseItemCommand, RelativeSource={RelativeSource AncestorType=ListBox}}" CommandParameter="{Binding}"
|
||||
ToolTip="{l:Loc Tooltips.Library.Analyse}" AutomationProperties.Name="{l:Loc Library.Action.Analyse}" />
|
||||
ToolTip="{Binding AnalyseToolTip}" AutomationProperties.Name="{l:Loc Library.Action.Analyse}" />
|
||||
<Button Style="{StaticResource Button.Quick}" ui:ButtonIcon.Glyph="{StaticResource Icon.Render}"
|
||||
Command="{Binding DataContext.RenderItemCommand, RelativeSource={RelativeSource AncestorType=ListBox}}" CommandParameter="{Binding}"
|
||||
ToolTip="{Binding RenderToolTip}" AutomationProperties.Name="{l:Loc Library.Action.Render}" />
|
||||
@@ -241,7 +263,8 @@
|
||||
</Border>
|
||||
<ListBox x:Name="RowList" Grid.Row="1" ItemsSource="{Binding Items}" ItemContainerStyle="{StaticResource ListBoxItem.LibraryRow}" SelectionMode="Extended"
|
||||
VirtualizingPanel.IsVirtualizing="True" VirtualizingPanel.VirtualizationMode="Recycling" VirtualizingPanel.ScrollUnit="Pixel"
|
||||
ScrollViewer.HorizontalScrollBarVisibility="Disabled" ScrollViewer.ScrollChanged="OnScrollChanged" AutomationProperties.Name="{l:Loc Shell.Nav.Library}">
|
||||
ScrollViewer.HorizontalScrollBarVisibility="Disabled" ScrollViewer.ScrollChanged="OnScrollChanged" AutomationProperties.Name="{l:Loc Shell.Nav.Library}"
|
||||
KeyboardNavigation.TabNavigation="Continue">
|
||||
<ListBox.InputBindings>
|
||||
<MouseBinding Gesture="LeftDoubleClick" Command="{Binding OpenCommand}" />
|
||||
<KeyBinding Key="Enter" Command="{Binding OpenCommand}" />
|
||||
@@ -268,15 +291,14 @@
|
||||
<TextBlock Grid.Column="6" Style="{StaticResource Text.CellNumber}" Text="{Binding SizeText}" Margin="10,0,0,0" />
|
||||
<ItemsControl Grid.Column="7" Margin="16,0,0,0" ItemsSource="{Binding Statuses}" ItemTemplate="{StaticResource Template.Status}"
|
||||
ItemsPanel="{StaticResource Panel.Row}" VerticalAlignment="Center" Focusable="False" ClipToBounds="True" />
|
||||
<Border Grid.Column="7" HorizontalAlignment="Right" Background="{DynamicResource Brush.Card}" Padding="6,0,0,0"
|
||||
Visibility="{Binding IsMouseOver, RelativeSource={RelativeSource AncestorType=ListBoxItem}, Converter={StaticResource BoolToVisibility}}">
|
||||
<Border Grid.Column="7" HorizontalAlignment="Right" Background="{DynamicResource Brush.Card}" Padding="6,0,0,0" Style="{StaticResource Border.RowActions}">
|
||||
<StackPanel Orientation="Horizontal" VerticalAlignment="Center">
|
||||
<Button Style="{StaticResource Button.RowQuick}" ui:ButtonIcon.Glyph="{StaticResource Icon.Sequence}"
|
||||
Command="{Binding DataContext.OpenItemCommand, RelativeSource={RelativeSource AncestorType=ListBox}}" CommandParameter="{Binding}"
|
||||
ToolTip="{l:Loc Tooltips.Library.Open}" AutomationProperties.Name="{l:Loc Library.Action.Open}" />
|
||||
<Button Style="{StaticResource Button.RowQuick}" ui:ButtonIcon.Glyph="{StaticResource Icon.Analyse}"
|
||||
Command="{Binding DataContext.AnalyseItemCommand, RelativeSource={RelativeSource AncestorType=ListBox}}" CommandParameter="{Binding}"
|
||||
ToolTip="{l:Loc Tooltips.Library.Analyse}" AutomationProperties.Name="{l:Loc Library.Action.Analyse}" />
|
||||
ToolTip="{Binding AnalyseToolTip}" AutomationProperties.Name="{l:Loc Library.Action.Analyse}" />
|
||||
<Button Style="{StaticResource Button.RowQuick}" ui:ButtonIcon.Glyph="{StaticResource Icon.Render}"
|
||||
Command="{Binding DataContext.RenderItemCommand, RelativeSource={RelativeSource AncestorType=ListBox}}" CommandParameter="{Binding}"
|
||||
ToolTip="{Binding RenderToolTip}" AutomationProperties.Name="{l:Loc Library.Action.Render}" />
|
||||
@@ -358,46 +380,57 @@
|
||||
<Button Content="{l:Loc Library.Action.Render}" Command="{Binding DataContext.RenderItemCommand, RelativeSource={RelativeSource AncestorType=UserControl}}"
|
||||
CommandParameter="{Binding}" ToolTip="{Binding RenderToolTip}" ui:ButtonIcon.Glyph="{StaticResource Icon.Render}" Margin="0,0,8,8" />
|
||||
<Button Content="{l:Loc Library.Action.Folder}" Command="{Binding DataContext.RevealCommand, RelativeSource={RelativeSource AncestorType=UserControl}}"
|
||||
ToolTip="{l:Loc Tooltips.Library.Folder}" ui:ButtonIcon.Glyph="{StaticResource Icon.FolderOpen}" Margin="0,0,8,8" />
|
||||
ToolTip="{Binding DataContext.RevealToolTip, RelativeSource={RelativeSource AncestorType=UserControl}}" ui:ButtonIcon.Glyph="{StaticResource Icon.FolderOpen}"
|
||||
Margin="0,0,8,8" />
|
||||
</WrapPanel>
|
||||
</StackPanel>
|
||||
</ScrollViewer>
|
||||
</Border>
|
||||
|
||||
<!-- Mass actions bar on the selection (BRIEF §12.2): each button disabled with its reason when it cannot run on it. -->
|
||||
<!--
|
||||
Mass actions bar on the selection (BRIEF §12.2): each button disabled with its reason when it cannot run on it.
|
||||
Delete… stands apart at the far right (Archive.html), the destructive action last.
|
||||
-->
|
||||
<Border Grid.Row="3" Grid.ColumnSpan="2" Style="{StaticResource Border.Panel}" Padding="14,8,6,0" Margin="20,0,20,12" MinHeight="48"
|
||||
Visibility="{Binding HasSelection, Converter={StaticResource BoolToVisibility}}">
|
||||
<WrapPanel VerticalAlignment="Center">
|
||||
<TextBlock Text="{Binding SelectionTitle}" FontWeight="SemiBold" VerticalAlignment="Center" Margin="0,0,8,8" Typography.NumeralAlignment="Tabular" />
|
||||
<TextBlock Text="{Binding SelectionSummary}" Foreground="{DynamicResource Brush.TextMuted}" VerticalAlignment="Center" Margin="0,0,12,8"
|
||||
Typography.NumeralAlignment="Tabular" />
|
||||
<Border Width="1" Height="22" Background="{DynamicResource Brush.Stroke}" Margin="0,0,12,8" />
|
||||
<Button Style="{StaticResource Button.Bar}" Content="{l:Loc Library.Action.Analyse}" Command="{Binding AnalyseCommand}" ToolTip="{Binding AnalyseToolTip}" />
|
||||
<Button Style="{StaticResource Button.Bar}" Content="{l:Loc Library.Action.Proxies}" Command="{Binding ProxiesCommand}" ToolTip="{Binding ProxiesToolTip}" />
|
||||
<Button Style="{StaticResource Button.Bar}" Content="{l:Loc Library.Action.Verify}" Command="{Binding VerifyCommand}" ToolTip="{Binding VerifyToolTip}" />
|
||||
<Button Style="{StaticResource Button.Bar}" Content="{l:Loc Library.Action.Tag}" Command="{Binding TagCommand}" ToolTip="{Binding TagToolTip}" />
|
||||
<Button Style="{StaticResource Button.Bar}" Click="OnOpenMenu" IsEnabled="{Binding CanRate}" ToolTip="{Binding RateToolTip}" AutomationProperties.Name="{l:Loc Library.Action.Rate}">
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<TextBlock Text="{l:Loc Library.Action.Rate}" />
|
||||
<ui:Icon Glyph="{StaticResource Icon.ChevronDown}" Margin="6,0,0,0" />
|
||||
</StackPanel>
|
||||
<Button.ContextMenu>
|
||||
<ContextMenu ItemsSource="{Binding RatingChoices}" ItemContainerStyle="{StaticResource MenuItem.Rating}" />
|
||||
</Button.ContextMenu>
|
||||
</Button>
|
||||
<Button Style="{StaticResource Button.Bar}" Content="{l:Loc Library.Action.Move}" Command="{Binding MoveCommand}" ToolTip="{Binding MoveToolTip}" />
|
||||
<Button Style="{StaticResource Button.Bar}" Content="{l:Loc Library.Action.Upload}" Command="{Binding UploadCommand}" ToolTip="{Binding UploadToolTip}" />
|
||||
<Button Style="{StaticResource Button.Bar}" Content="{l:Loc Library.Action.Download}" Command="{Binding DownloadCommand}" ToolTip="{Binding DownloadToolTip}" />
|
||||
<Button Style="{StaticResource Button.Bar}" Content="{l:Loc Library.Action.ExportList}" Command="{Binding ExportListCommand}" ToolTip="{Binding ExportListToolTip}" />
|
||||
<Button Style="{StaticResource Button.Destructive}" Height="30" Margin="0,0,8,8" Content="{l:Loc Library.Action.Delete}" Command="{Binding DeleteCommand}"
|
||||
ToolTip="{Binding DeleteToolTip}" />
|
||||
<Button Style="{StaticResource Button.Subtle}" Height="30" Margin="0,0,8,8" Content="{l:Loc Library.Action.ClearSelection}" Command="{Binding ClearSelectionCommand}"
|
||||
ToolTip="{l:Loc Tooltips.Library.ClearSelection}" />
|
||||
</WrapPanel>
|
||||
<!-- Delete… last in the tab order too. -->
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<WrapPanel VerticalAlignment="Center">
|
||||
<TextBlock Text="{Binding SelectionTitle}" FontWeight="SemiBold" VerticalAlignment="Center" Margin="0,0,8,8" Typography.NumeralAlignment="Tabular" />
|
||||
<TextBlock Text="{Binding SelectionSummary}" Foreground="{DynamicResource Brush.TextMuted}" VerticalAlignment="Center" Margin="0,0,12,8"
|
||||
Typography.NumeralAlignment="Tabular" />
|
||||
<Border Width="1" Height="22" Background="{DynamicResource Brush.Stroke}" Margin="0,0,12,8" />
|
||||
<Button Style="{StaticResource Button.Bar}" Content="{l:Loc Library.Action.Analyse}" Command="{Binding AnalyseCommand}" ToolTip="{Binding AnalyseToolTip}" />
|
||||
<Button Style="{StaticResource Button.Bar}" Content="{l:Loc Library.Action.Proxies}" Command="{Binding ProxiesCommand}" ToolTip="{Binding ProxiesToolTip}" />
|
||||
<Button Style="{StaticResource Button.Bar}" Content="{l:Loc Library.Action.Verify}" Command="{Binding VerifyCommand}" ToolTip="{Binding VerifyToolTip}" />
|
||||
<Button Style="{StaticResource Button.Bar}" Content="{l:Loc Library.Action.Tag}" Command="{Binding TagCommand}" ToolTip="{Binding TagToolTip}" />
|
||||
<Button Style="{StaticResource Button.Bar}" Click="OnOpenMenu" IsEnabled="{Binding CanRate}" ToolTip="{Binding RateToolTip}" AutomationProperties.Name="{l:Loc Library.Action.Rate}">
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<TextBlock Text="{l:Loc Library.Action.Rate}" />
|
||||
<ui:Icon Glyph="{StaticResource Icon.ChevronDown}" Margin="6,0,0,0" />
|
||||
</StackPanel>
|
||||
<Button.ContextMenu>
|
||||
<ContextMenu ItemsSource="{Binding RatingChoices}" ItemContainerStyle="{StaticResource MenuItem.Rating}" />
|
||||
</Button.ContextMenu>
|
||||
</Button>
|
||||
<Button Style="{StaticResource Button.Bar}" Content="{l:Loc Library.Action.Move}" Command="{Binding MoveCommand}" ToolTip="{Binding MoveToolTip}" />
|
||||
<Button Style="{StaticResource Button.Bar}" Content="{l:Loc Library.Action.Upload}" Command="{Binding UploadCommand}" ToolTip="{Binding UploadToolTip}" />
|
||||
<Button Style="{StaticResource Button.Bar}" Content="{l:Loc Library.Action.Download}" Command="{Binding DownloadCommand}" ToolTip="{Binding DownloadToolTip}" />
|
||||
<Button Style="{StaticResource Button.Bar}" Content="{l:Loc Library.Action.ExportList}" Command="{Binding ExportListCommand}" ToolTip="{Binding ExportListToolTip}" />
|
||||
<Button Style="{StaticResource Button.Subtle}" Height="30" Margin="0,0,8,8" Content="{l:Loc Library.Action.ClearSelection}" Command="{Binding ClearSelectionCommand}"
|
||||
ToolTip="{l:Loc Tooltips.Library.ClearSelection}" />
|
||||
</WrapPanel>
|
||||
<Button Grid.Column="1" Style="{StaticResource Button.Destructive}" Height="30" Margin="8,0,8,8" VerticalAlignment="Top"
|
||||
Content="{l:Loc Library.Action.Delete}" Command="{Binding DeleteCommand}" ToolTip="{Binding DeleteToolTip}" />
|
||||
</Grid>
|
||||
</Border>
|
||||
</Grid>
|
||||
|
||||
<!-- In-window dialogs (tags, move, view name) over a scrim; the keyboard stays inside the dialog. -->
|
||||
<!-- In-window dialogs (tags, move, view name, delete) over a scrim; the keyboard stays inside the dialog. -->
|
||||
<Grid Visibility="{Binding IsDialogOpen, Converter={StaticResource BoolToVisibility}}" KeyboardNavigation.TabNavigation="Cycle"
|
||||
KeyboardNavigation.ControlTabNavigation="Cycle" KeyboardNavigation.DirectionalNavigation="Contained">
|
||||
<Border Background="{DynamicResource Brush.Scrim}" />
|
||||
|
||||
@@ -63,6 +63,7 @@ public sealed class LibraryViewModel : SectionViewModel
|
||||
private IReadOnlyList<Sequence> _remote = [];
|
||||
private Dictionary<Guid, SyncEntry> _entries = [];
|
||||
private Dictionary<Guid, SequenceDto> _listing = [];
|
||||
private ArchiveStats? _localStats;
|
||||
private LibraryTimeline _timeline = LibraryTimeline.Empty;
|
||||
private IReadOnlyList<ChartRow> _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<SequenceSort>(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; }
|
||||
|
||||
/// <summary>The Undo of a deleted view's toast (parameter: the view); a failure is reported like any command's.</summary>
|
||||
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));
|
||||
}
|
||||
|
||||
/// <summary>The origin also decides which sequences the Year and Camera choices and the timeline count.</summary>
|
||||
public FilterOption<OriginFilter> 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<SequenceSort> SelectedSort
|
||||
@@ -332,6 +356,18 @@ public sealed class LibraryViewModel : SectionViewModel
|
||||
/// <summary>"Saved views · Night, 4K" or what the menu does.</summary>
|
||||
public string ViewsToolTip => ActiveView is { } active ? Loc.L("Tooltips.Library.ViewsActive", active.Name) : Loc.L("Tooltips.Library.Views");
|
||||
|
||||
/// <summary>"Show view": what it does, or that no view is saved yet.</summary>
|
||||
public string ViewsApplyToolTip => HasViews ? Loc.L("Tooltips.Library.ViewsApply") : Loc.L("Library.Blocked.NoViews");
|
||||
|
||||
/// <summary>"Save view…": what it does, or that the index is not open.</summary>
|
||||
public string ViewSaveToolTip => _viewStore is null ? Loc.L("Library.Blocked.NoIndex") : Loc.L("Tooltips.Library.ViewSave");
|
||||
|
||||
/// <summary>"Rename view…": what it does, or that no saved view is in use.</summary>
|
||||
public string ViewRenameToolTip => IsViewActive ? Loc.L("Tooltips.Library.ViewRename") : Loc.L("Library.Blocked.NoActiveView");
|
||||
|
||||
/// <summary>"Delete view": what it does, or that no saved view is in use.</summary>
|
||||
public string ViewDeleteToolTip => IsViewActive ? Loc.L("Tooltips.Library.ViewDelete") : Loc.L("Library.Blocked.NoActiveView");
|
||||
|
||||
// ---------------- Timeline ----------------
|
||||
|
||||
/// <summary>One band per capture year, newest first: photos per month.</summary>
|
||||
@@ -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));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>The details panel's "Folder": what it does, or why a remote card has no folder here.</summary>
|
||||
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 ----------------
|
||||
|
||||
/// <summary>The open in-window dialog (tags, move, view name); null when none.</summary>
|
||||
/// <summary>The open in-window dialog (tags, move, view name, delete); null when none.</summary>
|
||||
public ArchiveDialogViewModel? Dialog
|
||||
{
|
||||
get => _dialog;
|
||||
@@ -542,6 +584,20 @@ public sealed class LibraryViewModel : SectionViewModel
|
||||
/// <summary>Opens Tags on the selection (capture, tests).</summary>
|
||||
public void OpenRetag() => OpenRetag(Targets(MassAction.Tag));
|
||||
|
||||
/// <summary>Opens "Save view" on the filters on screen (capture, tests).</summary>
|
||||
public void OpenSaveView() => OpenViewName(rename: false);
|
||||
|
||||
/// <summary>
|
||||
/// 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.
|
||||
/// </summary>
|
||||
public async Task<bool> DeleteAsync(IReadOnlyList<Guid> 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<int?>(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<string?>(c.Model, c.Name, c.Name)),
|
||||
];
|
||||
Tags = [AnyTag(), .. tags.OrderBy(t => t.Name, StringComparer.CurrentCultureIgnoreCase).Select(t => new FilterOption<string?>(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
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 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.
|
||||
/// </summary>
|
||||
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<int?>(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<string?>(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;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary><paramref name="options"/>, plus the chosen value when they lack it, so a filter never changes by itself.</summary>
|
||||
private static IReadOnlyList<FilterOption<T>> WithChosen<T>(IReadOnlyList<FilterOption<T>> options, T chosen, Func<T, string> text) =>
|
||||
chosen is null || options.Any(o => EqualityComparer<T>.Default.Equals(o.Value, chosen)) ? options : [.. options, Option(options, chosen, text)];
|
||||
|
||||
/// <summary>
|
||||
/// 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<Sequence> a, IReadOnlyList<Sequence> 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);
|
||||
|
||||
/// <summary>The card's sync row and what its Sync quick action does now.</summary>
|
||||
/// <summary>The card's sync row, what its Sync quick action does now, and whether Analyse and Render can start.</summary>
|
||||
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();
|
||||
}
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
<TextBlock Text="{Binding Message}" Margin="0,8,0,0" Foreground="{DynamicResource Brush.TextMuted}" TextWrapping="Wrap" TextTrimming="None" LineHeight="18" />
|
||||
<Border Style="{StaticResource Border.Card}" Margin="0,16,0,0" Padding="12,10" ToolTip="{Binding DetailToolTip}"
|
||||
Visibility="{Binding Detail, Converter={x:Static ui:NullToCollapsedConverter.Instance}}">
|
||||
<TextBlock Text="{Binding Detail}" FontFamily="{StaticResource Font.Mono}" FontSize="{StaticResource Size.Secondary}" TextWrapping="Wrap" TextTrimming="None" LineHeight="18" />
|
||||
<TextBlock x:Name="DetailText" Text="{Binding Detail}" FontFamily="{StaticResource Font.Mono}" FontSize="{StaticResource Size.Secondary}" TextWrapping="Wrap" TextTrimming="None" LineHeight="18" />
|
||||
</Border>
|
||||
<StackPanel x:Name="Typing" Margin="0,16,0,0" Visibility="Collapsed">
|
||||
<TextBlock Text="{Binding TypedPrompt}" Foreground="{DynamicResource Brush.TextMuted}" TextWrapping="Wrap" />
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -154,8 +154,8 @@ public static class ScreenCapture
|
||||
|
||||
/// <summary>
|
||||
/// <c>library-timeline</c>, <c>library-mass</c> (the selection with the whole bar), <c>library-delete</c> (the dry run
|
||||
/// of deleting that selection, behind its typed confirmation) and <c>library-remote</c> (the server's sequences as
|
||||
/// remote cards), then the Library as it was.
|
||||
/// of deleting that selection, behind its typed confirmation), <c>library-remote</c> (the server's sequences as
|
||||
/// remote cards) and <c>library-viewname</c> (Save view), then the Library as it was.
|
||||
/// </summary>
|
||||
private static async Task<int> 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;
|
||||
|
||||
@@ -122,11 +122,16 @@
|
||||
<Trigger Property="IsScrubbing" Value="True">
|
||||
<Setter TargetName="ScrubTrack" Property="Visibility" Value="Visible" />
|
||||
</Trigger>
|
||||
<!-- A selected card keeps its actions in sight, so the keyboard reaches them (Tab from the card). -->
|
||||
<Trigger Property="IsSelected" Value="True">
|
||||
<Setter TargetName="Select" Property="Visibility" Value="Visible" />
|
||||
<Setter TargetName="Actions" Property="Visibility" Value="Visible" />
|
||||
<Setter TargetName="Frame" Property="BorderBrush" Value="{DynamicResource Brush.Accent}" />
|
||||
<Setter TargetName="Glow" Property="Visibility" Value="Visible" />
|
||||
</Trigger>
|
||||
<Trigger Property="IsKeyboardFocusWithin" Value="True">
|
||||
<Setter TargetName="Actions" Property="Visibility" Value="Visible" />
|
||||
</Trigger>
|
||||
<Trigger Property="IsEnabled" Value="False">
|
||||
<Setter Property="Opacity" Value="0.4" />
|
||||
</Trigger>
|
||||
|
||||
@@ -82,7 +82,7 @@ public class SequenceCard : Control
|
||||
/// <summary>Tooltip of the selection check box.</summary>
|
||||
public object? SelectToolTip { get => GetValue(SelectToolTipProperty); set => SetValue(SelectToolTipProperty, value); }
|
||||
|
||||
/// <summary>Quick actions shown bottom-right of the thumbnail on hover (Open, Analyse, Render, Sync).</summary>
|
||||
/// <summary>Quick actions shown bottom-right of the thumbnail on hover, while selected and while the keyboard is in them (Open, Analyse, Render, Sync).</summary>
|
||||
public object? ActionsContent { get => GetValue(ActionsContentProperty); set => SetValue(ActionsContentProperty, value); }
|
||||
|
||||
/// <summary>Selection state; bind two-way to the container's IsSelected so the check box toggles it.</summary>
|
||||
|
||||
@@ -62,4 +62,19 @@ public sealed class DeletePlansTests
|
||||
foreach (var reason in Enum.GetValues<DeleteBlock>())
|
||||
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");
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,74 @@
|
||||
using Titano.App.Library;
|
||||
using Titano.Core.Model;
|
||||
using Titano.Data.Repositories;
|
||||
using Titano.Testing;
|
||||
|
||||
namespace Titano.App.Tests.Library;
|
||||
|
||||
/// <summary>Mixed mode (BRIEF §4.4): the server's sequences without a copy here count in the Year and Camera choices and the timeline.</summary>
|
||||
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");
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,58 @@
|
||||
using Titano.App.Library;
|
||||
using Titano.Core.Model;
|
||||
using Titano.Testing;
|
||||
|
||||
namespace Titano.App.Tests.Library;
|
||||
|
||||
/// <summary>The Status choices of Main.html (analysed, proxies, rendered, synced): the index's query and the same test in memory agree.</summary>
|
||||
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);
|
||||
}
|
||||
}
|
||||
@@ -15,7 +15,7 @@ namespace Titano.App.Tests.Library;
|
||||
/// <summary>
|
||||
/// The Library's new states of <c>--capture</c> (<see cref="LibraryScenes"/>) 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.
|
||||
/// </summary>
|
||||
[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<LibraryView>("library-timeline", waitForThumbnails: true);
|
||||
Assert.True(app.FindAll<TimelineBands>().Any(t => t.IsVisible && t.ActualHeight > 0), "the bands are drawn");
|
||||
var bands = Assert.NotNull(app.FindAll<TimelineBands>().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<LibraryView>("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<LibraryView>("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<ArchiveView>("archive-trash-sample");
|
||||
trash.CloseCommand.Execute(null);
|
||||
});
|
||||
|
||||
[Test]
|
||||
|
||||
Reference in new issue
Block a user