fix(archive): accessible, right-to-left safe Archive screen after the visual review
Named menu buttons and set filter, visible keyboard focus on tree and preview rows, live search and progress lines, per-card Cancel, dialog labels that grow, paths and templates left to right, RTL tree keys, focus back to the opener when a dialog closes, lists that keep their fill behind a dialog, one chart grid with 14 px gaps, the heatmap scale in its header, health and recent states as in the mockup, and the Maintenance view renamed Health. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012iLMBNwBE2GnphAsu4cjaC
This commit is contained in:
7 files changed
+269
-96
No files matched your search
+12
-1
@@ -4,7 +4,7 @@
|
||||
<resheader name="version"><value>2.0</value></resheader>
|
||||
<resheader name="reader"><value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value></resheader>
|
||||
<resheader name="writer"><value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value></resheader>
|
||||
<data name="Archive.Adopt.Copy" xml:space="preserve"><value>Copy into the layout…</value></data>
|
||||
<data name="Archive.Adopt.Copy" xml:space="preserve"><value>Copy into archive…</value></data>
|
||||
<data name="Archive.Adopt.InPlace" xml:space="preserve"><value>Index in place…</value></data>
|
||||
<data name="Archive.Applied.one" xml:space="preserve"><value>{0:N0} sequence changed</value></data>
|
||||
<data name="Archive.Applied.other" xml:space="preserve"><value>{0:N0} sequences changed</value></data>
|
||||
@@ -37,6 +37,7 @@
|
||||
<data name="Archive.Dialog.Cancel" xml:space="preserve"><value>Cancel</value></data>
|
||||
<data name="Archive.Duplicates.Copies.one" xml:space="preserve"><value>{0:N0} copy</value></data>
|
||||
<data name="Archive.Duplicates.Copies.other" xml:space="preserve"><value>{0:N0} copies</value></data>
|
||||
<data name="Archive.Duplicates.Failed" xml:space="preserve"><value>The duplicate search stopped</value><comment>long</comment></data>
|
||||
<data name="Archive.Duplicates.Folder" xml:space="preserve"><value>Folder</value></data>
|
||||
<data name="Archive.Duplicates.Groups.one" xml:space="preserve"><value>{0:N0} group</value></data>
|
||||
<data name="Archive.Duplicates.Groups.other" xml:space="preserve"><value>{0:N0} groups</value></data>
|
||||
@@ -54,6 +55,11 @@
|
||||
<data name="Archive.Error.SourceChanged" xml:space="preserve"><value>{0} changed after the plan was made.</value><comment>long: error sentence</comment></data>
|
||||
<data name="Archive.Error.SourceGone" xml:space="preserve"><value>The card or folder {0} is no longer available.</value><comment>long: error sentence</comment></data>
|
||||
<data name="Archive.Error.StalePlan" xml:space="preserve"><value>The archive changed after this plan was made.</value><comment>long: error sentence</comment></data>
|
||||
<data name="Archive.Failed.Access" xml:space="preserve"><value>Titano was denied access to the archive.</value><comment>long</comment></data>
|
||||
<data name="Archive.Failed.Files" xml:space="preserve"><value>A file of the archive could not be read or written.</value><comment>long</comment></data>
|
||||
<data name="Archive.Failed.Gone" xml:space="preserve"><value>The sequence is no longer in the index.</value><comment>long</comment></data>
|
||||
<data name="Archive.Failed.Index" xml:space="preserve"><value>The index could not be read or written.</value><comment>long</comment></data>
|
||||
<data name="Archive.Failed.Retry" xml:space="preserve"><value>Retry</value></data>
|
||||
<data name="Archive.Find.Cancel" xml:space="preserve"><value>Cancel</value></data>
|
||||
<data name="Archive.Find.None" xml:space="preserve"><value>None found</value></data>
|
||||
<data name="Archive.Find.Run" xml:space="preserve"><value>Find</value></data>
|
||||
@@ -61,10 +67,13 @@
|
||||
<data name="Archive.Health.AllVerified" xml:space="preserve"><value>Every sequence verified</value></data>
|
||||
<data name="Archive.Health.AnalysedOk" xml:space="preserve"><value>Every sequence analysed</value></data>
|
||||
<data name="Archive.Health.Damaged" xml:space="preserve"><value>{0} missing · {1} damaged</value></data>
|
||||
<data name="Archive.Health.DuplicateGroups.one" xml:space="preserve"><value>{0:N0} duplicate group</value></data>
|
||||
<data name="Archive.Health.DuplicateGroups.other" xml:space="preserve"><value>{0:N0} duplicate groups</value></data>
|
||||
<data name="Archive.Health.Duplicates.one" xml:space="preserve"><value>{0:N0} duplicate frame</value></data>
|
||||
<data name="Archive.Health.Duplicates.other" xml:space="preserve"><value>{0:N0} duplicate frames</value></data>
|
||||
<data name="Archive.Health.Fix.Analyse" xml:space="preserve"><value>Analyse</value></data>
|
||||
<data name="Archive.Health.Fix.Duplicates" xml:space="preserve"><value>Show</value></data>
|
||||
<data name="Archive.Health.Fix.MarkDuplicates" xml:space="preserve"><value>Mark copies</value></data>
|
||||
<data name="Archive.Health.Fix.Orphans" xml:space="preserve"><value>Find</value></data>
|
||||
<data name="Archive.Health.Fix.Proxies" xml:space="preserve"><value>Build</value></data>
|
||||
<data name="Archive.Health.Fix.Verify" xml:space="preserve"><value>Verify</value></data>
|
||||
@@ -72,6 +81,7 @@
|
||||
<data name="Archive.Health.NoDuplicates" xml:space="preserve"><value>No duplicate frames</value></data>
|
||||
<data name="Archive.Health.NoProxies.one" xml:space="preserve"><value>{0:N0} sequence lacks proxies</value></data>
|
||||
<data name="Archive.Health.NoProxies.other" xml:space="preserve"><value>{0:N0} sequences lack proxies</value></data>
|
||||
<data name="Archive.Health.NoneFlagged" xml:space="preserve"><value>No copies flagged</value></data>
|
||||
<data name="Archive.Health.NotAnalysed.one" xml:space="preserve"><value>{0:N0} sequence not analysed</value></data>
|
||||
<data name="Archive.Health.NotAnalysed.other" xml:space="preserve"><value>{0:N0} sequences not analysed</value></data>
|
||||
<data name="Archive.Health.ProxiesOk" xml:space="preserve"><value>Every sequence has proxies</value></data>
|
||||
@@ -183,6 +193,7 @@
|
||||
<data name="Archive.Toolbar.Verify" xml:space="preserve"><value>Verify</value></data>
|
||||
<data name="Archive.Tree.Name" xml:space="preserve"><value>Archive tree</value></data>
|
||||
<data name="Archive.Tree.Undated" xml:space="preserve"><value>Undated</value></data>
|
||||
<data name="Archive.View.Health" xml:space="preserve"><value>Health</value></data>
|
||||
<data name="Archive.View.Maintenance" xml:space="preserve"><value>Maintenance</value></data>
|
||||
<data name="Archive.View.Name" xml:space="preserve"><value>View</value></data>
|
||||
<data name="Archive.View.Overview" xml:space="preserve"><value>Overview</value></data>
|
||||
|
||||
@@ -39,6 +39,7 @@
|
||||
<data name="Tooltips.Archive.FilterTag" xml:space="preserve"><value>Keep only the sequences with one tag</value></data>
|
||||
<data name="Tooltips.Archive.Fix.Analyse" xml:space="preserve"><value>Queue the light analysis of these sequences</value></data>
|
||||
<data name="Tooltips.Archive.Fix.Duplicates" xml:space="preserve"><value>Find the duplicate groups</value></data>
|
||||
<data name="Tooltips.Archive.Fix.MarkDuplicates" xml:space="preserve"><value>Flag every copy after the first so renders skip it · runs maintenance</value></data>
|
||||
<data name="Tooltips.Archive.Fix.Orphans" xml:space="preserve"><value>Find files and rows that do not match</value></data>
|
||||
<data name="Tooltips.Archive.Fix.Proxies" xml:space="preserve"><value>Queue proxy generation for these sequences</value></data>
|
||||
<data name="Tooltips.Archive.Fix.Verify" xml:space="preserve"><value>Re-hash the originals of these sequences</value></data>
|
||||
@@ -69,6 +70,7 @@
|
||||
<data name="Tooltips.Archive.Relink" xml:space="preserve"><value>Choose the new folder of an archive you moved; its sequences follow</value></data>
|
||||
<data name="Tooltips.Archive.RenameApply" xml:space="preserve"><value>Make exactly these changes to folders, sidecars and index · resumes after a crash</value></data>
|
||||
<data name="Tooltips.Archive.RetagApply" xml:space="preserve"><value>Change the tags of these sequences in sidecars and index</value></data>
|
||||
<data name="Tooltips.Archive.Retry" xml:space="preserve"><value>Run the same action again</value></data>
|
||||
<data name="Tooltips.Archive.Scan" xml:space="preserve"><value>Incremental scan: new, changed and removed files by modification time and size</value></data>
|
||||
<data name="Tooltips.Archive.Set" xml:space="preserve"><value>The selected years and sequences (all when nothing is selected), narrowed by camera, status or tag</value></data>
|
||||
<data name="Tooltips.Archive.SetAnalyse" xml:space="preserve"><value>Run the deep analysis on every sequence in the set</value></data>
|
||||
@@ -86,6 +88,7 @@
|
||||
<data name="Tooltips.Archive.TitleTemplate" xml:space="preserve"><value>Title template; the title token is the current title · checked as you type</value></data>
|
||||
<data name="Tooltips.Archive.Verify" xml:space="preserve"><value>Re-hash every original and report bit rot · reads the whole archive</value></data>
|
||||
<data name="Tooltips.Archive.YearRow" xml:space="preserve"><value>{0} · Right arrow opens the year, Left arrow closes it</value></data>
|
||||
<data name="Tooltips.Archive.YearRowRtl" xml:space="preserve"><value>{0} · Left arrow opens the year, Right arrow closes it</value></data>
|
||||
<data name="Tooltips.Common.Dismiss" xml:space="preserve"><value>Dismiss</value></data>
|
||||
<data name="Tooltips.Common.OpenLogs" xml:space="preserve"><value>Open the folder with the log files</value></data>
|
||||
<data name="Tooltips.Common.ResetToAuto" xml:space="preserve"><value>Return to the advisor's value</value></data>
|
||||
|
||||
+12
-1
@@ -4,7 +4,7 @@
|
||||
<resheader name="version"><value>2.0</value></resheader>
|
||||
<resheader name="reader"><value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value></resheader>
|
||||
<resheader name="writer"><value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value></resheader>
|
||||
<data name="Archive.Adopt.Copy" xml:space="preserve"><value>Copia nella struttura…</value></data>
|
||||
<data name="Archive.Adopt.Copy" xml:space="preserve"><value>Copia nell'archivio…</value></data>
|
||||
<data name="Archive.Adopt.InPlace" xml:space="preserve"><value>Indicizza sul posto…</value></data>
|
||||
<data name="Archive.Applied.one" xml:space="preserve"><value>{0:N0} sequenza modificata</value></data>
|
||||
<data name="Archive.Applied.other" xml:space="preserve"><value>{0:N0} sequenze modificate</value></data>
|
||||
@@ -34,6 +34,7 @@
|
||||
<data name="Archive.Dialog.Cancel" xml:space="preserve"><value>Annulla</value></data>
|
||||
<data name="Archive.Duplicates.Copies.one" xml:space="preserve"><value>{0:N0} copia</value></data>
|
||||
<data name="Archive.Duplicates.Copies.other" xml:space="preserve"><value>{0:N0} copie</value></data>
|
||||
<data name="Archive.Duplicates.Failed" xml:space="preserve"><value>Ricerca dei doppioni interrotta</value></data>
|
||||
<data name="Archive.Duplicates.Folder" xml:space="preserve"><value>Cartella</value></data>
|
||||
<data name="Archive.Duplicates.Groups.one" xml:space="preserve"><value>{0:N0} gruppo</value></data>
|
||||
<data name="Archive.Duplicates.Groups.other" xml:space="preserve"><value>{0:N0} gruppi</value></data>
|
||||
@@ -50,6 +51,11 @@
|
||||
<data name="Archive.Error.SourceChanged" xml:space="preserve"><value>{0} è cambiato dopo la creazione del piano.</value></data>
|
||||
<data name="Archive.Error.SourceGone" xml:space="preserve"><value>La scheda o cartella {0} non è più disponibile.</value></data>
|
||||
<data name="Archive.Error.StalePlan" xml:space="preserve"><value>L'archivio è cambiato dopo la creazione del piano.</value></data>
|
||||
<data name="Archive.Failed.Access" xml:space="preserve"><value>Titano non ha accesso all'archivio.</value></data>
|
||||
<data name="Archive.Failed.Files" xml:space="preserve"><value>Non è stato possibile leggere o scrivere un file dell'archivio.</value></data>
|
||||
<data name="Archive.Failed.Gone" xml:space="preserve"><value>La sequenza non è più nell'indice.</value></data>
|
||||
<data name="Archive.Failed.Index" xml:space="preserve"><value>Non è stato possibile leggere o scrivere l'indice.</value></data>
|
||||
<data name="Archive.Failed.Retry" xml:space="preserve"><value>Riprova</value></data>
|
||||
<data name="Archive.Find.Cancel" xml:space="preserve"><value>Annulla</value></data>
|
||||
<data name="Archive.Find.None" xml:space="preserve"><value>Nessuno trovato</value></data>
|
||||
<data name="Archive.Find.Run" xml:space="preserve"><value>Cerca</value></data>
|
||||
@@ -57,10 +63,13 @@
|
||||
<data name="Archive.Health.AllVerified" xml:space="preserve"><value>Tutte le sequenze verificate</value></data>
|
||||
<data name="Archive.Health.AnalysedOk" xml:space="preserve"><value>Tutte le sequenze analizzate</value></data>
|
||||
<data name="Archive.Health.Damaged" xml:space="preserve"><value>{0} mancanti · {1} danneggiati</value></data>
|
||||
<data name="Archive.Health.DuplicateGroups.one" xml:space="preserve"><value>{0:N0} gruppo di doppioni</value></data>
|
||||
<data name="Archive.Health.DuplicateGroups.other" xml:space="preserve"><value>{0:N0} gruppi di doppioni</value></data>
|
||||
<data name="Archive.Health.Duplicates.one" xml:space="preserve"><value>{0:N0} fotogramma doppio</value></data>
|
||||
<data name="Archive.Health.Duplicates.other" xml:space="preserve"><value>{0:N0} fotogrammi doppi</value></data>
|
||||
<data name="Archive.Health.Fix.Analyse" xml:space="preserve"><value>Analizza</value></data>
|
||||
<data name="Archive.Health.Fix.Duplicates" xml:space="preserve"><value>Mostra</value></data>
|
||||
<data name="Archive.Health.Fix.MarkDuplicates" xml:space="preserve"><value>Segna copie</value></data>
|
||||
<data name="Archive.Health.Fix.Orphans" xml:space="preserve"><value>Cerca</value></data>
|
||||
<data name="Archive.Health.Fix.Proxies" xml:space="preserve"><value>Crea</value></data>
|
||||
<data name="Archive.Health.Fix.Verify" xml:space="preserve"><value>Verifica</value></data>
|
||||
@@ -68,6 +77,7 @@
|
||||
<data name="Archive.Health.NoDuplicates" xml:space="preserve"><value>Nessun fotogramma doppio</value></data>
|
||||
<data name="Archive.Health.NoProxies.one" xml:space="preserve"><value>{0:N0} sequenza senza proxy</value></data>
|
||||
<data name="Archive.Health.NoProxies.other" xml:space="preserve"><value>{0:N0} sequenze senza proxy</value></data>
|
||||
<data name="Archive.Health.NoneFlagged" xml:space="preserve"><value>Nessuna copia segnata</value></data>
|
||||
<data name="Archive.Health.NotAnalysed.one" xml:space="preserve"><value>{0:N0} sequenza non analizzata</value></data>
|
||||
<data name="Archive.Health.NotAnalysed.other" xml:space="preserve"><value>{0:N0} sequenze non analizzate</value></data>
|
||||
<data name="Archive.Health.ProxiesOk" xml:space="preserve"><value>Ogni sequenza ha i proxy</value></data>
|
||||
@@ -177,6 +187,7 @@
|
||||
<data name="Archive.Toolbar.Verify" xml:space="preserve"><value>Verifica</value></data>
|
||||
<data name="Archive.Tree.Name" xml:space="preserve"><value>Albero dell'archivio</value></data>
|
||||
<data name="Archive.Tree.Undated" xml:space="preserve"><value>Senza data</value></data>
|
||||
<data name="Archive.View.Health" xml:space="preserve"><value>Stato</value></data>
|
||||
<data name="Archive.View.Maintenance" xml:space="preserve"><value>Manutenzione</value></data>
|
||||
<data name="Archive.View.Name" xml:space="preserve"><value>Vista</value></data>
|
||||
<data name="Archive.View.Overview" xml:space="preserve"><value>Panoramica</value></data>
|
||||
|
||||
@@ -39,6 +39,7 @@
|
||||
<data name="Tooltips.Archive.FilterTag" xml:space="preserve"><value>Tieni solo le sequenze con un tag</value></data>
|
||||
<data name="Tooltips.Archive.Fix.Analyse" xml:space="preserve"><value>Metti in coda l'analisi rapida di queste sequenze</value></data>
|
||||
<data name="Tooltips.Archive.Fix.Duplicates" xml:space="preserve"><value>Trova i gruppi di doppioni</value></data>
|
||||
<data name="Tooltips.Archive.Fix.MarkDuplicates" xml:space="preserve"><value>Segna ogni copia dopo la prima perché i render la saltino · esegue la manutenzione</value></data>
|
||||
<data name="Tooltips.Archive.Fix.Orphans" xml:space="preserve"><value>Trova file e righe che non corrispondono</value></data>
|
||||
<data name="Tooltips.Archive.Fix.Proxies" xml:space="preserve"><value>Metti in coda la creazione dei proxy per queste sequenze</value></data>
|
||||
<data name="Tooltips.Archive.Fix.Verify" xml:space="preserve"><value>Ricalcola l'hash degli originali di queste sequenze</value></data>
|
||||
@@ -69,6 +70,7 @@
|
||||
<data name="Tooltips.Archive.Relink" xml:space="preserve"><value>Scegli la nuova cartella di un archivio spostato; le sequenze lo seguono</value></data>
|
||||
<data name="Tooltips.Archive.RenameApply" xml:space="preserve"><value>Applica esattamente queste modifiche a cartelle, sidecar e indice · riprende dopo un arresto</value></data>
|
||||
<data name="Tooltips.Archive.RetagApply" xml:space="preserve"><value>Cambia i tag di queste sequenze in sidecar e indice</value></data>
|
||||
<data name="Tooltips.Archive.Retry" xml:space="preserve"><value>Esegui di nuovo la stessa azione</value></data>
|
||||
<data name="Tooltips.Archive.Scan" xml:space="preserve"><value>Scansione incrementale: file nuovi, modificati e rimossi per data e dimensione</value></data>
|
||||
<data name="Tooltips.Archive.Set" xml:space="preserve"><value>Anni e sequenze selezionati (tutti se nulla è selezionato), ristretti per fotocamera, stato o tag</value></data>
|
||||
<data name="Tooltips.Archive.SetAnalyse" xml:space="preserve"><value>Esegui l'analisi profonda su ogni sequenza della selezione</value></data>
|
||||
@@ -86,6 +88,7 @@
|
||||
<data name="Tooltips.Archive.TitleTemplate" xml:space="preserve"><value>Modello del titolo; il segnaposto title è il titolo attuale · controllato mentre scrivi</value></data>
|
||||
<data name="Tooltips.Archive.Verify" xml:space="preserve"><value>Ricalcola l'hash di ogni originale e segnala i danni · legge tutto l'archivio</value></data>
|
||||
<data name="Tooltips.Archive.YearRow" xml:space="preserve"><value>{0} · Freccia destra apre l'anno, freccia sinistra lo chiude</value></data>
|
||||
<data name="Tooltips.Archive.YearRowRtl" xml:space="preserve"><value>{0} · Freccia sinistra apre l'anno, freccia destra lo chiude</value></data>
|
||||
<data name="Tooltips.Common.Dismiss" xml:space="preserve"><value>Chiudi</value></data>
|
||||
<data name="Tooltips.Common.OpenLogs" xml:space="preserve"><value>Apri la cartella dei file di log</value></data>
|
||||
<data name="Tooltips.Common.ResetToAuto" xml:space="preserve"><value>Torna al valore consigliato</value></data>
|
||||
|
||||
@@ -5,8 +5,39 @@
|
||||
xmlns:v="clr-namespace:Titano.Ui.Visuals;assembly=Titano.Ui"
|
||||
xmlns:l="clr-namespace:Titano.Ui.Localization;assembly=Titano.Ui"
|
||||
xmlns:ar="clr-namespace:Titano.App.Archiving"
|
||||
xmlns:infra="clr-namespace:Titano.App.Infrastructure"
|
||||
xmlns:shell="clr-namespace:Titano.App.Shell">
|
||||
<UserControl.Resources>
|
||||
<!-- Keyboard focus drawn inside the row (DESIGN §4 ring): an outer ring would be clipped by the list's scroll viewer. -->
|
||||
<Style x:Key="Focus.Inset">
|
||||
<Setter Property="Control.Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate>
|
||||
<Border BorderBrush="{DynamicResource Brush.Accent}" BorderThickness="2" CornerRadius="{StaticResource Radius.Control}" SnapsToDevicePixels="True" />
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
|
||||
<!--
|
||||
Lists keep their panel's fill while the screen behind a dialog is disabled: the system template would paint them
|
||||
white. Rows and buttons dim themselves.
|
||||
-->
|
||||
<Style TargetType="ListBox" BasedOn="{StaticResource {x:Type ListBox}}">
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="ListBox">
|
||||
<Border Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}"
|
||||
Padding="1" SnapsToDevicePixels="True">
|
||||
<ScrollViewer Focusable="False" Padding="{TemplateBinding Padding}">
|
||||
<ItemsPresenter SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
|
||||
</ScrollViewer>
|
||||
</Border>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="Text.PanelHeading" TargetType="TextBlock" BasedOn="{StaticResource Text.Section}">
|
||||
<Setter Property="FontSize" Value="13" />
|
||||
<Setter Property="VerticalAlignment" Value="Center" />
|
||||
@@ -21,11 +52,45 @@
|
||||
<!-- Rows that only show text: focusable, so the arrow keys move through a long list. -->
|
||||
<Style x:Key="ListBoxItem.Preview" TargetType="ListBoxItem" BasedOn="{StaticResource ListBoxItem.Row}">
|
||||
<Setter Property="Padding" Value="0" />
|
||||
<Setter Property="FocusVisualStyle" Value="{StaticResource Focus.Inset}" />
|
||||
<Setter Property="AutomationProperties.Name" Value="{Binding To}" />
|
||||
<Setter Property="AutomationProperties.HelpText" Value="{Binding From}" />
|
||||
</Style>
|
||||
<!-- Report rows with their own buttons: Tab reaches every button. -->
|
||||
<Style x:Key="ListBoxItem.Duplicate" TargetType="ListBoxItem" BasedOn="{StaticResource ListBoxItem.PlainRow}">
|
||||
<Setter Property="AutomationProperties.Name" Value="{Binding Row.Title}" />
|
||||
<Setter Property="AutomationProperties.HelpText" Value="{Binding Row.Detail}" />
|
||||
</Style>
|
||||
|
||||
<!-- Dialog labels: a column at least 116 px wide that grows with the longest label (DESIGN §2: no fixed-width labels). -->
|
||||
<Style x:Key="Text.DialogLabel" TargetType="TextBlock" BasedOn="{StaticResource Text.Label}">
|
||||
<Setter Property="TextTrimming" Value="None" />
|
||||
</Style>
|
||||
|
||||
<!-- A path in a cell: left to right in every language, at the start of the cell (BRIEF §16). -->
|
||||
<Style x:Key="Text.Path" TargetType="TextBlock" BasedOn="{StaticResource Text.Cell}">
|
||||
<Setter Property="FlowDirection" Value="LeftToRight" />
|
||||
<Setter Property="HorizontalAlignment" Value="Left" />
|
||||
</Style>
|
||||
|
||||
<!-- A status line screen readers announce when it changes. -->
|
||||
<Style x:Key="Text.Live" TargetType="TextBlock">
|
||||
<Setter Property="Foreground" Value="{DynamicResource Brush.TextMuted}" />
|
||||
<Setter Property="VerticalAlignment" Value="Center" />
|
||||
<Setter Property="TextTrimming" Value="CharacterEllipsis" />
|
||||
<Setter Property="AutomationProperties.LiveSetting" Value="Polite" />
|
||||
</Style>
|
||||
|
||||
<!-- A dialog's failure: one sentence in the error colour with its glyph, the engine's own text in the tooltip, announced at once. -->
|
||||
<Style x:Key="Status.DialogError" TargetType="ui:StatusGlyph" BasedOn="{StaticResource {x:Type ui:StatusGlyph}}">
|
||||
<Setter Property="Kind" Value="Error" />
|
||||
<Setter Property="FontSize" Value="12" />
|
||||
<Setter Property="VerticalAlignment" Value="Center" />
|
||||
<Setter Property="Text" Value="{Binding ErrorText}" />
|
||||
<Setter Property="ToolTip" Value="{Binding ErrorToolTip}" />
|
||||
<Setter Property="AutomationProperties.LiveSetting" Value="Assertive" />
|
||||
<Setter Property="infra:LiveRegion.Text" Value="{Binding ErrorText}" />
|
||||
<Setter Property="Visibility" Value="{Binding ErrorText, Converter={x:Static ui:NullToCollapsedConverter.Instance}}" />
|
||||
</Style>
|
||||
<!-- A filter menu: its values, each checked while chosen. -->
|
||||
<Style x:Key="MenuItem.Choice" TargetType="MenuItem" BasedOn="{StaticResource {x:Type MenuItem}}">
|
||||
@@ -52,21 +117,29 @@
|
||||
<Border Style="{StaticResource Border.Dialog}" Width="520">
|
||||
<StackPanel>
|
||||
<TextBlock Text="{l:Loc Archive.Rebuild.Heading}" Style="{StaticResource Text.Title}" />
|
||||
<ItemsControl ItemsSource="{Binding FactRows}" Focusable="False" Margin="0,14,0,0">
|
||||
<ItemsControl ItemsSource="{Binding FactRows}" Focusable="False" Margin="0,14,0,0" Grid.IsSharedSizeScope="True">
|
||||
<ItemsControl.ItemTemplate>
|
||||
<DataTemplate DataType="{x:Type ar:DialogFact}">
|
||||
<Grid Margin="0,0,0,8">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="{StaticResource Grid.LabelColumn}" />
|
||||
<ColumnDefinition Width="Auto" MinWidth="116" SharedSizeGroup="FactLabel" />
|
||||
<ColumnDefinition Width="*" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<TextBlock Text="{Binding Label}" Style="{StaticResource Text.Label}" />
|
||||
<TextBlock Grid.Column="1" Text="{Binding Value}" TextTrimming="CharacterEllipsis" ToolTip="{Binding Value}" Typography.NumeralAlignment="Tabular" />
|
||||
<TextBlock Text="{Binding Label}" Style="{StaticResource Text.DialogLabel}" />
|
||||
<TextBlock x:Name="Value" Grid.Column="1" Text="{Binding Value}" TextTrimming="CharacterEllipsis" ToolTip="{Binding ToolTip}"
|
||||
Typography.NumeralAlignment="Tabular" />
|
||||
</Grid>
|
||||
<DataTemplate.Triggers>
|
||||
<DataTrigger Binding="{Binding IsPath}" Value="True">
|
||||
<Setter TargetName="Value" Property="FlowDirection" Value="LeftToRight" />
|
||||
<Setter TargetName="Value" Property="HorizontalAlignment" Value="Left" />
|
||||
</DataTrigger>
|
||||
</DataTemplate.Triggers>
|
||||
</DataTemplate>
|
||||
</ItemsControl.ItemTemplate>
|
||||
</ItemsControl>
|
||||
<TextBlock Text="{Binding BusyText}" Foreground="{DynamicResource Brush.TextMuted}" Visibility="{Binding BusyText, Converter={x:Static ui:NullToCollapsedConverter.Instance}}" />
|
||||
<TextBlock Style="{StaticResource Text.Live}" Text="{Binding BusyText}" infra:LiveRegion.Text="{Binding BusyText}"
|
||||
Visibility="{Binding BusyText, Converter={x:Static ui:NullToCollapsedConverter.Instance}}" />
|
||||
<StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="0,18,0,0">
|
||||
<Button Content="{l:Loc Archive.Dialog.Cancel}" Command="{Binding CloseCommand}" ToolTip="{Binding CloseToolTip}" IsDefault="True" IsCancel="True"
|
||||
MinWidth="96" />
|
||||
@@ -90,12 +163,14 @@
|
||||
<TextBlock Text="{Binding Heading}" Style="{StaticResource Text.Title}" />
|
||||
<Grid Grid.Row="1" Margin="0,14,0,0">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="{StaticResource Grid.LabelColumn}" />
|
||||
<ColumnDefinition Width="Auto" MinWidth="116" />
|
||||
<ColumnDefinition Width="*" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<TextBlock Text="{l:Loc Archive.Rename.Template}" Style="{StaticResource Text.Label}" />
|
||||
<TextBox Grid.Column="1" Style="{StaticResource TextBox.Mono}" Text="{Binding Template.Text, UpdateSourceTrigger=PropertyChanged, ValidatesOnNotifyDataErrors=True}"
|
||||
shell:EditBehavior.Field="{Binding Template}" ToolTip="{Binding Template.ToolTip}" AutomationProperties.Name="{l:Loc Archive.Rename.Template}" />
|
||||
<TextBlock Text="{l:Loc Archive.Rename.Template}" Style="{StaticResource Text.DialogLabel}" />
|
||||
<!-- A naming template keeps its tokens and separators in order in every language. -->
|
||||
<TextBox Grid.Column="1" Style="{StaticResource TextBox.Mono}" FlowDirection="LeftToRight"
|
||||
Text="{Binding Template.Text, UpdateSourceTrigger=PropertyChanged, ValidatesOnNotifyDataErrors=True}" shell:EditBehavior.Field="{Binding Template}"
|
||||
ToolTip="{Binding Template.ToolTip}" AutomationProperties.Name="{l:Loc Archive.Rename.Template}" />
|
||||
</Grid>
|
||||
<TextBlock Grid.Row="2" Text="{Binding SummaryText}" Foreground="{DynamicResource Brush.TextMuted}" Margin="0,12,0,6" Typography.NumeralAlignment="Tabular" />
|
||||
<ListBox Grid.Row="3" ItemsSource="{Binding Rows}" ItemContainerStyle="{StaticResource ListBoxItem.Preview}" MinHeight="120"
|
||||
@@ -108,19 +183,31 @@
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="*" MinWidth="120" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<TextBlock Style="{StaticResource Text.Cell}" Text="{Binding From}" Foreground="{DynamicResource Brush.TextMuted}" ToolTip="{Binding From}" />
|
||||
<ui:Icon Grid.Column="1" Glyph="{StaticResource Icon.Forward}" Margin="10,0" Foreground="{DynamicResource Brush.TextFaint}" />
|
||||
<TextBlock Grid.Column="2" Style="{StaticResource Text.Cell}" Text="{Binding To}" ToolTip="{Binding To}" />
|
||||
<TextBlock x:Name="From" Style="{StaticResource Text.Cell}" Text="{Binding From}" Foreground="{DynamicResource Brush.TextMuted}" ToolTip="{Binding From}" />
|
||||
<ui:Icon Grid.Column="1" Glyph="{StaticResource Icon.Forward}" Margin="10,0" VerticalAlignment="Center" Foreground="{DynamicResource Brush.TextMuted}" />
|
||||
<TextBlock x:Name="To" Grid.Column="2" Style="{StaticResource Text.Cell}" Text="{Binding To}" ToolTip="{Binding To}" />
|
||||
</Grid>
|
||||
<DataTemplate.Triggers>
|
||||
<!-- Move lists folders: paths stay left to right; Rename lists titles, which read in the language's direction. -->
|
||||
<DataTrigger Binding="{Binding DataContext.Mode, RelativeSource={RelativeSource AncestorType=ListBox}}" Value="Folders">
|
||||
<Setter TargetName="From" Property="FlowDirection" Value="LeftToRight" />
|
||||
<Setter TargetName="From" Property="HorizontalAlignment" Value="Left" />
|
||||
<Setter TargetName="To" Property="FlowDirection" Value="LeftToRight" />
|
||||
<Setter TargetName="To" Property="HorizontalAlignment" Value="Left" />
|
||||
</DataTrigger>
|
||||
</DataTemplate.Triggers>
|
||||
</DataTemplate>
|
||||
</ListBox.ItemTemplate>
|
||||
</ListBox>
|
||||
<DockPanel Grid.Row="4" Margin="0,16,0,0">
|
||||
<Button DockPanel.Dock="Right" Style="{StaticResource Button.Primary}" Content="{l:Loc Archive.Rename.Apply}" Command="{Binding ApplyCommand}"
|
||||
ToolTip="{Binding ApplyToolTip}" MinWidth="96" Margin="8,0,0,0" />
|
||||
<Button DockPanel.Dock="Right" Content="{l:Loc Archive.Dialog.Cancel}" Command="{Binding CloseCommand}" ToolTip="{Binding CloseToolTip}" IsCancel="True"
|
||||
MinWidth="96" />
|
||||
<TextBlock Text="{Binding BusyText}" Foreground="{DynamicResource Brush.TextMuted}" VerticalAlignment="Center" TextTrimming="CharacterEllipsis" />
|
||||
<Button DockPanel.Dock="Right" Content="{l:Loc Archive.Dialog.Cancel}" Command="{Binding CloseCommand}" ToolTip="{Binding CloseToolTip}" IsDefault="True"
|
||||
IsCancel="True" MinWidth="96" />
|
||||
<Grid Margin="0,0,12,0">
|
||||
<TextBlock Style="{StaticResource Text.Live}" Text="{Binding BusyText}" infra:LiveRegion.Text="{Binding BusyText}" Typography.NumeralAlignment="Tabular" />
|
||||
<ui:StatusGlyph Style="{StaticResource Status.DialogError}" />
|
||||
</Grid>
|
||||
</DockPanel>
|
||||
</Grid>
|
||||
</Border>
|
||||
@@ -132,17 +219,17 @@
|
||||
<TextBlock Text="{Binding Heading}" Style="{StaticResource Text.Title}" />
|
||||
<Grid Margin="0,14,0,0">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="{StaticResource Grid.LabelColumn}" />
|
||||
<ColumnDefinition Width="Auto" MinWidth="116" />
|
||||
<ColumnDefinition Width="*" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
</Grid.RowDefinitions>
|
||||
<TextBlock Text="{l:Loc Archive.Retag.Add}" Style="{StaticResource Text.Label}" />
|
||||
<TextBlock Text="{l:Loc Archive.Retag.Add}" Style="{StaticResource Text.DialogLabel}" />
|
||||
<TextBox Grid.Column="1" Text="{Binding Add.Text, UpdateSourceTrigger=PropertyChanged, ValidatesOnNotifyDataErrors=True}" shell:EditBehavior.Field="{Binding Add}"
|
||||
ToolTip="{Binding Add.ToolTip}" AutomationProperties.Name="{l:Loc Archive.Retag.Add}" />
|
||||
<TextBlock Grid.Row="1" Text="{l:Loc Archive.Retag.Remove}" Style="{StaticResource Text.Label}" Margin="0,10,14,0" />
|
||||
<TextBlock Grid.Row="1" Text="{l:Loc Archive.Retag.Remove}" Style="{StaticResource Text.DialogLabel}" Margin="0,10,14,0" />
|
||||
<TextBox Grid.Row="1" Grid.Column="1" Margin="0,10,0,0" Text="{Binding Remove.Text, UpdateSourceTrigger=PropertyChanged, ValidatesOnNotifyDataErrors=True}"
|
||||
shell:EditBehavior.Field="{Binding Remove}" ToolTip="{Binding Remove.ToolTip}" AutomationProperties.Name="{l:Loc Archive.Retag.Remove}" />
|
||||
</Grid>
|
||||
@@ -150,9 +237,12 @@
|
||||
<DockPanel Margin="0,18,0,0">
|
||||
<Button DockPanel.Dock="Right" Style="{StaticResource Button.Primary}" Content="{l:Loc Archive.Retag.Apply}" Command="{Binding ApplyCommand}"
|
||||
ToolTip="{Binding ApplyToolTip}" MinWidth="96" Margin="8,0,0,0" />
|
||||
<Button DockPanel.Dock="Right" Content="{l:Loc Archive.Dialog.Cancel}" Command="{Binding CloseCommand}" ToolTip="{Binding CloseToolTip}" IsCancel="True"
|
||||
MinWidth="96" />
|
||||
<TextBlock Text="{Binding BusyText}" Foreground="{DynamicResource Brush.TextMuted}" VerticalAlignment="Center" TextTrimming="CharacterEllipsis" />
|
||||
<Button DockPanel.Dock="Right" Content="{l:Loc Archive.Dialog.Cancel}" Command="{Binding CloseCommand}" ToolTip="{Binding CloseToolTip}" IsDefault="True"
|
||||
IsCancel="True" MinWidth="96" />
|
||||
<Grid Margin="0,0,12,0">
|
||||
<TextBlock Style="{StaticResource Text.Live}" Text="{Binding BusyText}" infra:LiveRegion.Text="{Binding BusyText}" Typography.NumeralAlignment="Tabular" />
|
||||
<ui:StatusGlyph Style="{StaticResource Status.DialogError}" />
|
||||
</Grid>
|
||||
</DockPanel>
|
||||
</StackPanel>
|
||||
</Border>
|
||||
@@ -180,10 +270,10 @@
|
||||
<Button Style="{StaticResource Button.Tool}" Content="{l:Loc Archive.Toolbar.Duplicates}" Command="{Binding FindDuplicatesCommand}"
|
||||
ToolTip="{Binding DuplicatesToolTip}" />
|
||||
<Button Style="{StaticResource Button.Tool}" Content="{l:Loc Archive.Toolbar.Orphans}" Command="{Binding FindOrphansCommand}" ToolTip="{Binding OrphansToolTip}" />
|
||||
<Button Style="{StaticResource Button.Tool}" Click="OnOpenMenu" ToolTip="{l:Loc Tooltips.Archive.Adopt}">
|
||||
<Button Style="{StaticResource Button.Tool}" Click="OnOpenMenu" ToolTip="{l:Loc Tooltips.Archive.Adopt}" AutomationProperties.Name="{l:Loc Archive.Toolbar.AdoptMenu}">
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<TextBlock Text="{l:Loc Archive.Toolbar.AdoptMenu}" />
|
||||
<ui:Icon Glyph="{StaticResource Icon.ChevronDown}" Margin="6,0,0,0" />
|
||||
<ui:Icon Glyph="{StaticResource Icon.ChevronDown}" Margin="6,0,0,0" VerticalAlignment="Center" />
|
||||
</StackPanel>
|
||||
<Button.ContextMenu>
|
||||
<ContextMenu>
|
||||
@@ -192,10 +282,11 @@
|
||||
</ContextMenu>
|
||||
</Button.ContextMenu>
|
||||
</Button>
|
||||
<Button x:Name="MaintenanceButton" Style="{StaticResource Button.Tool}" Click="OnOpenMenu" ToolTip="{l:Loc Tooltips.Archive.Maintenance}">
|
||||
<Button x:Name="MaintenanceButton" Style="{StaticResource Button.Tool}" Click="OnOpenMenu" ToolTip="{l:Loc Tooltips.Archive.Maintenance}"
|
||||
AutomationProperties.Name="{l:Loc Archive.Toolbar.Maintenance}">
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<TextBlock Text="{l:Loc Archive.Toolbar.Maintenance}" />
|
||||
<ui:Icon Glyph="{StaticResource Icon.ChevronDown}" Margin="6,0,0,0" />
|
||||
<ui:Icon Glyph="{StaticResource Icon.ChevronDown}" Margin="6,0,0,0" VerticalAlignment="Center" />
|
||||
</StackPanel>
|
||||
<Button.ContextMenu>
|
||||
<ContextMenu>
|
||||
@@ -215,8 +306,7 @@
|
||||
<DockPanel Grid.Row="1" Margin="0,0,0,12" Visibility="{Binding HasArchive, Converter={StaticResource BoolToVisibility}}">
|
||||
<v:SegmentedControl DockPanel.Dock="Left" SelectedIndex="{Binding ViewIndex}" AutomationProperties.Name="{l:Loc Archive.View.Name}">
|
||||
<v:SegmentedItem Content="{l:Loc Archive.View.Overview}" ToolTip="{l:Loc Tooltips.Archive.Overview}" AutomationProperties.Name="{l:Loc Archive.View.Overview}" />
|
||||
<v:SegmentedItem Content="{l:Loc Archive.View.Maintenance}" ToolTip="{l:Loc Tooltips.Archive.MaintenanceView}"
|
||||
AutomationProperties.Name="{l:Loc Archive.View.Maintenance}" />
|
||||
<v:SegmentedItem Content="{l:Loc Archive.View.Health}" ToolTip="{l:Loc Tooltips.Archive.MaintenanceView}" AutomationProperties.Name="{l:Loc Archive.View.Health}" />
|
||||
</v:SegmentedControl>
|
||||
<TextBlock Text="{Binding LastScanText}" Foreground="{DynamicResource Brush.TextMuted}" VerticalAlignment="Center" HorizontalAlignment="Right" Margin="14,0,0,0"
|
||||
TextTrimming="CharacterEllipsis" Typography.NumeralAlignment="Tabular" ToolTip="{l:Loc Tooltips.Archive.LastScan}" />
|
||||
@@ -236,6 +326,7 @@
|
||||
<Style TargetType="ListBoxItem" BasedOn="{StaticResource {x:Type ListBoxItem}}">
|
||||
<Setter Property="MinHeight" Value="32" />
|
||||
<Setter Property="Padding" Value="6,0" />
|
||||
<Setter Property="FocusVisualStyle" Value="{StaticResource Focus.Inset}" />
|
||||
<Setter Property="ToolTip" Value="{Binding RowToolTip}" />
|
||||
<Setter Property="AutomationProperties.Name" Value="{Binding Title}" />
|
||||
<Setter Property="AutomationProperties.HelpText" Value="{Binding Detail}" />
|
||||
@@ -281,13 +372,28 @@
|
||||
</Border>
|
||||
|
||||
<Grid Grid.Column="2">
|
||||
<!--
|
||||
Chart labels in TextMuted as in Archive.html: the kit's charts draw them in TextFaint, too faint for 11 px data
|
||||
labels (reported to the shared controls; remove this alias once they draw in TextMuted).
|
||||
-->
|
||||
<Grid.Resources>
|
||||
<SolidColorBrush x:Key="Brush.TextFaint" Color="{DynamicResource Color.TextMuted}" />
|
||||
</Grid.Resources>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="14" />
|
||||
<RowDefinition Height="*" />
|
||||
<RowDefinition Height="14" />
|
||||
<RowDefinition Height="*" />
|
||||
</Grid.RowDefinitions>
|
||||
<!-- One column split for both chart rows, so the gutter lines up; 14 px gaps throughout (Archive.html). -->
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1.2*" />
|
||||
<ColumnDefinition Width="14" />
|
||||
<ColumnDefinition Width="*" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<!-- Figure tiles (Archive.html). -->
|
||||
<ItemsControl ItemsSource="{Binding Tiles}" Focusable="False" Margin="0,0,-10,0">
|
||||
<ItemsControl Grid.ColumnSpan="3" ItemsSource="{Binding Tiles}" Focusable="False" Margin="0,0,-14,0">
|
||||
<ItemsControl.ItemsPanel>
|
||||
<ItemsPanelTemplate>
|
||||
<UniformGrid Rows="1" />
|
||||
@@ -295,7 +401,7 @@
|
||||
</ItemsControl.ItemsPanel>
|
||||
<ItemsControl.ItemTemplate>
|
||||
<DataTemplate DataType="{x:Type ar:ArchiveTile}">
|
||||
<Border Style="{StaticResource Border.Panel}" Padding="14,8" Margin="0,0,10,0" ToolTip="{Binding Caption}">
|
||||
<Border Style="{StaticResource Border.Panel}" Padding="14,8" Margin="0,0,14,0" ToolTip="{Binding Caption}">
|
||||
<StackPanel>
|
||||
<!-- A narrow tile (the window at its minimum width) shrinks the figure rather than cutting it. -->
|
||||
<Viewbox StretchDirection="DownOnly" HorizontalAlignment="Left">
|
||||
@@ -308,49 +414,59 @@
|
||||
</ItemsControl.ItemTemplate>
|
||||
</ItemsControl>
|
||||
|
||||
<Grid Grid.Row="1" Margin="0,12,0,0">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1.2*" />
|
||||
<ColumnDefinition Width="12" />
|
||||
<ColumnDefinition Width="*" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Border Style="{StaticResource Border.Panel}" Padding="14,10">
|
||||
<DockPanel>
|
||||
<TextBlock DockPanel.Dock="Top" Text="{l:Loc Archive.Chart.Months}" Style="{StaticResource Text.PanelHeading}" Margin="0,0,0,8" />
|
||||
<v:HeatmapStrip Rows="{Binding MonthRows}" ColumnLabels="{Binding MonthLabels}" ValueFormatter="{Binding CountFormatter}" MaxCellSize="18"
|
||||
ToolTip="{l:Loc Tooltips.Archive.Months}" AutomationProperties.Name="{l:Loc Archive.Chart.Months}" />
|
||||
<Border Grid.Row="2" Style="{StaticResource Border.Panel}" Padding="14,10">
|
||||
<DockPanel>
|
||||
<!-- The colour scale sits in the header, at the end of the title (Archive.html). -->
|
||||
<DockPanel DockPanel.Dock="Top" Margin="0,0,0,8">
|
||||
<StackPanel DockPanel.Dock="Right" Orientation="Horizontal" FlowDirection="LeftToRight" VerticalAlignment="Center"
|
||||
Visibility="{Binding HasMonthScale, Converter={StaticResource BoolToVisibility}}">
|
||||
<TextBlock Text="{Binding MonthScaleLow}" Style="{StaticResource Text.Chip}" Typography.NumeralAlignment="Tabular" />
|
||||
<Grid Width="60" Height="8" Margin="6,0">
|
||||
<Border CornerRadius="2" Background="{DynamicResource Brush.Accent}" Opacity="0.08" />
|
||||
<Border CornerRadius="2" Background="{DynamicResource Brush.Accent}">
|
||||
<Border.OpacityMask>
|
||||
<LinearGradientBrush StartPoint="0,0" EndPoint="1,0">
|
||||
<GradientStop Color="Transparent" Offset="0" />
|
||||
<GradientStop Color="Black" Offset="1" />
|
||||
</LinearGradientBrush>
|
||||
</Border.OpacityMask>
|
||||
</Border>
|
||||
</Grid>
|
||||
<TextBlock Text="{Binding MonthScaleHigh}" Style="{StaticResource Text.Chip}" Typography.NumeralAlignment="Tabular" />
|
||||
</StackPanel>
|
||||
<TextBlock Text="{l:Loc Archive.Chart.Months}" Style="{StaticResource Text.PanelHeading}" />
|
||||
</DockPanel>
|
||||
</Border>
|
||||
<Border Grid.Column="2" Style="{StaticResource Border.Panel}" Padding="14,10">
|
||||
<DockPanel>
|
||||
<TextBlock DockPanel.Dock="Top" Text="{l:Loc Archive.Chart.Storage}" Style="{StaticResource Text.PanelHeading}" Margin="0,0,0,8" />
|
||||
<v:BarChart Items="{Binding StorageBars}" MinimumOpacity="0.55" BarThickness="12" ToolTip="{l:Loc Tooltips.Archive.Storage}"
|
||||
AutomationProperties.Name="{l:Loc Archive.Chart.Storage}" />
|
||||
</DockPanel>
|
||||
</Border>
|
||||
</Grid>
|
||||
|
||||
<Grid Grid.Row="2" Margin="0,12,0,0">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*" />
|
||||
<ColumnDefinition Width="12" />
|
||||
<ColumnDefinition Width="*" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Border Style="{StaticResource Border.Panel}" Padding="14,10">
|
||||
<DockPanel>
|
||||
<TextBlock DockPanel.Dock="Top" Text="{l:Loc Archive.Chart.Cameras}" Style="{StaticResource Text.PanelHeading}" Margin="0,0,0,8" />
|
||||
<v:BarChart Items="{Binding CameraBars}" BrushKey="Brush.Sun" MinimumOpacity="0.45" BarThickness="12" ToolTip="{l:Loc Tooltips.Archive.Cameras}"
|
||||
AutomationProperties.Name="{l:Loc Archive.Chart.Cameras}" />
|
||||
</DockPanel>
|
||||
</Border>
|
||||
<Border Grid.Column="2" Style="{StaticResource Border.Panel}" Padding="14,10">
|
||||
<DockPanel>
|
||||
<TextBlock DockPanel.Dock="Top" Text="{l:Loc Archive.Chart.Formats}" Style="{StaticResource Text.PanelHeading}" Margin="0,0,0,8" />
|
||||
<v:BarChart Items="{Binding FormatBars}" MinimumOpacity="0.35" BarThickness="12" ToolTip="{l:Loc Tooltips.Archive.Formats}"
|
||||
AutomationProperties.Name="{l:Loc Archive.Chart.Formats}" />
|
||||
</DockPanel>
|
||||
</Border>
|
||||
</Grid>
|
||||
<v:HeatmapStrip Rows="{Binding MonthRows}" ColumnLabels="{Binding MonthLabels}" ValueFormatter="{Binding CountFormatter}" MaxCellSize="32" ShowScale="False"
|
||||
ToolTip="{l:Loc Tooltips.Archive.Months}" AutomationProperties.Name="{l:Loc Archive.Chart.Months}"
|
||||
AutomationProperties.HelpText="{Binding MonthsDescription}">
|
||||
<!-- Months still to come in the Stroke tone: the kit fills them with Card, the panel's own colour in the light theme. -->
|
||||
<v:HeatmapStrip.Resources>
|
||||
<SolidColorBrush x:Key="Brush.Card" Color="{DynamicResource Color.Stroke}" />
|
||||
</v:HeatmapStrip.Resources>
|
||||
</v:HeatmapStrip>
|
||||
</DockPanel>
|
||||
</Border>
|
||||
<Border Grid.Row="2" Grid.Column="2" Style="{StaticResource Border.Panel}" Padding="14,10">
|
||||
<DockPanel>
|
||||
<TextBlock DockPanel.Dock="Top" Text="{l:Loc Archive.Chart.Storage}" Style="{StaticResource Text.PanelHeading}" Margin="0,0,0,8" />
|
||||
<v:BarChart Items="{Binding StorageBars}" MinimumOpacity="0.55" BarThickness="12" ToolTip="{l:Loc Tooltips.Archive.Storage}"
|
||||
AutomationProperties.Name="{l:Loc Archive.Chart.Storage}" AutomationProperties.HelpText="{Binding StorageDescription}" />
|
||||
</DockPanel>
|
||||
</Border>
|
||||
<Border Grid.Row="4" Style="{StaticResource Border.Panel}" Padding="14,10">
|
||||
<DockPanel>
|
||||
<TextBlock DockPanel.Dock="Top" Text="{l:Loc Archive.Chart.Cameras}" Style="{StaticResource Text.PanelHeading}" Margin="0,0,0,8" />
|
||||
<v:BarChart Items="{Binding CameraBars}" BrushKey="Brush.Sun" MinimumOpacity="0.45" BarThickness="12" ToolTip="{l:Loc Tooltips.Archive.Cameras}"
|
||||
AutomationProperties.Name="{l:Loc Archive.Chart.Cameras}" AutomationProperties.HelpText="{Binding CamerasDescription}" />
|
||||
</DockPanel>
|
||||
</Border>
|
||||
<Border Grid.Row="4" Grid.Column="2" Style="{StaticResource Border.Panel}" Padding="14,10">
|
||||
<DockPanel>
|
||||
<TextBlock DockPanel.Dock="Top" Text="{l:Loc Archive.Chart.Formats}" Style="{StaticResource Text.PanelHeading}" Margin="0,0,0,8" />
|
||||
<v:BarChart Items="{Binding FormatBars}" MinimumOpacity="0.35" BarThickness="12" ToolTip="{l:Loc Tooltips.Archive.Formats}"
|
||||
AutomationProperties.Name="{l:Loc Archive.Chart.Formats}" AutomationProperties.HelpText="{Binding FormatsDescription}" />
|
||||
</DockPanel>
|
||||
</Border>
|
||||
</Grid>
|
||||
</Grid>
|
||||
|
||||
@@ -371,12 +487,21 @@
|
||||
<TextBlock Text="{l:Loc Archive.Health.Title}" Style="{StaticResource Text.PanelHeading}" Margin="0,0,0,8" />
|
||||
<ItemsControl ItemsSource="{Binding Health}" Focusable="False">
|
||||
<ItemsControl.ItemTemplate>
|
||||
<!-- Archive.html: a 14 px glyph in the state's colour (● ok, ▲ needs attention), the text in the normal colour. -->
|
||||
<DataTemplate DataType="{x:Type ar:HealthLineViewModel}">
|
||||
<DockPanel Height="32">
|
||||
<Button DockPanel.Dock="Right" Style="{StaticResource Button.Row}" Margin="8,0,0,0" Content="{Binding FixText}" Command="{Binding FixCommand}"
|
||||
ToolTip="{Binding FixToolTip}" Visibility="{Binding HasFix, Converter={StaticResource BoolToVisibility}}" />
|
||||
<ui:StatusGlyph Kind="{Binding Kind}" Text="{Binding Text}" FontSize="13" VerticalAlignment="Center" ToolTip="{Binding KindToolTip}" />
|
||||
<ui:Icon x:Name="Glyph" DockPanel.Dock="Left" Glyph="{StaticResource Icon.Warning}" Size="14" Margin="0,0,10,0" VerticalAlignment="Center"
|
||||
Foreground="{DynamicResource Brush.Warning}" />
|
||||
<TextBlock Text="{Binding Text}" VerticalAlignment="Center" TextTrimming="CharacterEllipsis" ToolTip="{Binding KindToolTip}" />
|
||||
</DockPanel>
|
||||
<DataTemplate.Triggers>
|
||||
<DataTrigger Binding="{Binding IsOk}" Value="True">
|
||||
<Setter TargetName="Glyph" Property="Glyph" Value="{StaticResource Icon.SuccessCircle}" />
|
||||
<Setter TargetName="Glyph" Property="Foreground" Value="{DynamicResource Brush.Success}" />
|
||||
</DataTrigger>
|
||||
</DataTemplate.Triggers>
|
||||
</DataTemplate>
|
||||
</ItemsControl.ItemTemplate>
|
||||
</ItemsControl>
|
||||
@@ -402,7 +527,9 @@
|
||||
</Grid.ColumnDefinitions>
|
||||
<TextBlock Text="{Binding DateText}" Foreground="{DynamicResource Brush.TextMuted}" VerticalAlignment="Center" Typography.NumeralAlignment="Tabular" />
|
||||
<TextBlock Grid.Column="1" Text="{Binding Text}" Margin="12,0" VerticalAlignment="Center" TextTrimming="CharacterEllipsis" ToolTip="{Binding Text}" />
|
||||
<TextBlock Grid.Column="2" Text="{Binding StateText}" Foreground="{DynamicResource Brush.TextMuted}" VerticalAlignment="Center" Typography.NumeralAlignment="Tabular" />
|
||||
<!-- The outcome in its state's colour and glyph (Archive.html: accent while running, green when done). -->
|
||||
<ui:StatusGlyph Grid.Column="2" Kind="{Binding StateKind}" Text="{Binding StateText}" FontSize="12" VerticalAlignment="Center"
|
||||
Typography.NumeralAlignment="Tabular" ToolTip="{Binding StateToolTip}" />
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
</ItemsControl.ItemTemplate>
|
||||
@@ -421,12 +548,13 @@
|
||||
<DockPanel DockPanel.Dock="Top" Margin="0,0,0,8">
|
||||
<Button DockPanel.Dock="Right" Style="{StaticResource Button.Row}" Margin="8,0,0,0" Content="{l:Loc Archive.Duplicates.Mark}"
|
||||
Command="{Binding MarkDuplicatesCommand}" ToolTip="{Binding MarkDuplicatesToolTip}" />
|
||||
<!-- Cancel only in the card whose search runs; the other card's Find waits, its tooltip says why. -->
|
||||
<Button DockPanel.Dock="Right" Style="{StaticResource Button.Row}" Margin="0" Content="{l:Loc Archive.Find.Run}" Command="{Binding FindDuplicatesCommand}"
|
||||
ToolTip="{Binding DuplicatesToolTip}" Visibility="{Binding IsSearching, Converter={x:Static ui:InverseBoolToVisibilityConverter.Instance}}" />
|
||||
ToolTip="{Binding DuplicatesToolTip}" Visibility="{Binding IsFindingDuplicates, Converter={x:Static ui:InverseBoolToVisibilityConverter.Instance}}" />
|
||||
<Button DockPanel.Dock="Right" Style="{StaticResource Button.Row}" Margin="0" Content="{l:Loc Archive.Find.Cancel}" Command="{Binding CancelSearchCommand}"
|
||||
ToolTip="{l:Loc Tooltips.Archive.CancelSearch}" Visibility="{Binding IsSearching, Converter={StaticResource BoolToVisibility}}" />
|
||||
ToolTip="{l:Loc Tooltips.Archive.CancelSearch}" Visibility="{Binding IsFindingDuplicates, Converter={StaticResource BoolToVisibility}}" />
|
||||
<TextBlock Text="{l:Loc Archive.Duplicates.Title}" Style="{StaticResource Text.PanelHeading}" />
|
||||
<TextBlock Text="{Binding DuplicatesText}" Foreground="{DynamicResource Brush.TextMuted}" Margin="10,0,0,0" VerticalAlignment="Center" />
|
||||
<TextBlock Style="{StaticResource Text.Live}" Text="{Binding DuplicatesText}" infra:LiveRegion.Text="{Binding DuplicatesText}" Margin="10,0,0,0" />
|
||||
</DockPanel>
|
||||
<ListBox ItemsSource="{Binding Duplicates}" ItemContainerStyle="{StaticResource ListBoxItem.Duplicate}" AutomationProperties.Name="{l:Loc Archive.Duplicates.Title}"
|
||||
KeyboardNavigation.TabNavigation="Continue">
|
||||
@@ -454,11 +582,11 @@
|
||||
<DockPanel>
|
||||
<DockPanel DockPanel.Dock="Top" Margin="0,0,0,8">
|
||||
<Button DockPanel.Dock="Right" Style="{StaticResource Button.Row}" Margin="0" Content="{l:Loc Archive.Find.Run}" Command="{Binding FindOrphansCommand}"
|
||||
ToolTip="{Binding OrphansToolTip}" Visibility="{Binding IsSearching, Converter={x:Static ui:InverseBoolToVisibilityConverter.Instance}}" />
|
||||
ToolTip="{Binding OrphansToolTip}" Visibility="{Binding IsFindingOrphans, Converter={x:Static ui:InverseBoolToVisibilityConverter.Instance}}" />
|
||||
<Button DockPanel.Dock="Right" Style="{StaticResource Button.Row}" Margin="0" Content="{l:Loc Archive.Find.Cancel}" Command="{Binding CancelSearchCommand}"
|
||||
ToolTip="{l:Loc Tooltips.Archive.CancelSearch}" Visibility="{Binding IsSearching, Converter={StaticResource BoolToVisibility}}" />
|
||||
ToolTip="{l:Loc Tooltips.Archive.CancelSearch}" Visibility="{Binding IsFindingOrphans, Converter={StaticResource BoolToVisibility}}" />
|
||||
<TextBlock Text="{l:Loc Archive.Orphans.Title}" Style="{StaticResource Text.PanelHeading}" />
|
||||
<TextBlock Text="{Binding OrphansText}" Foreground="{DynamicResource Brush.TextMuted}" Margin="10,0,0,0" VerticalAlignment="Center" />
|
||||
<TextBlock Style="{StaticResource Text.Live}" Text="{Binding OrphansText}" infra:LiveRegion.Text="{Binding OrphansText}" Margin="10,0,0,0" />
|
||||
</DockPanel>
|
||||
<ListBox ItemsSource="{Binding Orphans}" ItemContainerStyle="{StaticResource ListBoxItem.Duplicate}" AutomationProperties.Name="{l:Loc Archive.Orphans.Title}"
|
||||
KeyboardNavigation.TabNavigation="Continue">
|
||||
@@ -468,7 +596,7 @@
|
||||
<Button DockPanel.Dock="Right" Style="{StaticResource Button.Row}" Content="{Binding FixText}" Command="{Binding FixCommand}" ToolTip="{Binding FixToolTip}" />
|
||||
<StackPanel VerticalAlignment="Center">
|
||||
<TextBlock Text="{Binding Row.Title}" FontWeight="SemiBold" TextTrimming="CharacterEllipsis" ToolTip="{Binding Row.Title}" />
|
||||
<ui:StatusGlyph Kind="{Binding Kind}" Text="{Binding Row.Detail}" FontSize="12" ToolTip="{Binding KindText}" />
|
||||
<ui:StatusGlyph Kind="Warning" Text="{Binding Row.Detail}" FontSize="12" ToolTip="{Binding KindText}" />
|
||||
</StackPanel>
|
||||
</DockPanel>
|
||||
</DataTemplate>
|
||||
@@ -485,10 +613,10 @@
|
||||
<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}">
|
||||
AutomationProperties.Name="{Binding SetFilterName}">
|
||||
<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" />
|
||||
<ui:Icon Glyph="{StaticResource Icon.ChevronDown}" Margin="6,0,0,0" VerticalAlignment="Center" />
|
||||
</StackPanel>
|
||||
<Button.ContextMenu>
|
||||
<ContextMenu>
|
||||
|
||||
@@ -12,6 +12,7 @@ public partial class ArchiveView : UserControl
|
||||
{
|
||||
private bool _restoring;
|
||||
private string? _focusKey;
|
||||
private IInputElement? _beforeDialog;
|
||||
|
||||
public ArchiveView()
|
||||
{
|
||||
@@ -79,26 +80,42 @@ public partial class ArchiveView : UserControl
|
||||
});
|
||||
}
|
||||
|
||||
/// <summary>On a year: Right opens it, Left closes it, Enter toggles it.</summary>
|
||||
/// <summary>
|
||||
/// On a year: the arrow towards the indented side opens it (Right, or Left in a right-to-left layout, as a tree
|
||||
/// view does), the other arrow closes it, Enter toggles it.
|
||||
/// </summary>
|
||||
private void OnTreeKeyDown(object sender, KeyEventArgs e)
|
||||
{
|
||||
if (Model is not { } model || Keyboard.FocusedElement is not ListBoxItem { DataContext: ArchiveTreeRowViewModel row } || !row.HasChildren || row.IsArchive) return;
|
||||
var toggle = e.Key switch
|
||||
{
|
||||
Key.Right => !row.IsExpanded,
|
||||
Key.Left => row.IsExpanded,
|
||||
Key.Enter => true,
|
||||
_ => false,
|
||||
};
|
||||
var (open, close) = Tree.FlowDirection == FlowDirection.RightToLeft ? (Key.Left, Key.Right) : (Key.Right, Key.Left);
|
||||
var toggle = e.Key == open ? !row.IsExpanded
|
||||
: e.Key == close ? row.IsExpanded
|
||||
: e.Key == Key.Enter;
|
||||
if (!toggle) return;
|
||||
model.Toggle(row);
|
||||
e.Handled = true;
|
||||
}
|
||||
|
||||
/// <summary>A dialog that opens takes the keyboard: its first field or button.</summary>
|
||||
/// <summary>
|
||||
/// A dialog that opens takes the keyboard (its first field or button); when it closes, the keyboard goes back to the
|
||||
/// control that opened it, or to the tree when that control can no longer take it.
|
||||
/// </summary>
|
||||
private void OnModelChanged(object? sender, PropertyChangedEventArgs e)
|
||||
{
|
||||
if (e.PropertyName != nameof(ArchiveViewModel.Dialog) || Model?.Dialog is null || !IsVisible) return;
|
||||
Dispatcher.BeginInvoke(DispatcherPriority.Input, () => DialogHost.MoveFocus(new TraversalRequest(FocusNavigationDirection.First)));
|
||||
if (e.PropertyName != nameof(ArchiveViewModel.Dialog) || Model is not { } model || !IsVisible) return;
|
||||
if (model.Dialog is not null)
|
||||
{
|
||||
// Raised before the screen behind the dialog is disabled: the control that opened it still has the keyboard.
|
||||
_beforeDialog ??= Keyboard.FocusedElement is DependencyObject focused && IsAncestorOf(focused) ? Keyboard.FocusedElement : null;
|
||||
Dispatcher.BeginInvoke(DispatcherPriority.Input, () => DialogHost.MoveFocus(new TraversalRequest(FocusNavigationDirection.First)));
|
||||
return;
|
||||
}
|
||||
var back = _beforeDialog;
|
||||
_beforeDialog = null;
|
||||
Dispatcher.BeginInvoke(DispatcherPriority.Input, () =>
|
||||
{
|
||||
if (back is UIElement { IsVisible: true, IsEnabled: true, Focusable: true } element && element.Focus()) return;
|
||||
Tree.Focus();
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -168,7 +168,7 @@ public sealed class ArchiveViewModel : SectionViewModel
|
||||
public ICommand VerifyCommand { get; }
|
||||
public ICommand AdoptCommand { get; }
|
||||
|
||||
/// <summary>"Adopt folder ▾ › Copy into the layout": the Import screen copies the folder into the archive with its templates.</summary>
|
||||
/// <summary>"Adopt folder ▾ › Copy into archive": the Import screen copies the folder into the archive with its templates.</summary>
|
||||
public ICommand CopyFolderCommand { get; }
|
||||
|
||||
public ICommand BackupCommand { get; }
|
||||
|
||||
Reference in new issue
Block a user