feat(app): Import and Archive manager screens with capture scenes and resources
Import (cards and folders): the card pool with remembered profiles and the nickname field for new cards, the form (destination, scan, sessions, names with live preview and tokens, duplicates, after-import choices), the plan panel with editable session titles, Show plan, the archive import job or the folder/server run with progress, the verification result and the after-import actions (dry run, delete, format through the Windows dialog, eject, open in Library), card-insertion toasts, automatic import into the archive and resume after re-insertion. Deep analysis after import is queued with ProcessingJobs at background priority. Archive manager: archive picker, tree with availability, figure tiles and charts, mass operations on the selected set, scan/rebuild (dialog)/verify/ duplicates/orphans/adopt/maintenance as jobs, and the maintenance view with index health, recent runs and the duplicate and orphan reports with safe fixes. --capture renders import-<state> and archive-<view> from a simulated card and sample reports; en and it resources for both screens. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012iLMBNwBE2GnphAsu4cjaC
This commit is contained in:
31 files changed
+4531
-28
No files matched your search
@@ -4,16 +4,37 @@
|
||||
<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.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>
|
||||
<data name="Archive.Availability.Offline" xml:space="preserve"><value>offline</value></data>
|
||||
<data name="Archive.Availability.Online" xml:space="preserve"><value>online</value></data>
|
||||
<data name="Archive.Availability.ReadOnly" xml:space="preserve"><value>read-only</value></data>
|
||||
<data name="Archive.Blocked.NotOnline" xml:space="preserve"><value>The archive must be online and writable.</value><comment>long</comment></data>
|
||||
<data name="Archive.Chart.Cameras" xml:space="preserve"><value>By camera</value></data>
|
||||
<data name="Archive.Chart.Formats" xml:space="preserve"><value>By format</value></data>
|
||||
<data name="Archive.Chart.MonthTip" xml:space="preserve"><value>{0} · {1} · {2}</value><comment>invariant</comment></data>
|
||||
<data name="Archive.Chart.Months" xml:space="preserve"><value>Photos per month</value></data>
|
||||
<data name="Archive.Chart.OtherCameras.one" xml:space="preserve"><value>{0:N0} other</value></data>
|
||||
<data name="Archive.Chart.OtherCameras.other" xml:space="preserve"><value>{0:N0} others</value></data>
|
||||
<data name="Archive.Chart.OtherFormats" xml:space="preserve"><value>Other</value></data>
|
||||
<data name="Archive.Chart.ShareTip" xml:space="preserve"><value>{0} · {1} · {2}</value><comment>invariant</comment></data>
|
||||
<data name="Archive.Chart.Storage" xml:space="preserve"><value>Storage by year</value></data>
|
||||
<data name="Archive.Chart.UnknownCamera" xml:space="preserve"><value>Unknown camera</value></data>
|
||||
<data name="Archive.Chart.YearTip" xml:space="preserve"><value>{0} · {1} · {2}</value><comment>invariant</comment></data>
|
||||
<data name="Archive.Confirm.Keep" xml:space="preserve"><value>Keep row</value></data>
|
||||
<data name="Archive.Confirm.Remove" xml:space="preserve"><value>Remove row</value></data>
|
||||
<data name="Archive.Confirm.RemoveHeading" xml:space="preserve"><value>Remove {0} from the index?</value><comment>long</comment></data>
|
||||
<data name="Archive.Confirm.RemoveMessage" xml:space="preserve"><value>Its sidecar is gone. Only the index row is removed; no file is deleted.</value><comment>long</comment></data>
|
||||
<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.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>
|
||||
<data name="Archive.Duplicates.Mark" xml:space="preserve"><value>Mark copies</value></data>
|
||||
<data name="Archive.Duplicates.Open" xml:space="preserve"><value>Open</value></data>
|
||||
<data name="Archive.Duplicates.Place" xml:space="preserve"><value>{0} · {1}</value><comment>invariant</comment></data>
|
||||
<data name="Archive.Duplicates.Title" xml:space="preserve"><value>Duplicates</value></data>
|
||||
<data name="Archive.Empty" xml:space="preserve"><value>No archive yet</value></data>
|
||||
<data name="Archive.Error.Busy" xml:space="preserve"><value>Another Titano ({0}) is writing here. Try again shortly.</value><comment>long: error sentence</comment></data>
|
||||
<data name="Archive.Error.CopyMismatch" xml:space="preserve"><value>The copy of {0} does not match the original.</value><comment>long: error sentence</comment></data>
|
||||
@@ -24,11 +45,19 @@
|
||||
<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.Find.None" xml:space="preserve"><value>None found</value></data>
|
||||
<data name="Archive.Find.Run" xml:space="preserve"><value>Find</value></data>
|
||||
<data name="Archive.Find.Searching" xml:space="preserve"><value>Searching…</value></data>
|
||||
<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.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.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>
|
||||
<data name="Archive.Health.FramesOk" xml:space="preserve"><value>No missing frames</value></data>
|
||||
<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>
|
||||
@@ -36,8 +65,10 @@
|
||||
<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>
|
||||
<data name="Archive.Health.Title" xml:space="preserve"><value>Index health</value></data>
|
||||
<data name="Archive.Health.Unverified.one" xml:space="preserve"><value>{0:N0} sequence unverified</value></data>
|
||||
<data name="Archive.Health.Unverified.other" xml:space="preserve"><value>{0:N0} sequences unverified</value></data>
|
||||
<data name="Archive.LastScan" xml:space="preserve"><value>Last scan {0} · {1}</value><comment>long</comment></data>
|
||||
<data name="Archive.Log.DryRun" xml:space="preserve"><value>Dry run: nothing was changed.</value><comment>long: job log line</comment></data>
|
||||
<data name="Archive.Log.FolderFailed" xml:space="preserve"><value>Not indexed: {0} ({1})</value><comment>long: job log line</comment></data>
|
||||
<data name="Archive.Log.FrameChanged" xml:space="preserve"><value>Changed: {0}</value><comment>long: job log line</comment></data>
|
||||
@@ -51,16 +82,71 @@
|
||||
<data name="Archive.Log.ScanDone" xml:space="preserve"><value>{0} folders, {1} indexed, {2} adopted, {3} removed</value><comment>long: job log line</comment></data>
|
||||
<data name="Archive.Log.SequenceMissing" xml:space="preserve"><value>Sequence not found: {0}</value><comment>long: job log line</comment></data>
|
||||
<data name="Archive.Log.VerifyDone" xml:space="preserve"><value>{0} photos checked, {1} intact, {2} hashed, {3} with problems</value><comment>long: job log line</comment></data>
|
||||
<data name="Archive.Maintenance.DryRun" xml:space="preserve"><value>Dry run</value></data>
|
||||
<data name="Archive.Maintenance.Proxies" xml:space="preserve"><value>Rebuild proxies</value></data>
|
||||
<data name="Archive.Maintenance.Relink" xml:space="preserve"><value>Relink moved archive…</value></data>
|
||||
<data name="Archive.Maintenance.Run" xml:space="preserve"><value>Run maintenance</value></data>
|
||||
<data name="Archive.Orphans.Count.one" xml:space="preserve"><value>{0:N0} issue</value></data>
|
||||
<data name="Archive.Orphans.Count.other" xml:space="preserve"><value>{0:N0} issues</value></data>
|
||||
<data name="Archive.Orphans.Failed" xml:space="preserve"><value>The orphan search stopped</value><comment>long</comment></data>
|
||||
<data name="Archive.Orphans.Fix.MissingFiles" xml:space="preserve"><value>Reconcile</value></data>
|
||||
<data name="Archive.Orphans.Fix.MissingSequence" xml:space="preserve"><value>Remove row</value></data>
|
||||
<data name="Archive.Orphans.Fix.NewFolder" xml:space="preserve"><value>Scan</value></data>
|
||||
<data name="Archive.Orphans.Fix.UnlistedFiles" xml:space="preserve"><value>Index</value></data>
|
||||
<data name="Archive.Orphans.FixFailed" xml:space="preserve"><value>The fix did not complete</value><comment>long</comment></data>
|
||||
<data name="Archive.Orphans.Kind.MissingFiles" xml:space="preserve"><value>Files missing</value></data>
|
||||
<data name="Archive.Orphans.Kind.MissingSequence" xml:space="preserve"><value>Row without sidecar</value></data>
|
||||
<data name="Archive.Orphans.Kind.NewFolder" xml:space="preserve"><value>Folder not indexed</value></data>
|
||||
<data name="Archive.Orphans.Kind.UnlistedFiles" xml:space="preserve"><value>Photos not listed</value></data>
|
||||
<data name="Archive.Orphans.Missing.one" xml:space="preserve"><value>{0:N0} file missing</value></data>
|
||||
<data name="Archive.Orphans.Missing.other" xml:space="preserve"><value>{0:N0} files missing</value></data>
|
||||
<data name="Archive.Orphans.NewFolder" xml:space="preserve"><value>Not indexed yet</value></data>
|
||||
<data name="Archive.Orphans.NoSidecar" xml:space="preserve"><value>No sidecar in {0}</value><comment>long</comment></data>
|
||||
<data name="Archive.Orphans.Title" xml:space="preserve"><value>Orphans</value></data>
|
||||
<data name="Archive.Orphans.Unlisted.one" xml:space="preserve"><value>{0:N0} photo not in sidecar</value></data>
|
||||
<data name="Archive.Orphans.Unlisted.other" xml:space="preserve"><value>{0:N0} photos not in sidecar</value></data>
|
||||
<data name="Archive.Rebuild.Archive" xml:space="preserve"><value>Archive</value></data>
|
||||
<data name="Archive.Rebuild.Counting" xml:space="preserve"><value>Counting…</value></data>
|
||||
<data name="Archive.Rebuild.Heading" xml:space="preserve"><value>Rebuild index</value></data>
|
||||
<data name="Archive.Rebuild.Indexed" xml:space="preserve"><value>Indexed now</value></data>
|
||||
<data name="Archive.Rebuild.Metadata" xml:space="preserve"><value>Without sidecar</value></data>
|
||||
<data name="Archive.Rebuild.Root" xml:space="preserve"><value>Folder</value></data>
|
||||
<data name="Archive.Rebuild.Sidecars" xml:space="preserve"><value>Sidecars</value></data>
|
||||
<data name="Archive.Rebuild.Start" xml:space="preserve"><value>Rebuild</value></data>
|
||||
<data name="Archive.Rebuild.State" xml:space="preserve"><value>State</value></data>
|
||||
<data name="Archive.Recent.History" xml:space="preserve"><value>History</value></data>
|
||||
<data name="Archive.Recent.Line" xml:space="preserve"><value>{0} · {1}</value><comment>invariant</comment></data>
|
||||
<data name="Archive.Recent.Title" xml:space="preserve"><value>Recent maintenance</value></data>
|
||||
<data name="Archive.Relink.Done" xml:space="preserve"><value>{0} relinked</value><comment>long</comment></data>
|
||||
<data name="Archive.Relink.Failed" xml:space="preserve"><value>The archive could not be relinked</value><comment>long</comment></data>
|
||||
<data name="Archive.Relink.Title" xml:space="preserve"><value>Folder of the moved archive</value></data>
|
||||
<data name="Archive.Rename.Apply" xml:space="preserve"><value>Apply</value></data>
|
||||
<data name="Archive.Rename.Applying" xml:space="preserve"><value>{0} of {1}</value></data>
|
||||
<data name="Archive.Rename.Heading.one" xml:space="preserve"><value>Rename {0:N0} sequence</value></data>
|
||||
<data name="Archive.Rename.Heading.other" xml:space="preserve"><value>Rename {0:N0} sequences</value></data>
|
||||
<data name="Archive.Rename.MoveHeading.one" xml:space="preserve"><value>Move {0:N0} sequence</value></data>
|
||||
<data name="Archive.Rename.MoveHeading.other" xml:space="preserve"><value>Move {0:N0} sequences</value></data>
|
||||
<data name="Archive.Rename.Preview" xml:space="preserve"><value>Changes</value></data>
|
||||
<data name="Archive.Rename.Summary.one" xml:space="preserve"><value>{0:N0} of {1:N0} changes</value></data>
|
||||
<data name="Archive.Rename.Summary.other" xml:space="preserve"><value>{0:N0} of {1:N0} change</value></data>
|
||||
<data name="Archive.Rename.Template" xml:space="preserve"><value>Template</value></data>
|
||||
<data name="Archive.Retag.Add" xml:space="preserve"><value>Add tags</value></data>
|
||||
<data name="Archive.Retag.Apply" xml:space="preserve"><value>Apply</value></data>
|
||||
<data name="Archive.Retag.Heading.one" xml:space="preserve"><value>Tags of {0:N0} sequence</value></data>
|
||||
<data name="Archive.Retag.Heading.other" xml:space="preserve"><value>Tags of {0:N0} sequences</value></data>
|
||||
<data name="Archive.Retag.Invalid" xml:space="preserve"><value>Each tag has 1 to {0} characters.</value><comment>long</comment></data>
|
||||
<data name="Archive.Retag.Remove" xml:space="preserve"><value>Remove tags</value></data>
|
||||
<data name="Archive.Set.All.one" xml:space="preserve"><value>{0:N0} sequence · all</value></data>
|
||||
<data name="Archive.Set.All.other" xml:space="preserve"><value>{0:N0} sequences · all</value></data>
|
||||
<data name="Archive.Set.Analyse" xml:space="preserve"><value>Analyse</value></data>
|
||||
<data name="Archive.Set.Export" xml:space="preserve"><value>Export CSV</value></data>
|
||||
<data name="Archive.Set.Label" xml:space="preserve"><value>Selected set</value></data>
|
||||
<data name="Archive.Set.Move" xml:space="preserve"><value>Move…</value></data>
|
||||
<data name="Archive.Set.Proxies" xml:space="preserve"><value>Proxies</value></data>
|
||||
<data name="Archive.Set.Rename" xml:space="preserve"><value>Rename…</value></data>
|
||||
<data name="Archive.Set.Retag" xml:space="preserve"><value>Retag…</value></data>
|
||||
<data name="Archive.Set.Thumbnails" xml:space="preserve"><value>Thumbnails</value></data>
|
||||
<data name="Archive.Set.Verify" xml:space="preserve"><value>Verify</value></data>
|
||||
<data name="Archive.Tile.Cameras.one" xml:space="preserve"><value>camera</value></data>
|
||||
<data name="Archive.Tile.Cameras.other" xml:space="preserve"><value>cameras</value></data>
|
||||
<data name="Archive.Tile.Formats.one" xml:space="preserve"><value>{0:N0} format</value></data>
|
||||
@@ -72,5 +158,17 @@
|
||||
<data name="Archive.Tile.Sequences.one" xml:space="preserve"><value>sequence</value></data>
|
||||
<data name="Archive.Tile.Sequences.other" xml:space="preserve"><value>sequences</value></data>
|
||||
<data name="Archive.Tile.YearRange" xml:space="preserve"><value>{0} – {1}</value><comment>invariant</comment></data>
|
||||
<data name="Archive.Toolbar.Adopt" xml:space="preserve"><value>Adopt folder…</value></data>
|
||||
<data name="Archive.Toolbar.Archive" xml:space="preserve"><value>Archive</value></data>
|
||||
<data name="Archive.Toolbar.Duplicates" xml:space="preserve"><value>Duplicates</value></data>
|
||||
<data name="Archive.Toolbar.Maintenance" xml:space="preserve"><value>Maintenance</value></data>
|
||||
<data name="Archive.Toolbar.Orphans" xml:space="preserve"><value>Orphans</value></data>
|
||||
<data name="Archive.Toolbar.Rebuild" xml:space="preserve"><value>Rebuild index…</value></data>
|
||||
<data name="Archive.Toolbar.Scan" xml:space="preserve"><value>Scan</value></data>
|
||||
<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.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>
|
||||
</root>
|
||||
+151
-2
@@ -8,29 +8,79 @@
|
||||
<data name="Import.Action.Copy" xml:space="preserve"><value>Copy</value></data>
|
||||
<data name="Import.Action.Duplicate" xml:space="preserve"><value>Already in archive</value></data>
|
||||
<data name="Import.Action.ImportedBefore" xml:space="preserve"><value>Imported before</value></data>
|
||||
<data name="Import.After.Deep" xml:space="preserve"><value>Deep analysis</value></data>
|
||||
<data name="Import.After.Delete" xml:space="preserve"><value>Delete imported</value></data>
|
||||
<data name="Import.After.Eject" xml:space="preserve"><value>Eject</value></data>
|
||||
<data name="Import.After.Format" xml:space="preserve"><value>Format card</value></data>
|
||||
<data name="Import.After.Keep" xml:space="preserve"><value>Keep card</value></data>
|
||||
<data name="Import.Blocked.AutoNeedsCard" xml:space="preserve"><value>Available once the card is remembered.</value><comment>long</comment></data>
|
||||
<data name="Import.Blocked.Incomplete" xml:space="preserve"><value>Formatting needs a complete import with verified copies.</value><comment>long</comment></data>
|
||||
<data name="Import.Blocked.NoArchive" xml:space="preserve"><value>Create or adopt an archive first (Library or Settings).</value><comment>long</comment></data>
|
||||
<data name="Import.Blocked.NoCard" xml:space="preserve"><value>Only for a remembered card that is inserted.</value><comment>long</comment></data>
|
||||
<data name="Import.Blocked.NoDryRun" xml:space="preserve"><value>Check the card first: every file and its copy are hashed again.</value><comment>long</comment></data>
|
||||
<data name="Import.Blocked.NoPlan" xml:space="preserve"><value>Wait for the plan of the card.</value><comment>long</comment></data>
|
||||
<data name="Import.Blocked.NoServer" xml:space="preserve"><value>Sign in to a Titano Server first.</value><comment>long</comment></data>
|
||||
<data name="Import.Blocked.NotAllVerified" xml:space="preserve"><value>Some photos on the card have no verified copy; formatting would lose them.</value><comment>long</comment></data>
|
||||
<data name="Import.Blocked.NotArchive" xml:space="preserve"><value>Only imports into this PC's archive can be checked against the card.</value><comment>long</comment></data>
|
||||
<data name="Import.Blocked.NotInserted" xml:space="preserve"><value>Insert the card first.</value><comment>long</comment></data>
|
||||
<data name="Import.Blocked.NotRemovable" xml:space="preserve"><value>Only removable cards can be ejected.</value><comment>long</comment></data>
|
||||
<data name="Import.Blocked.NothingImported" xml:space="preserve"><value>Nothing from this card has been imported yet.</value><comment>long</comment></data>
|
||||
<data name="Import.Blocked.NothingToCopy" xml:space="preserve"><value>Every photo is already imported or in the archive.</value><comment>long</comment></data>
|
||||
<data name="Import.Blocked.NothingVerified" xml:space="preserve"><value>No photo on the card matches a verified copy.</value><comment>long</comment></data>
|
||||
<data name="Import.Blocked.Space" xml:space="preserve"><value>Not enough free space at the destination.</value><comment>long</comment></data>
|
||||
<data name="Import.Blocked.Template" xml:space="preserve"><value>Fix the name templates first.</value><comment>long</comment></data>
|
||||
<data name="Import.Confirm.Delete" xml:space="preserve"><value>Delete</value></data>
|
||||
<data name="Import.Confirm.DeleteHeading.one" xml:space="preserve"><value>Delete {0:N0} photo from the card?</value><comment>long</comment></data>
|
||||
<data name="Import.Confirm.DeleteHeading.other" xml:space="preserve"><value>Delete {0:N0} photos from the card?</value><comment>long</comment></data>
|
||||
<data name="Import.Confirm.DeleteMessage" xml:space="preserve"><value>Each one was hashed again on the card and in the archive just now. Files changed since are kept.</value><comment>long</comment></data>
|
||||
<data name="Import.Confirm.Forget" xml:space="preserve"><value>Forget</value></data>
|
||||
<data name="Import.Confirm.ForgetHeading" xml:space="preserve"><value>Forget {0}?</value><comment>long</comment></data>
|
||||
<data name="Import.Confirm.ForgetMessage" xml:space="preserve"><value>Its nickname, settings and import history are removed. Photos on the card and in the archive stay.</value><comment>long</comment></data>
|
||||
<data name="Import.Confirm.Format" xml:space="preserve"><value>Format</value></data>
|
||||
<data name="Import.Confirm.FormatHeading" xml:space="preserve"><value>Format {0}?</value><comment>long</comment></data>
|
||||
<data name="Import.Confirm.FormatMessage.one" xml:space="preserve"><value>{0:N0} photo was copied and verified. Formatting removes everything on the card.</value><comment>long</comment></data>
|
||||
<data name="Import.Confirm.FormatMessage.other" xml:space="preserve"><value>{0:N0} photos were copied and verified. Formatting removes everything on the card.</value><comment>long</comment></data>
|
||||
<data name="Import.Confirm.Keep" xml:space="preserve"><value>Keep card</value></data>
|
||||
<data name="Import.Confirm.KeepProfile" xml:space="preserve"><value>Keep</value></data>
|
||||
<data name="Import.Confirm.TypeName" xml:space="preserve"><value>Type the card name to confirm</value><comment>long</comment></data>
|
||||
<data name="Import.Destination.Archive" xml:space="preserve"><value>Archive</value></data>
|
||||
<data name="Import.Destination.Choose" xml:space="preserve"><value>Choose folder</value></data>
|
||||
<data name="Import.Destination.Folder" xml:space="preserve"><value>Folder</value></data>
|
||||
<data name="Import.Destination.FolderPlaceholder" xml:space="preserve"><value>Folder path</value></data>
|
||||
<data name="Import.Destination.NotConnected" xml:space="preserve"><value>Not connected</value></data>
|
||||
<data name="Import.Destination.Server" xml:space="preserve"><value>Server</value></data>
|
||||
<data name="Import.Details.Close" xml:space="preserve"><value>Close</value></data>
|
||||
<data name="Import.Details.Column.Action" xml:space="preserve"><value>Action</value></data>
|
||||
<data name="Import.Details.Column.Destination" xml:space="preserve"><value>Destination</value></data>
|
||||
<data name="Import.Details.Column.Source" xml:space="preserve"><value>On the card</value></data>
|
||||
<data name="Import.Details.Copy" xml:space="preserve"><value>copy {0} ({1})</value></data>
|
||||
<data name="Import.Details.Files.one" xml:space="preserve"><value>{0:N0} file</value></data>
|
||||
<data name="Import.Details.Files.other" xml:space="preserve"><value>{0:N0} files</value></data>
|
||||
<data name="Import.Details.Session" xml:space="preserve"><value>Session {0} · {1}</value><comment>long</comment></data>
|
||||
<data name="Import.Details.Title" xml:space="preserve"><value>Plan</value></data>
|
||||
<data name="Import.Details.Unreadable" xml:space="preserve"><value>Cannot read {0}: {1}</value><comment>long</comment></data>
|
||||
<data name="Import.Device.Away" xml:space="preserve"><value>{0} · not inserted</value><comment>long</comment></data>
|
||||
<data name="Import.Device.Body" xml:space="preserve"><value>{0} #{1}</value><comment>invariant</comment></data>
|
||||
<data name="Import.Device.Card" xml:space="preserve"><value>{0} · {1} · {2} used</value></data>
|
||||
<data name="Import.Device.NoDcim" xml:space="preserve"><value>{0} · no DCIM · {1} free</value></data>
|
||||
<data name="Import.Device.Card" xml:space="preserve"><value>{0} · {1} used</value></data>
|
||||
<data name="Import.Device.LastImport" xml:space="preserve"><value>last import {0}</value></data>
|
||||
<data name="Import.Device.NoDcim" xml:space="preserve"><value>no DCIM · {0} free</value></data>
|
||||
<data name="Import.Device.Serial" xml:space="preserve"><value>serial {0}</value></data>
|
||||
<data name="Import.Device.State.Away" xml:space="preserve"><value>Known card, not inserted</value></data>
|
||||
<data name="Import.Device.State.Drive" xml:space="preserve"><value>Drive without DCIM</value></data>
|
||||
<data name="Import.Device.State.Folder" xml:space="preserve"><value>Folder</value></data>
|
||||
<data name="Import.Device.State.Known" xml:space="preserve"><value>Known card</value></data>
|
||||
<data name="Import.Device.State.New" xml:space="preserve"><value>New card</value></data>
|
||||
<data name="Import.Devices.Auto" xml:space="preserve"><value>Import automatically</value></data>
|
||||
<data name="Import.Devices.Folder" xml:space="preserve"><value>Folder…</value></data>
|
||||
<data name="Import.Devices.Refresh" xml:space="preserve"><value>Refresh devices</value></data>
|
||||
<data name="Import.Devices.Title" xml:space="preserve"><value>Devices</value></data>
|
||||
<data name="Import.Duplicates.Again" xml:space="preserve"><value>Import again</value></data>
|
||||
<data name="Import.Duplicates.Skip" xml:space="preserve"><value>Skip</value></data>
|
||||
<data name="Import.Empty" xml:space="preserve"><value>Insert a card or pick a folder</value></data>
|
||||
<data name="Import.Erase.Checking.one" xml:space="preserve"><value>Checking {0:N0} photo</value></data>
|
||||
<data name="Import.Erase.Checking.other" xml:space="preserve"><value>Checking {0:N0} photos</value></data>
|
||||
<data name="Import.Erase.Delete.one" xml:space="preserve"><value>Delete {0:N0} photo…</value></data>
|
||||
<data name="Import.Erase.Delete.other" xml:space="preserve"><value>Delete {0:N0} photos…</value></data>
|
||||
<data name="Import.Erase.Kept.one" xml:space="preserve"><value>{0:N0} kept</value></data>
|
||||
<data name="Import.Erase.Kept.other" xml:space="preserve"><value>{0:N0} kept</value></data>
|
||||
<data name="Import.Erase.Reason" xml:space="preserve"><value>{0} · {1}</value><comment>invariant</comment></data>
|
||||
@@ -41,6 +91,18 @@
|
||||
<data name="Import.Erase.Verdict.SourceMissing" xml:space="preserve"><value>no longer on the card</value></data>
|
||||
<data name="Import.Erase.Verified.one" xml:space="preserve"><value>{0:N0} verified on the card</value></data>
|
||||
<data name="Import.Erase.Verified.other" xml:space="preserve"><value>{0:N0} verified on the card</value></data>
|
||||
<data name="Import.Failed.Retry" xml:space="preserve"><value>Retry</value></data>
|
||||
<data name="Import.Folder.PickDestination" xml:space="preserve"><value>Import into folder</value></data>
|
||||
<data name="Import.Folder.PickSource" xml:space="preserve"><value>Import from folder</value></data>
|
||||
<data name="Import.Label.After" xml:space="preserve"><value>After import</value></data>
|
||||
<data name="Import.Label.Destination" xml:space="preserve"><value>Destination</value></data>
|
||||
<data name="Import.Label.Duplicates" xml:space="preserve"><value>Duplicates</value></data>
|
||||
<data name="Import.Label.Names" xml:space="preserve"><value>Names</value></data>
|
||||
<data name="Import.Label.Scan" xml:space="preserve"><value>Scan</value></data>
|
||||
<data name="Import.Names.File" xml:space="preserve"><value>File template</value></data>
|
||||
<data name="Import.Names.Folder" xml:space="preserve"><value>Folder template</value></data>
|
||||
<data name="Import.Names.Preview" xml:space="preserve"><value>→ {0}</value><comment>invariant</comment></data>
|
||||
<data name="Import.Names.Tokens" xml:space="preserve"><value>Template tokens</value></data>
|
||||
<data name="Import.Plan.About" xml:space="preserve"><value>about {0}</value></data>
|
||||
<data name="Import.Plan.Duplicates.one" xml:space="preserve"><value>{0:N0} duplicate</value></data>
|
||||
<data name="Import.Plan.Duplicates.other" xml:space="preserve"><value>{0:N0} duplicates</value></data>
|
||||
@@ -49,13 +111,100 @@
|
||||
<data name="Import.Plan.ImportedBefore.other" xml:space="preserve"><value>{0:N0} imported before</value></data>
|
||||
<data name="Import.Plan.Sessions.one" xml:space="preserve"><value>{0:N0} session</value></data>
|
||||
<data name="Import.Plan.Sessions.other" xml:space="preserve"><value>{0:N0} sessions</value></data>
|
||||
<data name="Import.Plan.Show" xml:space="preserve"><value>Show plan</value></data>
|
||||
<data name="Import.Plan.SpaceMissing" xml:space="preserve"><value>{0} missing</value></data>
|
||||
<data name="Import.Plan.Title" xml:space="preserve"><value>Plan</value></data>
|
||||
<data name="Import.Profile.CopyFrom" xml:space="preserve"><value>Copy settings from</value></data>
|
||||
<data name="Import.Profile.Edit" xml:space="preserve"><value>Edit</value></data>
|
||||
<data name="Import.Profile.Forget" xml:space="preserve"><value>Forget card…</value></data>
|
||||
<data name="Import.Profile.Nickname" xml:space="preserve"><value>Card nickname</value></data>
|
||||
<data name="Import.Profile.Rename" xml:space="preserve"><value>Rename</value></data>
|
||||
<data name="Import.Progress.Bytes" xml:space="preserve"><value>{0} of {1}</value></data>
|
||||
<data name="Import.Progress.Cancel" xml:space="preserve"><value>Cancel</value></data>
|
||||
<data name="Import.Progress.Items" xml:space="preserve"><value>{0} of {1}</value></data>
|
||||
<data name="Import.Progress.Starting" xml:space="preserve"><value>Starting…</value></data>
|
||||
<data name="Import.Result.AlreadyThere.one" xml:space="preserve"><value>{0:N0} already there</value></data>
|
||||
<data name="Import.Result.AlreadyThere.other" xml:space="preserve"><value>{0:N0} already there</value></data>
|
||||
<data name="Import.Result.Check" xml:space="preserve"><value>Check card</value></data>
|
||||
<data name="Import.Result.Copied.one" xml:space="preserve"><value>{0:N0} copied</value></data>
|
||||
<data name="Import.Result.Copied.other" xml:space="preserve"><value>{0:N0} copied</value></data>
|
||||
<data name="Import.Result.Eject" xml:space="preserve"><value>Eject</value></data>
|
||||
<data name="Import.Result.Failure" xml:space="preserve"><value>{0} · {1}</value><comment>invariant</comment></data>
|
||||
<data name="Import.Result.FailuresName" xml:space="preserve"><value>Failed photos</value></data>
|
||||
<data name="Import.Result.Format" xml:space="preserve"><value>Format card…</value></data>
|
||||
<data name="Import.Result.Library" xml:space="preserve"><value>Open in Library</value></data>
|
||||
<data name="Import.Result.New" xml:space="preserve"><value>New import</value></data>
|
||||
<data name="Import.Result.NotCommitted" xml:space="preserve"><value>No archive copy after the import; see the job log.</value><comment>long</comment></data>
|
||||
<data name="Import.Result.Partial" xml:space="preserve"><value>{0} copied · {1} failed</value><comment>long</comment></data>
|
||||
<data name="Import.Result.Skipped.one" xml:space="preserve"><value>{0:N0} skipped</value></data>
|
||||
<data name="Import.Result.Skipped.other" xml:space="preserve"><value>{0:N0} skipped</value></data>
|
||||
<data name="Import.Result.Verified.one" xml:space="preserve"><value>{0:N0} copied and verified</value></data>
|
||||
<data name="Import.Result.Verified.other" xml:space="preserve"><value>{0:N0} copied and verified</value></data>
|
||||
<data name="Import.Scan.Frames" xml:space="preserve"><value>frames</value></data>
|
||||
<data name="Import.Scan.Gap" xml:space="preserve"><value>gap</value></data>
|
||||
<data name="Import.Scan.GapName" xml:space="preserve"><value>Session gap in minutes</value></data>
|
||||
<data name="Import.Scan.Minimum" xml:space="preserve"><value>min</value></data>
|
||||
<data name="Import.Scan.MinimumName" xml:space="preserve"><value>Minimum frames per session</value></data>
|
||||
<data name="Import.Scan.Minutes" xml:space="preserve"><value>min</value></data>
|
||||
<data name="Import.Scan.Sessions" xml:space="preserve"><value>Sessions</value></data>
|
||||
<data name="Import.Scan.Subfolders" xml:space="preserve"><value>Subfolders</value></data>
|
||||
<data name="Import.Scan.Verify" xml:space="preserve"><value>Verify hashes</value></data>
|
||||
<data name="Import.Session.Adds" xml:space="preserve"><value>Adds to · {0}</value><comment>long</comment></data>
|
||||
<data name="Import.Session.AddsShort" xml:space="preserve"><value>adds</value></data>
|
||||
<data name="Import.Session.Column.Camera" xml:space="preserve"><value>Camera</value></data>
|
||||
<data name="Import.Session.Column.Frames" xml:space="preserve"><value>Frames · interval</value></data>
|
||||
<data name="Import.Session.Column.Sequence" xml:space="preserve"><value>Sequence</value></data>
|
||||
<data name="Import.Session.Column.Session" xml:space="preserve"><value>Session</value></data>
|
||||
<data name="Import.Session.Column.Size" xml:space="preserve"><value>Size</value></data>
|
||||
<data name="Import.Session.Frames" xml:space="preserve"><value>{0} · {1}</value><comment>invariant</comment></data>
|
||||
<data name="Import.Session.New" xml:space="preserve"><value>New · {0}</value><comment>long</comment></data>
|
||||
<data name="Import.Session.NewShort" xml:space="preserve"><value>new</value></data>
|
||||
<data name="Import.Session.Server" xml:space="preserve"><value>Server</value></data>
|
||||
<data name="Import.Session.Time" xml:space="preserve"><value>{0} · {1} → {2}</value><comment>invariant</comment></data>
|
||||
<data name="Import.Start.one" xml:space="preserve"><value>Import {0:N0} photo</value></data>
|
||||
<data name="Import.Start.other" xml:space="preserve"><value>Import {0:N0} photos</value></data>
|
||||
<data name="Import.StartPlain" xml:space="preserve"><value>Import</value></data>
|
||||
<data name="Import.Status.Cancelled" xml:space="preserve"><value>Import cancelled</value></data>
|
||||
<data name="Import.Status.Choose" xml:space="preserve"><value>Choose a card or a folder.</value><comment>long</comment></data>
|
||||
<data name="Import.Status.NotInserted" xml:space="preserve"><value>Insert this card to plan its import.</value><comment>long</comment></data>
|
||||
<data name="Import.Status.PlanFailed" xml:space="preserve"><value>The card could not be read: {0}</value><comment>long</comment></data>
|
||||
<data name="Import.Status.Reading" xml:space="preserve"><value>Reading the card…</value></data>
|
||||
<data name="Import.Status.ReadingCount.one" xml:space="preserve"><value>{0:N0} photo read</value></data>
|
||||
<data name="Import.Status.ReadingCount.other" xml:space="preserve"><value>{0:N0} photos read</value></data>
|
||||
<data name="Import.Toast.AutoMessage" xml:space="preserve"><value>Importing with its saved settings</value><comment>long</comment></data>
|
||||
<data name="Import.Toast.Cancel" xml:space="preserve"><value>Cancel</value></data>
|
||||
<data name="Import.Toast.CheckFailed" xml:space="preserve"><value>The card check stopped</value><comment>long</comment></data>
|
||||
<data name="Import.Toast.DeleteFailed" xml:space="preserve"><value>Deleting from the card stopped</value><comment>long</comment></data>
|
||||
<data name="Import.Toast.Deleted.one" xml:space="preserve"><value>{0:N0} photo deleted from the card</value><comment>long</comment></data>
|
||||
<data name="Import.Toast.Deleted.other" xml:space="preserve"><value>{0:N0} photos deleted from the card</value><comment>long</comment></data>
|
||||
<data name="Import.Toast.Done" xml:space="preserve"><value>{0} imported</value><comment>long</comment></data>
|
||||
<data name="Import.Toast.Eject.Ejected" xml:space="preserve"><value>{0} can be removed</value><comment>long</comment></data>
|
||||
<data name="Import.Toast.Eject.Failed" xml:space="preserve"><value>{0} could not be ejected</value><comment>long</comment></data>
|
||||
<data name="Import.Toast.Eject.InUse" xml:space="preserve"><value>{0} is in use; close its files and retry</value><comment>long</comment></data>
|
||||
<data name="Import.Toast.Format.Cancelled" xml:space="preserve"><value>Format of {0} cancelled</value><comment>long</comment></data>
|
||||
<data name="Import.Toast.Format.Failed" xml:space="preserve"><value>{0} was not formatted</value><comment>long</comment></data>
|
||||
<data name="Import.Toast.Format.Formatted" xml:space="preserve"><value>{0} formatted</value><comment>long</comment></data>
|
||||
<data name="Import.Toast.Import" xml:space="preserve"><value>Import</value></data>
|
||||
<data name="Import.Toast.Inserted" xml:space="preserve"><value>{0} inserted</value><comment>long</comment></data>
|
||||
<data name="Import.Toast.Resume" xml:space="preserve"><value>Resume</value></data>
|
||||
<data name="Import.Toast.ResumeMessage" xml:space="preserve"><value>The interrupted import can continue</value><comment>long</comment></data>
|
||||
<data name="Import.Toast.Started" xml:space="preserve"><value>Importing {0}</value><comment>long</comment></data>
|
||||
<data name="Import.Token.aperture" xml:space="preserve"><value>Aperture</value></data>
|
||||
<data name="Import.Token.camera" xml:space="preserve"><value>Camera name</value></data>
|
||||
<data name="Import.Token.date" xml:space="preserve"><value>Capture date</value></data>
|
||||
<data name="Import.Token.day" xml:space="preserve"><value>Day of the month</value></data>
|
||||
<data name="Import.Token.ext" xml:space="preserve"><value>Original extension</value></data>
|
||||
<data name="Import.Token.hm" xml:space="preserve"><value>Hour and minute</value></data>
|
||||
<data name="Import.Token.iso" xml:space="preserve"><value>ISO</value></data>
|
||||
<data name="Import.Token.lens" xml:space="preserve"><value>Lens</value></data>
|
||||
<data name="Import.Token.month" xml:space="preserve"><value>Month</value></data>
|
||||
<data name="Import.Token.n" xml:space="preserve"><value>Frame number</value></data>
|
||||
<data name="Import.Token.name" xml:space="preserve"><value>Original name</value></data>
|
||||
<data name="Import.Token.nsession" xml:space="preserve"><value>Frame number in session</value></data>
|
||||
<data name="Import.Token.session" xml:space="preserve"><value>Session number</value></data>
|
||||
<data name="Import.Token.sessionstart" xml:space="preserve"><value>Session start time</value></data>
|
||||
<data name="Import.Token.shutter" xml:space="preserve"><value>Shutter speed</value></data>
|
||||
<data name="Import.Token.time" xml:space="preserve"><value>Capture time</value></data>
|
||||
<data name="Import.Token.title" xml:space="preserve"><value>Sequence title</value></data>
|
||||
<data name="Import.Token.year" xml:space="preserve"><value>Capture year</value></data>
|
||||
</root>
|
||||
@@ -12,9 +12,120 @@
|
||||
<data name="Tooltips.About.Releases" xml:space="preserve"><value>Open the public releases page in the browser</value></data>
|
||||
<data name="Tooltips.About.Review" xml:space="preserve"><value>Every language but English is machine-translated; propose a better wording on the public issue tracker</value></data>
|
||||
<data name="Tooltips.About.ThirdParty" xml:space="preserve"><value>Titano uses no third-party code: everything beyond .NET and Windows is written in-house</value></data>
|
||||
<data name="Tooltips.Archive.Adopt" xml:space="preserve"><value>Index an existing folder tree in place; nothing is moved or renamed</value></data>
|
||||
<data name="Tooltips.Archive.Availability.Offline" xml:space="preserve"><value>The archive folder cannot be reached; the index stays as last seen</value></data>
|
||||
<data name="Tooltips.Archive.Availability.Online" xml:space="preserve"><value>The archive folder is reachable and writable</value></data>
|
||||
<data name="Tooltips.Archive.Availability.ReadOnly" xml:space="preserve"><value>Readable but not writable: browse only</value></data>
|
||||
<data name="Tooltips.Archive.Cameras" xml:space="preserve"><value>Photos per camera; the smallest are grouped</value></data>
|
||||
<data name="Tooltips.Archive.CloseDialog" xml:space="preserve"><value>Close without changing anything · Esc</value></data>
|
||||
<data name="Tooltips.Archive.Collapse" xml:space="preserve"><value>Hide the sequences of this year</value></data>
|
||||
<data name="Tooltips.Archive.DuplicateFolder" xml:space="preserve"><value>Show the folder of the first copy in Explorer</value></data>
|
||||
<data name="Tooltips.Archive.DuplicateOpen" xml:space="preserve"><value>Open the sequence of the first copy in the editor</value></data>
|
||||
<data name="Tooltips.Archive.Duplicates" xml:space="preserve"><value>Find identical photos across sequences by hash · reads the index only</value></data>
|
||||
<data name="Tooltips.Archive.Expand" xml:space="preserve"><value>Show the sequences of this year</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.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>
|
||||
<data name="Tooltips.Archive.FolderTemplate" xml:space="preserve"><value>Folder template; the title token is the new title · checked as you type</value></data>
|
||||
<data name="Tooltips.Archive.Formats" xml:space="preserve"><value>Photos per file format</value></data>
|
||||
<data name="Tooltips.Archive.HealthOk" xml:space="preserve"><value>Nothing to fix</value></data>
|
||||
<data name="Tooltips.Archive.HealthWarning" xml:space="preserve"><value>Needs attention; the button fixes it</value></data>
|
||||
<data name="Tooltips.Archive.History" xml:space="preserve"><value>Open the job history</value></data>
|
||||
<data name="Tooltips.Archive.KeepRow" xml:space="preserve"><value>Keep the index row</value></data>
|
||||
<data name="Tooltips.Archive.LastScan" xml:space="preserve"><value>Last incremental scan: when it finished and how long it took</value></data>
|
||||
<data name="Tooltips.Archive.Maintenance" xml:space="preserve"><value>Leases, temporary files, thumbnail packs and duplicate flags; relink a moved archive</value></data>
|
||||
<data name="Tooltips.Archive.MaintenanceDryRun" xml:space="preserve"><value>List what maintenance would change, without changing it</value></data>
|
||||
<data name="Tooltips.Archive.MaintenanceProxies" xml:space="preserve"><value>Rebuild every proxy of the archive · runs in the background</value></data>
|
||||
<data name="Tooltips.Archive.MaintenanceRun" xml:space="preserve"><value>Clean stale leases and temporary files, compact thumbnail packs, mark duplicates · originals untouched</value></data>
|
||||
<data name="Tooltips.Archive.MaintenanceView" xml:space="preserve"><value>Index health, duplicates, orphans and recent maintenance</value></data>
|
||||
<data name="Tooltips.Archive.MarkDuplicates" xml:space="preserve"><value>Flag every copy after the first so renders skip it · runs maintenance</value></data>
|
||||
<data name="Tooltips.Archive.Months" xml:space="preserve"><value>Photos per month by first capture</value></data>
|
||||
<data name="Tooltips.Archive.Orphans" xml:space="preserve"><value>Find photos not in a sidecar, frames without a file and folders not indexed · reads the archive</value></data>
|
||||
<data name="Tooltips.Archive.Orphans.MissingFiles" xml:space="preserve"><value>Mark the missing files in the sidecar and the index</value></data>
|
||||
<data name="Tooltips.Archive.Orphans.MissingSequence" xml:space="preserve"><value>Remove the index row; no file is deleted</value></data>
|
||||
<data name="Tooltips.Archive.Orphans.NewFolder" xml:space="preserve"><value>Scan the archive to index this folder</value></data>
|
||||
<data name="Tooltips.Archive.Orphans.UnlistedFiles" xml:space="preserve"><value>Add these photos to the sequence's sidecar and index</value></data>
|
||||
<data name="Tooltips.Archive.Overview" xml:space="preserve"><value>Tree, figures and charts</value></data>
|
||||
<data name="Tooltips.Archive.Pick" xml:space="preserve"><value>Choose which archive to manage</value></data>
|
||||
<data name="Tooltips.Archive.PickRoot" xml:space="preserve"><value>Choose which archive to manage · {0}</value></data>
|
||||
<data name="Tooltips.Archive.Rebuild" xml:space="preserve"><value>Rebuild the index from the sidecars; falls back to a full metadata scan; never deletes originals</value></data>
|
||||
<data name="Tooltips.Archive.RebuildStart" xml:space="preserve"><value>Queue the rebuild · the archive stays usable meanwhile</value></data>
|
||||
<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.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; nothing selected means all</value></data>
|
||||
<data name="Tooltips.Archive.SetAnalyse" xml:space="preserve"><value>Run the deep analysis on every sequence in the set</value></data>
|
||||
<data name="Tooltips.Archive.SetExport" xml:space="preserve"><value>Export the set as CSV: one row per sequence</value></data>
|
||||
<data name="Tooltips.Archive.SetMove" xml:space="preserve"><value>Move the set into a new folder layout · dry run first</value></data>
|
||||
<data name="Tooltips.Archive.SetProxies" xml:space="preserve"><value>Generate or refresh proxies</value></data>
|
||||
<data name="Tooltips.Archive.SetRename" xml:space="preserve"><value>Rename the titles of the set with a template · dry run first</value></data>
|
||||
<data name="Tooltips.Archive.SetRetag" xml:space="preserve"><value>Add or remove tags on the whole set</value></data>
|
||||
<data name="Tooltips.Archive.SetThumbnails" xml:space="preserve"><value>Generate or refresh thumbnails</value></data>
|
||||
<data name="Tooltips.Archive.SetVerify" xml:space="preserve"><value>Re-hash the originals of the set</value></data>
|
||||
<data name="Tooltips.Archive.Storage" xml:space="preserve"><value>Bytes of originals per capture year</value></data>
|
||||
<data name="Tooltips.Archive.TagsAdd" xml:space="preserve"><value>Tags to add, separated by commas</value></data>
|
||||
<data name="Tooltips.Archive.TagsRemove" xml:space="preserve"><value>Tags to remove, separated by commas</value></data>
|
||||
<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.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>
|
||||
<data name="Tooltips.Import.Again" xml:space="preserve"><value>Import photos already in the archive again; nothing is overwritten</value></data>
|
||||
<data name="Tooltips.Import.Archive" xml:space="preserve"><value>Copy into this PC's archive with the naming templates · {0}</value></data>
|
||||
<data name="Tooltips.Import.Auto" xml:space="preserve"><value>Start the import with this card's settings as soon as it is inserted; a toast lets you cancel</value></data>
|
||||
<data name="Tooltips.Import.Cancel" xml:space="preserve"><value>Stop copying; verified copies stay and the import can resume</value></data>
|
||||
<data name="Tooltips.Import.CancelAuto" xml:space="preserve"><value>Do not import this card now</value></data>
|
||||
<data name="Tooltips.Import.Check" xml:space="preserve"><value>Hash every imported file on the card and its archive copy again · reads both</value></data>
|
||||
<data name="Tooltips.Import.ChooseFolder" xml:space="preserve"><value>Choose the destination folder</value></data>
|
||||
<data name="Tooltips.Import.ClosePlan" xml:space="preserve"><value>Close the plan</value></data>
|
||||
<data name="Tooltips.Import.Conflict" xml:space="preserve"><value>Resolved or reported by the plan before copying</value></data>
|
||||
<data name="Tooltips.Import.CopyFrom" xml:space="preserve"><value>Use another card's saved settings</value></data>
|
||||
<data name="Tooltips.Import.Deep" xml:space="preserve"><value>Queue the deep analysis of every imported sequence (runs in the background)</value></data>
|
||||
<data name="Tooltips.Import.Delete" xml:space="preserve"><value>Delete from the card only the photos verified just now; asks first</value></data>
|
||||
<data name="Tooltips.Import.DeleteChoice" xml:space="preserve"><value>After the import, offer to delete only the files whose copy was verified</value></data>
|
||||
<data name="Tooltips.Import.Duplicates" xml:space="preserve"><value>Photos already in the archive (same hash)</value></data>
|
||||
<data name="Tooltips.Import.Edit" xml:space="preserve"><value>Rename this card, copy settings from another card, or forget it</value></data>
|
||||
<data name="Tooltips.Import.Eject" xml:space="preserve"><value>Safely eject the card</value></data>
|
||||
<data name="Tooltips.Import.EjectChoice" xml:space="preserve"><value>Safely eject the card when done</value></data>
|
||||
<data name="Tooltips.Import.Failed" xml:space="preserve"><value>The import stopped; verified copies were kept</value></data>
|
||||
<data name="Tooltips.Import.FileTemplate" xml:space="preserve"><value>File template; the extension is kept · checked as you type</value></data>
|
||||
<data name="Tooltips.Import.Folder" xml:space="preserve"><value>Import from any folder on this PC or on the network</value></data>
|
||||
<data name="Tooltips.Import.FolderDestination" xml:space="preserve"><value>Copy into a folder of your choice; not indexed unless you adopt it later</value></data>
|
||||
<data name="Tooltips.Import.FolderPath" xml:space="preserve"><value>Folder used when the destination is Folder</value></data>
|
||||
<data name="Tooltips.Import.FolderTemplate" xml:space="preserve"><value>Folder template · checked as you type</value></data>
|
||||
<data name="Tooltips.Import.Forget" xml:space="preserve"><value>Remove this card's nickname, settings and history; photos stay</value></data>
|
||||
<data name="Tooltips.Import.Format" xml:space="preserve"><value>Open the Windows format dialog after a typed confirmation</value></data>
|
||||
<data name="Tooltips.Import.FormatChoice" xml:space="preserve"><value>After the import, offer the Windows format dialog once every copy is verified</value></data>
|
||||
<data name="Tooltips.Import.FormatConfirm" xml:space="preserve"><value>Open the Windows format dialog</value></data>
|
||||
<data name="Tooltips.Import.Gap" xml:space="preserve"><value>Minutes without photos that start a new session</value></data>
|
||||
<data name="Tooltips.Import.ImportedBefore" xml:space="preserve"><value>Photos imported from this card before (same name, size and time)</value></data>
|
||||
<data name="Tooltips.Import.Keep" xml:space="preserve"><value>Leave the card untouched</value></data>
|
||||
<data name="Tooltips.Import.KeepCard" xml:space="preserve"><value>Keep every photo on the card</value></data>
|
||||
<data name="Tooltips.Import.KeepProfile" xml:space="preserve"><value>Keep this card remembered</value></data>
|
||||
<data name="Tooltips.Import.Kept" xml:space="preserve"><value>This photo stays on the card</value></data>
|
||||
<data name="Tooltips.Import.Library" xml:space="preserve"><value>Show the imported sequences in the Library</value></data>
|
||||
<data name="Tooltips.Import.MinimumFrames" xml:space="preserve"><value>Groups smaller than this join the previous session</value></data>
|
||||
<data name="Tooltips.Import.New" xml:space="preserve"><value>Plan this card again</value></data>
|
||||
<data name="Tooltips.Import.Nickname" xml:space="preserve"><value>Name of this card in Titano · Enter saves</value></data>
|
||||
<data name="Tooltips.Import.OpenCard" xml:space="preserve"><value>Open Import with this card selected</value></data>
|
||||
<data name="Tooltips.Import.Refresh" xml:space="preserve"><value>Look again for cards and folders with a DCIM tree</value></data>
|
||||
<data name="Tooltips.Import.Rename" xml:space="preserve"><value>Change the nickname of this card</value></data>
|
||||
<data name="Tooltips.Import.Result" xml:space="preserve"><value>Copies hashed while copying and read back from the destination</value></data>
|
||||
<data name="Tooltips.Import.Resume" xml:space="preserve"><value>Continue the interrupted import where it stopped</value></data>
|
||||
<data name="Tooltips.Import.Retry" xml:space="preserve"><value>Continue the import where it stopped</value></data>
|
||||
<data name="Tooltips.Import.Server" xml:space="preserve"><value>Stream the frames to the server; each one counts once the server confirms its hash</value></data>
|
||||
<data name="Tooltips.Import.SessionTitle" xml:space="preserve"><value>Sequence title · empty keeps the folder name · Enter saves</value></data>
|
||||
<data name="Tooltips.Import.Sessions" xml:space="preserve"><value>Split the card into sessions when the gap between two photos exceeds the limit</value></data>
|
||||
<data name="Tooltips.Import.ShowPlan" xml:space="preserve"><value>Show every file, where it goes and what the plan resolved</value></data>
|
||||
<data name="Tooltips.Import.Skip" xml:space="preserve"><value>Leave photos already in the archive (same hash) on the card</value></data>
|
||||
<data name="Tooltips.Import.Space" xml:space="preserve"><value>Free space at the destination after the import; on a server, what your quota leaves</value></data>
|
||||
<data name="Tooltips.Import.Start" xml:space="preserve"><value>Copy with verification; the card is only touched after every hash matches · Ctrl+Enter</value></data>
|
||||
<data name="Tooltips.Import.Subfolders" xml:space="preserve"><value>Look inside every subfolder of the source</value></data>
|
||||
<data name="Tooltips.Import.Tokens" xml:space="preserve"><value>Insert a token into the template used last</value></data>
|
||||
<data name="Tooltips.Import.Verify" xml:space="preserve"><value>Hash while copying and read the destination back before the source is touched</value></data>
|
||||
<data name="Tooltips.Jobs.Cancel" xml:space="preserve"><value>Stop this job; Retry continues later from its last checkpoint</value></data>
|
||||
<data name="Tooltips.Jobs.ClearDone" xml:space="preserve"><value>Hide finished jobs from the list; they stay in the history</value></data>
|
||||
<data name="Tooltips.Jobs.Filter.All" xml:space="preserve"><value>Every job</value></data>
|
||||
|
||||
@@ -4,12 +4,33 @@
|
||||
<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.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>
|
||||
<data name="Archive.Availability.Offline" xml:space="preserve"><value>offline</value></data>
|
||||
<data name="Archive.Availability.Online" xml:space="preserve"><value>online</value></data>
|
||||
<data name="Archive.Availability.ReadOnly" xml:space="preserve"><value>sola lettura</value></data>
|
||||
<data name="Archive.Blocked.NotOnline" xml:space="preserve"><value>L'archivio deve essere raggiungibile e scrivibile.</value></data>
|
||||
<data name="Archive.Chart.Cameras" xml:space="preserve"><value>Per fotocamera</value></data>
|
||||
<data name="Archive.Chart.Formats" xml:space="preserve"><value>Per formato</value></data>
|
||||
<data name="Archive.Chart.Months" xml:space="preserve"><value>Foto al mese</value></data>
|
||||
<data name="Archive.Chart.OtherCameras.one" xml:space="preserve"><value>{0:N0} altra</value></data>
|
||||
<data name="Archive.Chart.OtherCameras.other" xml:space="preserve"><value>{0:N0} altre</value></data>
|
||||
<data name="Archive.Chart.OtherFormats" xml:space="preserve"><value>Altro</value></data>
|
||||
<data name="Archive.Chart.Storage" xml:space="preserve"><value>Spazio per anno</value></data>
|
||||
<data name="Archive.Chart.UnknownCamera" xml:space="preserve"><value>Fotocamera ignota</value></data>
|
||||
<data name="Archive.Confirm.Keep" xml:space="preserve"><value>Mantieni riga</value></data>
|
||||
<data name="Archive.Confirm.Remove" xml:space="preserve"><value>Rimuovi riga</value></data>
|
||||
<data name="Archive.Confirm.RemoveHeading" xml:space="preserve"><value>Rimuovere {0} dall'indice?</value></data>
|
||||
<data name="Archive.Confirm.RemoveMessage" xml:space="preserve"><value>Il suo sidecar non c'è più. Viene rimossa solo la riga dell'indice; nessun file viene eliminato.</value></data>
|
||||
<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.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>
|
||||
<data name="Archive.Duplicates.Mark" xml:space="preserve"><value>Segna copie</value></data>
|
||||
<data name="Archive.Duplicates.Open" xml:space="preserve"><value>Apri</value></data>
|
||||
<data name="Archive.Duplicates.Title" xml:space="preserve"><value>Doppioni</value></data>
|
||||
<data name="Archive.Empty" xml:space="preserve"><value>Nessun archivio</value></data>
|
||||
<data name="Archive.Error.Busy" xml:space="preserve"><value>Un altro Titano ({0}) sta scrivendo qui. Riprova tra poco.</value></data>
|
||||
<data name="Archive.Error.CopyMismatch" xml:space="preserve"><value>La copia di {0} non corrisponde all'originale.</value></data>
|
||||
@@ -20,11 +41,19 @@
|
||||
<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.Find.None" xml:space="preserve"><value>Nessuno trovato</value></data>
|
||||
<data name="Archive.Find.Run" xml:space="preserve"><value>Cerca</value></data>
|
||||
<data name="Archive.Find.Searching" xml:space="preserve"><value>Ricerca…</value></data>
|
||||
<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.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.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>
|
||||
<data name="Archive.Health.FramesOk" xml:space="preserve"><value>Nessun fotogramma mancante</value></data>
|
||||
<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>
|
||||
@@ -32,8 +61,10 @@
|
||||
<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>Proxy pronti per tutte</value></data>
|
||||
<data name="Archive.Health.Title" xml:space="preserve"><value>Stato dell'indice</value></data>
|
||||
<data name="Archive.Health.Unverified.one" xml:space="preserve"><value>{0:N0} sequenza non verificata</value></data>
|
||||
<data name="Archive.Health.Unverified.other" xml:space="preserve"><value>{0:N0} sequenze non verificate</value></data>
|
||||
<data name="Archive.LastScan" xml:space="preserve"><value>Ultima scansione {0} · {1}</value></data>
|
||||
<data name="Archive.Log.DryRun" xml:space="preserve"><value>Prova: nulla è stato modificato.</value></data>
|
||||
<data name="Archive.Log.FolderFailed" xml:space="preserve"><value>Non indicizzata: {0} ({1})</value></data>
|
||||
<data name="Archive.Log.FrameChanged" xml:space="preserve"><value>Modificato: {0}</value></data>
|
||||
@@ -47,15 +78,70 @@
|
||||
<data name="Archive.Log.ScanDone" xml:space="preserve"><value>{0} cartelle, {1} indicizzate, {2} adottate, {3} rimosse</value></data>
|
||||
<data name="Archive.Log.SequenceMissing" xml:space="preserve"><value>Sequenza non trovata: {0}</value></data>
|
||||
<data name="Archive.Log.VerifyDone" xml:space="preserve"><value>{0} foto controllate, {1} integre, {2} con impronta nuova, {3} con problemi</value></data>
|
||||
<data name="Archive.Maintenance.DryRun" xml:space="preserve"><value>Simulazione</value></data>
|
||||
<data name="Archive.Maintenance.Proxies" xml:space="preserve"><value>Ricrea proxy</value></data>
|
||||
<data name="Archive.Maintenance.Relink" xml:space="preserve"><value>Ricollega archivio spostato…</value></data>
|
||||
<data name="Archive.Maintenance.Run" xml:space="preserve"><value>Esegui manutenzione</value></data>
|
||||
<data name="Archive.Orphans.Count.one" xml:space="preserve"><value>{0:N0} problema</value></data>
|
||||
<data name="Archive.Orphans.Count.other" xml:space="preserve"><value>{0:N0} problemi</value></data>
|
||||
<data name="Archive.Orphans.Failed" xml:space="preserve"><value>Ricerca degli orfani interrotta</value></data>
|
||||
<data name="Archive.Orphans.Fix.MissingFiles" xml:space="preserve"><value>Riallinea</value></data>
|
||||
<data name="Archive.Orphans.Fix.MissingSequence" xml:space="preserve"><value>Rimuovi riga</value></data>
|
||||
<data name="Archive.Orphans.Fix.NewFolder" xml:space="preserve"><value>Scansiona</value></data>
|
||||
<data name="Archive.Orphans.Fix.UnlistedFiles" xml:space="preserve"><value>Indicizza</value></data>
|
||||
<data name="Archive.Orphans.FixFailed" xml:space="preserve"><value>La correzione non è stata completata</value></data>
|
||||
<data name="Archive.Orphans.Kind.MissingFiles" xml:space="preserve"><value>File mancanti</value></data>
|
||||
<data name="Archive.Orphans.Kind.MissingSequence" xml:space="preserve"><value>Riga senza sidecar</value></data>
|
||||
<data name="Archive.Orphans.Kind.NewFolder" xml:space="preserve"><value>Cartella non indicizzata</value></data>
|
||||
<data name="Archive.Orphans.Kind.UnlistedFiles" xml:space="preserve"><value>Foto non elencate</value></data>
|
||||
<data name="Archive.Orphans.Missing.one" xml:space="preserve"><value>{0:N0} file mancante</value></data>
|
||||
<data name="Archive.Orphans.Missing.other" xml:space="preserve"><value>{0:N0} file mancanti</value></data>
|
||||
<data name="Archive.Orphans.NewFolder" xml:space="preserve"><value>Non ancora indicizzata</value></data>
|
||||
<data name="Archive.Orphans.NoSidecar" xml:space="preserve"><value>Nessun sidecar in {0}</value></data>
|
||||
<data name="Archive.Orphans.Title" xml:space="preserve"><value>Orfani</value></data>
|
||||
<data name="Archive.Orphans.Unlisted.one" xml:space="preserve"><value>{0:N0} foto fuori dal sidecar</value></data>
|
||||
<data name="Archive.Orphans.Unlisted.other" xml:space="preserve"><value>{0:N0} foto fuori dal sidecar</value></data>
|
||||
<data name="Archive.Rebuild.Archive" xml:space="preserve"><value>Archivio</value></data>
|
||||
<data name="Archive.Rebuild.Counting" xml:space="preserve"><value>Conteggio…</value></data>
|
||||
<data name="Archive.Rebuild.Heading" xml:space="preserve"><value>Ricostruisci indice</value></data>
|
||||
<data name="Archive.Rebuild.Indexed" xml:space="preserve"><value>Ora nell'indice</value></data>
|
||||
<data name="Archive.Rebuild.Metadata" xml:space="preserve"><value>Senza sidecar</value></data>
|
||||
<data name="Archive.Rebuild.Root" xml:space="preserve"><value>Cartella</value></data>
|
||||
<data name="Archive.Rebuild.Sidecars" xml:space="preserve"><value>Sidecar</value></data>
|
||||
<data name="Archive.Rebuild.Start" xml:space="preserve"><value>Ricostruisci</value></data>
|
||||
<data name="Archive.Rebuild.State" xml:space="preserve"><value>Stato</value></data>
|
||||
<data name="Archive.Recent.History" xml:space="preserve"><value>Cronologia</value></data>
|
||||
<data name="Archive.Recent.Title" xml:space="preserve"><value>Manutenzione recente</value></data>
|
||||
<data name="Archive.Relink.Done" xml:space="preserve"><value>{0} ricollegato</value></data>
|
||||
<data name="Archive.Relink.Failed" xml:space="preserve"><value>Impossibile ricollegare l'archivio</value></data>
|
||||
<data name="Archive.Relink.Title" xml:space="preserve"><value>Nuova cartella dell'archivio</value></data>
|
||||
<data name="Archive.Rename.Apply" xml:space="preserve"><value>Applica</value></data>
|
||||
<data name="Archive.Rename.Applying" xml:space="preserve"><value>{0} di {1}</value></data>
|
||||
<data name="Archive.Rename.Heading.one" xml:space="preserve"><value>Rinomina {0:N0} sequenza</value></data>
|
||||
<data name="Archive.Rename.Heading.other" xml:space="preserve"><value>Rinomina {0:N0} sequenze</value></data>
|
||||
<data name="Archive.Rename.MoveHeading.one" xml:space="preserve"><value>Sposta {0:N0} sequenza</value></data>
|
||||
<data name="Archive.Rename.MoveHeading.other" xml:space="preserve"><value>Sposta {0:N0} sequenze</value></data>
|
||||
<data name="Archive.Rename.Preview" xml:space="preserve"><value>Modifiche</value></data>
|
||||
<data name="Archive.Rename.Summary.one" xml:space="preserve"><value>{0:N0} di {1:N0} cambia</value></data>
|
||||
<data name="Archive.Rename.Summary.other" xml:space="preserve"><value>{0:N0} di {1:N0} cambiano</value></data>
|
||||
<data name="Archive.Rename.Template" xml:space="preserve"><value>Modello</value></data>
|
||||
<data name="Archive.Retag.Add" xml:space="preserve"><value>Aggiungi tag</value></data>
|
||||
<data name="Archive.Retag.Apply" xml:space="preserve"><value>Applica</value></data>
|
||||
<data name="Archive.Retag.Heading.one" xml:space="preserve"><value>Tag di {0:N0} sequenza</value></data>
|
||||
<data name="Archive.Retag.Heading.other" xml:space="preserve"><value>Tag di {0:N0} sequenze</value></data>
|
||||
<data name="Archive.Retag.Invalid" xml:space="preserve"><value>Ogni tag ha da 1 a {0} caratteri.</value></data>
|
||||
<data name="Archive.Retag.Remove" xml:space="preserve"><value>Rimuovi tag</value></data>
|
||||
<data name="Archive.Set.All.one" xml:space="preserve"><value>{0:N0} sequenza · tutte</value></data>
|
||||
<data name="Archive.Set.All.other" xml:space="preserve"><value>{0:N0} sequenze · tutte</value></data>
|
||||
<data name="Archive.Set.Analyse" xml:space="preserve"><value>Analizza</value></data>
|
||||
<data name="Archive.Set.Export" xml:space="preserve"><value>Esporta CSV</value></data>
|
||||
<data name="Archive.Set.Label" xml:space="preserve"><value>Insieme scelto</value></data>
|
||||
<data name="Archive.Set.Move" xml:space="preserve"><value>Sposta…</value></data>
|
||||
<data name="Archive.Set.Proxies" xml:space="preserve"><value>Proxy</value></data>
|
||||
<data name="Archive.Set.Rename" xml:space="preserve"><value>Rinomina…</value></data>
|
||||
<data name="Archive.Set.Retag" xml:space="preserve"><value>Tag…</value></data>
|
||||
<data name="Archive.Set.Thumbnails" xml:space="preserve"><value>Miniature</value></data>
|
||||
<data name="Archive.Set.Verify" xml:space="preserve"><value>Verifica</value></data>
|
||||
<data name="Archive.Tile.Cameras.one" xml:space="preserve"><value>fotocamera</value></data>
|
||||
<data name="Archive.Tile.Cameras.other" xml:space="preserve"><value>fotocamere</value></data>
|
||||
<data name="Archive.Tile.Formats.one" xml:space="preserve"><value>{0:N0} formato</value></data>
|
||||
@@ -66,5 +152,17 @@
|
||||
<data name="Archive.Tile.Photos.other" xml:space="preserve"><value>foto</value></data>
|
||||
<data name="Archive.Tile.Sequences.one" xml:space="preserve"><value>sequenza</value></data>
|
||||
<data name="Archive.Tile.Sequences.other" xml:space="preserve"><value>sequenze</value></data>
|
||||
<data name="Archive.Toolbar.Adopt" xml:space="preserve"><value>Adotta cartella…</value></data>
|
||||
<data name="Archive.Toolbar.Archive" xml:space="preserve"><value>Archivio</value></data>
|
||||
<data name="Archive.Toolbar.Duplicates" xml:space="preserve"><value>Doppioni</value></data>
|
||||
<data name="Archive.Toolbar.Maintenance" xml:space="preserve"><value>Manutenzione</value></data>
|
||||
<data name="Archive.Toolbar.Orphans" xml:space="preserve"><value>Orfani</value></data>
|
||||
<data name="Archive.Toolbar.Rebuild" xml:space="preserve"><value>Ricostruisci indice…</value></data>
|
||||
<data name="Archive.Toolbar.Scan" xml:space="preserve"><value>Scansiona</value></data>
|
||||
<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.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>
|
||||
</root>
|
||||
+149
-2
@@ -8,28 +8,78 @@
|
||||
<data name="Import.Action.Copy" xml:space="preserve"><value>Copia</value></data>
|
||||
<data name="Import.Action.Duplicate" xml:space="preserve"><value>Già in archivio</value></data>
|
||||
<data name="Import.Action.ImportedBefore" xml:space="preserve"><value>Già importata</value></data>
|
||||
<data name="Import.After.Deep" xml:space="preserve"><value>Analisi profonda</value></data>
|
||||
<data name="Import.After.Delete" xml:space="preserve"><value>Elimina importate</value></data>
|
||||
<data name="Import.After.Eject" xml:space="preserve"><value>Espelli</value></data>
|
||||
<data name="Import.After.Format" xml:space="preserve"><value>Formatta scheda</value></data>
|
||||
<data name="Import.After.Keep" xml:space="preserve"><value>Mantieni scheda</value></data>
|
||||
<data name="Import.Blocked.AutoNeedsCard" xml:space="preserve"><value>Disponibile quando la scheda è memorizzata.</value></data>
|
||||
<data name="Import.Blocked.Incomplete" xml:space="preserve"><value>Per formattare serve un'importazione completa con copie verificate.</value></data>
|
||||
<data name="Import.Blocked.NoArchive" xml:space="preserve"><value>Crea o adotta prima un archivio (Libreria o Impostazioni).</value></data>
|
||||
<data name="Import.Blocked.NoCard" xml:space="preserve"><value>Solo per una scheda nota e inserita.</value></data>
|
||||
<data name="Import.Blocked.NoDryRun" xml:space="preserve"><value>Controlla prima la scheda: ogni file e la sua copia vengono verificati di nuovo.</value></data>
|
||||
<data name="Import.Blocked.NoPlan" xml:space="preserve"><value>Attendi il piano della scheda.</value></data>
|
||||
<data name="Import.Blocked.NoServer" xml:space="preserve"><value>Accedi prima a un Titano Server.</value></data>
|
||||
<data name="Import.Blocked.NotAllVerified" xml:space="preserve"><value>Alcune foto della scheda non hanno una copia verificata: formattando andrebbero perse.</value></data>
|
||||
<data name="Import.Blocked.NotArchive" xml:space="preserve"><value>Solo le importazioni nell'archivio di questo PC si possono confrontare con la scheda.</value></data>
|
||||
<data name="Import.Blocked.NotInserted" xml:space="preserve"><value>Inserisci prima la scheda.</value></data>
|
||||
<data name="Import.Blocked.NotRemovable" xml:space="preserve"><value>Si possono espellere solo schede rimovibili.</value></data>
|
||||
<data name="Import.Blocked.NothingImported" xml:space="preserve"><value>Da questa scheda non è ancora stato importato nulla.</value></data>
|
||||
<data name="Import.Blocked.NothingToCopy" xml:space="preserve"><value>Ogni foto è già importata o in archivio.</value></data>
|
||||
<data name="Import.Blocked.NothingVerified" xml:space="preserve"><value>Nessuna foto della scheda corrisponde a una copia verificata.</value></data>
|
||||
<data name="Import.Blocked.Space" xml:space="preserve"><value>Spazio libero insufficiente nella destinazione.</value></data>
|
||||
<data name="Import.Blocked.Template" xml:space="preserve"><value>Correggi prima i modelli dei nomi.</value></data>
|
||||
<data name="Import.Confirm.Delete" xml:space="preserve"><value>Elimina</value></data>
|
||||
<data name="Import.Confirm.DeleteHeading.one" xml:space="preserve"><value>Eliminare {0:N0} foto dalla scheda?</value></data>
|
||||
<data name="Import.Confirm.DeleteHeading.other" xml:space="preserve"><value>Eliminare {0:N0} foto dalla scheda?</value></data>
|
||||
<data name="Import.Confirm.DeleteMessage" xml:space="preserve"><value>Ognuna è stata appena verificata di nuovo sulla scheda e in archivio. I file modificati da allora vengono mantenuti.</value></data>
|
||||
<data name="Import.Confirm.Forget" xml:space="preserve"><value>Dimentica</value></data>
|
||||
<data name="Import.Confirm.ForgetHeading" xml:space="preserve"><value>Dimenticare {0}?</value></data>
|
||||
<data name="Import.Confirm.ForgetMessage" xml:space="preserve"><value>Soprannome, impostazioni e cronologia delle importazioni vengono rimossi. Le foto sulla scheda e in archivio restano.</value></data>
|
||||
<data name="Import.Confirm.Format" xml:space="preserve"><value>Formatta</value></data>
|
||||
<data name="Import.Confirm.FormatHeading" xml:space="preserve"><value>Formattare {0}?</value></data>
|
||||
<data name="Import.Confirm.FormatMessage.one" xml:space="preserve"><value>{0:N0} foto è stata copiata e verificata. La formattazione cancella tutto il contenuto della scheda.</value></data>
|
||||
<data name="Import.Confirm.FormatMessage.other" xml:space="preserve"><value>{0:N0} foto sono state copiate e verificate. La formattazione cancella tutto il contenuto della scheda.</value></data>
|
||||
<data name="Import.Confirm.Keep" xml:space="preserve"><value>Mantieni scheda</value></data>
|
||||
<data name="Import.Confirm.KeepProfile" xml:space="preserve"><value>Mantieni</value></data>
|
||||
<data name="Import.Confirm.TypeName" xml:space="preserve"><value>Scrivi il nome della scheda per confermare</value></data>
|
||||
<data name="Import.Destination.Archive" xml:space="preserve"><value>Archivio</value></data>
|
||||
<data name="Import.Destination.Choose" xml:space="preserve"><value>Scegli cartella</value></data>
|
||||
<data name="Import.Destination.Folder" xml:space="preserve"><value>Cartella</value></data>
|
||||
<data name="Import.Destination.FolderPlaceholder" xml:space="preserve"><value>Percorso cartella</value></data>
|
||||
<data name="Import.Destination.NotConnected" xml:space="preserve"><value>Non connesso</value></data>
|
||||
<data name="Import.Destination.Server" xml:space="preserve"><value>Server</value></data>
|
||||
<data name="Import.Details.Close" xml:space="preserve"><value>Chiudi</value></data>
|
||||
<data name="Import.Details.Column.Action" xml:space="preserve"><value>Azione</value></data>
|
||||
<data name="Import.Details.Column.Destination" xml:space="preserve"><value>Destinazione</value></data>
|
||||
<data name="Import.Details.Column.Source" xml:space="preserve"><value>Sulla scheda</value></data>
|
||||
<data name="Import.Details.Copy" xml:space="preserve"><value>copia {0} ({1})</value></data>
|
||||
<data name="Import.Details.Files.one" xml:space="preserve"><value>{0:N0} file</value></data>
|
||||
<data name="Import.Details.Files.other" xml:space="preserve"><value>{0:N0} file</value></data>
|
||||
<data name="Import.Details.Session" xml:space="preserve"><value>Sessione {0} · {1}</value></data>
|
||||
<data name="Import.Details.Title" xml:space="preserve"><value>Piano</value></data>
|
||||
<data name="Import.Details.Unreadable" xml:space="preserve"><value>Impossibile leggere {0}: {1}</value></data>
|
||||
<data name="Import.Device.Away" xml:space="preserve"><value>{0} · non inserita</value></data>
|
||||
<data name="Import.Device.Card" xml:space="preserve"><value>{0} · {1} · {2} occupati</value></data>
|
||||
<data name="Import.Device.NoDcim" xml:space="preserve"><value>{0} · senza DCIM · {1} liberi</value></data>
|
||||
<data name="Import.Device.Card" xml:space="preserve"><value>{0} · {1} occupati</value></data>
|
||||
<data name="Import.Device.LastImport" xml:space="preserve"><value>ultima importazione {0}</value></data>
|
||||
<data name="Import.Device.NoDcim" xml:space="preserve"><value>senza DCIM · {0} liberi</value></data>
|
||||
<data name="Import.Device.Serial" xml:space="preserve"><value>seriale {0}</value></data>
|
||||
<data name="Import.Device.State.Away" xml:space="preserve"><value>Scheda nota, non inserita</value></data>
|
||||
<data name="Import.Device.State.Drive" xml:space="preserve"><value>Unità senza DCIM</value></data>
|
||||
<data name="Import.Device.State.Folder" xml:space="preserve"><value>Cartella</value></data>
|
||||
<data name="Import.Device.State.Known" xml:space="preserve"><value>Scheda nota</value></data>
|
||||
<data name="Import.Device.State.New" xml:space="preserve"><value>Nuova scheda</value></data>
|
||||
<data name="Import.Devices.Auto" xml:space="preserve"><value>Importa automaticamente</value></data>
|
||||
<data name="Import.Devices.Folder" xml:space="preserve"><value>Cartella…</value></data>
|
||||
<data name="Import.Devices.Refresh" xml:space="preserve"><value>Aggiorna dispositivi</value></data>
|
||||
<data name="Import.Devices.Title" xml:space="preserve"><value>Dispositivi</value></data>
|
||||
<data name="Import.Duplicates.Again" xml:space="preserve"><value>Importa di nuovo</value></data>
|
||||
<data name="Import.Duplicates.Skip" xml:space="preserve"><value>Salta</value></data>
|
||||
<data name="Import.Empty" xml:space="preserve"><value>Inserisci una scheda o una cartella</value></data>
|
||||
<data name="Import.Erase.Checking.one" xml:space="preserve"><value>Verifica di {0:N0} foto</value></data>
|
||||
<data name="Import.Erase.Checking.other" xml:space="preserve"><value>Verifica di {0:N0} foto</value></data>
|
||||
<data name="Import.Erase.Delete.one" xml:space="preserve"><value>Elimina {0:N0} foto…</value></data>
|
||||
<data name="Import.Erase.Delete.other" xml:space="preserve"><value>Elimina {0:N0} foto…</value></data>
|
||||
<data name="Import.Erase.Kept.one" xml:space="preserve"><value>{0:N0} conservata</value></data>
|
||||
<data name="Import.Erase.Kept.other" xml:space="preserve"><value>{0:N0} conservate</value></data>
|
||||
<data name="Import.Erase.Verdict.CopyMismatch" xml:space="preserve"><value>la copia in archivio è diversa</value></data>
|
||||
@@ -39,6 +89,17 @@
|
||||
<data name="Import.Erase.Verdict.SourceMissing" xml:space="preserve"><value>non più sulla scheda</value></data>
|
||||
<data name="Import.Erase.Verified.one" xml:space="preserve"><value>{0:N0} verificata sulla scheda</value></data>
|
||||
<data name="Import.Erase.Verified.other" xml:space="preserve"><value>{0:N0} verificate sulla scheda</value></data>
|
||||
<data name="Import.Failed.Retry" xml:space="preserve"><value>Riprova</value></data>
|
||||
<data name="Import.Folder.PickDestination" xml:space="preserve"><value>Importa nella cartella</value></data>
|
||||
<data name="Import.Folder.PickSource" xml:space="preserve"><value>Importa dalla cartella</value></data>
|
||||
<data name="Import.Label.After" xml:space="preserve"><value>Dopo l'importazione</value></data>
|
||||
<data name="Import.Label.Destination" xml:space="preserve"><value>Destinazione</value></data>
|
||||
<data name="Import.Label.Duplicates" xml:space="preserve"><value>Doppioni</value></data>
|
||||
<data name="Import.Label.Names" xml:space="preserve"><value>Nomi</value></data>
|
||||
<data name="Import.Label.Scan" xml:space="preserve"><value>Scansione</value></data>
|
||||
<data name="Import.Names.File" xml:space="preserve"><value>Modello file</value></data>
|
||||
<data name="Import.Names.Folder" xml:space="preserve"><value>Modello cartella</value></data>
|
||||
<data name="Import.Names.Tokens" xml:space="preserve"><value>Segnaposto</value></data>
|
||||
<data name="Import.Plan.About" xml:space="preserve"><value>circa {0}</value></data>
|
||||
<data name="Import.Plan.Duplicates.one" xml:space="preserve"><value>{0:N0} doppione</value></data>
|
||||
<data name="Import.Plan.Duplicates.other" xml:space="preserve"><value>{0:N0} doppioni</value></data>
|
||||
@@ -47,11 +108,97 @@
|
||||
<data name="Import.Plan.ImportedBefore.other" xml:space="preserve"><value>{0:N0} già importate</value></data>
|
||||
<data name="Import.Plan.Sessions.one" xml:space="preserve"><value>{0:N0} sessione</value></data>
|
||||
<data name="Import.Plan.Sessions.other" xml:space="preserve"><value>{0:N0} sessioni</value></data>
|
||||
<data name="Import.Plan.Show" xml:space="preserve"><value>Mostra piano</value></data>
|
||||
<data name="Import.Plan.SpaceMissing" xml:space="preserve"><value>mancano {0}</value></data>
|
||||
<data name="Import.Plan.Title" xml:space="preserve"><value>Piano</value></data>
|
||||
<data name="Import.Profile.CopyFrom" xml:space="preserve"><value>Copia impostazioni da</value></data>
|
||||
<data name="Import.Profile.Edit" xml:space="preserve"><value>Modifica</value></data>
|
||||
<data name="Import.Profile.Forget" xml:space="preserve"><value>Dimentica scheda…</value></data>
|
||||
<data name="Import.Profile.Nickname" xml:space="preserve"><value>Nome della scheda</value></data>
|
||||
<data name="Import.Profile.Rename" xml:space="preserve"><value>Rinomina</value></data>
|
||||
<data name="Import.Progress.Bytes" xml:space="preserve"><value>{0} di {1}</value></data>
|
||||
<data name="Import.Progress.Cancel" xml:space="preserve"><value>Annulla</value></data>
|
||||
<data name="Import.Progress.Items" xml:space="preserve"><value>{0} di {1}</value></data>
|
||||
<data name="Import.Progress.Starting" xml:space="preserve"><value>Avvio…</value></data>
|
||||
<data name="Import.Result.AlreadyThere.one" xml:space="preserve"><value>{0:N0} già presente</value></data>
|
||||
<data name="Import.Result.AlreadyThere.other" xml:space="preserve"><value>{0:N0} già presenti</value></data>
|
||||
<data name="Import.Result.Check" xml:space="preserve"><value>Controlla scheda</value></data>
|
||||
<data name="Import.Result.Copied.one" xml:space="preserve"><value>{0:N0} copiata</value></data>
|
||||
<data name="Import.Result.Copied.other" xml:space="preserve"><value>{0:N0} copiate</value></data>
|
||||
<data name="Import.Result.Eject" xml:space="preserve"><value>Espelli</value></data>
|
||||
<data name="Import.Result.FailuresName" xml:space="preserve"><value>Foto non riuscite</value></data>
|
||||
<data name="Import.Result.Format" xml:space="preserve"><value>Formatta scheda…</value></data>
|
||||
<data name="Import.Result.Library" xml:space="preserve"><value>Apri nella Libreria</value></data>
|
||||
<data name="Import.Result.New" xml:space="preserve"><value>Nuova importazione</value></data>
|
||||
<data name="Import.Result.NotCommitted" xml:space="preserve"><value>Nessuna copia in archivio dopo l'importazione: vedi il registro dell'attività.</value></data>
|
||||
<data name="Import.Result.Partial" xml:space="preserve"><value>{0} copiate · {1} non riuscite</value></data>
|
||||
<data name="Import.Result.Skipped.one" xml:space="preserve"><value>{0:N0} saltata</value></data>
|
||||
<data name="Import.Result.Skipped.other" xml:space="preserve"><value>{0:N0} saltate</value></data>
|
||||
<data name="Import.Result.Verified.one" xml:space="preserve"><value>{0:N0} copiata e verificata</value></data>
|
||||
<data name="Import.Result.Verified.other" xml:space="preserve"><value>{0:N0} copiate e verificate</value></data>
|
||||
<data name="Import.Scan.Frames" xml:space="preserve"><value>fotogrammi</value></data>
|
||||
<data name="Import.Scan.Gap" xml:space="preserve"><value>pausa</value></data>
|
||||
<data name="Import.Scan.GapName" xml:space="preserve"><value>Pausa tra sessioni (min)</value></data>
|
||||
<data name="Import.Scan.Minimum" xml:space="preserve"><value>minimo</value></data>
|
||||
<data name="Import.Scan.MinimumName" xml:space="preserve"><value>Minimo fotogrammi a sessione</value></data>
|
||||
<data name="Import.Scan.Minutes" xml:space="preserve"><value>min</value></data>
|
||||
<data name="Import.Scan.Sessions" xml:space="preserve"><value>Sessioni</value></data>
|
||||
<data name="Import.Scan.Subfolders" xml:space="preserve"><value>Sottocartelle</value></data>
|
||||
<data name="Import.Scan.Verify" xml:space="preserve"><value>Verifica hash</value></data>
|
||||
<data name="Import.Session.Adds" xml:space="preserve"><value>Si aggiunge a · {0}</value></data>
|
||||
<data name="Import.Session.AddsShort" xml:space="preserve"><value>aggiunge</value></data>
|
||||
<data name="Import.Session.Column.Camera" xml:space="preserve"><value>Fotocamera</value></data>
|
||||
<data name="Import.Session.Column.Frames" xml:space="preserve"><value>Fotogrammi · intervallo</value></data>
|
||||
<data name="Import.Session.Column.Sequence" xml:space="preserve"><value>Sequenza</value></data>
|
||||
<data name="Import.Session.Column.Session" xml:space="preserve"><value>Sessione</value></data>
|
||||
<data name="Import.Session.Column.Size" xml:space="preserve"><value>Dimensione</value></data>
|
||||
<data name="Import.Session.New" xml:space="preserve"><value>Nuova · {0}</value></data>
|
||||
<data name="Import.Session.NewShort" xml:space="preserve"><value>nuova</value></data>
|
||||
<data name="Import.Session.Server" xml:space="preserve"><value>Server</value></data>
|
||||
<data name="Import.Start.one" xml:space="preserve"><value>Importa {0:N0} foto</value></data>
|
||||
<data name="Import.Start.other" xml:space="preserve"><value>Importa {0:N0} foto</value></data>
|
||||
<data name="Import.StartPlain" xml:space="preserve"><value>Importa</value></data>
|
||||
<data name="Import.Status.Cancelled" xml:space="preserve"><value>Importazione annullata</value></data>
|
||||
<data name="Import.Status.Choose" xml:space="preserve"><value>Scegli una scheda o una cartella.</value></data>
|
||||
<data name="Import.Status.NotInserted" xml:space="preserve"><value>Inserisci questa scheda per pianificarne l'importazione.</value></data>
|
||||
<data name="Import.Status.PlanFailed" xml:space="preserve"><value>Impossibile leggere la scheda: {0}</value></data>
|
||||
<data name="Import.Status.Reading" xml:space="preserve"><value>Lettura della scheda…</value></data>
|
||||
<data name="Import.Status.ReadingCount.one" xml:space="preserve"><value>{0:N0} foto letta</value></data>
|
||||
<data name="Import.Status.ReadingCount.other" xml:space="preserve"><value>{0:N0} foto lette</value></data>
|
||||
<data name="Import.Toast.AutoMessage" xml:space="preserve"><value>Importazione con le impostazioni salvate</value></data>
|
||||
<data name="Import.Toast.Cancel" xml:space="preserve"><value>Annulla</value></data>
|
||||
<data name="Import.Toast.CheckFailed" xml:space="preserve"><value>Controllo della scheda interrotto</value></data>
|
||||
<data name="Import.Toast.DeleteFailed" xml:space="preserve"><value>Eliminazione dalla scheda interrotta</value></data>
|
||||
<data name="Import.Toast.Deleted.one" xml:space="preserve"><value>{0:N0} foto eliminata dalla scheda</value></data>
|
||||
<data name="Import.Toast.Deleted.other" xml:space="preserve"><value>{0:N0} foto eliminate dalla scheda</value></data>
|
||||
<data name="Import.Toast.Done" xml:space="preserve"><value>Importazione di {0} completata</value></data>
|
||||
<data name="Import.Toast.Eject.Ejected" xml:space="preserve"><value>{0} può essere rimossa</value></data>
|
||||
<data name="Import.Toast.Eject.Failed" xml:space="preserve"><value>Impossibile espellere {0}</value></data>
|
||||
<data name="Import.Toast.Eject.InUse" xml:space="preserve"><value>{0} è in uso: chiudi i suoi file e riprova</value></data>
|
||||
<data name="Import.Toast.Format.Cancelled" xml:space="preserve"><value>Formattazione di {0} annullata</value></data>
|
||||
<data name="Import.Toast.Format.Failed" xml:space="preserve"><value>{0} non è stata formattata</value></data>
|
||||
<data name="Import.Toast.Format.Formatted" xml:space="preserve"><value>{0} formattata</value></data>
|
||||
<data name="Import.Toast.Import" xml:space="preserve"><value>Importa</value></data>
|
||||
<data name="Import.Toast.Inserted" xml:space="preserve"><value>{0} inserita</value></data>
|
||||
<data name="Import.Toast.Resume" xml:space="preserve"><value>Riprendi</value></data>
|
||||
<data name="Import.Toast.ResumeMessage" xml:space="preserve"><value>L'importazione interrotta può continuare</value></data>
|
||||
<data name="Import.Toast.Started" xml:space="preserve"><value>Importazione di {0}</value></data>
|
||||
<data name="Import.Token.aperture" xml:space="preserve"><value>Diaframma</value></data>
|
||||
<data name="Import.Token.camera" xml:space="preserve"><value>Nome fotocamera</value></data>
|
||||
<data name="Import.Token.date" xml:space="preserve"><value>Data di scatto</value></data>
|
||||
<data name="Import.Token.day" xml:space="preserve"><value>Giorno del mese</value></data>
|
||||
<data name="Import.Token.ext" xml:space="preserve"><value>Estensione originale</value></data>
|
||||
<data name="Import.Token.hm" xml:space="preserve"><value>Ora e minuti</value></data>
|
||||
<data name="Import.Token.iso" xml:space="preserve"><value>ISO</value></data>
|
||||
<data name="Import.Token.lens" xml:space="preserve"><value>Obiettivo</value></data>
|
||||
<data name="Import.Token.month" xml:space="preserve"><value>Mese</value></data>
|
||||
<data name="Import.Token.n" xml:space="preserve"><value>Numero fotogramma</value></data>
|
||||
<data name="Import.Token.name" xml:space="preserve"><value>Nome originale</value></data>
|
||||
<data name="Import.Token.nsession" xml:space="preserve"><value>Numero nella sessione</value></data>
|
||||
<data name="Import.Token.session" xml:space="preserve"><value>Numero di sessione</value></data>
|
||||
<data name="Import.Token.sessionstart" xml:space="preserve"><value>Inizio della sessione</value></data>
|
||||
<data name="Import.Token.shutter" xml:space="preserve"><value>Tempo di posa</value></data>
|
||||
<data name="Import.Token.time" xml:space="preserve"><value>Ora di scatto</value></data>
|
||||
<data name="Import.Token.title" xml:space="preserve"><value>Titolo della sequenza</value></data>
|
||||
<data name="Import.Token.year" xml:space="preserve"><value>Anno di scatto</value></data>
|
||||
</root>
|
||||
@@ -12,9 +12,120 @@
|
||||
<data name="Tooltips.About.Releases" xml:space="preserve"><value>Apri la pagina pubblica delle versioni nel browser</value></data>
|
||||
<data name="Tooltips.About.Review" xml:space="preserve"><value>Tutte le lingue tranne l'inglese sono tradotte automaticamente; proponi una formulazione migliore nel tracker pubblico</value></data>
|
||||
<data name="Tooltips.About.ThirdParty" xml:space="preserve"><value>Titano non usa codice di terze parti: tutto ciò che va oltre .NET e Windows è scritto internamente</value></data>
|
||||
<data name="Tooltips.Archive.Adopt" xml:space="preserve"><value>Indicizza sul posto una cartella esistente; nulla viene spostato o rinominato</value></data>
|
||||
<data name="Tooltips.Archive.Availability.Offline" xml:space="preserve"><value>La cartella dell'archivio non è raggiungibile; l'indice resta com'era</value></data>
|
||||
<data name="Tooltips.Archive.Availability.Online" xml:space="preserve"><value>La cartella dell'archivio è raggiungibile e scrivibile</value></data>
|
||||
<data name="Tooltips.Archive.Availability.ReadOnly" xml:space="preserve"><value>Leggibile ma non scrivibile: solo consultazione</value></data>
|
||||
<data name="Tooltips.Archive.Cameras" xml:space="preserve"><value>Foto per fotocamera; le minori sono raggruppate</value></data>
|
||||
<data name="Tooltips.Archive.CloseDialog" xml:space="preserve"><value>Chiudi senza modificare nulla · Esc</value></data>
|
||||
<data name="Tooltips.Archive.Collapse" xml:space="preserve"><value>Nascondi le sequenze di quest'anno</value></data>
|
||||
<data name="Tooltips.Archive.DuplicateFolder" xml:space="preserve"><value>Mostra in Esplora risorse la cartella della prima copia</value></data>
|
||||
<data name="Tooltips.Archive.DuplicateOpen" xml:space="preserve"><value>Apri nell'editor la sequenza della prima copia</value></data>
|
||||
<data name="Tooltips.Archive.Duplicates" xml:space="preserve"><value>Trova foto identiche tra le sequenze tramite hash · legge solo l'indice</value></data>
|
||||
<data name="Tooltips.Archive.Expand" xml:space="preserve"><value>Mostra le sequenze di quest'anno</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.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>
|
||||
<data name="Tooltips.Archive.FolderTemplate" xml:space="preserve"><value>Modello della cartella; il segnaposto title è il nuovo titolo · controllato mentre scrivi</value></data>
|
||||
<data name="Tooltips.Archive.Formats" xml:space="preserve"><value>Foto per formato di file</value></data>
|
||||
<data name="Tooltips.Archive.HealthOk" xml:space="preserve"><value>Nulla da correggere</value></data>
|
||||
<data name="Tooltips.Archive.HealthWarning" xml:space="preserve"><value>Richiede attenzione; il pulsante lo risolve</value></data>
|
||||
<data name="Tooltips.Archive.History" xml:space="preserve"><value>Apri la cronologia delle attività</value></data>
|
||||
<data name="Tooltips.Archive.KeepRow" xml:space="preserve"><value>Mantieni la riga dell'indice</value></data>
|
||||
<data name="Tooltips.Archive.LastScan" xml:space="preserve"><value>Ultima scansione incrementale: quando è finita e quanto è durata</value></data>
|
||||
<data name="Tooltips.Archive.Maintenance" xml:space="preserve"><value>Lease, file temporanei, pacchetti di miniature e segni dei doppioni; ricollega un archivio spostato</value></data>
|
||||
<data name="Tooltips.Archive.MaintenanceDryRun" xml:space="preserve"><value>Elenca cosa cambierebbe la manutenzione, senza cambiarlo</value></data>
|
||||
<data name="Tooltips.Archive.MaintenanceProxies" xml:space="preserve"><value>Ricrea tutti i proxy dell'archivio · in background</value></data>
|
||||
<data name="Tooltips.Archive.MaintenanceRun" xml:space="preserve"><value>Pulisce lease scaduti e file temporanei, compatta le miniature, segna i doppioni · originali intatti</value></data>
|
||||
<data name="Tooltips.Archive.MaintenanceView" xml:space="preserve"><value>Stato dell'indice, doppioni, orfani e manutenzione recente</value></data>
|
||||
<data name="Tooltips.Archive.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.Months" xml:space="preserve"><value>Foto al mese per data del primo scatto</value></data>
|
||||
<data name="Tooltips.Archive.Orphans" xml:space="preserve"><value>Trova foto fuori dai sidecar, fotogrammi senza file e cartelle non indicizzate · legge l'archivio</value></data>
|
||||
<data name="Tooltips.Archive.Orphans.MissingFiles" xml:space="preserve"><value>Segna i file mancanti nel sidecar e nell'indice</value></data>
|
||||
<data name="Tooltips.Archive.Orphans.MissingSequence" xml:space="preserve"><value>Rimuove la riga dell'indice; nessun file viene eliminato</value></data>
|
||||
<data name="Tooltips.Archive.Orphans.NewFolder" xml:space="preserve"><value>Scansiona l'archivio per indicizzare questa cartella</value></data>
|
||||
<data name="Tooltips.Archive.Orphans.UnlistedFiles" xml:space="preserve"><value>Aggiunge queste foto al sidecar e all'indice della sequenza</value></data>
|
||||
<data name="Tooltips.Archive.Overview" xml:space="preserve"><value>Albero, cifre e grafici</value></data>
|
||||
<data name="Tooltips.Archive.Pick" xml:space="preserve"><value>Scegli quale archivio gestire</value></data>
|
||||
<data name="Tooltips.Archive.PickRoot" xml:space="preserve"><value>Scegli quale archivio gestire · {0}</value></data>
|
||||
<data name="Tooltips.Archive.Rebuild" xml:space="preserve"><value>Ricostruisce l'indice dai sidecar; se mancano legge i metadati; non elimina mai gli originali</value></data>
|
||||
<data name="Tooltips.Archive.RebuildStart" xml:space="preserve"><value>Metti in coda la ricostruzione · l'archivio resta utilizzabile</value></data>
|
||||
<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.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; senza selezione, tutte</value></data>
|
||||
<data name="Tooltips.Archive.SetAnalyse" xml:space="preserve"><value>Esegui l'analisi profonda su ogni sequenza dell'insieme</value></data>
|
||||
<data name="Tooltips.Archive.SetExport" xml:space="preserve"><value>Esporta l'insieme in CSV: una riga per sequenza</value></data>
|
||||
<data name="Tooltips.Archive.SetMove" xml:space="preserve"><value>Sposta l'insieme in una nuova struttura di cartelle · prima la prova</value></data>
|
||||
<data name="Tooltips.Archive.SetProxies" xml:space="preserve"><value>Crea o aggiorna i proxy</value></data>
|
||||
<data name="Tooltips.Archive.SetRename" xml:space="preserve"><value>Rinomina i titoli dell'insieme con un modello · prima la prova</value></data>
|
||||
<data name="Tooltips.Archive.SetRetag" xml:space="preserve"><value>Aggiungi o rimuovi tag su tutto l'insieme</value></data>
|
||||
<data name="Tooltips.Archive.SetThumbnails" xml:space="preserve"><value>Crea o aggiorna le miniature</value></data>
|
||||
<data name="Tooltips.Archive.SetVerify" xml:space="preserve"><value>Ricalcola l'hash degli originali dell'insieme</value></data>
|
||||
<data name="Tooltips.Archive.Storage" xml:space="preserve"><value>Spazio degli originali per anno di scatto</value></data>
|
||||
<data name="Tooltips.Archive.TagsAdd" xml:space="preserve"><value>Tag da aggiungere, separati da virgole</value></data>
|
||||
<data name="Tooltips.Archive.TagsRemove" xml:space="preserve"><value>Tag da rimuovere, separati da virgole</value></data>
|
||||
<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.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>
|
||||
<data name="Tooltips.Import.Again" xml:space="preserve"><value>Importa di nuovo le foto già in archivio; nulla viene sovrascritto</value></data>
|
||||
<data name="Tooltips.Import.Archive" xml:space="preserve"><value>Copia nell'archivio di questo PC con i modelli dei nomi · {0}</value></data>
|
||||
<data name="Tooltips.Import.Auto" xml:space="preserve"><value>Avvia l'importazione con le impostazioni della scheda appena viene inserita; un avviso permette di annullare</value></data>
|
||||
<data name="Tooltips.Import.Cancel" xml:space="preserve"><value>Ferma la copia; le copie verificate restano e l'importazione può riprendere</value></data>
|
||||
<data name="Tooltips.Import.CancelAuto" xml:space="preserve"><value>Non importare ora questa scheda</value></data>
|
||||
<data name="Tooltips.Import.Check" xml:space="preserve"><value>Ricalcola l'hash di ogni file importato sulla scheda e della sua copia · legge entrambi</value></data>
|
||||
<data name="Tooltips.Import.ChooseFolder" xml:space="preserve"><value>Scegli la cartella di destinazione</value></data>
|
||||
<data name="Tooltips.Import.ClosePlan" xml:space="preserve"><value>Chiudi il piano</value></data>
|
||||
<data name="Tooltips.Import.Conflict" xml:space="preserve"><value>Risolto o segnalato dal piano prima della copia</value></data>
|
||||
<data name="Tooltips.Import.CopyFrom" xml:space="preserve"><value>Usa le impostazioni salvate di un'altra scheda</value></data>
|
||||
<data name="Tooltips.Import.Deep" xml:space="preserve"><value>Metti in coda l'analisi profonda di ogni sequenza importata (in background)</value></data>
|
||||
<data name="Tooltips.Import.Delete" xml:space="preserve"><value>Elimina dalla scheda solo le foto appena verificate; chiede conferma</value></data>
|
||||
<data name="Tooltips.Import.DeleteChoice" xml:space="preserve"><value>Dopo l'importazione, proponi di eliminare solo i file con copia verificata</value></data>
|
||||
<data name="Tooltips.Import.Duplicates" xml:space="preserve"><value>Foto già in archivio (stesso hash)</value></data>
|
||||
<data name="Tooltips.Import.Edit" xml:space="preserve"><value>Rinomina la scheda, copia le impostazioni da un'altra o dimenticala</value></data>
|
||||
<data name="Tooltips.Import.Eject" xml:space="preserve"><value>Espelli la scheda in sicurezza</value></data>
|
||||
<data name="Tooltips.Import.EjectChoice" xml:space="preserve"><value>Espelli la scheda in sicurezza al termine</value></data>
|
||||
<data name="Tooltips.Import.Failed" xml:space="preserve"><value>L'importazione si è fermata; le copie verificate sono state mantenute</value></data>
|
||||
<data name="Tooltips.Import.FileTemplate" xml:space="preserve"><value>Modello del file; l'estensione resta · controllato mentre scrivi</value></data>
|
||||
<data name="Tooltips.Import.Folder" xml:space="preserve"><value>Importa da una cartella di questo PC o della rete</value></data>
|
||||
<data name="Tooltips.Import.FolderDestination" xml:space="preserve"><value>Copia in una cartella a scelta; non indicizzata finché non la adotti</value></data>
|
||||
<data name="Tooltips.Import.FolderPath" xml:space="preserve"><value>Cartella usata quando la destinazione è Cartella</value></data>
|
||||
<data name="Tooltips.Import.FolderTemplate" xml:space="preserve"><value>Modello della cartella · controllato mentre scrivi</value></data>
|
||||
<data name="Tooltips.Import.Forget" xml:space="preserve"><value>Rimuovi soprannome, impostazioni e cronologia della scheda; le foto restano</value></data>
|
||||
<data name="Tooltips.Import.Format" xml:space="preserve"><value>Apri la formattazione di Windows dopo una conferma scritta</value></data>
|
||||
<data name="Tooltips.Import.FormatChoice" xml:space="preserve"><value>Dopo l'importazione, proponi la formattazione di Windows quando ogni copia è verificata</value></data>
|
||||
<data name="Tooltips.Import.FormatConfirm" xml:space="preserve"><value>Apri la formattazione di Windows</value></data>
|
||||
<data name="Tooltips.Import.Gap" xml:space="preserve"><value>Minuti senza foto che avviano una nuova sessione</value></data>
|
||||
<data name="Tooltips.Import.ImportedBefore" xml:space="preserve"><value>Foto già importate da questa scheda (stesso nome, dimensione e data)</value></data>
|
||||
<data name="Tooltips.Import.Keep" xml:space="preserve"><value>Lascia intatta la scheda</value></data>
|
||||
<data name="Tooltips.Import.KeepCard" xml:space="preserve"><value>Mantieni tutte le foto sulla scheda</value></data>
|
||||
<data name="Tooltips.Import.KeepProfile" xml:space="preserve"><value>Mantieni la scheda in memoria</value></data>
|
||||
<data name="Tooltips.Import.Kept" xml:space="preserve"><value>Questa foto resta sulla scheda</value></data>
|
||||
<data name="Tooltips.Import.Library" xml:space="preserve"><value>Mostra le sequenze importate nella Libreria</value></data>
|
||||
<data name="Tooltips.Import.MinimumFrames" xml:space="preserve"><value>I gruppi più piccoli si uniscono alla sessione precedente</value></data>
|
||||
<data name="Tooltips.Import.New" xml:space="preserve"><value>Pianifica di nuovo questa scheda</value></data>
|
||||
<data name="Tooltips.Import.Nickname" xml:space="preserve"><value>Nome della scheda in Titano · Invio salva</value></data>
|
||||
<data name="Tooltips.Import.OpenCard" xml:space="preserve"><value>Apri Importa con questa scheda selezionata</value></data>
|
||||
<data name="Tooltips.Import.Refresh" xml:space="preserve"><value>Cerca di nuovo schede e cartelle con DCIM</value></data>
|
||||
<data name="Tooltips.Import.Rename" xml:space="preserve"><value>Cambia il nome della scheda</value></data>
|
||||
<data name="Tooltips.Import.Result" xml:space="preserve"><value>Copie verificate con hash durante la copia e rilette dalla destinazione</value></data>
|
||||
<data name="Tooltips.Import.Resume" xml:space="preserve"><value>Continua l'importazione interrotta da dove si è fermata</value></data>
|
||||
<data name="Tooltips.Import.Retry" xml:space="preserve"><value>Continua l'importazione da dove si è fermata</value></data>
|
||||
<data name="Tooltips.Import.Server" xml:space="preserve"><value>Invia i fotogrammi al server; ognuno conta quando il server ne conferma l'hash</value></data>
|
||||
<data name="Tooltips.Import.SessionTitle" xml:space="preserve"><value>Titolo della sequenza · vuoto mantiene il nome della cartella · Invio salva</value></data>
|
||||
<data name="Tooltips.Import.Sessions" xml:space="preserve"><value>Dividi la scheda in sessioni quando la pausa tra due foto supera il limite</value></data>
|
||||
<data name="Tooltips.Import.ShowPlan" xml:space="preserve"><value>Mostra ogni file, dove andrà e cosa ha risolto il piano</value></data>
|
||||
<data name="Tooltips.Import.Skip" xml:space="preserve"><value>Lascia sulla scheda le foto già in archivio (stesso hash)</value></data>
|
||||
<data name="Tooltips.Import.Space" xml:space="preserve"><value>Spazio libero nella destinazione dopo l'importazione; su un server, quanto resta della tua quota</value></data>
|
||||
<data name="Tooltips.Import.Start" xml:space="preserve"><value>Copia con verifica; la scheda si tocca solo dopo che ogni hash coincide · Ctrl+Invio</value></data>
|
||||
<data name="Tooltips.Import.Subfolders" xml:space="preserve"><value>Cerca in ogni sottocartella della sorgente</value></data>
|
||||
<data name="Tooltips.Import.Tokens" xml:space="preserve"><value>Inserisci un segnaposto nell'ultimo modello usato</value></data>
|
||||
<data name="Tooltips.Import.Verify" xml:space="preserve"><value>Calcola l'hash durante la copia e rileggi la destinazione prima di toccare la sorgente</value></data>
|
||||
<data name="Tooltips.Jobs.Cancel" xml:space="preserve"><value>Ferma questa attività; Riprova la continua più tardi dall'ultimo punto di ripresa</value></data>
|
||||
<data name="Tooltips.Jobs.ClearDone" xml:space="preserve"><value>Nasconde le attività concluse dall'elenco; restano nella cronologia</value></data>
|
||||
<data name="Tooltips.Jobs.Filter.All" xml:space="preserve"><value>Tutte le attività</value></data>
|
||||
|
||||
@@ -0,0 +1,289 @@
|
||||
using System.IO;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Threading;
|
||||
using Titano.App.Infrastructure;
|
||||
using Titano.App.Settings;
|
||||
using Titano.Core.Archiving;
|
||||
using Titano.Core.Diagnostics;
|
||||
using Titano.Core.Localization;
|
||||
using Titano.Core.Model;
|
||||
using Titano.Data;
|
||||
using Titano.Data.Archiving;
|
||||
using Titano.Ui.Mvvm;
|
||||
|
||||
namespace Titano.App.Archiving;
|
||||
|
||||
/// <summary>An in-window dialog of the Archive screen: one primary action, one way out.</summary>
|
||||
public abstract class ArchiveDialogViewModel(Action close) : LocalizedViewModel
|
||||
{
|
||||
private bool _isBusy;
|
||||
private string? _busyText;
|
||||
|
||||
public ICommand CloseCommand { get; } = new RelayCommand(close);
|
||||
|
||||
public bool IsBusy
|
||||
{
|
||||
get => _isBusy;
|
||||
protected set
|
||||
{
|
||||
if (Set(ref _isBusy, value)) CommandManager.InvalidateRequerySuggested();
|
||||
}
|
||||
}
|
||||
|
||||
public string? BusyText { get => _busyText; protected set => Set(ref _busyText, value); }
|
||||
|
||||
protected void Close() => CloseCommand.Execute(null);
|
||||
}
|
||||
|
||||
/// <summary>A fact of the rebuild dialog ("Sidecars · 412").</summary>
|
||||
public sealed record DialogFact(string Label, string Value);
|
||||
|
||||
/// <summary>
|
||||
/// "Rebuild index" (BRIEF §12.5): what the rebuild reads — the sidecars on disk, then a full metadata scan of folders
|
||||
/// without one — next to what the index holds now. Originals are never touched; the rebuild runs as a job.
|
||||
/// </summary>
|
||||
public sealed class RebuildDialogViewModel : ArchiveDialogViewModel
|
||||
{
|
||||
private readonly Func<Task> _rebuild;
|
||||
private IReadOnlyList<DialogFact> _facts;
|
||||
|
||||
public RebuildDialogViewModel(Core.Model.Archive archive, ArchiveAvailability availability, int indexed, Func<Task> rebuild, Action close)
|
||||
: base(close)
|
||||
{
|
||||
_rebuild = rebuild;
|
||||
Archive = archive;
|
||||
Availability = availability;
|
||||
Indexed = indexed;
|
||||
_facts = Facts(null);
|
||||
RebuildCommand = new AsyncRelayCommand(RebuildAsync, () => !IsBusy && availability == ArchiveAvailability.Online);
|
||||
}
|
||||
|
||||
public Core.Model.Archive Archive { get; }
|
||||
public ArchiveAvailability Availability { get; }
|
||||
public int Indexed { get; }
|
||||
|
||||
public IReadOnlyList<DialogFact> FactRows { get => _facts; private set => Set(ref _facts, value); }
|
||||
|
||||
public ICommand RebuildCommand { get; }
|
||||
|
||||
public string RebuildToolTip => Availability == ArchiveAvailability.Online ? Loc.L("Tooltips.Archive.RebuildStart") : Loc.L("Archive.Blocked.NotOnline");
|
||||
|
||||
/// <summary>Counts sequence folders with and without a sidecar (a walk of the archive tree, off the UI thread).</summary>
|
||||
public async Task CountAsync()
|
||||
{
|
||||
if (Availability == ArchiveAvailability.Offline) return;
|
||||
BusyText = Loc.L("Archive.Rebuild.Counting");
|
||||
try
|
||||
{
|
||||
var root = Archive.RootPath;
|
||||
var folders = await Task.Run(() => ArchiveScanner.FindSequenceFolders(new ArchivePaths(root)));
|
||||
FactRows = Facts(folders);
|
||||
}
|
||||
catch (Exception ex) when (ex is IOException or UnauthorizedAccessException)
|
||||
{
|
||||
Log.Warning("archive", "Counting sidecars failed", ex);
|
||||
}
|
||||
finally
|
||||
{
|
||||
BusyText = null;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Shows counts computed elsewhere (capture).</summary>
|
||||
public void ShowFolders(IReadOnlyList<SequenceFolder> folders) => FactRows = Facts(folders);
|
||||
|
||||
private IReadOnlyList<DialogFact> Facts(IReadOnlyList<SequenceFolder>? folders)
|
||||
{
|
||||
var waiting = Loc.L("Archive.Rebuild.Counting");
|
||||
return
|
||||
[
|
||||
new(Loc.L("Archive.Rebuild.Archive"), Archive.Name),
|
||||
new(Loc.L("Archive.Rebuild.Root"), Archive.RootPath),
|
||||
new(Loc.L("Archive.Rebuild.State"), Loc.L("Archive.Availability." + Availability)),
|
||||
new(Loc.L("Archive.Rebuild.Indexed"), Loc.Plural("Shell.Status.Sequences", Indexed)),
|
||||
new(Loc.L("Archive.Rebuild.Sidecars"), folders is null ? waiting : Formatting.Count(folders.Count(f => f.Sidecar is not null))),
|
||||
new(Loc.L("Archive.Rebuild.Metadata"), folders is null ? waiting : Formatting.Count(folders.Count(f => f.Sidecar is null))),
|
||||
];
|
||||
}
|
||||
|
||||
private async Task RebuildAsync()
|
||||
{
|
||||
IsBusy = true;
|
||||
try
|
||||
{
|
||||
await _rebuild();
|
||||
Close();
|
||||
}
|
||||
finally
|
||||
{
|
||||
IsBusy = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Mass rename (titles) or move (folder layout) of a set (BRIEF §7, §12.5): the template is checked as it is typed,
|
||||
/// the dry run lists every change, and Apply makes exactly those changes (journaled, so a crash resumes it).
|
||||
/// </summary>
|
||||
public sealed class RenameDialogViewModel : ArchiveDialogViewModel
|
||||
{
|
||||
private readonly ArchiveService _archives;
|
||||
private readonly Core.Model.Archive _archive;
|
||||
private readonly IReadOnlyList<Sequence> _set;
|
||||
private readonly Func<int, Task> _applied;
|
||||
private readonly DispatcherTimer _delay = new() { Interval = TimeSpan.FromMilliseconds(400) };
|
||||
private RenamePlan? _plan;
|
||||
private IReadOnlyList<RenameRow> _rows = [];
|
||||
private CancellationTokenSource? _planning;
|
||||
|
||||
public RenameDialogViewModel(RenameMode mode, ArchiveService archives, Core.Model.Archive archive, IReadOnlyList<Sequence> set, Func<int, Task> applied,
|
||||
Action close)
|
||||
: base(close)
|
||||
{
|
||||
Mode = mode;
|
||||
_archives = archives;
|
||||
_archive = archive;
|
||||
_set = set;
|
||||
_applied = applied;
|
||||
var initial = mode == RenameMode.Folders ? archive.FolderTemplate : "{title}";
|
||||
Template = new EditableField(initial, t => MassRename.Validate(mode, t), committed => _ = PlanAsync(),
|
||||
() => Loc.L(mode == RenameMode.Folders ? "Tooltips.Archive.FolderTemplate" : "Tooltips.Archive.TitleTemplate"));
|
||||
Template.PropertyChanged += (_, e) =>
|
||||
{
|
||||
if (e.PropertyName != nameof(EditableField.Text)) return;
|
||||
_delay.Stop();
|
||||
_delay.Start();
|
||||
};
|
||||
_delay.Tick += (_, _) =>
|
||||
{
|
||||
_delay.Stop();
|
||||
_ = PlanAsync();
|
||||
};
|
||||
ApplyCommand = new AsyncRelayCommand(ApplyAsync, () => !IsBusy && _plan is { Steps.Count: > 0 } && !Template.HasErrors);
|
||||
}
|
||||
|
||||
public RenameMode Mode { get; }
|
||||
|
||||
public string Heading => Loc.Plural(Mode == RenameMode.Folders ? "Archive.Rename.MoveHeading" : "Archive.Rename.Heading", _set.Count);
|
||||
|
||||
public EditableField Template { get; }
|
||||
|
||||
public IReadOnlyList<RenameRow> Rows { get => _rows; private set => Set(ref _rows, value); }
|
||||
|
||||
public string SummaryText => _plan is null ? string.Empty : MassRename.Summary(_plan, _set.Count);
|
||||
|
||||
public ICommand ApplyCommand { get; }
|
||||
|
||||
/// <summary>The dry run of the current template (the engine's plan; nothing changes on disk).</summary>
|
||||
public async Task PlanAsync()
|
||||
{
|
||||
_planning?.Cancel();
|
||||
_plan = null;
|
||||
Rows = [];
|
||||
OnPropertyChanged(nameof(SummaryText));
|
||||
if (Template.HasErrors) return;
|
||||
var cts = _planning = new CancellationTokenSource();
|
||||
var template = Template.Text;
|
||||
var ids = _set.Select(s => s.Id).ToList();
|
||||
try
|
||||
{
|
||||
var plan = await Task.Run(() => _archives.PlanRenameAsync(_archive.Id, ids, Mode == RenameMode.Folders ? template : null,
|
||||
Mode == RenameMode.Titles ? template : null, cts.Token), cts.Token);
|
||||
if (cts.IsCancellationRequested) return;
|
||||
_plan = plan;
|
||||
Rows = MassRename.Rows(plan, Mode);
|
||||
OnPropertyChanged(nameof(SummaryText));
|
||||
CommandManager.InvalidateRequerySuggested();
|
||||
}
|
||||
catch (OperationCanceledException) when (cts.IsCancellationRequested)
|
||||
{
|
||||
}
|
||||
catch (Exception ex) when (ex is ArgumentException or DatabaseException or FormatException)
|
||||
{
|
||||
Log.Warning("archive", "Rename plan failed", ex);
|
||||
BusyText = ex.Message;
|
||||
}
|
||||
}
|
||||
|
||||
private async Task ApplyAsync()
|
||||
{
|
||||
if (_plan is not { } plan) return;
|
||||
IsBusy = true;
|
||||
var progress = new Progress<int>(n => BusyText = Loc.L("Archive.Rename.Applying", Formatting.Count(n), Formatting.Count(plan.Steps.Count)));
|
||||
try
|
||||
{
|
||||
await Task.Run(() => _archives.ApplyRenameAsync(plan, progress));
|
||||
await _applied(plan.Steps.Count);
|
||||
Close();
|
||||
}
|
||||
catch (Exception ex) when (ex is IOException or UnauthorizedAccessException or StaleRenamePlanException or ArchiveOfflineException)
|
||||
{
|
||||
Log.Warning("archive", "Rename failed", ex);
|
||||
BusyText = ex.Message;
|
||||
}
|
||||
finally
|
||||
{
|
||||
IsBusy = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Add and remove tags on a set (BRIEF §12.5 Retag): the dry run counts the sequences that change.</summary>
|
||||
public sealed class RetagDialogViewModel : ArchiveDialogViewModel
|
||||
{
|
||||
private readonly ArchiveService _archives;
|
||||
private readonly IReadOnlyList<Sequence> _set;
|
||||
private readonly Func<int, Task> _applied;
|
||||
|
||||
public RetagDialogViewModel(ArchiveService archives, IReadOnlyList<Sequence> set, Func<int, Task> applied, Action close)
|
||||
: base(close)
|
||||
{
|
||||
_archives = archives;
|
||||
_set = set;
|
||||
_applied = applied;
|
||||
Add = new EditableField(string.Empty, Retag.Validate, _ => OnPropertyChanged(nameof(SummaryText)), () => Loc.L("Tooltips.Archive.TagsAdd"));
|
||||
Remove = new EditableField(string.Empty, Retag.Validate, _ => OnPropertyChanged(nameof(SummaryText)), () => Loc.L("Tooltips.Archive.TagsRemove"));
|
||||
Add.PropertyChanged += (_, _) => OnPropertyChanged(nameof(SummaryText));
|
||||
Remove.PropertyChanged += (_, _) => OnPropertyChanged(nameof(SummaryText));
|
||||
ApplyCommand = new AsyncRelayCommand(ApplyAsync, () => !IsBusy && Changes().Count > 0);
|
||||
}
|
||||
|
||||
public string Heading => Loc.Plural("Archive.Retag.Heading", _set.Count);
|
||||
|
||||
public EditableField Add { get; }
|
||||
public EditableField Remove { get; }
|
||||
|
||||
/// <summary>"12 of 36 change".</summary>
|
||||
public string SummaryText => Loc.Plural("Archive.Rename.Summary", Changes().Count, _set.Count);
|
||||
|
||||
public ICommand ApplyCommand { get; }
|
||||
|
||||
private IReadOnlyList<(Sequence Sequence, IReadOnlyList<string> Tags)> Changes() =>
|
||||
Add.HasErrors || Remove.HasErrors ? [] : Retag.Changes(_set, Retag.Parse(Add.Text), Retag.Parse(Remove.Text));
|
||||
|
||||
private async Task ApplyAsync()
|
||||
{
|
||||
var changes = Changes();
|
||||
IsBusy = true;
|
||||
try
|
||||
{
|
||||
for (var i = 0; i < changes.Count; i++)
|
||||
{
|
||||
var (s, tags) = changes[i];
|
||||
BusyText = Loc.L("Archive.Rename.Applying", Formatting.Count(i + 1), Formatting.Count(changes.Count));
|
||||
await Task.Run(() => _archives.SetSequenceInfoAsync(s.Id, s.Title, tags, s.Rating, s.Notes));
|
||||
}
|
||||
await _applied(changes.Count);
|
||||
Close();
|
||||
}
|
||||
catch (Exception ex) when (ex is IOException or UnauthorizedAccessException or ArgumentException or DatabaseException or ArchiveOfflineException)
|
||||
{
|
||||
Log.Warning("archive", "Retag failed", ex);
|
||||
BusyText = ex.Message;
|
||||
}
|
||||
finally
|
||||
{
|
||||
IsBusy = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,73 @@
|
||||
using System.Windows.Input;
|
||||
using Titano.Core.Archiving;
|
||||
using Titano.Core.Localization;
|
||||
using Titano.Ui.Controls;
|
||||
using Titano.Ui.Mvvm;
|
||||
|
||||
namespace Titano.App.Archiving;
|
||||
|
||||
/// <summary>A visible row of the archive tree: indentation, expander, title, figures and availability.</summary>
|
||||
public sealed class ArchiveTreeRowViewModel(ArchiveTreeNode node, ArchiveAvailability availability, Action<ArchiveTreeNode> toggle) : ObservableObject
|
||||
{
|
||||
public ArchiveTreeNode Node { get; } = node;
|
||||
|
||||
public string Title => Node.Title;
|
||||
public string Detail => Node.Detail;
|
||||
|
||||
/// <summary>16 px per level.</summary>
|
||||
public System.Windows.Thickness IndentMargin => new(Node.Depth * 16, 0, 0, 0);
|
||||
|
||||
public bool HasChildren => Node.HasChildren;
|
||||
public bool IsExpanded => Node.IsExpanded;
|
||||
public bool IsArchive => Node.Kind == TreeNodeKind.Archive;
|
||||
public bool IsYear => Node.Kind == TreeNodeKind.Year;
|
||||
|
||||
public string ToggleToolTip => Loc.L(Node.IsExpanded ? "Tooltips.Archive.Collapse" : "Tooltips.Archive.Expand");
|
||||
|
||||
public ICommand ToggleCommand { get; } = new RelayCommand(() => toggle(node));
|
||||
|
||||
/// <summary>The archive's availability (BRIEF §7: online, read-only, offline) on the archive row.</summary>
|
||||
public StatusKind AvailabilityKind => availability switch
|
||||
{
|
||||
ArchiveAvailability.Online => StatusKind.Online,
|
||||
ArchiveAvailability.ReadOnly => StatusKind.Warning,
|
||||
_ => StatusKind.Offline,
|
||||
};
|
||||
|
||||
public string AvailabilityText => Loc.L("Archive.Availability." + availability);
|
||||
|
||||
public string AvailabilityToolTip => Loc.L("Tooltips.Archive.Availability." + availability);
|
||||
}
|
||||
|
||||
/// <summary>A line of "Index health" with its fix.</summary>
|
||||
public sealed class HealthLineViewModel(HealthLine line, ICommand? fix) : ObservableObject
|
||||
{
|
||||
public HealthLine Line { get; } = line;
|
||||
public string Text => Line.Text;
|
||||
public StatusKind Kind => Line.IsOk ? StatusKind.Done : StatusKind.Warning;
|
||||
public string KindToolTip => Loc.L(Line.IsOk ? "Tooltips.Archive.HealthOk" : "Tooltips.Archive.HealthWarning");
|
||||
public bool HasFix => FixCommand is not null && Line.Action != HealthAction.None;
|
||||
public ICommand? FixCommand { get; } = fix;
|
||||
public string FixText => HasFix ? Loc.L("Archive.Health.Fix." + Line.Action) : string.Empty;
|
||||
public string FixToolTip => HasFix ? Loc.L("Tooltips.Archive.Fix." + Line.Action) : string.Empty;
|
||||
}
|
||||
|
||||
/// <summary>A duplicate group with its safe actions: open the first copy's sequence, show its folder.</summary>
|
||||
public sealed class DuplicateRowViewModel(DuplicateRow row, ICommand open, ICommand reveal) : ObservableObject
|
||||
{
|
||||
public DuplicateRow Row { get; } = row;
|
||||
public string Places => string.Join(" · ", Row.Places);
|
||||
public ICommand OpenCommand { get; } = open;
|
||||
public ICommand RevealCommand { get; } = reveal;
|
||||
}
|
||||
|
||||
/// <summary>An orphan line with its fix (index, reconcile, remove the row, scan).</summary>
|
||||
public sealed class OrphanRowViewModel(OrphanRow row, ICommand fix) : ObservableObject
|
||||
{
|
||||
public OrphanRow Row { get; } = row;
|
||||
public StatusKind Kind => Row.Kind is OrphanKind.MissingFiles or OrphanKind.MissingSequence ? StatusKind.Warning : StatusKind.Queued;
|
||||
public string KindText => Loc.L("Archive.Orphans.Kind." + Row.Kind);
|
||||
public ICommand FixCommand { get; } = fix;
|
||||
public string FixText => Loc.L("Archive.Orphans.Fix." + Row.Kind);
|
||||
public string FixToolTip => Loc.L("Tooltips.Archive.Orphans." + Row.Kind);
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
using Titano.App.Shell;
|
||||
|
||||
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, and
|
||||
/// the rebuild dialog.
|
||||
/// </summary>
|
||||
public static class ArchiveScenes
|
||||
{
|
||||
public static readonly IReadOnlyList<string> Views = ["overview", "maintenance", "rebuild"];
|
||||
|
||||
public static async Task ShowAsync(ShellViewModel shell, string view)
|
||||
{
|
||||
var archive = shell.Archive;
|
||||
shell.Navigate(SectionKey.Archive);
|
||||
archive.Dialog?.CloseCommand.Execute(null);
|
||||
await archive.LoadAsync();
|
||||
var db = shell.Services.Database ?? throw new InvalidOperationException("The sample index is not open.");
|
||||
var locations = archive.SelectedArchive is { } selected ? await db.Sequences.ListLocationsAsync(selected.Id) : [];
|
||||
switch (view)
|
||||
{
|
||||
case "overview":
|
||||
archive.ViewIndex = 0;
|
||||
break;
|
||||
case "maintenance":
|
||||
archive.ViewIndex = 1;
|
||||
archive.ShowReports(SampleReports.Duplicates(locations), SampleReports.Orphans(locations), locations);
|
||||
break;
|
||||
case "rebuild":
|
||||
archive.ViewIndex = 0;
|
||||
(await archive.OpenRebuildDialogAsync())?.ShowFolders(SampleReports.Folders(locations));
|
||||
break;
|
||||
default:
|
||||
throw new ArgumentOutOfRangeException(nameof(view), view, "Unknown Archive view.");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
using System.IO;
|
||||
using Titano.Data;
|
||||
|
||||
namespace Titano.App.Archiving;
|
||||
|
||||
/// <summary>The archive the Import and Archive screens work on: the one at the remembered root, else the first indexed.</summary>
|
||||
public static class CurrentArchive
|
||||
{
|
||||
public static Core.Model.Archive? Pick(IReadOnlyList<Core.Model.Archive> archives, string? lastRoot)
|
||||
{
|
||||
if (archives.Count == 0) return null;
|
||||
if (string.IsNullOrWhiteSpace(lastRoot)) return archives[0];
|
||||
var wanted = Normalize(lastRoot);
|
||||
return archives.FirstOrDefault(a => string.Equals(Normalize(a.RootPath), wanted, StringComparison.OrdinalIgnoreCase)) ?? archives[0];
|
||||
}
|
||||
|
||||
public static async Task<Core.Model.Archive?> FindAsync(TitanoDatabase db, string? lastRoot, CancellationToken cancellationToken = default) =>
|
||||
Pick(await db.Archives.ListAsync(cancellationToken).ConfigureAwait(false), lastRoot);
|
||||
|
||||
private static string Normalize(string path)
|
||||
{
|
||||
try
|
||||
{
|
||||
return Path.TrimEndingDirectorySeparator(Path.GetFullPath(path));
|
||||
}
|
||||
catch (Exception ex) when (ex is ArgumentException or NotSupportedException or PathTooLongException)
|
||||
{
|
||||
return path;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
using Titano.Core.Archiving;
|
||||
using Titano.Data.Archiving;
|
||||
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
|
||||
/// (the sample index has no sidecars on disk, so the real searches would find nothing to show).
|
||||
/// </summary>
|
||||
public static class SampleReports
|
||||
{
|
||||
private const string Sha = "9f2c41d07be8a6c3e15f0d2b84a97c6e3d1f50a28b9e7c4d6a0f3e2b1c8d9a47";
|
||||
|
||||
/// <summary>One photo stored twice: a frame of the first sequence copied into the second.</summary>
|
||||
public static IReadOnlyList<DuplicateGroup> Duplicates(IReadOnlyList<SequenceLocation> sequences) =>
|
||||
sequences.Count < 2
|
||||
? []
|
||||
:
|
||||
[
|
||||
new DuplicateGroup(Sha,
|
||||
[
|
||||
new DuplicateFrame(Sha, Guid.CreateVersion7(), sequences[0].Id, 0, sequences[0].Folder + "/IMG_0001.CR2"),
|
||||
new DuplicateFrame(Sha, Guid.CreateVersion7(), sequences[1].Id, 12, sequences[1].Folder + "/IMG_0001.CR2"),
|
||||
]),
|
||||
];
|
||||
|
||||
/// <summary>Two photos missing from a sidecar, a row whose sidecar is gone and a folder not indexed yet.</summary>
|
||||
public static OrphanReport Orphans(IReadOnlyList<SequenceLocation> sequences) =>
|
||||
sequences.Count < 4
|
||||
? new OrphanReport([], [], [])
|
||||
: new OrphanReport([new SequenceOrphans(sequences[2].Folder, ["IMG_0412.CR2", "IMG_0413.CR2"], [])], [sequences[3]], ["2024/2024-12-31 Unsorted"]);
|
||||
|
||||
/// <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)
|
||||
{
|
||||
var stamp = new FileStamp(4_096, DateTime.UtcNow);
|
||||
return [.. sequences.Select((s, i) => new SequenceFolder(s.Folder, i < sequences.Count - 2 ? stamp : null, stamp))];
|
||||
}
|
||||
}
|
||||
@@ -1,9 +1,11 @@
|
||||
using System.IO;
|
||||
using System.Net;
|
||||
using Titano.App.About;
|
||||
using Titano.App.Import;
|
||||
using Titano.App.Infrastructure;
|
||||
using Titano.App.Server;
|
||||
using Titano.App.Settings;
|
||||
using Titano.Core.Archiving;
|
||||
using Titano.Core.Codecs.Jpeg;
|
||||
using Titano.Core.Imaging;
|
||||
using Titano.Core.Model;
|
||||
@@ -38,6 +40,8 @@ public sealed class SampleData
|
||||
services.Server = new ServerSession(settings, services.SaveSettings, new SampleServerApiFactory(), new PlainTokenProtector());
|
||||
services.Encoders = new SampleEncoders();
|
||||
services.CheckForUpdateAsync = _ => Task.FromResult<ReleaseInfo?>(null);
|
||||
services.Devices.Dispose();
|
||||
services.Devices = new SampleDeviceMonitor();
|
||||
return new SampleData(services);
|
||||
}
|
||||
|
||||
@@ -57,6 +61,9 @@ public sealed class SampleData
|
||||
Directory.CreateDirectory(root);
|
||||
var archive = new Archive { Id = Guid.CreateVersion7(), Name = "TitanoArchive", RootPath = root, Created = DateTimeOffset.UtcNow.AddYears(-2) };
|
||||
await db.Archives.UpsertAsync(archive);
|
||||
var paths = new ArchivePaths(root);
|
||||
Directory.CreateDirectory(paths.MetaDirectory);
|
||||
ManifestStore.WriteArchive(paths.ManifestPath, new ArchiveManifest { Id = archive.Id, Name = archive.Name, Created = archive.Created });
|
||||
|
||||
var sequences = Sequences(archive.Id).ToList();
|
||||
foreach (var (sequence, colours, raw) in sequences)
|
||||
@@ -68,6 +75,7 @@ public sealed class SampleData
|
||||
await db.Sequences.SetTagsAsync(sequences[9].Sequence.Id, ["holy grail"]);
|
||||
|
||||
foreach (var job in Jobs(sequences.Select(s => s.Sequence).ToList(), archive.Id)) await db.Jobs.EnqueueAsync(job);
|
||||
await SampleCards.InsertAsync(db, (SampleDeviceMonitor)_services.Devices, _services.Environment.DataDirectory);
|
||||
|
||||
settings.LastArchivePath = @"D:\TitanoArchive";
|
||||
settings.ServerUrl = "https://nas.local:8443";
|
||||
|
||||
@@ -36,12 +36,12 @@ public sealed record ImportSource(string Key, SourceKind Kind, CardDevice? Devic
|
||||
: Device is { Label.Length: > 0 } labelled ? labelled.Label
|
||||
: Device?.Root ?? FolderPath ?? Card?.Label ?? string.Empty;
|
||||
|
||||
/// <summary>"E:\ · 128 GB · 96.2 GB used", "no DCIM · 1.8 TB free", "Canon EOS R5 · not inserted".</summary>
|
||||
/// <summary>"128 GB · 96.2 GB used", "no DCIM · 1.8 TB free", "Canon EOS R5 · not inserted".</summary>
|
||||
public string Subtitle => Kind switch
|
||||
{
|
||||
SourceKind.Folder => FolderPath ?? string.Empty,
|
||||
SourceKind.Drive => Loc.L("Import.Device.NoDcim", Device!.Root, Formatting.Bytes(Device.FreeBytes)),
|
||||
_ when Device is not null => Loc.L("Import.Device.Card", Device.Root, Formatting.Bytes(Device.TotalBytes), Formatting.Bytes(Device.UsedBytes)),
|
||||
SourceKind.Drive => Loc.L("Import.Device.NoDcim", Formatting.Bytes(Device!.FreeBytes)),
|
||||
_ when Device is not null => Loc.L("Import.Device.Card", Formatting.Bytes(Device.TotalBytes), Formatting.Bytes(Device.UsedBytes)),
|
||||
_ => Loc.L("Import.Device.Away", CameraText(Card) is { Length: > 0 } camera ? camera : Formatting.Bytes(Card!.Capacity)),
|
||||
};
|
||||
|
||||
@@ -61,7 +61,6 @@ public sealed record ImportSource(string Key, SourceKind Kind, CardDevice? Devic
|
||||
get
|
||||
{
|
||||
var parts = new List<string>();
|
||||
if (Device is not null) parts.Add(Device.Root);
|
||||
var capacity = Device?.TotalBytes ?? Card?.Capacity ?? 0;
|
||||
if (capacity > 0) parts.Add(Formatting.Bytes(capacity));
|
||||
var serial = Device?.SerialNumber ?? Card?.VolumeSerial;
|
||||
|
||||
@@ -35,12 +35,17 @@ public sealed class UnindexedDestination(ImportDestinationKind kind, string root
|
||||
/// <summary>The folder, or the local staging folder of server uploads.</summary>
|
||||
public string Root { get; } = root;
|
||||
|
||||
public Task<ImportPlan> PlanAsync(string sourceRoot, ImportOptions options, Guid? cardId, IProgress<int>? progress, CancellationToken cancellationToken)
|
||||
/// <summary>Room left on the server (the user's quota); null when unlimited or unknown. A folder reports its volume's space.</summary>
|
||||
public long? ServerSpace { get; init; }
|
||||
|
||||
public async Task<ImportPlan> PlanAsync(string sourceRoot, ImportOptions options, Guid? cardId, IProgress<int>? progress, CancellationToken cancellationToken)
|
||||
{
|
||||
var problems = new List<ImportProblem>();
|
||||
var files = CardScanner.Find(sourceRoot, options.IncludeSubfolders, cancellationToken);
|
||||
var photos = CardScanner.ReadMetadata(sourceRoot, files, problems, progress, cancellationToken);
|
||||
return ImportPlanner.PlanAsync(sourceRoot, Root, photos, problems, options, NoIndex.Instance, cancellationToken);
|
||||
var plan = await ImportPlanner.PlanAsync(sourceRoot, Root, photos, problems, options, NoIndex.Instance, cancellationToken).ConfigureAwait(false);
|
||||
// Staging only ever holds one batch; the space that matters for a server import is the quota.
|
||||
return Kind == ImportDestinationKind.Server ? plan with { AvailableBytes = ServerSpace } : plan;
|
||||
}
|
||||
|
||||
/// <summary>No history and no index; folders are reused so a repeated import lands next to the first one.</summary>
|
||||
|
||||
@@ -0,0 +1,249 @@
|
||||
using System.IO;
|
||||
using System.Windows.Input;
|
||||
using Titano.App.Infrastructure;
|
||||
using Titano.App.Shell;
|
||||
using Titano.Core.Diagnostics;
|
||||
using Titano.Core.Import;
|
||||
using Titano.Core.Localization;
|
||||
using Titano.Core.Model;
|
||||
using Titano.Data;
|
||||
using Titano.Data.Archiving;
|
||||
using Titano.Ui.Controls;
|
||||
using Titano.Ui.Mvvm;
|
||||
|
||||
namespace Titano.App.Import;
|
||||
|
||||
/// <summary>
|
||||
/// The end of an import (BRIEF §12.4, §13): the verification result and the after-import actions — check the card
|
||||
/// (dry run: every card file and its archive copy hashed again), delete the verified photos or format the card
|
||||
/// (each after a confirmation, never by default), eject, open in the Library. <see cref="CardActions"/> decides
|
||||
/// what is allowed and why not.
|
||||
/// </summary>
|
||||
public sealed class ImportResultViewModel : LocalizedViewModel
|
||||
{
|
||||
private const int ListedFailures = 100;
|
||||
|
||||
private readonly ShellViewModel _shell;
|
||||
private readonly ImportPlan _plan;
|
||||
private readonly ImportChoices _choices;
|
||||
private readonly Core.Model.Archive? _archive;
|
||||
private readonly MediaCard? _card;
|
||||
private CardDevice? _device;
|
||||
private CardActions _actions;
|
||||
private bool _isBusy;
|
||||
private string? _busyText;
|
||||
|
||||
public ImportResultViewModel(ShellViewModel shell, ImportPlan plan, ImportOutcome outcome, ImportChoices choices, Core.Model.Archive? archive,
|
||||
MediaCard? card, CardDevice? device)
|
||||
{
|
||||
_shell = shell;
|
||||
_plan = plan;
|
||||
_choices = choices;
|
||||
_archive = archive;
|
||||
_card = card;
|
||||
_device = device;
|
||||
Outcome = outcome;
|
||||
_actions = new CardActions(choices.Destination, card is not null, device is not null, device?.IsRemovable == true, outcome, null,
|
||||
plan.FileCount + plan.Problems.Count);
|
||||
Failures = [.. outcome.Failures.Take(ListedFailures).Select(f => Loc.L("Import.Result.Failure", f.SourcePath, f.Message))];
|
||||
CheckCommand = new AsyncRelayCommand(CheckAsync, () => _actions.CanCheck && !_isBusy);
|
||||
DeleteCommand = new AsyncRelayCommand(DeleteAsync, () => _actions.CanDelete && !_isBusy);
|
||||
FormatCommand = new RelayCommand(Format, () => _actions.CanFormat && !_isBusy);
|
||||
EjectCommand = new AsyncRelayCommand(EjectAsync, () => _actions.CanEject && !_isBusy);
|
||||
OpenLibraryCommand = new AsyncRelayCommand(async () =>
|
||||
{
|
||||
await _shell.Library.RefreshAsync();
|
||||
_shell.Navigate(SectionKey.Library);
|
||||
});
|
||||
}
|
||||
|
||||
public ImportOutcome Outcome { get; }
|
||||
|
||||
public CardActions Actions
|
||||
{
|
||||
get => _actions;
|
||||
private set
|
||||
{
|
||||
_actions = value;
|
||||
OnAllPropertiesChanged();
|
||||
CommandManager.InvalidateRequerySuggested();
|
||||
}
|
||||
}
|
||||
|
||||
public ICommand CheckCommand { get; }
|
||||
public ICommand DeleteCommand { get; }
|
||||
public ICommand FormatCommand { get; }
|
||||
public ICommand EjectCommand { get; }
|
||||
public ICommand OpenLibraryCommand { get; }
|
||||
|
||||
/// <summary>"4,812 copied and verified", "4,800 copied · 12 failed".</summary>
|
||||
public string ResultText => Outcome.IsComplete
|
||||
? Loc.Plural(Outcome.Verified ? "Import.Result.Verified" : "Import.Result.Copied", Outcome.Imported)
|
||||
: Loc.L("Import.Result.Partial", Formatting.Count(Outcome.Imported), Formatting.Count(Outcome.Failures.Count));
|
||||
|
||||
/// <summary>"12 skipped · 3 already there", or empty.</summary>
|
||||
public string DetailText => string.Join(" · ", new[]
|
||||
{
|
||||
Outcome.Skipped > 0 ? Loc.Plural("Import.Result.Skipped", Outcome.Skipped) : string.Empty,
|
||||
Outcome.Duplicates > 0 ? Loc.Plural("Import.Result.AlreadyThere", Outcome.Duplicates) : string.Empty,
|
||||
}.Where(t => t.Length > 0));
|
||||
|
||||
public bool IsComplete => Outcome.IsComplete;
|
||||
|
||||
public StatusKind ResultKind => Outcome.IsComplete ? StatusKind.Done : StatusKind.Warning;
|
||||
|
||||
public IReadOnlyList<string> Failures { get; }
|
||||
|
||||
public bool HasFailures => Failures.Count > 0;
|
||||
|
||||
/// <summary>The profile chose "Delete imported": the dry run and the delete button are offered.</summary>
|
||||
public bool OffersDelete => _choices.AfterImport == AfterImport.DeleteImported;
|
||||
|
||||
/// <summary>The profile chose "Format card".</summary>
|
||||
public bool OffersFormat => _choices.AfterImport == AfterImport.FormatCard;
|
||||
|
||||
public bool OffersCheck => OffersDelete || OffersFormat;
|
||||
|
||||
public bool IsBusy
|
||||
{
|
||||
get => _isBusy;
|
||||
private set
|
||||
{
|
||||
if (Set(ref _isBusy, value)) CommandManager.InvalidateRequerySuggested();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>"Checking 1,240 photos" while the dry run hashes.</summary>
|
||||
public string? BusyText { get => _busyText; private set => Set(ref _busyText, value); }
|
||||
|
||||
public string EraseText => _actions.EraseText;
|
||||
|
||||
public IReadOnlyList<string> KeptReasons => _actions.KeptReasons;
|
||||
|
||||
public string CheckToolTip => _actions.CheckBlocker ?? Loc.L("Tooltips.Import.Check");
|
||||
|
||||
/// <summary>"Delete 4,812 photos…".</summary>
|
||||
public string DeleteText => Loc.Plural("Import.Erase.Delete", _actions.DeleteCount);
|
||||
|
||||
public string DeleteToolTip => _actions.DeleteBlocker ?? Loc.L("Tooltips.Import.Delete");
|
||||
|
||||
public string FormatToolTip => _actions.FormatBlocker ?? Loc.L("Tooltips.Import.Format");
|
||||
|
||||
public string EjectToolTip => _actions.CanEject ? Loc.L("Tooltips.Import.Eject") : Loc.L("Import.Blocked.NotRemovable");
|
||||
|
||||
/// <summary>The card left or came back (Devices list); actions follow.</summary>
|
||||
public void SetDevice(CardDevice? device)
|
||||
{
|
||||
_device = device;
|
||||
Actions = _actions with { IsInserted = device is not null, IsRemovable = device?.IsRemovable == true };
|
||||
}
|
||||
|
||||
/// <summary>Shows a dry run computed elsewhere (capture, tests).</summary>
|
||||
public void ShowErase(ErasePlan erase, int cardPhotos) => Actions = _actions with { Erase = erase, CardPhotos = cardPhotos };
|
||||
|
||||
/// <summary>Ejects when the profile asks for it and nothing more is to be done on the card.</summary>
|
||||
public async Task AutoEjectAsync()
|
||||
{
|
||||
if (_choices.Eject && _choices.AfterImport == AfterImport.Keep && Outcome.IsComplete && _actions.CanEject) await EjectAsync();
|
||||
}
|
||||
|
||||
private async Task CheckAsync()
|
||||
{
|
||||
if (_shell.Services.Archives is not { } archives || _archive is null || _card is null || _device is null) return;
|
||||
var root = _device.Root;
|
||||
IsBusy = true;
|
||||
try
|
||||
{
|
||||
var progress = new Progress<int>(n => BusyText = Loc.Plural("Import.Erase.Checking", n));
|
||||
var (erase, photos) = await Task.Run(async () =>
|
||||
{
|
||||
var plan = await archives.PlanCardEraseAsync(_archive.Id, _card.Id, root, progress).ConfigureAwait(false);
|
||||
return (plan, CardScanner.Find(root, includeSubfolders: true).Count);
|
||||
});
|
||||
ShowErase(erase, photos);
|
||||
}
|
||||
catch (Exception ex) when (ex is IOException or UnauthorizedAccessException or DatabaseException)
|
||||
{
|
||||
Log.Warning("import", "Card check failed", ex);
|
||||
_shell.Notify(Loc.L("Import.Toast.CheckFailed"), ex.Message);
|
||||
}
|
||||
finally
|
||||
{
|
||||
BusyText = null;
|
||||
IsBusy = false;
|
||||
}
|
||||
}
|
||||
|
||||
private async Task DeleteAsync()
|
||||
{
|
||||
if (_actions.Erase is not { } erase) return;
|
||||
var confirmed = _shell.Services.Dialogs.Confirm(new ConfirmRequest
|
||||
{
|
||||
Heading = Loc.Plural("Import.Confirm.DeleteHeading", _actions.DeleteCount),
|
||||
Message = Loc.L("Import.Confirm.DeleteMessage"),
|
||||
SafeText = Loc.L("Import.Confirm.Keep"),
|
||||
SafeToolTip = Loc.L("Tooltips.Import.KeepCard"),
|
||||
ActionText = Loc.L("Import.Confirm.Delete"),
|
||||
ActionToolTip = Loc.L("Tooltips.Import.Delete"),
|
||||
IsDestructive = true,
|
||||
});
|
||||
if (!confirmed) return;
|
||||
IsBusy = true;
|
||||
try
|
||||
{
|
||||
var result = await Task.Run(() => CardEraser.Execute(erase));
|
||||
_shell.Notify(Loc.Plural("Import.Toast.Deleted", result.Deleted),
|
||||
result.Kept.Count > 0 ? Loc.Plural("Import.Erase.Kept", result.Kept.Count) : null);
|
||||
// The card changed: a new dry run is needed before anything else is deleted.
|
||||
Actions = _actions with { Erase = null };
|
||||
}
|
||||
catch (Exception ex) when (ex is IOException or UnauthorizedAccessException)
|
||||
{
|
||||
Log.Warning("import", "Deleting imported photos failed", ex);
|
||||
_shell.Notify(Loc.L("Import.Toast.DeleteFailed"), ex.Message);
|
||||
}
|
||||
finally
|
||||
{
|
||||
IsBusy = false;
|
||||
}
|
||||
if (_choices.Eject && _actions.CanEject) await EjectAsync();
|
||||
}
|
||||
|
||||
private void Format()
|
||||
{
|
||||
if (_device is not { } device) return;
|
||||
var name = _card?.Nickname ?? device.Label;
|
||||
var confirmed = _shell.Services.Dialogs.Confirm(new ConfirmRequest
|
||||
{
|
||||
Heading = Loc.L("Import.Confirm.FormatHeading", name),
|
||||
Message = Loc.Plural("Import.Confirm.FormatMessage", _actions.DeleteCount),
|
||||
SafeText = Loc.L("Import.Confirm.Keep"),
|
||||
SafeToolTip = Loc.L("Tooltips.Import.KeepCard"),
|
||||
ActionText = Loc.L("Import.Confirm.Format"),
|
||||
ActionToolTip = Loc.L("Tooltips.Import.FormatConfirm"),
|
||||
IsDestructive = true,
|
||||
TypedConfirmation = name,
|
||||
TypedPrompt = Loc.L("Import.Confirm.TypeName"),
|
||||
});
|
||||
if (!confirmed) return;
|
||||
var outcome = _shell.Services.Devices.Format(device);
|
||||
if (outcome == FormatOutcome.Formatted) Actions = _actions with { Erase = null };
|
||||
if (outcome != FormatOutcome.Cancelled) _shell.Notify(Loc.L("Import.Toast.Format." + outcome, name));
|
||||
}
|
||||
|
||||
private async Task EjectAsync()
|
||||
{
|
||||
if (_device is not { } device) return;
|
||||
IsBusy = true;
|
||||
try
|
||||
{
|
||||
var outcome = await Task.Run(() => _shell.Services.Devices.Eject(device));
|
||||
_shell.Notify(Loc.L("Import.Toast.Eject." + outcome, _card?.Nickname ?? device.Label));
|
||||
if (outcome == EjectOutcome.Ejected) SetDevice(null);
|
||||
}
|
||||
finally
|
||||
{
|
||||
IsBusy = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,49 @@
|
||||
using Titano.App.Shell;
|
||||
|
||||
namespace Titano.App.Import;
|
||||
|
||||
/// <summary>
|
||||
/// The Import states that <c>--capture</c> renders (<c>import-<state>-<theme>.png</c>) and the screen smoke
|
||||
/// tests check, on the card of <see cref="SampleCards"/>: the card just inserted with its plan and sessions (and the
|
||||
/// insertion toast), "Show plan", and the verification result with the after-import actions.
|
||||
/// </summary>
|
||||
public static class ImportScenes
|
||||
{
|
||||
public static readonly IReadOnlyList<string> States = ["plan", "showplan", "done"];
|
||||
|
||||
public static async Task ShowAsync(ShellViewModel shell, string state)
|
||||
{
|
||||
var import = shell.Import;
|
||||
shell.Navigate(SectionKey.Import);
|
||||
switch (state)
|
||||
{
|
||||
case "plan":
|
||||
var card = SampleCards.Card(shell.Services.Environment.DataDirectory);
|
||||
if (import.Result is not null) import.NewImportCommand.Execute(null);
|
||||
import.CloseDetailsCommand.Execute(null);
|
||||
await import.RefreshSourcesAsync();
|
||||
import.SelectSource(card.Identity);
|
||||
import.KeepCard = true;
|
||||
await import.WaitForPlanAsync();
|
||||
if (import.Sessions.Count > 0)
|
||||
{
|
||||
var sunset = import.Sessions[^1].Title;
|
||||
sunset.Text = "Harbour sunset";
|
||||
sunset.Commit();
|
||||
}
|
||||
await import.CardInsertedAsync(card);
|
||||
break;
|
||||
case "showplan":
|
||||
import.ShowPlanCommand.Execute(null);
|
||||
break;
|
||||
case "done":
|
||||
import.CloseDetailsCommand.Execute(null);
|
||||
import.DeleteImported = true;
|
||||
var plan = import.Plan ?? throw new InvalidOperationException("The sample card has no plan.");
|
||||
import.ShowResult(SampleCards.Outcome(plan)).ShowErase(SampleCards.Erase(plan), plan.FileCount);
|
||||
break;
|
||||
default:
|
||||
throw new ArgumentOutOfRangeException(nameof(state), state, "Unknown Import state.");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
using Titano.App.Settings;
|
||||
using Titano.Core.Localization;
|
||||
using Titano.Ui.Mvvm;
|
||||
|
||||
namespace Titano.App.Import;
|
||||
|
||||
/// <summary>A session of the plan with its editable title (the sequence title; empty keeps the folder name).</summary>
|
||||
public sealed class ImportSessionRowViewModel : ObservableObject
|
||||
{
|
||||
public ImportSessionRowViewModel(PlanSessionRow row, Action<string, string> titleChanged)
|
||||
{
|
||||
Row = row;
|
||||
Title = new EditableField(row.Title ?? string.Empty, _ => null, text => titleChanged(row.SessionKey, text), () => Loc.L("Tooltips.Import.SessionTitle"));
|
||||
}
|
||||
|
||||
public PlanSessionRow Row { get; }
|
||||
|
||||
public EditableField Title { get; }
|
||||
|
||||
public string Placeholder => Row.DefaultTitle;
|
||||
}
|
||||
@@ -0,0 +1,173 @@
|
||||
using System.IO;
|
||||
using Titano.Core.Archiving;
|
||||
using Titano.Core.Codecs.Jpeg;
|
||||
using Titano.Core.Imaging;
|
||||
using Titano.Core.Import;
|
||||
using Titano.Core.Metadata;
|
||||
using Titano.Core.Model;
|
||||
using Titano.Data;
|
||||
using Titano.Data.Repositories;
|
||||
|
||||
namespace Titano.App.Import;
|
||||
|
||||
/// <summary>
|
||||
/// Capture and smoke-test data ONLY (<c>--capture</c>, never the user's data): a simulated Canon EOS R5 card in the
|
||||
/// capture folder — a night, a dawn and a sunset session of small JPEGs with Exif — remembered as "EOS R5 · card A",
|
||||
/// a second remembered card that is not inserted, a USB drive without DCIM, and the import result shown afterwards.
|
||||
/// </summary>
|
||||
public static class SampleCards
|
||||
{
|
||||
private const uint Serial = 0x3F2A9C11;
|
||||
private static readonly DateTimeOffset LastImport = new(2026, 9, 21, 19, 40, 0, TimeSpan.Zero);
|
||||
|
||||
/// <summary>Night, dawn and sunset: start, photos, seconds between photos.</summary>
|
||||
private static readonly (DateTime Start, int Photos, int Interval)[] Sessions =
|
||||
[
|
||||
(new DateTime(2026, 9, 26, 21, 10, 0), 10, 120),
|
||||
(new DateTime(2026, 9, 27, 5, 41, 0), 16, 4),
|
||||
(new DateTime(2026, 9, 28, 18, 2, 11), 24, 2),
|
||||
];
|
||||
|
||||
/// <summary>The inserted card: its root is a folder of the capture environment.</summary>
|
||||
public static CardDevice Card(string dataDirectory) =>
|
||||
new(Path.Combine(dataDirectory, "card") + Path.DirectorySeparatorChar, "EOS_DIGITAL", Serial, 127_865_454_592, 31_665_454_592, IsRemovable: true,
|
||||
HasDcim: true);
|
||||
|
||||
/// <summary>Writes the card's photos, remembers both cards (the inserted one with its last import) and inserts the card and a USB drive.</summary>
|
||||
public static async Task InsertAsync(TitanoDatabase db, SampleDeviceMonitor devices, string dataDirectory)
|
||||
{
|
||||
var card = Card(dataDirectory);
|
||||
WritePhotos(card.Root);
|
||||
var known = new MediaCard
|
||||
{
|
||||
Id = Guid.CreateVersion7(),
|
||||
Identity = card.Identity,
|
||||
VolumeSerial = card.SerialNumber,
|
||||
Label = card.Label,
|
||||
Capacity = card.TotalBytes,
|
||||
Nickname = "EOS R5 · card A",
|
||||
CameraMake = "Canon",
|
||||
CameraModel = "Canon EOS R5",
|
||||
CameraSerial = "0431",
|
||||
FirstSeen = LastImport.AddMonths(-7),
|
||||
LastSeen = DateTimeOffset.UtcNow,
|
||||
};
|
||||
await db.MediaCards.UpsertAsync(known);
|
||||
await db.MediaCards.RecordImportsAsync([new ImportRecord(known.Id, new ImportKey("DCIM/100CANON/IMG_9001.CR2", 24_000_000, LastImport), null, null, null,
|
||||
LastImport)]);
|
||||
await db.MediaCards.UpsertAsync(new MediaCard
|
||||
{
|
||||
Id = Guid.CreateVersion7(),
|
||||
Identity = "7C1D0E42-GOPRO-63864569856",
|
||||
VolumeSerial = 0x7C1D0E42,
|
||||
Label = "GOPRO",
|
||||
Capacity = 63_864_569_856,
|
||||
Nickname = "GoPro 12",
|
||||
CameraMake = "GoPro",
|
||||
CameraModel = "HERO12 Black",
|
||||
FirstSeen = LastImport.AddMonths(-3),
|
||||
LastSeen = LastImport.AddDays(-6),
|
||||
});
|
||||
devices.Insert(card);
|
||||
devices.Insert(new CardDevice(@"F:\", "USB DRIVE", 0x51E02B44, 2_000_398_934_016, 1_800_000_000_000, IsRemovable: true, HasDcim: false));
|
||||
}
|
||||
|
||||
/// <summary>What the import of <paramref name="plan"/> reports: every planned copy committed and read back.</summary>
|
||||
public static ImportOutcome Outcome(ImportPlan plan) => new(plan.CopyCount, 0, plan.FileCount - plan.CopyCount, [], Verified: true);
|
||||
|
||||
/// <summary>The dry run of "Delete imported" after that import: every copy matches except the last photo, touched since.</summary>
|
||||
public static ErasePlan Erase(ImportPlan plan)
|
||||
{
|
||||
var copied = plan.Sessions.SelectMany(s => s.Items.Where(i => i.Action == ImportAction.Copy).Select(i => (Session: s, Item: i))).ToList();
|
||||
return new ErasePlan(plan.SourceRoot,
|
||||
[
|
||||
.. copied.Select((c, n) => new EraseItem(
|
||||
new EraseCandidate(c.Item.SourcePath, c.Item.Size, string.Empty,
|
||||
Path.Combine(plan.DestinationRoot, c.Session.Folder, ArchiveLayout.OriginalsFolder, c.Item.FileName)),
|
||||
n == copied.Count - 1 ? EraseVerdict.SourceChanged : EraseVerdict.Delete, c.Item.ModifiedUtc)),
|
||||
]);
|
||||
}
|
||||
|
||||
private static void WritePhotos(string root)
|
||||
{
|
||||
var folder = Path.Combine(root, "DCIM", "100CANON");
|
||||
if (Directory.Exists(folder)) return;
|
||||
Directory.CreateDirectory(folder);
|
||||
var n = 1;
|
||||
foreach (var (start, photos, interval) in Sessions)
|
||||
{
|
||||
for (var i = 0; i < photos; i++, n++)
|
||||
{
|
||||
var captured = start.AddSeconds(i * interval);
|
||||
var path = Path.Combine(folder, $"IMG_{n:0000}.JPG");
|
||||
File.WriteAllBytes(path, Photo(captured, n));
|
||||
File.SetLastWriteTime(path, captured);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>A small sky gradient with grain (distinct bytes per photo) and the camera's Exif.</summary>
|
||||
private static byte[] Photo(DateTime captured, int seed)
|
||||
{
|
||||
const int Width = 96, Height = 64;
|
||||
using var image = new ImageBuffer(Width, Height, 3, clear: false);
|
||||
var random = new Random(seed);
|
||||
var dusk = captured.Hour is >= 18 or < 6 ? 0.15f : 0.6f;
|
||||
for (var y = 0; y < Height; y++)
|
||||
{
|
||||
for (var x = 0; x < Width; x++)
|
||||
{
|
||||
var sky = dusk * (1 - y / (float)Height) + 0.05f;
|
||||
var grain = (float)random.NextDouble() * 0.04f;
|
||||
image.Plane(0)[y * Width + x] = sky * 1.2f + grain;
|
||||
image.Plane(1)[y * Width + x] = sky * 0.8f + grain;
|
||||
image.Plane(2)[y * Width + x] = sky * 0.6f + grain;
|
||||
}
|
||||
}
|
||||
var exif = ExifWriter.BuildJpegApp1(new FrameMetadata
|
||||
{
|
||||
Make = "Canon",
|
||||
Model = "Canon EOS R5",
|
||||
BodySerial = "0431",
|
||||
CapturedAt = captured,
|
||||
Iso = 100,
|
||||
ExposureTime = 1.0 / 250,
|
||||
FNumber = 8,
|
||||
});
|
||||
return JpegEncoder.Encode(image, new JpegEncodeOptions { Quality = 85, App1Segments = [exif[4..]] });
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>The capture's device monitor: lists the sample volumes; it raises no events and never ejects or formats.</summary>
|
||||
public sealed class SampleDeviceMonitor : IDeviceMonitor
|
||||
{
|
||||
private readonly List<CardDevice> _devices = [];
|
||||
|
||||
public event Action<CardDevice>? Arrived
|
||||
{
|
||||
add { }
|
||||
remove { }
|
||||
}
|
||||
|
||||
public event Action<CardDevice>? Removed
|
||||
{
|
||||
add { }
|
||||
remove { }
|
||||
}
|
||||
|
||||
public IReadOnlyList<CardDevice> Devices => [.. _devices];
|
||||
|
||||
public void Insert(CardDevice device) => _devices.Add(device);
|
||||
|
||||
public void Start()
|
||||
{
|
||||
}
|
||||
|
||||
public EjectOutcome Eject(CardDevice device) => EjectOutcome.Failed;
|
||||
|
||||
public FormatOutcome Format(CardDevice device) => FormatOutcome.Cancelled;
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
}
|
||||
}
|
||||
@@ -3,6 +3,7 @@ using System.IO;
|
||||
using System.Net.Http;
|
||||
using System.Reflection;
|
||||
using Titano.App.About;
|
||||
using Titano.App.Import;
|
||||
using Titano.App.Jobs;
|
||||
using Titano.App.Library;
|
||||
using Titano.App.Server;
|
||||
@@ -86,6 +87,9 @@ public sealed class AppServices : IAsyncDisposable
|
||||
|
||||
public IEncoderInventory Encoders { get; set; }
|
||||
|
||||
/// <summary>Card detection, eject and format (BRIEF §13); started with the index, replaced by a fake in capture.</summary>
|
||||
public IDeviceMonitor Devices { get; set; } = new WindowsDeviceMonitor();
|
||||
|
||||
/// <summary>Latest public release (GitHub Releases API of the releases repository, BRIEF §18).</summary>
|
||||
public Func<CancellationToken, Task<ReleaseInfo?>> CheckForUpdateAsync { get; set; }
|
||||
|
||||
@@ -155,6 +159,7 @@ public sealed class AppServices : IAsyncDisposable
|
||||
}
|
||||
await StartJobsAsync(Database, startEngine: true, ct);
|
||||
Thumbnails = new ThumbnailService(Database, Settings.ThumbnailMemoryItems);
|
||||
Devices.Start();
|
||||
if (Settings.LastArchivePath is { Length: > 0 } root) _polling = PollAsync(root, _stopping.Token);
|
||||
}
|
||||
|
||||
@@ -177,6 +182,7 @@ public sealed class AppServices : IAsyncDisposable
|
||||
(Jobs as IDisposable)?.Dispose();
|
||||
if (Engine is not null) await Engine.DisposeAsync();
|
||||
Thumbnails?.Dispose();
|
||||
Devices.Dispose();
|
||||
Server.Dispose();
|
||||
if (Database is not null) await Database.DisposeAsync();
|
||||
}
|
||||
|
||||
@@ -17,6 +17,12 @@ public sealed record ConfirmRequest
|
||||
|
||||
/// <summary>Warning-outlined action (never a primary) for data-destroying choices.</summary>
|
||||
public bool IsDestructive { get; init; }
|
||||
|
||||
/// <summary>Text the user must type before the action enables (formatting a card: its name); null asks no typing.</summary>
|
||||
public string? TypedConfirmation { get; init; }
|
||||
|
||||
/// <summary>Label of the typing field ("Type the card name to confirm").</summary>
|
||||
public string? TypedPrompt { get; init; }
|
||||
}
|
||||
|
||||
/// <summary>Modal questions and OS pickers the view models ask for (BRIEF §12.1: modals only for confirmations and login).</summary>
|
||||
|
||||
@@ -0,0 +1,74 @@
|
||||
using System.ComponentModel;
|
||||
using System.Windows;
|
||||
using System.Windows.Interop;
|
||||
using Titano.App.Import;
|
||||
using Titano.Core.Diagnostics;
|
||||
using Titano.Core.Windows.Devices;
|
||||
|
||||
namespace Titano.App.Infrastructure;
|
||||
|
||||
/// <summary>
|
||||
/// Card detection on this PC (BRIEF §13): <see cref="RemovableVolumeWatcher"/> (WM_DEVICECHANGE plus a 3-second poll),
|
||||
/// safe removal through <see cref="VolumeEjector"/> and formatting only through the Windows format dialog
|
||||
/// (<see cref="FormatDialog"/>, BRIEF §8.6).
|
||||
/// </summary>
|
||||
public sealed class WindowsDeviceMonitor : IDeviceMonitor
|
||||
{
|
||||
private RemovableVolumeWatcher? _watcher;
|
||||
|
||||
public event Action<CardDevice>? Arrived;
|
||||
|
||||
public event Action<CardDevice>? Removed;
|
||||
|
||||
public IReadOnlyList<CardDevice> Devices => _watcher is { } watcher ? [.. watcher.Volumes.Select(Map)] : [];
|
||||
|
||||
public void Start()
|
||||
{
|
||||
if (_watcher is not null) return;
|
||||
var watcher = new RemovableVolumeWatcher();
|
||||
watcher.VolumeArrived += (_, e) => Arrived?.Invoke(Map(e.Volume));
|
||||
watcher.VolumeRemoved += (_, e) => Removed?.Invoke(Map(e.Volume));
|
||||
try
|
||||
{
|
||||
watcher.Start();
|
||||
_watcher = watcher;
|
||||
}
|
||||
catch (Win32Exception ex)
|
||||
{
|
||||
// Without the watcher cards are still listed by "Folder…"; nothing else depends on it.
|
||||
Log.Warning("devices", "Card detection is unavailable", ex);
|
||||
watcher.Dispose();
|
||||
}
|
||||
}
|
||||
|
||||
public EjectOutcome Eject(CardDevice device) => VolumeEjector.Eject(device.Root[0]) switch
|
||||
{
|
||||
EjectResult.Ejected => EjectOutcome.Ejected,
|
||||
EjectResult.InUse => EjectOutcome.InUse,
|
||||
_ => EjectOutcome.Failed,
|
||||
};
|
||||
|
||||
public FormatOutcome Format(CardDevice device)
|
||||
{
|
||||
var owner = Application.Current?.MainWindow is { } window ? new WindowInteropHelper(window).Handle : 0;
|
||||
try
|
||||
{
|
||||
return FormatDialog.Show(owner, device.Root[0]) switch
|
||||
{
|
||||
FormatDialogResult.Formatted => FormatOutcome.Formatted,
|
||||
FormatDialogResult.Cancelled => FormatOutcome.Cancelled,
|
||||
_ => FormatOutcome.Failed,
|
||||
};
|
||||
}
|
||||
catch (Exception ex) when (ex is ArgumentException or InvalidOperationException)
|
||||
{
|
||||
Log.Warning("devices", $"The format dialog cannot open for {device.Root}", ex);
|
||||
return FormatOutcome.Failed;
|
||||
}
|
||||
}
|
||||
|
||||
public void Dispose() => _watcher?.Dispose();
|
||||
|
||||
private static CardDevice Map(VolumeInfo v) =>
|
||||
new(v.RootPath, v.Label, v.SerialNumber, v.TotalBytes, v.FreeBytes, v.DriveType == VolumeDriveType.Removable, v.HasDcim);
|
||||
}
|
||||
@@ -2,8 +2,466 @@
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:ui="clr-namespace:Titano.Ui.Controls;assembly=Titano.Ui"
|
||||
xmlns:l="clr-namespace:Titano.Ui.Localization;assembly=Titano.Ui">
|
||||
<Grid Margin="20">
|
||||
<ui:EmptyState Message="{l:Loc Archive.Empty}" />
|
||||
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:shell="clr-namespace:Titano.App.Shell">
|
||||
<UserControl.Resources>
|
||||
<Style x:Key="Text.PanelHeading" TargetType="TextBlock" BasedOn="{StaticResource Text.Section}">
|
||||
<Setter Property="FontSize" Value="13" />
|
||||
<Setter Property="VerticalAlignment" Value="Center" />
|
||||
</Style>
|
||||
<Style x:Key="Button.Bar" TargetType="Button" BasedOn="{StaticResource {x:Type Button}}">
|
||||
<Setter Property="Height" Value="30" />
|
||||
<Setter Property="Margin" Value="0,0,8,0" />
|
||||
</Style>
|
||||
<Style x:Key="Button.Tool" TargetType="Button" BasedOn="{StaticResource {x:Type Button}}">
|
||||
<Setter Property="Margin" Value="0,0,8,8" />
|
||||
</Style>
|
||||
|
||||
<!-- Dialog card (DESIGN §4: Surface, Stroke, radius 12, 24 px shadow, two buttons). -->
|
||||
<Style x:Key="Border.Dialog" TargetType="Border">
|
||||
<Setter Property="Background" Value="{DynamicResource Brush.Surface}" />
|
||||
<Setter Property="BorderBrush" Value="{DynamicResource Brush.Stroke}" />
|
||||
<Setter Property="BorderThickness" Value="1" />
|
||||
<Setter Property="CornerRadius" Value="{StaticResource Radius.Dialog}" />
|
||||
<Setter Property="Padding" Value="24,18,24,20" />
|
||||
<Setter Property="Effect" Value="{StaticResource Shadow.Popup}" />
|
||||
<Setter Property="HorizontalAlignment" Value="Center" />
|
||||
<Setter Property="VerticalAlignment" Value="Center" />
|
||||
</Style>
|
||||
|
||||
<DataTemplate DataType="{x:Type ar:RebuildDialogViewModel}">
|
||||
<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.ItemTemplate>
|
||||
<DataTemplate DataType="{x:Type ar:DialogFact}">
|
||||
<Grid Margin="0,0,0,8">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="{StaticResource Grid.LabelColumn}" />
|
||||
<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" />
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
</ItemsControl.ItemTemplate>
|
||||
</ItemsControl>
|
||||
<TextBlock Text="{Binding BusyText}" Foreground="{DynamicResource Brush.TextMuted}" 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="{l:Loc Tooltips.Archive.CloseDialog}" IsDefault="True" IsCancel="True"
|
||||
MinWidth="96" />
|
||||
<Button Style="{StaticResource Button.Primary}" Content="{l:Loc Archive.Rebuild.Start}" Command="{Binding RebuildCommand}" ToolTip="{Binding RebuildToolTip}"
|
||||
MinWidth="96" Margin="8,0,0,0" />
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
</Border>
|
||||
</DataTemplate>
|
||||
|
||||
<DataTemplate DataType="{x:Type ar:RenameDialogViewModel}">
|
||||
<Border Style="{StaticResource Border.Dialog}" Width="720" MaxHeight="560">
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="*" />
|
||||
<RowDefinition Height="Auto" />
|
||||
</Grid.RowDefinitions>
|
||||
<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="*" />
|
||||
</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}" />
|
||||
</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.PlainRow}" MinHeight="120"
|
||||
AutomationProperties.Name="{l:Loc Archive.Rename.Preview}">
|
||||
<ListBox.ItemTemplate>
|
||||
<DataTemplate DataType="{x:Type ar:RenameRow}">
|
||||
<Grid Height="30" TextElement.FontSize="12">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*" MinWidth="120" />
|
||||
<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}" />
|
||||
</Grid>
|
||||
</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="{l:Loc Tooltips.Archive.RenameApply}" MinWidth="96" Margin="8,0,0,0" />
|
||||
<Button DockPanel.Dock="Right" Content="{l:Loc Archive.Dialog.Cancel}" Command="{Binding CloseCommand}" ToolTip="{l:Loc Tooltips.Archive.CloseDialog}" IsCancel="True"
|
||||
MinWidth="96" />
|
||||
<TextBlock Text="{Binding BusyText}" Foreground="{DynamicResource Brush.TextMuted}" VerticalAlignment="Center" TextTrimming="CharacterEllipsis" />
|
||||
</DockPanel>
|
||||
</Grid>
|
||||
</Border>
|
||||
</DataTemplate>
|
||||
|
||||
<DataTemplate DataType="{x:Type ar:RetagDialogViewModel}">
|
||||
<Border Style="{StaticResource Border.Dialog}" Width="520">
|
||||
<StackPanel>
|
||||
<TextBlock Text="{Binding Heading}" Style="{StaticResource Text.Title}" />
|
||||
<Grid Margin="0,14,0,0">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="{StaticResource Grid.LabelColumn}" />
|
||||
<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}" />
|
||||
<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" />
|
||||
<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>
|
||||
<TextBlock Text="{Binding SummaryText}" Foreground="{DynamicResource Brush.TextMuted}" Margin="0,12,0,0" Typography.NumeralAlignment="Tabular" />
|
||||
<DockPanel Margin="0,18,0,0">
|
||||
<Button DockPanel.Dock="Right" Style="{StaticResource Button.Primary}" Content="{l:Loc Archive.Retag.Apply}" Command="{Binding ApplyCommand}"
|
||||
ToolTip="{l:Loc Tooltips.Archive.RetagApply}" MinWidth="96" Margin="8,0,0,0" />
|
||||
<Button DockPanel.Dock="Right" Content="{l:Loc Archive.Dialog.Cancel}" Command="{Binding CloseCommand}" ToolTip="{l:Loc Tooltips.Archive.CloseDialog}" IsCancel="True"
|
||||
MinWidth="96" />
|
||||
<TextBlock Text="{Binding BusyText}" Foreground="{DynamicResource Brush.TextMuted}" VerticalAlignment="Center" TextTrimming="CharacterEllipsis" />
|
||||
</DockPanel>
|
||||
</StackPanel>
|
||||
</Border>
|
||||
</DataTemplate>
|
||||
</UserControl.Resources>
|
||||
|
||||
<Grid>
|
||||
<Grid Margin="20,16">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="*" />
|
||||
<RowDefinition Height="Auto" />
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<!-- ===================== Toolbar ===================== -->
|
||||
<DockPanel Margin="0,0,0,6">
|
||||
<v:SegmentedControl DockPanel.Dock="Right" SelectedIndex="{Binding ViewIndex}" VerticalAlignment="Top" 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:SegmentedControl>
|
||||
<TextBlock DockPanel.Dock="Right" Text="{Binding LastScanText}" Foreground="{DynamicResource Brush.TextMuted}" VerticalAlignment="Top" Margin="0,8,14,0"
|
||||
Typography.NumeralAlignment="Tabular" ToolTip="{l:Loc Tooltips.Archive.LastScan}" />
|
||||
<ComboBox DockPanel.Dock="Left" Width="220" VerticalAlignment="Top" ItemsSource="{Binding Archives}" SelectedItem="{Binding SelectedArchive}" DisplayMemberPath="Name"
|
||||
ToolTip="{Binding ArchiveToolTip}" AutomationProperties.Name="{l:Loc Archive.Toolbar.Archive}" Margin="0,0,8,8" />
|
||||
<Border DockPanel.Dock="Left" Width="1" Height="22" Background="{DynamicResource Brush.Stroke}" Margin="4,5,12,0" VerticalAlignment="Top" />
|
||||
<WrapPanel>
|
||||
<Button Style="{StaticResource Button.Tool}" Content="{l:Loc Archive.Toolbar.Scan}" Command="{Binding ScanCommand}" ToolTip="{l:Loc Tooltips.Archive.Scan}" />
|
||||
<Button Style="{StaticResource Button.Tool}" Content="{l:Loc Archive.Toolbar.Rebuild}" Command="{Binding RebuildCommand}" ToolTip="{l:Loc Tooltips.Archive.Rebuild}" />
|
||||
<Button Style="{StaticResource Button.Tool}" Content="{l:Loc Archive.Toolbar.Verify}" Command="{Binding VerifyCommand}" ToolTip="{l:Loc Tooltips.Archive.Verify}" />
|
||||
<Button Style="{StaticResource Button.Tool}" Content="{l:Loc Archive.Toolbar.Duplicates}" Command="{Binding FindDuplicatesCommand}"
|
||||
ToolTip="{l:Loc Tooltips.Archive.Duplicates}" />
|
||||
<Button Style="{StaticResource Button.Tool}" Content="{l:Loc Archive.Toolbar.Orphans}" Command="{Binding FindOrphansCommand}" ToolTip="{l:Loc Tooltips.Archive.Orphans}" />
|
||||
<Button Style="{StaticResource Button.Tool}" Content="{l:Loc Archive.Toolbar.Adopt}" Command="{Binding AdoptCommand}" ToolTip="{l:Loc Tooltips.Archive.Adopt}" />
|
||||
<Button x:Name="MaintenanceButton" Style="{StaticResource Button.Tool}" Click="OnOpenMenu" ToolTip="{l:Loc Tooltips.Archive.Maintenance}">
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<TextBlock Text="{l:Loc Archive.Toolbar.Maintenance}" />
|
||||
<ui:Icon Glyph="{StaticResource Icon.ChevronDown}" Margin="6,0,0,0" />
|
||||
</StackPanel>
|
||||
<Button.ContextMenu>
|
||||
<ContextMenu>
|
||||
<MenuItem Header="{l:Loc Archive.Maintenance.Run}" Command="{Binding MaintenanceCommand}" ToolTip="{l:Loc Tooltips.Archive.MaintenanceRun}" />
|
||||
<MenuItem Header="{l:Loc Archive.Maintenance.DryRun}" Command="{Binding MaintenanceDryRunCommand}" ToolTip="{l:Loc Tooltips.Archive.MaintenanceDryRun}" />
|
||||
<MenuItem Header="{l:Loc Archive.Maintenance.Proxies}" Command="{Binding RebuildProxiesCommand}" ToolTip="{l:Loc Tooltips.Archive.MaintenanceProxies}" />
|
||||
<Separator />
|
||||
<MenuItem Header="{l:Loc Archive.Maintenance.Relink}" Command="{Binding RelinkCommand}" ToolTip="{l:Loc Tooltips.Archive.Relink}" />
|
||||
</ContextMenu>
|
||||
</Button.ContextMenu>
|
||||
</Button>
|
||||
</WrapPanel>
|
||||
</DockPanel>
|
||||
|
||||
<!-- ===================== Overview: tree, figures, charts ===================== -->
|
||||
<Grid Grid.Row="1" Visibility="{Binding IsOverview, Converter={StaticResource BoolToVisibility}}">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="0.34*" MinWidth="220" MaxWidth="320" />
|
||||
<ColumnDefinition Width="14" />
|
||||
<ColumnDefinition Width="*" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Border Style="{StaticResource Border.Panel}" Padding="6,8">
|
||||
<ListBox x:Name="Tree" ItemsSource="{Binding TreeRows}" SelectionMode="Extended" SelectionChanged="OnTreeSelectionChanged"
|
||||
AutomationProperties.Name="{l:Loc Archive.Tree.Name}">
|
||||
<ListBox.ItemContainerStyle>
|
||||
<Style TargetType="ListBoxItem" BasedOn="{StaticResource {x:Type ListBoxItem}}">
|
||||
<Setter Property="MinHeight" Value="32" />
|
||||
<Setter Property="Padding" Value="6,0" />
|
||||
<Setter Property="ToolTip" Value="{Binding Detail}" />
|
||||
</Style>
|
||||
</ListBox.ItemContainerStyle>
|
||||
<ListBox.ItemTemplate>
|
||||
<DataTemplate DataType="{x:Type ar:ArchiveTreeRowViewModel}">
|
||||
<Grid Margin="{Binding IndentMargin}">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="24" />
|
||||
<ColumnDefinition Width="*" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Button x:Name="Toggle" Style="{StaticResource Button.IconSubtle}" Width="22" Height="22" MinWidth="22" ui:ButtonIcon.Glyph="{StaticResource Icon.ChevronRight}"
|
||||
Command="{Binding ToggleCommand}" ToolTip="{Binding ToggleToolTip}" AutomationProperties.Name="{Binding ToggleToolTip}" Visibility="Hidden" />
|
||||
<TextBlock x:Name="Title" Grid.Column="1" Text="{Binding Title}" TextTrimming="CharacterEllipsis" VerticalAlignment="Center" />
|
||||
<TextBlock x:Name="Detail" Grid.Column="2" Text="{Binding Detail}" Style="{StaticResource Text.Secondary}" VerticalAlignment="Center" Margin="8,0,0,0"
|
||||
Visibility="Collapsed" Typography.NumeralAlignment="Tabular" />
|
||||
<ui:StatusGlyph x:Name="State" Grid.Column="2" Kind="{Binding AvailabilityKind}" Text="{Binding AvailabilityText}" VerticalAlignment="Center"
|
||||
Margin="8,0,0,0" ToolTip="{Binding AvailabilityToolTip}" Visibility="Collapsed" />
|
||||
</Grid>
|
||||
<DataTemplate.Triggers>
|
||||
<DataTrigger Binding="{Binding HasChildren}" Value="True">
|
||||
<Setter TargetName="Toggle" Property="Visibility" Value="Visible" />
|
||||
</DataTrigger>
|
||||
<DataTrigger Binding="{Binding IsExpanded}" Value="True">
|
||||
<Setter TargetName="Toggle" Property="ui:ButtonIcon.Glyph" Value="{StaticResource Icon.ChevronDown}" />
|
||||
</DataTrigger>
|
||||
<DataTrigger Binding="{Binding IsArchive}" Value="True">
|
||||
<Setter TargetName="Title" Property="FontWeight" Value="SemiBold" />
|
||||
<Setter TargetName="State" Property="Visibility" Value="Visible" />
|
||||
<Setter TargetName="Toggle" Property="Visibility" Value="Collapsed" />
|
||||
</DataTrigger>
|
||||
<DataTrigger Binding="{Binding IsYear}" Value="True">
|
||||
<Setter TargetName="Title" Property="FontWeight" Value="SemiBold" />
|
||||
<Setter TargetName="Detail" Property="Visibility" Value="Visible" />
|
||||
</DataTrigger>
|
||||
</DataTemplate.Triggers>
|
||||
</DataTemplate>
|
||||
</ListBox.ItemTemplate>
|
||||
</ListBox>
|
||||
</Border>
|
||||
|
||||
<Grid Grid.Column="2">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="*" />
|
||||
<RowDefinition Height="*" />
|
||||
</Grid.RowDefinitions>
|
||||
<!-- Figure tiles (Archive.html). -->
|
||||
<ItemsControl ItemsSource="{Binding Tiles}" Focusable="False">
|
||||
<ItemsControl.ItemsPanel>
|
||||
<ItemsPanelTemplate>
|
||||
<UniformGrid Rows="1" />
|
||||
</ItemsPanelTemplate>
|
||||
</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}">
|
||||
<StackPanel>
|
||||
<TextBlock Text="{Binding Value}" FontSize="22" FontWeight="SemiBold" TextTrimming="CharacterEllipsis" Typography.NumeralAlignment="Tabular" />
|
||||
<TextBlock Text="{Binding Caption}" Style="{StaticResource Text.Secondary}" TextTrimming="CharacterEllipsis" />
|
||||
</StackPanel>
|
||||
</Border>
|
||||
</DataTemplate>
|
||||
</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}" />
|
||||
</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>
|
||||
</Grid>
|
||||
</Grid>
|
||||
|
||||
<!-- ===================== Maintenance: health, recent runs, duplicates, orphans ===================== -->
|
||||
<Grid Grid.Row="1" Visibility="{Binding IsMaintenance, Converter={StaticResource BoolToVisibility}}">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*" />
|
||||
<ColumnDefinition Width="14" />
|
||||
<ColumnDefinition Width="1.1*" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="*" />
|
||||
</Grid.RowDefinitions>
|
||||
<Border Style="{StaticResource Border.Panel}" Padding="16,12">
|
||||
<StackPanel>
|
||||
<TextBlock Text="{l:Loc Archive.Health.Title}" Style="{StaticResource Text.PanelHeading}" Margin="0,0,0,8" />
|
||||
<ItemsControl ItemsSource="{Binding Health}" Focusable="False">
|
||||
<ItemsControl.ItemTemplate>
|
||||
<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}" />
|
||||
</DockPanel>
|
||||
</DataTemplate>
|
||||
</ItemsControl.ItemTemplate>
|
||||
</ItemsControl>
|
||||
</StackPanel>
|
||||
</Border>
|
||||
<Border Grid.Row="1" Style="{StaticResource Border.Panel}" Padding="16,12" Margin="0,14,0,0">
|
||||
<DockPanel>
|
||||
<DockPanel DockPanel.Dock="Top" Margin="0,0,0,8">
|
||||
<Button DockPanel.Dock="Right" Style="{StaticResource Button.Row}" Margin="0" Content="{l:Loc Archive.Recent.History}" Command="{Binding HistoryCommand}"
|
||||
ToolTip="{l:Loc Tooltips.Archive.History}" />
|
||||
<TextBlock Text="{l:Loc Archive.Recent.Title}" Style="{StaticResource Text.PanelHeading}" />
|
||||
</DockPanel>
|
||||
<ItemsControl ItemsSource="{Binding Recent}" Focusable="False">
|
||||
<ItemsControl.ItemTemplate>
|
||||
<DataTemplate DataType="{x:Type ar:MaintenanceRow}">
|
||||
<Grid Height="28">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto" MinWidth="90" />
|
||||
<ColumnDefinition Width="*" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
</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" />
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
</ItemsControl.ItemTemplate>
|
||||
</ItemsControl>
|
||||
</DockPanel>
|
||||
</Border>
|
||||
</Grid>
|
||||
|
||||
<Grid Grid.Column="2">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="*" />
|
||||
<RowDefinition Height="*" />
|
||||
</Grid.RowDefinitions>
|
||||
<Border Style="{StaticResource Border.Panel}" Padding="16,12">
|
||||
<DockPanel>
|
||||
<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="{l:Loc Tooltips.Archive.MarkDuplicates}" />
|
||||
<Button DockPanel.Dock="Right" Style="{StaticResource Button.Row}" Margin="0" Content="{l:Loc Archive.Find.Run}" Command="{Binding FindDuplicatesCommand}"
|
||||
ToolTip="{l:Loc Tooltips.Archive.Duplicates}" />
|
||||
<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" />
|
||||
</DockPanel>
|
||||
<ListBox ItemsSource="{Binding Duplicates}" ItemContainerStyle="{StaticResource ListBoxItem.PlainRow}" AutomationProperties.Name="{l:Loc Archive.Duplicates.Title}">
|
||||
<ListBox.ItemTemplate>
|
||||
<DataTemplate DataType="{x:Type ar:DuplicateRowViewModel}">
|
||||
<DockPanel Height="44">
|
||||
<Button DockPanel.Dock="Right" Style="{StaticResource Button.Row}" Content="{l:Loc Archive.Duplicates.Folder}" Command="{Binding RevealCommand}"
|
||||
ToolTip="{l:Loc Tooltips.Archive.DuplicateFolder}" />
|
||||
<Button DockPanel.Dock="Right" Style="{StaticResource Button.Row}" Content="{l:Loc Archive.Duplicates.Open}" Command="{Binding OpenCommand}"
|
||||
ToolTip="{l:Loc Tooltips.Archive.DuplicateOpen}" />
|
||||
<StackPanel VerticalAlignment="Center">
|
||||
<TextBlock TextTrimming="CharacterEllipsis">
|
||||
<Run Text="{Binding Row.Title, Mode=OneWay}" FontWeight="SemiBold" />
|
||||
<Run Text="{Binding Row.Detail, Mode=OneWay}" Foreground="{DynamicResource Brush.TextMuted}" />
|
||||
</TextBlock>
|
||||
<TextBlock Text="{Binding Places}" Style="{StaticResource Text.Secondary}" TextTrimming="CharacterEllipsis" ToolTip="{Binding Places}" />
|
||||
</StackPanel>
|
||||
</DockPanel>
|
||||
</DataTemplate>
|
||||
</ListBox.ItemTemplate>
|
||||
</ListBox>
|
||||
</DockPanel>
|
||||
</Border>
|
||||
<Border Grid.Row="1" Style="{StaticResource Border.Panel}" Padding="16,12" Margin="0,14,0,0">
|
||||
<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="{l:Loc Tooltips.Archive.Orphans}" />
|
||||
<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" />
|
||||
</DockPanel>
|
||||
<ListBox ItemsSource="{Binding Orphans}" ItemContainerStyle="{StaticResource ListBoxItem.PlainRow}" AutomationProperties.Name="{l:Loc Archive.Orphans.Title}">
|
||||
<ListBox.ItemTemplate>
|
||||
<DataTemplate DataType="{x:Type ar:OrphanRowViewModel}">
|
||||
<DockPanel Height="44">
|
||||
<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}" />
|
||||
</StackPanel>
|
||||
</DockPanel>
|
||||
</DataTemplate>
|
||||
</ListBox.ItemTemplate>
|
||||
</ListBox>
|
||||
</DockPanel>
|
||||
</Border>
|
||||
</Grid>
|
||||
</Grid>
|
||||
|
||||
<!-- ===================== Mass operations on the selected set ===================== -->
|
||||
<Border Grid.Row="2" 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" />
|
||||
<Border BorderBrush="{DynamicResource Brush.Accent}" BorderThickness="1" CornerRadius="{StaticResource Radius.Control}" Padding="12,0" Height="30"
|
||||
Margin="0,0,8,8" ToolTip="{l:Loc Tooltips.Archive.Set}">
|
||||
<TextBlock Text="{Binding SetText}" VerticalAlignment="Center" Typography.NumeralAlignment="Tabular" MaxWidth="220" TextTrimming="CharacterEllipsis" />
|
||||
</Border>
|
||||
<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="{l:Loc Tooltips.Archive.SetAnalyse}" />
|
||||
<Button Style="{StaticResource Button.Bar}" Margin="0,0,8,8" Content="{l:Loc Archive.Set.Proxies}" Command="{Binding ProxiesSetCommand}" ToolTip="{l:Loc Tooltips.Archive.SetProxies}" />
|
||||
<Button Style="{StaticResource Button.Bar}" Margin="0,0,8,8" Content="{l:Loc Archive.Set.Thumbnails}" Command="{Binding ThumbnailsSetCommand}"
|
||||
ToolTip="{l:Loc Tooltips.Archive.SetThumbnails}" />
|
||||
<Button Style="{StaticResource Button.Bar}" Margin="0,0,8,8" Content="{l:Loc Archive.Set.Verify}" Command="{Binding VerifySetCommand}" ToolTip="{l:Loc Tooltips.Archive.SetVerify}" />
|
||||
<Button Style="{StaticResource Button.Bar}" Margin="0,0,8,8" Content="{l:Loc Archive.Set.Rename}" Command="{Binding RenameSetCommand}" ToolTip="{l:Loc Tooltips.Archive.SetRename}" />
|
||||
<Button Style="{StaticResource Button.Bar}" Margin="0,0,8,8" Content="{l:Loc Archive.Set.Move}" Command="{Binding MoveSetCommand}" ToolTip="{l:Loc Tooltips.Archive.SetMove}" />
|
||||
<Button Style="{StaticResource Button.Bar}" Margin="0,0,8,8" Content="{l:Loc Archive.Set.Retag}" Command="{Binding RetagSetCommand}" ToolTip="{l:Loc Tooltips.Archive.SetRetag}" />
|
||||
<Button Style="{StaticResource Button.Bar}" Margin="0,0,8,8" Content="{l:Loc Archive.Set.Export}" Command="{Binding ExportSetCommand}" ToolTip="{l:Loc Tooltips.Archive.SetExport}" />
|
||||
</WrapPanel>
|
||||
</Border>
|
||||
|
||||
<ui:EmptyState Grid.Row="1" Message="{l:Loc Archive.Empty}" Visibility="{Binding IsEmpty, Converter={StaticResource BoolToVisibility}}">
|
||||
<Button Style="{StaticResource Button.Primary}" Content="{l:Loc Archive.Toolbar.Adopt}" Command="{Binding AdoptCommand}" ToolTip="{l:Loc Tooltips.Archive.Adopt}" />
|
||||
</ui:EmptyState>
|
||||
</Grid>
|
||||
|
||||
<!-- In-window dialogs (rebuild, rename, retag) over a scrim. -->
|
||||
<Grid Visibility="{Binding IsDialogOpen, Converter={StaticResource BoolToVisibility}}">
|
||||
<Border Background="{DynamicResource Brush.Scrim}" />
|
||||
<ContentPresenter Content="{Binding Dialog}" Margin="20" />
|
||||
</Grid>
|
||||
</Grid>
|
||||
</UserControl>
|
||||
@@ -1,8 +1,27 @@
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Controls.Primitives;
|
||||
using Titano.App.Archiving;
|
||||
|
||||
namespace Titano.App.Sections;
|
||||
|
||||
public partial class ArchiveView : UserControl
|
||||
{
|
||||
public ArchiveView() => InitializeComponent();
|
||||
|
||||
/// <summary>"Maintenance ▾" opens its menu under itself.</summary>
|
||||
private void OnOpenMenu(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (sender is not Button { ContextMenu: { } menu } button) return;
|
||||
menu.DataContext = DataContext;
|
||||
menu.PlacementTarget = button;
|
||||
menu.Placement = PlacementMode.Bottom;
|
||||
menu.IsOpen = true;
|
||||
}
|
||||
|
||||
/// <summary>The selected tree rows are the set the mass operations act on.</summary>
|
||||
private void OnTreeSelectionChanged(object sender, SelectionChangedEventArgs e)
|
||||
{
|
||||
if (DataContext is ArchiveViewModel model) model.SetSelection(Tree.SelectedItems.OfType<ArchiveTreeRowViewModel>());
|
||||
}
|
||||
}
|
||||
@@ -1,9 +1,621 @@
|
||||
using System.Collections.ObjectModel;
|
||||
using System.IO;
|
||||
using System.Windows.Input;
|
||||
using Titano.App.Archiving;
|
||||
using Titano.App.Infrastructure;
|
||||
using Titano.App.Jobs;
|
||||
using Titano.App.Shell;
|
||||
using Titano.Core.Archiving;
|
||||
using Titano.Core.Diagnostics;
|
||||
using Titano.Core.IO;
|
||||
using Titano.Core.Localization;
|
||||
using Titano.Core.Model;
|
||||
using Titano.Data;
|
||||
using Titano.Data.Archiving;
|
||||
using Titano.Data.Archiving.Jobs;
|
||||
using Titano.Data.Processing;
|
||||
using Titano.Data.Repositories;
|
||||
using Titano.Ui.Mvvm;
|
||||
using Titano.Ui.Visuals;
|
||||
|
||||
namespace Titano.App.Sections;
|
||||
|
||||
/// <summary>Archive manager (BRIEF §12.5).</summary>
|
||||
public sealed class ArchiveViewModel(ShellViewModel shell) : SectionViewModel(SectionKey.Archive, "Icon.Archive")
|
||||
/// <summary>
|
||||
/// Archive manager (BRIEF §12.5, Archive.html): the archive's tree (years, sequences) with its availability, its
|
||||
/// figures and charts, mass operations on the selected set (analyse, proxies, thumbnails, verify, rename, move,
|
||||
/// retag, CSV), and the operations on the whole archive as jobs (scan, rebuild with its dialog, verify,
|
||||
/// maintenance), plus the maintenance view: index health, duplicates and orphans with safe fixes, recent runs.
|
||||
/// </summary>
|
||||
public sealed class ArchiveViewModel : SectionViewModel
|
||||
{
|
||||
public ShellViewModel Shell { get; } = shell;
|
||||
private const int RecentCount = 6;
|
||||
private const int PageSize = 1000;
|
||||
|
||||
private readonly HashSet<ArchiveTreeNode> _selection = [];
|
||||
private IReadOnlyList<Core.Model.Archive> _archives = [];
|
||||
private Core.Model.Archive? _archive;
|
||||
private ArchiveAvailability _availability = ArchiveAvailability.Offline;
|
||||
private ArchiveStats? _stats;
|
||||
private ArchiveTree? _tree;
|
||||
private int _viewIndex;
|
||||
private bool _loaded;
|
||||
private Task _load = Task.CompletedTask;
|
||||
private bool _jobEvents;
|
||||
private string _lastScanText = string.Empty;
|
||||
private ArchiveDialogViewModel? _dialog;
|
||||
private IReadOnlyList<ArchiveTile> _tiles = [];
|
||||
private IReadOnlyList<ChartRow> _months = [];
|
||||
private IReadOnlyList<ChartItem> _storage = [];
|
||||
private IReadOnlyList<ChartItem> _cameras = [];
|
||||
private IReadOnlyList<ChartItem> _formats = [];
|
||||
private IReadOnlyList<HealthLineViewModel> _health = [];
|
||||
private IReadOnlyList<MaintenanceRow> _recent = [];
|
||||
private IReadOnlyList<DuplicateRowViewModel>? _duplicates;
|
||||
private IReadOnlyList<OrphanRowViewModel>? _orphans;
|
||||
private bool _findingDuplicates;
|
||||
private bool _findingOrphans;
|
||||
|
||||
public ArchiveViewModel(ShellViewModel shell)
|
||||
: base(SectionKey.Archive, "Icon.Archive")
|
||||
{
|
||||
Shell = shell;
|
||||
ScanCommand = new AsyncRelayCommand(() => QueueAsync(a => ArchiveJobs.Scan(a)), IsOnline);
|
||||
RebuildCommand = new AsyncRelayCommand(() => OpenRebuildDialogAsync(), () => _archive is not null);
|
||||
VerifyCommand = new AsyncRelayCommand(() => QueueAsync(a => ArchiveJobs.Verify(a)), IsOnline);
|
||||
AdoptCommand = new AsyncRelayCommand(AdoptAsync);
|
||||
MaintenanceCommand = new AsyncRelayCommand(() => QueueAsync(a => ArchiveJobs.Maintenance(a)), IsOnline);
|
||||
MaintenanceDryRunCommand = new AsyncRelayCommand(() => QueueAsync(a => ArchiveJobs.Maintenance(a, dryRun: true)), () => _archive is not null);
|
||||
RebuildProxiesCommand = new AsyncRelayCommand(() => QueueSetAsync(ids => ArchiveJobs.Proxies(ids, SetLabel(), force: true), All()), IsOnline);
|
||||
RelinkCommand = new AsyncRelayCommand(RelinkAsync);
|
||||
HistoryCommand = new RelayCommand(() => Shell.Navigate(SectionKey.Jobs));
|
||||
|
||||
AnalyseSetCommand = new AsyncRelayCommand(() => QueueSetAsync(ids => ProcessingJobs.DeepAnalysis(ids, SetLabel()), Set()), HasSet);
|
||||
ProxiesSetCommand = new AsyncRelayCommand(() => QueueSetAsync(ids => ArchiveJobs.Proxies(ids, SetLabel()), Set()), HasSet);
|
||||
ThumbnailsSetCommand = new AsyncRelayCommand(() => QueueSetAsync(ids => ArchiveJobs.Thumbnails(ids, SetLabel()), Set()), HasSet);
|
||||
VerifySetCommand = new AsyncRelayCommand(() => QueueSetAsync(ids => ArchiveJobs.Verify(_archive!, ids), Set()), HasSet);
|
||||
RenameSetCommand = new RelayCommand(() => OpenRename(RenameMode.Titles), () => HasSet() && IsOnline());
|
||||
MoveSetCommand = new RelayCommand(() => OpenRename(RenameMode.Folders), () => HasSet() && IsOnline());
|
||||
RetagSetCommand = new RelayCommand(OpenRetag, () => HasSet() && IsOnline());
|
||||
ExportSetCommand = new AsyncRelayCommand(ExportAsync, HasSet);
|
||||
|
||||
FindDuplicatesCommand = new AsyncRelayCommand(FindDuplicatesAsync, () => _archive is not null && !_findingDuplicates);
|
||||
FindOrphansCommand = new AsyncRelayCommand(FindOrphansAsync, () => IsOnline() && !_findingOrphans);
|
||||
MarkDuplicatesCommand = new AsyncRelayCommand(() => QueueAsync(a => ArchiveJobs.Maintenance(a)), IsOnline);
|
||||
}
|
||||
|
||||
public ShellViewModel Shell { get; }
|
||||
|
||||
private AppServices Services => Shell.Services;
|
||||
|
||||
// ---------------- Toolbar ----------------
|
||||
|
||||
public IReadOnlyList<Core.Model.Archive> Archives { get => _archives; private set => Set(ref _archives, value); }
|
||||
|
||||
public Core.Model.Archive? SelectedArchive
|
||||
{
|
||||
get => _archive;
|
||||
set
|
||||
{
|
||||
if (value is null || value == _archive) return;
|
||||
_archive = value;
|
||||
_duplicates = null;
|
||||
_orphans = null;
|
||||
_ = LoadAsync();
|
||||
}
|
||||
}
|
||||
|
||||
public bool HasArchive => _archive is not null;
|
||||
|
||||
public string ArchiveToolTip => _archive is null ? Loc.L("Tooltips.Archive.Pick") : Loc.L("Tooltips.Archive.PickRoot", _archive.RootPath);
|
||||
|
||||
/// <summary>0 = overview (tree and figures), 1 = maintenance.</summary>
|
||||
public int ViewIndex
|
||||
{
|
||||
get => _viewIndex;
|
||||
set
|
||||
{
|
||||
if (!Set(ref _viewIndex, value)) return;
|
||||
OnPropertyChanged(nameof(IsOverview));
|
||||
OnPropertyChanged(nameof(IsMaintenance));
|
||||
}
|
||||
}
|
||||
|
||||
public bool IsOverview => HasArchive && _viewIndex == 0;
|
||||
public bool IsMaintenance => HasArchive && _viewIndex == 1;
|
||||
|
||||
/// <summary>"Last scan 29/09/2026 07:12 · 14 min".</summary>
|
||||
public string LastScanText { get => _lastScanText; private set => Set(ref _lastScanText, value); }
|
||||
|
||||
public ICommand ScanCommand { get; }
|
||||
public ICommand RebuildCommand { get; }
|
||||
public ICommand VerifyCommand { get; }
|
||||
public ICommand AdoptCommand { get; }
|
||||
public ICommand MaintenanceCommand { get; }
|
||||
public ICommand MaintenanceDryRunCommand { get; }
|
||||
public ICommand RebuildProxiesCommand { get; }
|
||||
public ICommand RelinkCommand { get; }
|
||||
public ICommand HistoryCommand { get; }
|
||||
|
||||
// ---------------- Overview ----------------
|
||||
|
||||
public ObservableCollection<ArchiveTreeRowViewModel> TreeRows { get; } = [];
|
||||
|
||||
public IReadOnlyList<ArchiveTile> Tiles { get => _tiles; private set => Set(ref _tiles, value); }
|
||||
public IReadOnlyList<ChartRow> MonthRows { get => _months; private set => Set(ref _months, value); }
|
||||
public IReadOnlyList<string> MonthLabels => ArchiveFigures.MonthLabels();
|
||||
public IReadOnlyList<ChartItem> StorageBars { get => _storage; private set => Set(ref _storage, value); }
|
||||
public IReadOnlyList<ChartItem> CameraBars { get => _cameras; private set => Set(ref _cameras, value); }
|
||||
public IReadOnlyList<ChartItem> FormatBars { get => _formats; private set => Set(ref _formats, value); }
|
||||
|
||||
/// <summary>Photos per month in the culture's digits.</summary>
|
||||
public Func<double, string> CountFormatter { get; } = v => Formatting.Count((long)v);
|
||||
|
||||
/// <summary>"412 sequences · all", "36 sequences · 2025", "Harbour sunset".</summary>
|
||||
public string SetText
|
||||
{
|
||||
get
|
||||
{
|
||||
var set = Set();
|
||||
if (_selection.Count == 0 || _selection.Any(n => n.Kind == TreeNodeKind.Archive)) return Loc.Plural("Archive.Set.All", set.Count);
|
||||
return set.Count == 1 ? set[0].DisplayTitle : Loc.Plural("Shell.Status.Sequences", set.Count);
|
||||
}
|
||||
}
|
||||
|
||||
public ICommand AnalyseSetCommand { get; }
|
||||
public ICommand ProxiesSetCommand { get; }
|
||||
public ICommand ThumbnailsSetCommand { get; }
|
||||
public ICommand VerifySetCommand { get; }
|
||||
public ICommand RenameSetCommand { get; }
|
||||
public ICommand MoveSetCommand { get; }
|
||||
public ICommand RetagSetCommand { get; }
|
||||
public ICommand ExportSetCommand { get; }
|
||||
|
||||
/// <summary>The view reports the selected tree rows.</summary>
|
||||
public void SetSelection(IEnumerable<ArchiveTreeRowViewModel> rows)
|
||||
{
|
||||
_selection.Clear();
|
||||
foreach (var row in rows) _selection.Add(row.Node);
|
||||
OnPropertyChanged(nameof(SetText));
|
||||
CommandManager.InvalidateRequerySuggested();
|
||||
}
|
||||
|
||||
// ---------------- Maintenance view ----------------
|
||||
|
||||
public IReadOnlyList<HealthLineViewModel> Health { get => _health; private set => Set(ref _health, value); }
|
||||
public IReadOnlyList<MaintenanceRow> Recent { get => _recent; private set => Set(ref _recent, value); }
|
||||
|
||||
public IReadOnlyList<DuplicateRowViewModel>? Duplicates
|
||||
{
|
||||
get => _duplicates;
|
||||
private set
|
||||
{
|
||||
if (Set(ref _duplicates, value)) OnPropertyChanged(nameof(DuplicatesText));
|
||||
}
|
||||
}
|
||||
|
||||
public IReadOnlyList<OrphanRowViewModel>? Orphans
|
||||
{
|
||||
get => _orphans;
|
||||
private set
|
||||
{
|
||||
if (Set(ref _orphans, value)) OnPropertyChanged(nameof(OrphansText));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>"3 groups", "None found", or empty before the first search.</summary>
|
||||
public string DuplicatesText => _findingDuplicates ? Loc.L("Archive.Find.Searching")
|
||||
: _duplicates is null ? string.Empty
|
||||
: _duplicates.Count == 0 ? Loc.L("Archive.Find.None")
|
||||
: Loc.Plural("Archive.Duplicates.Groups", _duplicates.Count);
|
||||
|
||||
public string OrphansText => _findingOrphans ? Loc.L("Archive.Find.Searching")
|
||||
: _orphans is null ? string.Empty
|
||||
: _orphans.Count == 0 ? Loc.L("Archive.Find.None")
|
||||
: Loc.Plural("Archive.Orphans.Count", _orphans.Count);
|
||||
|
||||
public ICommand FindDuplicatesCommand { get; }
|
||||
public ICommand FindOrphansCommand { get; }
|
||||
public ICommand MarkDuplicatesCommand { get; }
|
||||
|
||||
// ---------------- Dialogs ----------------
|
||||
|
||||
/// <summary>The open in-window dialog (rebuild, rename, retag); null when none.</summary>
|
||||
public ArchiveDialogViewModel? Dialog
|
||||
{
|
||||
get => _dialog;
|
||||
private set
|
||||
{
|
||||
if (Set(ref _dialog, value)) OnPropertyChanged(nameof(IsDialogOpen));
|
||||
}
|
||||
}
|
||||
|
||||
public bool IsDialogOpen => _dialog is not null;
|
||||
|
||||
public bool IsEmpty => _loaded && _archive is null;
|
||||
|
||||
// ---------------- Lifecycle ----------------
|
||||
|
||||
protected override void OnActivated()
|
||||
{
|
||||
if (_loaded) return;
|
||||
_ = LoadAsync();
|
||||
}
|
||||
|
||||
/// <summary>Reads archives, figures, tree, health and recent maintenance of the selected archive; joins a read in progress.</summary>
|
||||
public Task LoadAsync() => _load.IsCompleted ? _load = ReadAsync() : _load;
|
||||
|
||||
private async Task ReadAsync()
|
||||
{
|
||||
if (Services.Database is not { } db) return;
|
||||
try
|
||||
{
|
||||
AttachJobEvents();
|
||||
Archives = await db.Archives.ListAsync();
|
||||
_archive = _archive is { } current ? Archives.FirstOrDefault(a => a.Id == current.Id) : null;
|
||||
_archive ??= CurrentArchive.Pick(Archives, Services.Settings.LastArchivePath);
|
||||
if (_archive is not { } archive) return;
|
||||
var root = archive.RootPath;
|
||||
_availability = await Task.Run(() => ArchiveVolume.Probe(new ArchivePaths(root)));
|
||||
_stats = await db.Sequences.GetStatsAsync(archive.Id);
|
||||
var sequences = await ListSequencesAsync(db, archive.Id);
|
||||
var withoutProxies = await db.Sequences.CountAsync(new SequenceQuery { ArchiveId = archive.Id, WithoutStatus = SequenceStatus.ProxiesBuilt });
|
||||
ShowFigures(_stats, withoutProxies);
|
||||
ShowTree(ArchiveTree.Build(archive, _availability, sequences));
|
||||
await LoadRecentAsync(db, archive);
|
||||
}
|
||||
catch (DatabaseException ex)
|
||||
{
|
||||
Log.Warning("archive", "Archive figures unavailable", ex);
|
||||
}
|
||||
finally
|
||||
{
|
||||
_loaded = true;
|
||||
OnPropertyChanged(string.Empty);
|
||||
CommandManager.InvalidateRequerySuggested();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Opens the rebuild dialog (BRIEF §12.5) and counts, off the UI thread, the sidecars the rebuild will read.</summary>
|
||||
public async Task<RebuildDialogViewModel?> OpenRebuildDialogAsync()
|
||||
{
|
||||
if (_archive is not { } archive || Services.Engine is not { } engine) return null;
|
||||
var dialog = new RebuildDialogViewModel(archive, _availability, _stats?.Sequences ?? 0, async () =>
|
||||
{
|
||||
var request = ArchiveJobs.Rebuild(archive);
|
||||
await engine.EnqueueAsync(request);
|
||||
Queued(request.Kind, archive.Name);
|
||||
}, CloseDialog);
|
||||
Dialog = dialog;
|
||||
await dialog.CountAsync();
|
||||
return dialog;
|
||||
}
|
||||
|
||||
/// <summary>Shows reports computed elsewhere (capture).</summary>
|
||||
public void ShowReports(IReadOnlyList<DuplicateGroup> duplicates, OrphanReport orphans, IReadOnlyList<SequenceLocation> locations)
|
||||
{
|
||||
Duplicates = DuplicateRows(duplicates, locations);
|
||||
Orphans = OrphanRows(orphans, locations);
|
||||
}
|
||||
|
||||
public override void Dispose()
|
||||
{
|
||||
if (_jobEvents && Services.Jobs is { } jobs) jobs.JobChanged -= OnJobChanged;
|
||||
_dialog?.Dispose();
|
||||
base.Dispose();
|
||||
}
|
||||
|
||||
private static async Task<List<Sequence>> ListSequencesAsync(TitanoDatabase db, Guid archiveId)
|
||||
{
|
||||
var all = new List<Sequence>();
|
||||
string? cursor = null;
|
||||
do
|
||||
{
|
||||
var page = await db.Sequences.ListAsync(new SequenceQuery { ArchiveId = archiveId, Sort = SequenceSort.Newest, Limit = PageSize, Cursor = cursor });
|
||||
all.AddRange(page.Items);
|
||||
cursor = page.NextCursor;
|
||||
}
|
||||
while (cursor is not null);
|
||||
return all;
|
||||
}
|
||||
|
||||
private void ShowFigures(ArchiveStats stats, int withoutProxies)
|
||||
{
|
||||
Tiles = ArchiveFigures.Tiles(stats);
|
||||
MonthRows = [.. ArchiveFigures.PhotosPerMonth(stats, DateTime.Today).Select(r => new ChartRow(r.Label, r.Values, r.ToolTips))];
|
||||
StorageBars = Bars(ArchiveFigures.StorageByYear(stats));
|
||||
CameraBars = Bars(ArchiveFigures.ByCamera(stats));
|
||||
FormatBars = Bars(ArchiveFigures.ByFormat(stats));
|
||||
Health =
|
||||
[
|
||||
.. ArchiveFigures.Health(stats, withoutProxies).Select(line => new HealthLineViewModel(line, line.Action switch
|
||||
{
|
||||
HealthAction.Verify => new AsyncRelayCommand(() => QueueStatusAsync(SequenceStatus.Verified, ids => ArchiveJobs.Verify(_archive!, ids))),
|
||||
HealthAction.Proxies => new AsyncRelayCommand(() => QueueStatusAsync(SequenceStatus.ProxiesBuilt, ids => ArchiveJobs.Proxies(ids, CountLabel(ids)))),
|
||||
HealthAction.Analyse => new AsyncRelayCommand(() => QueueStatusAsync(SequenceStatus.AnalyzedLight, ids => ProcessingJobs.LightAnalysis(ids, CountLabel(ids)))),
|
||||
HealthAction.Duplicates => FindDuplicatesCommand,
|
||||
HealthAction.Orphans => FindOrphansCommand,
|
||||
_ => null,
|
||||
})),
|
||||
];
|
||||
}
|
||||
|
||||
private static IReadOnlyList<ChartItem> Bars(IReadOnlyList<BarValue> values) =>
|
||||
[.. values.Select(v => new ChartItem(v.Label, v.Value, v.ValueText, v.ToolTip))];
|
||||
|
||||
private void ShowTree(ArchiveTree tree)
|
||||
{
|
||||
var expanded = _tree?.ExpandedKeys();
|
||||
if (expanded is not null) tree.Expand(expanded);
|
||||
else if (tree.Root.Children.Count > 0) tree.Root.Children[0].IsExpanded = true;
|
||||
_tree = tree;
|
||||
_selection.Clear();
|
||||
RebuildRows();
|
||||
}
|
||||
|
||||
private void RebuildRows()
|
||||
{
|
||||
TreeRows.Clear();
|
||||
if (_tree is null) return;
|
||||
foreach (var node in _tree.Visible()) TreeRows.Add(new ArchiveTreeRowViewModel(node, _tree.Availability, Toggle));
|
||||
OnPropertyChanged(nameof(SetText));
|
||||
}
|
||||
|
||||
private void Toggle(ArchiveTreeNode node)
|
||||
{
|
||||
if (node.Kind == TreeNodeKind.Archive) return;
|
||||
node.IsExpanded = !node.IsExpanded;
|
||||
RebuildRows();
|
||||
}
|
||||
|
||||
private async Task LoadRecentAsync(TitanoDatabase db, Core.Model.Archive archive)
|
||||
{
|
||||
var jobs = new List<Job>();
|
||||
foreach (var kind in MaintenanceReports.MaintenanceKinds)
|
||||
jobs.AddRange((await db.Jobs.ListAsync(null, kind, RecentCount)).Items.Where(j => j.TargetIds.Contains(archive.Id)));
|
||||
Recent = MaintenanceReports.Recent(jobs, RecentCount);
|
||||
var scan = jobs.Where(j => j.Kind == JobKind.Scan && j is { State: JobState.Done, Finished: not null, Started: not null })
|
||||
.MaxBy(j => j.Finished);
|
||||
LastScanText = scan is { Started: { } started, Finished: { } finished }
|
||||
? Loc.L("Archive.LastScan", Formatting.Date(finished) + " " + Formatting.TimeOfDay(finished), Formatting.Duration(finished - started))
|
||||
: string.Empty;
|
||||
}
|
||||
|
||||
private void AttachJobEvents()
|
||||
{
|
||||
if (_jobEvents || Services.Jobs is not { } jobs) return;
|
||||
jobs.JobChanged += OnJobChanged;
|
||||
_jobEvents = true;
|
||||
}
|
||||
|
||||
/// <summary>A finished archive job changes the figures: read them again.</summary>
|
||||
private void OnJobChanged(Job job)
|
||||
{
|
||||
if (job.State is not (JobState.Done or JobState.Failed) || _archive is null) return;
|
||||
if (job.Kind is not (JobKind.Scan or JobKind.Rebuild or JobKind.Verify or JobKind.Maintenance or JobKind.Import or JobKind.Proxies or JobKind.Thumbs
|
||||
or JobKind.LightAnalyse or JobKind.DeepAnalyse)) return;
|
||||
System.Windows.Application.Current?.Dispatcher.BeginInvoke(() =>
|
||||
{
|
||||
if (IsSelected) _ = LoadAsync();
|
||||
else _loaded = false;
|
||||
});
|
||||
}
|
||||
|
||||
// ---------------- Actions ----------------
|
||||
|
||||
private bool IsOnline() => _archive is not null && _availability == ArchiveAvailability.Online;
|
||||
|
||||
private bool HasSet() => _archive is not null && _tree is not null && Set().Count > 0;
|
||||
|
||||
private IReadOnlyList<Sequence> Set() => _tree is null ? [] : ArchiveTree.SetOf(_tree, _selection);
|
||||
|
||||
private IReadOnlyList<Sequence> All() => _tree is null ? [] : ArchiveTree.SetOf(_tree, []);
|
||||
|
||||
private string SetLabel() => SetText;
|
||||
|
||||
private async Task QueueAsync(Func<Core.Model.Archive, ArchiveJobRequest> build)
|
||||
{
|
||||
if (Services.Engine is not { } engine || _archive is not { } archive) return;
|
||||
var request = build(archive);
|
||||
await engine.EnqueueAsync(request);
|
||||
Queued(request.Kind, request.Label ?? archive.Name);
|
||||
}
|
||||
|
||||
private async Task QueueSetAsync(Func<IReadOnlyList<Guid>, ArchiveJobRequest> build, IReadOnlyList<Sequence> set)
|
||||
{
|
||||
if (Services.Engine is not { } engine || set.Count == 0) return;
|
||||
var request = build([.. set.Select(s => s.Id)]);
|
||||
await engine.EnqueueAsync(request);
|
||||
Queued(request.Kind, request.Label ?? SetLabel());
|
||||
}
|
||||
|
||||
/// <summary>Health fixes act on the sequences that miss a status (never verified, no proxies).</summary>
|
||||
private async Task QueueStatusAsync(SequenceStatus missing, Func<IReadOnlyList<Guid>, ArchiveJobRequest> build)
|
||||
{
|
||||
if (Services.Database is not { } db || _archive is not { } archive) return;
|
||||
var page = await db.Sequences.ListAsync(new SequenceQuery { ArchiveId = archive.Id, WithoutStatus = missing, Limit = PageSize });
|
||||
await QueueSetAsync(build, page.Items);
|
||||
}
|
||||
|
||||
private static string CountLabel(IReadOnlyList<Guid> ids) => Loc.Plural("Shell.Status.Sequences", ids.Count);
|
||||
|
||||
private void Queued(JobKind kind, string label) =>
|
||||
Shell.Notify(Loc.L("Library.Queued", JobText.Kind(kind), label), actionText: Loc.L("Shell.Nav.Jobs"), actionToolTip: Loc.L("Tooltips.Nav.Jobs"),
|
||||
action: () => Shell.Navigate(SectionKey.Jobs));
|
||||
|
||||
private void OpenRename(RenameMode mode)
|
||||
{
|
||||
if (Services.Archives is not { } archives || _archive is not { } archive) return;
|
||||
var dialog = new RenameDialogViewModel(mode, archives, archive, Set(), Applied, CloseDialog);
|
||||
Dialog = dialog;
|
||||
_ = dialog.PlanAsync();
|
||||
}
|
||||
|
||||
private void OpenRetag()
|
||||
{
|
||||
if (Services.Archives is not { } archives) return;
|
||||
Dialog = new RetagDialogViewModel(archives, Set(), Applied, CloseDialog);
|
||||
}
|
||||
|
||||
private async Task Applied(int changed)
|
||||
{
|
||||
Shell.Notify(Loc.Plural("Archive.Applied", changed));
|
||||
await LoadAsync();
|
||||
await Shell.Library.RefreshAsync();
|
||||
}
|
||||
|
||||
private void CloseDialog()
|
||||
{
|
||||
_dialog?.Dispose();
|
||||
Dialog = null;
|
||||
}
|
||||
|
||||
private async Task AdoptAsync()
|
||||
{
|
||||
var folder = Services.Dialogs.PickFolder(Loc.L("Library.Adopt.Title"));
|
||||
if (folder is null) return;
|
||||
if (await ArchiveActions.TryAsync(Shell, s => s.AdoptAsync(folder)))
|
||||
{
|
||||
_archive = null;
|
||||
await LoadAsync();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>A moved archive keeps its id: opening it at the new root relinks every sequence (BRIEF §12.5 Move archive).</summary>
|
||||
private async Task RelinkAsync()
|
||||
{
|
||||
if (Services.Archives is not { } archives) return;
|
||||
var folder = Services.Dialogs.PickFolder(Loc.L("Archive.Relink.Title"));
|
||||
if (folder is null) return;
|
||||
try
|
||||
{
|
||||
var archive = await Task.Run(() => archives.OpenAsync(folder));
|
||||
Services.Settings.LastArchivePath = archive.RootPath;
|
||||
Services.SaveSettings();
|
||||
_archive = archive;
|
||||
await Services.QueueScanAsync(archive, full: false);
|
||||
Shell.Notify(Loc.L("Archive.Relink.Done", archive.Name), archive.RootPath);
|
||||
await LoadAsync();
|
||||
}
|
||||
catch (Exception ex) when (ex is IOException or UnauthorizedAccessException or InvalidDataException or DatabaseException)
|
||||
{
|
||||
Log.Warning("archive", $"Relinking {folder} failed", ex);
|
||||
Shell.Notify(Loc.L("Archive.Relink.Failed"), ex.Message);
|
||||
}
|
||||
}
|
||||
|
||||
private async Task ExportAsync()
|
||||
{
|
||||
var set = Set();
|
||||
var folder = Services.Dialogs.PickFolder(Loc.L("Library.Export.Title"));
|
||||
if (folder is null || set.Count == 0) return;
|
||||
var path = Path.Combine(folder, $"Titano sequences {DateTime.Now:yyyy-MM-dd HHmm}.csv");
|
||||
var csv = LibraryViewModel.Csv(set);
|
||||
await Task.Run(() => AtomicFile.WriteAllText(path, csv));
|
||||
Shell.Notify(Loc.L("Library.Export.Done"), Path.GetFileName(path), Loc.L("Library.Export.Show"), Loc.L("Tooltips.Library.ShowExport"),
|
||||
() => ShellActions.Reveal(path));
|
||||
}
|
||||
|
||||
private async Task FindDuplicatesAsync()
|
||||
{
|
||||
if (Services.Archives is not { } archives || Services.Database is not { } db || _archive is not { } archive) return;
|
||||
ViewIndex = 1;
|
||||
_findingDuplicates = true;
|
||||
OnPropertyChanged(nameof(DuplicatesText));
|
||||
try
|
||||
{
|
||||
var groups = await Task.Run(() => archives.FindDuplicatesAsync(archive.Id));
|
||||
Duplicates = DuplicateRows(groups, await db.Sequences.ListLocationsAsync(archive.Id));
|
||||
}
|
||||
catch (DatabaseException ex)
|
||||
{
|
||||
Shell.ReportError(ex);
|
||||
}
|
||||
finally
|
||||
{
|
||||
_findingDuplicates = false;
|
||||
OnPropertyChanged(nameof(DuplicatesText));
|
||||
CommandManager.InvalidateRequerySuggested();
|
||||
}
|
||||
}
|
||||
|
||||
private async Task FindOrphansAsync()
|
||||
{
|
||||
if (Services.Archives is not { } archives || Services.Database is not { } db || _archive is not { } archive) return;
|
||||
ViewIndex = 1;
|
||||
_findingOrphans = true;
|
||||
OnPropertyChanged(nameof(OrphansText));
|
||||
try
|
||||
{
|
||||
var report = await Task.Run(() => archives.FindOrphansAsync(archive.Id));
|
||||
Orphans = OrphanRows(report, await db.Sequences.ListLocationsAsync(archive.Id));
|
||||
}
|
||||
catch (Exception ex) when (ex is IOException or UnauthorizedAccessException or InvalidDataException or ArchiveOfflineException or DatabaseException)
|
||||
{
|
||||
Log.Warning("archive", "Orphan search failed", ex);
|
||||
Shell.Notify(Loc.L("Archive.Orphans.Failed"), ex.Message);
|
||||
}
|
||||
finally
|
||||
{
|
||||
_findingOrphans = false;
|
||||
OnPropertyChanged(nameof(OrphansText));
|
||||
CommandManager.InvalidateRequerySuggested();
|
||||
}
|
||||
}
|
||||
|
||||
private IReadOnlyList<DuplicateRowViewModel> DuplicateRows(IReadOnlyList<DuplicateGroup> groups, IReadOnlyList<SequenceLocation> locations) =>
|
||||
[
|
||||
.. MaintenanceReports.Duplicates(groups, locations).Select(row => new DuplicateRowViewModel(row,
|
||||
new RelayCommand(() => Shell.OpenSequence(row.SequenceId)),
|
||||
new RelayCommand(() =>
|
||||
{
|
||||
if (_archive is { } archive && locations.FirstOrDefault(l => l.Id == row.SequenceId) is { } location)
|
||||
ShellActions.Reveal(new ArchivePaths(archive.RootPath).Sequence(location.Folder).Folder);
|
||||
}))),
|
||||
];
|
||||
|
||||
private IReadOnlyList<OrphanRowViewModel> OrphanRows(OrphanReport report, IReadOnlyList<SequenceLocation> locations) =>
|
||||
[.. MaintenanceReports.Orphans(report, locations).Select(row => new OrphanRowViewModel(row, new AsyncRelayCommand(() => FixAsync(row))))];
|
||||
|
||||
/// <summary>The safe fix of an orphan line; removing an index row asks first (its sidecar is gone, its files are not touched).</summary>
|
||||
private async Task FixAsync(OrphanRow row)
|
||||
{
|
||||
if (Services.Archives is not { } archives || _archive is not { } archive) return;
|
||||
try
|
||||
{
|
||||
switch (row.Kind)
|
||||
{
|
||||
case OrphanKind.UnlistedFiles or OrphanKind.MissingFiles when row.SequenceId is { } id:
|
||||
await Task.Run(() => archives.ReconcileAsync(id));
|
||||
break;
|
||||
case OrphanKind.MissingSequence when row.SequenceId is { } id:
|
||||
var confirmed = Services.Dialogs.Confirm(new ConfirmRequest
|
||||
{
|
||||
Heading = Loc.L("Archive.Confirm.RemoveHeading", row.Title),
|
||||
Message = Loc.L("Archive.Confirm.RemoveMessage"),
|
||||
SafeText = Loc.L("Archive.Confirm.Keep"),
|
||||
SafeToolTip = Loc.L("Tooltips.Archive.KeepRow"),
|
||||
ActionText = Loc.L("Archive.Confirm.Remove"),
|
||||
ActionToolTip = Loc.L("Tooltips.Archive.Orphans.MissingSequence"),
|
||||
IsDestructive = true,
|
||||
});
|
||||
if (!confirmed) return;
|
||||
await Task.Run(() => archives.RemoveMissingSequencesAsync(archive.Id, [id]));
|
||||
break;
|
||||
case OrphanKind.NewFolder:
|
||||
await Services.QueueScanAsync(archive, full: false);
|
||||
Queued(JobKind.Scan, archive.Name);
|
||||
return;
|
||||
default:
|
||||
return;
|
||||
}
|
||||
Orphans = Orphans?.Where(o => o.Row != row).ToList();
|
||||
await LoadAsync();
|
||||
}
|
||||
catch (Exception ex) when (ex is IOException or UnauthorizedAccessException or InvalidDataException or ArchiveOfflineException or DatabaseException
|
||||
or ArgumentException)
|
||||
{
|
||||
Log.Warning("archive", $"Fixing {row.Title} failed", ex);
|
||||
Shell.Notify(Loc.L("Archive.Orphans.FixFailed"), ex.Message);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2,8 +2,524 @@
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:ui="clr-namespace:Titano.Ui.Controls;assembly=Titano.Ui"
|
||||
xmlns:l="clr-namespace:Titano.Ui.Localization;assembly=Titano.Ui">
|
||||
<Grid Margin="20">
|
||||
<ui:EmptyState Message="{l:Loc Import.Empty}" />
|
||||
xmlns:l="clr-namespace:Titano.Ui.Localization;assembly=Titano.Ui"
|
||||
xmlns:imp="clr-namespace:Titano.App.Import"
|
||||
xmlns:shell="clr-namespace:Titano.App.Shell">
|
||||
<UserControl.InputBindings>
|
||||
<KeyBinding Key="Enter" Modifiers="Control" Command="{Binding StartCommand}" />
|
||||
</UserControl.InputBindings>
|
||||
<UserControl.Resources>
|
||||
<!-- Devices list entry (Import.html): 54 px, Surface fill, Stroke border; selected = accent border. -->
|
||||
<Style x:Key="ListBoxItem.Device" TargetType="ListBoxItem" BasedOn="{StaticResource {x:Type ListBoxItem}}">
|
||||
<Setter Property="Height" Value="54" />
|
||||
<Setter Property="Margin" Value="0,0,0,8" />
|
||||
<Setter Property="Padding" Value="12,0" />
|
||||
<Setter Property="Background" Value="{DynamicResource Brush.Surface}" />
|
||||
<Setter Property="ToolTip" Value="{Binding StateText}" />
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="ListBoxItem">
|
||||
<Border x:Name="Bd" Background="{DynamicResource Brush.Surface}" BorderThickness="1" BorderBrush="{DynamicResource Brush.Stroke}"
|
||||
CornerRadius="{StaticResource Radius.Control}" Padding="{TemplateBinding Padding}">
|
||||
<ContentPresenter VerticalAlignment="Center" />
|
||||
</Border>
|
||||
<ControlTemplate.Triggers>
|
||||
<Trigger Property="IsMouseOver" Value="True">
|
||||
<Setter TargetName="Bd" Property="Background" Value="{DynamicResource Brush.Card}" />
|
||||
</Trigger>
|
||||
<Trigger Property="IsSelected" Value="True">
|
||||
<Setter TargetName="Bd" Property="Background" Value="{DynamicResource Brush.Card}" />
|
||||
<Setter TargetName="Bd" Property="BorderBrush" Value="{DynamicResource Brush.Accent}" />
|
||||
</Trigger>
|
||||
</ControlTemplate.Triggers>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
|
||||
<!-- One form line: 116 px label column, then the controls (Import.html grid). -->
|
||||
<Style x:Key="Import.Row" TargetType="HeaderedContentControl">
|
||||
<Setter Property="Focusable" Value="False" />
|
||||
<Setter Property="Margin" Value="0,0,0,10" />
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="HeaderedContentControl">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="{StaticResource Grid.LabelColumn}" />
|
||||
<ColumnDefinition Width="*" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<TextBlock Text="{TemplateBinding Header}" Style="{StaticResource Text.Label}" VerticalAlignment="Top" Margin="0,6,12,0" />
|
||||
<ContentPresenter Grid.Column="1" VerticalAlignment="Center" />
|
||||
</Grid>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="Import.Choice" TargetType="FrameworkElement">
|
||||
<Setter Property="Margin" Value="0,4,18,4" />
|
||||
<Setter Property="VerticalAlignment" Value="Center" />
|
||||
</Style>
|
||||
<Style TargetType="RadioButton" BasedOn="{StaticResource {x:Type RadioButton}}">
|
||||
<Setter Property="Margin" Value="0,4,18,4" />
|
||||
</Style>
|
||||
<Style TargetType="CheckBox" BasedOn="{StaticResource {x:Type CheckBox}}">
|
||||
<Setter Property="Margin" Value="0,4,18,4" />
|
||||
</Style>
|
||||
<Style x:Key="TextBox.Small" TargetType="TextBox" BasedOn="{StaticResource TextBox.Number}">
|
||||
<Setter Property="Width" Value="56" />
|
||||
<Setter Property="Height" Value="30" />
|
||||
<Setter Property="Margin" Value="6,0" />
|
||||
</Style>
|
||||
|
||||
<!-- Session table columns, shared by header and rows. -->
|
||||
<Style x:Key="Session.Grid" TargetType="Grid">
|
||||
<Setter Property="Height" Value="34" />
|
||||
</Style>
|
||||
</UserControl.Resources>
|
||||
|
||||
<Grid Margin="20,16">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="0.36*" MinWidth="220" MaxWidth="300" />
|
||||
<ColumnDefinition Width="16" />
|
||||
<ColumnDefinition Width="*" />
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<!-- ===================== Devices ===================== -->
|
||||
<DockPanel>
|
||||
<DockPanel DockPanel.Dock="Top" Height="32" Margin="0,0,0,8">
|
||||
<Button DockPanel.Dock="Right" Style="{StaticResource Button.Icon}" ui:ButtonIcon.Glyph="{StaticResource Icon.Refresh}" Command="{Binding RefreshCommand}"
|
||||
ToolTip="{l:Loc Tooltips.Import.Refresh}" AutomationProperties.Name="{l:Loc Import.Devices.Refresh}" />
|
||||
<TextBlock Text="{l:Loc Import.Devices.Title}" Style="{StaticResource Text.Section}" VerticalAlignment="Center" />
|
||||
</DockPanel>
|
||||
<CheckBox DockPanel.Dock="Bottom" Margin="0,8,0,0" IsChecked="{Binding AutoImport}" IsEnabled="{Binding CanAutoImport}" ToolTip="{Binding AutoImportToolTip}"
|
||||
VerticalContentAlignment="Top">
|
||||
<TextBlock Text="{l:Loc Import.Devices.Auto}" TextWrapping="Wrap" Foreground="{DynamicResource Brush.TextMuted}" />
|
||||
</CheckBox>
|
||||
<Button DockPanel.Dock="Bottom" Height="44" HorizontalContentAlignment="Left" Background="Transparent" Command="{Binding PickFolderCommand}"
|
||||
ToolTip="{l:Loc Tooltips.Import.Folder}" Margin="0,0,0,8">
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<ui:Icon Glyph="{StaticResource Icon.Folder}" Margin="0,0,10,0" Foreground="{DynamicResource Brush.TextMuted}" />
|
||||
<TextBlock Text="{l:Loc Import.Devices.Folder}" Foreground="{DynamicResource Brush.TextMuted}" />
|
||||
</StackPanel>
|
||||
</Button>
|
||||
<ListBox ItemsSource="{Binding Sources}" SelectedItem="{Binding SelectedSource}" ItemContainerStyle="{StaticResource ListBoxItem.Device}"
|
||||
AutomationProperties.Name="{l:Loc Import.Devices.Title}">
|
||||
<ListBox.ItemTemplate>
|
||||
<DataTemplate DataType="{x:Type imp:ImportSource}">
|
||||
<Grid x:Name="Root">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="*" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<ui:Icon x:Name="Glyph" Glyph="{StaticResource Icon.Card}" Size="18" Margin="0,0,10,0" VerticalAlignment="Center" />
|
||||
<StackPanel Grid.Column="1" VerticalAlignment="Center">
|
||||
<TextBlock Text="{Binding Title}" FontWeight="SemiBold" TextTrimming="CharacterEllipsis" />
|
||||
<TextBlock Text="{Binding Subtitle}" Style="{StaticResource Text.Secondary}" TextTrimming="CharacterEllipsis" Margin="0,2,0,0" />
|
||||
</StackPanel>
|
||||
<ui:StatusGlyph x:Name="State" Grid.Column="2" Kind="Online" Margin="8,0,0,0" VerticalAlignment="Center" ToolTip="{Binding StateText}" />
|
||||
</Grid>
|
||||
<DataTemplate.Triggers>
|
||||
<DataTrigger Binding="{Binding Kind}" Value="Drive">
|
||||
<Setter TargetName="Glyph" Property="Glyph" Value="{StaticResource Icon.Drive}" />
|
||||
<Setter TargetName="State" Property="Kind" Value="Offline" />
|
||||
</DataTrigger>
|
||||
<DataTrigger Binding="{Binding Kind}" Value="Folder">
|
||||
<Setter TargetName="Glyph" Property="Glyph" Value="{StaticResource Icon.Folder}" />
|
||||
<Setter TargetName="State" Property="Visibility" Value="Collapsed" />
|
||||
</DataTrigger>
|
||||
<DataTrigger Binding="{Binding IsKnown}" Value="False">
|
||||
<Setter TargetName="State" Property="Kind" Value="Offline" />
|
||||
</DataTrigger>
|
||||
<DataTrigger Binding="{Binding IsInserted}" Value="False">
|
||||
<Setter TargetName="Root" Property="Opacity" Value="0.6" />
|
||||
<Setter TargetName="State" Property="Kind" Value="Offline" />
|
||||
</DataTrigger>
|
||||
</DataTemplate.Triggers>
|
||||
</DataTemplate>
|
||||
</ListBox.ItemTemplate>
|
||||
</ListBox>
|
||||
</DockPanel>
|
||||
|
||||
<!-- ===================== Profile, form and plan ===================== -->
|
||||
<Border Grid.Column="2" Style="{StaticResource Border.Panel}" Padding="20,16">
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="*" />
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<!-- Profile header: nickname (or its field for a new card), identity, Edit ▾. -->
|
||||
<DockPanel Margin="0,0,0,14" MinHeight="32">
|
||||
<Button x:Name="EditButton" DockPanel.Dock="Right" Click="OnOpenMenu" IsEnabled="{Binding CanEditProfile}" ToolTip="{l:Loc Tooltips.Import.Edit}">
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<TextBlock Text="{l:Loc Import.Profile.Edit}" VerticalAlignment="Center" />
|
||||
<ui:Icon Glyph="{StaticResource Icon.ChevronDown}" Margin="6,0,0,0" />
|
||||
</StackPanel>
|
||||
<Button.ContextMenu>
|
||||
<ContextMenu>
|
||||
<MenuItem Header="{l:Loc Import.Profile.Rename}" Command="{Binding RenameCommand}" ToolTip="{l:Loc Tooltips.Import.Rename}" />
|
||||
<MenuItem Header="{l:Loc Import.Profile.CopyFrom}" ItemsSource="{Binding OtherCards}" ToolTip="{l:Loc Tooltips.Import.CopyFrom}">
|
||||
<MenuItem.ItemContainerStyle>
|
||||
<Style TargetType="MenuItem" BasedOn="{StaticResource {x:Type MenuItem}}">
|
||||
<Setter Property="Header" Value="{Binding Name}" />
|
||||
<Setter Property="Command" Value="{Binding Command}" />
|
||||
<Setter Property="ToolTip" Value="{l:Loc Tooltips.Import.CopyFrom}" />
|
||||
</Style>
|
||||
</MenuItem.ItemContainerStyle>
|
||||
</MenuItem>
|
||||
<Separator />
|
||||
<MenuItem Header="{l:Loc Import.Profile.Forget}" Command="{Binding ForgetCommand}" ToolTip="{l:Loc Tooltips.Import.Forget}" />
|
||||
</ContextMenu>
|
||||
</Button.ContextMenu>
|
||||
</Button>
|
||||
<StackPanel Orientation="Horizontal" VerticalAlignment="Center">
|
||||
<TextBlock Text="{Binding SourceTitle}" Style="{StaticResource Text.Title}" VerticalAlignment="Center" MaxWidth="320" TextTrimming="CharacterEllipsis"
|
||||
Visibility="{Binding IsNicknameOpen, Converter={x:Static ui:InverseBoolToVisibilityConverter.Instance}}" />
|
||||
<TextBox Width="240" Text="{Binding Nickname.Text, UpdateSourceTrigger=PropertyChanged}" shell:EditBehavior.Field="{Binding Nickname}"
|
||||
ui:Field.Placeholder="{l:Loc Import.Profile.Nickname}" ToolTip="{Binding Nickname.ToolTip}" AutomationProperties.Name="{l:Loc Import.Profile.Nickname}"
|
||||
Visibility="{Binding IsNicknameOpen, Converter={StaticResource BoolToVisibility}}" />
|
||||
</StackPanel>
|
||||
<TextBlock Text="{Binding IdentityText}" Foreground="{DynamicResource Brush.TextMuted}" VerticalAlignment="Center" Margin="12,0,12,0"
|
||||
TextTrimming="CharacterEllipsis" ToolTip="{Binding IdentityText}" />
|
||||
</DockPanel>
|
||||
|
||||
<!-- The form (Import.html grid). -->
|
||||
<StackPanel Grid.Row="1" IsEnabled="{Binding IsFormEnabled}">
|
||||
<HeaderedContentControl Style="{StaticResource Import.Row}" Header="{l:Loc Import.Label.Destination}">
|
||||
<WrapPanel>
|
||||
<RadioButton GroupName="Destination" Content="{l:Loc Import.Destination.Archive}" IsChecked="{Binding IsArchiveDestination}"
|
||||
IsEnabled="{Binding CanUseArchive}" ToolTip="{Binding ArchiveToolTip}" />
|
||||
<RadioButton GroupName="Destination" Content="{l:Loc Import.Destination.Folder}" IsChecked="{Binding IsFolderDestination}"
|
||||
ToolTip="{l:Loc Tooltips.Import.FolderDestination}" Margin="0,4,8,4" />
|
||||
<TextBox Width="190" Height="30" Text="{Binding FolderPath.Text, UpdateSourceTrigger=PropertyChanged, ValidatesOnNotifyDataErrors=True}"
|
||||
shell:EditBehavior.Field="{Binding FolderPath}" ToolTip="{Binding FolderPath.ToolTip}" AutomationProperties.Name="{l:Loc Import.Destination.Folder}"
|
||||
ui:Field.Placeholder="{l:Loc Import.Destination.FolderPlaceholder}" />
|
||||
<Button Style="{StaticResource Button.Icon}" Width="30" MinWidth="30" Height="30" Margin="6,0,18,0" Content="…" Command="{Binding ChooseDestinationCommand}"
|
||||
ToolTip="{l:Loc Tooltips.Import.ChooseFolder}" AutomationProperties.Name="{l:Loc Import.Destination.Choose}" />
|
||||
<RadioButton GroupName="Destination" IsChecked="{Binding IsServerDestination}" IsEnabled="{Binding CanUseServer}" ToolTip="{Binding ServerToolTip}">
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<TextBlock Text="{l:Loc Import.Destination.Server}" />
|
||||
<ui:Icon Glyph="{StaticResource Icon.Server}" Margin="10,0,6,0" Foreground="{DynamicResource Brush.Accent}" />
|
||||
<TextBlock Text="{Binding ServerName}" Foreground="{DynamicResource Brush.Accent}" />
|
||||
</StackPanel>
|
||||
</RadioButton>
|
||||
</WrapPanel>
|
||||
</HeaderedContentControl>
|
||||
|
||||
<HeaderedContentControl Style="{StaticResource Import.Row}" Header="{l:Loc Import.Label.Scan}">
|
||||
<WrapPanel>
|
||||
<CheckBox Content="{l:Loc Import.Scan.Subfolders}" IsChecked="{Binding IncludeSubfolders}" ToolTip="{l:Loc Tooltips.Import.Subfolders}" />
|
||||
<CheckBox Content="{l:Loc Import.Scan.Sessions}" IsChecked="{Binding SplitSessions}" ToolTip="{l:Loc Tooltips.Import.Sessions}" />
|
||||
<StackPanel Orientation="Horizontal" Style="{StaticResource Import.Choice}" IsEnabled="{Binding SplitSessions}">
|
||||
<TextBlock Text="{l:Loc Import.Scan.Gap}" Foreground="{DynamicResource Brush.TextMuted}" VerticalAlignment="Center" />
|
||||
<TextBox Style="{StaticResource TextBox.Small}" Text="{Binding GapMinutes.Text, UpdateSourceTrigger=PropertyChanged, ValidatesOnNotifyDataErrors=True}"
|
||||
shell:EditBehavior.Field="{Binding GapMinutes}" ToolTip="{Binding GapMinutes.ToolTip}" AutomationProperties.Name="{l:Loc Import.Scan.GapName}" />
|
||||
<TextBlock Text="{l:Loc Import.Scan.Minutes}" Foreground="{DynamicResource Brush.TextMuted}" VerticalAlignment="Center" />
|
||||
</StackPanel>
|
||||
<StackPanel Orientation="Horizontal" Style="{StaticResource Import.Choice}">
|
||||
<TextBlock Text="{l:Loc Import.Scan.Minimum}" Foreground="{DynamicResource Brush.TextMuted}" VerticalAlignment="Center" />
|
||||
<TextBox Style="{StaticResource TextBox.Small}" Text="{Binding MinimumFrames.Text, UpdateSourceTrigger=PropertyChanged, ValidatesOnNotifyDataErrors=True}"
|
||||
shell:EditBehavior.Field="{Binding MinimumFrames}" ToolTip="{Binding MinimumFrames.ToolTip}" AutomationProperties.Name="{l:Loc Import.Scan.MinimumName}" />
|
||||
<TextBlock Text="{l:Loc Import.Scan.Frames}" Foreground="{DynamicResource Brush.TextMuted}" VerticalAlignment="Center" />
|
||||
</StackPanel>
|
||||
<CheckBox Content="{l:Loc Import.Scan.Verify}" IsChecked="{Binding VerifyCopies}" ToolTip="{l:Loc Tooltips.Import.Verify}" />
|
||||
</WrapPanel>
|
||||
</HeaderedContentControl>
|
||||
|
||||
<HeaderedContentControl Style="{StaticResource Import.Row}" Header="{l:Loc Import.Label.Names}">
|
||||
<StackPanel>
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*" MinWidth="140" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="*" MinWidth="140" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<TextBox Style="{StaticResource TextBox.Mono}" Height="30" Text="{Binding FolderTemplate.Text, UpdateSourceTrigger=PropertyChanged, ValidatesOnNotifyDataErrors=True}"
|
||||
shell:EditBehavior.Field="{Binding FolderTemplate}" ToolTip="{Binding FolderTemplate.ToolTip}" GotKeyboardFocus="OnFolderTemplateFocus"
|
||||
AutomationProperties.Name="{l:Loc Import.Names.Folder}" />
|
||||
<TextBlock Grid.Column="1" Text="/" Foreground="{DynamicResource Brush.TextFaint}" Margin="10,0" VerticalAlignment="Center" />
|
||||
<TextBox Grid.Column="2" Style="{StaticResource TextBox.Mono}" Height="30"
|
||||
Text="{Binding FileTemplate.Text, UpdateSourceTrigger=PropertyChanged, ValidatesOnNotifyDataErrors=True}" shell:EditBehavior.Field="{Binding FileTemplate}"
|
||||
ToolTip="{Binding FileTemplate.ToolTip}" GotKeyboardFocus="OnFileTemplateFocus" AutomationProperties.Name="{l:Loc Import.Names.File}" />
|
||||
<Button x:Name="TokensButton" Grid.Column="3" Style="{StaticResource Button.Icon}" Width="30" MinWidth="30" Height="30" Margin="10,0,0,0" Content="{}{ }"
|
||||
Click="OnOpenMenu" ToolTip="{l:Loc Tooltips.Import.Tokens}" AutomationProperties.Name="{l:Loc Import.Names.Tokens}">
|
||||
<Button.ContextMenu>
|
||||
<ContextMenu ItemsSource="{Binding Tokens}" MaxHeight="420">
|
||||
<ContextMenu.ItemContainerStyle>
|
||||
<Style TargetType="MenuItem" BasedOn="{StaticResource {x:Type MenuItem}}">
|
||||
<Setter Property="Header" Value="{Binding Text}" />
|
||||
<Setter Property="InputGestureText" Value="{Binding ToolTip}" />
|
||||
<Setter Property="ToolTip" Value="{Binding ToolTip}" />
|
||||
<Setter Property="Command" Value="{Binding DataContext.InsertTokenCommand, RelativeSource={RelativeSource AncestorType=ContextMenu}}" />
|
||||
<Setter Property="CommandParameter" Value="{Binding}" />
|
||||
</Style>
|
||||
</ContextMenu.ItemContainerStyle>
|
||||
</ContextMenu>
|
||||
</Button.ContextMenu>
|
||||
</Button>
|
||||
</Grid>
|
||||
<TextBlock Text="{Binding NamePreview}" Style="{StaticResource Text.Secondary}" Foreground="{DynamicResource Brush.TextFaint}" Margin="0,6,0,0"
|
||||
TextTrimming="CharacterEllipsis" ToolTip="{Binding NamePreview}" />
|
||||
</StackPanel>
|
||||
</HeaderedContentControl>
|
||||
|
||||
<HeaderedContentControl Style="{StaticResource Import.Row}" Header="{l:Loc Import.Label.Duplicates}">
|
||||
<WrapPanel>
|
||||
<RadioButton GroupName="Duplicates" Content="{l:Loc Import.Duplicates.Skip}" IsChecked="{Binding SkipDuplicates}" ToolTip="{l:Loc Tooltips.Import.Skip}" />
|
||||
<RadioButton GroupName="Duplicates" Content="{l:Loc Import.Duplicates.Again}" IsChecked="{Binding ImportDuplicatesAgain}" ToolTip="{l:Loc Tooltips.Import.Again}" />
|
||||
</WrapPanel>
|
||||
</HeaderedContentControl>
|
||||
|
||||
<HeaderedContentControl Style="{StaticResource Import.Row}" Header="{l:Loc Import.Label.After}" Margin="0">
|
||||
<WrapPanel>
|
||||
<RadioButton GroupName="After" Content="{l:Loc Import.After.Keep}" IsChecked="{Binding KeepCard}" ToolTip="{l:Loc Tooltips.Import.Keep}" />
|
||||
<RadioButton GroupName="After" Content="{l:Loc Import.After.Delete}" IsChecked="{Binding DeleteImported}" IsEnabled="{Binding CardActionsApply}"
|
||||
ToolTip="{l:Loc Tooltips.Import.DeleteChoice}" />
|
||||
<RadioButton GroupName="After" Content="{l:Loc Import.After.Format}" IsChecked="{Binding FormatCard}" IsEnabled="{Binding CardActionsApply}"
|
||||
ToolTip="{l:Loc Tooltips.Import.FormatChoice}" />
|
||||
<Border Width="1" Height="20" Background="{DynamicResource Brush.Stroke}" Margin="0,0,18,0" VerticalAlignment="Center" />
|
||||
<CheckBox Content="{l:Loc Import.After.Eject}" IsChecked="{Binding Eject}" ToolTip="{l:Loc Tooltips.Import.EjectChoice}" />
|
||||
<CheckBox Content="{l:Loc Import.After.Deep}" IsChecked="{Binding DeepAnalysis}" IsEnabled="{Binding IsArchiveDestination}" ToolTip="{l:Loc Tooltips.Import.Deep}" />
|
||||
</WrapPanel>
|
||||
</HeaderedContentControl>
|
||||
</StackPanel>
|
||||
|
||||
<!-- ===================== Plan panel ===================== -->
|
||||
<Border Grid.Row="2" Style="{StaticResource Border.Card}" Padding="16,14" Margin="0,14,0,0">
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="*" />
|
||||
<RowDefinition Height="Auto" />
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<DockPanel Margin="0,0,0,10">
|
||||
<TextBlock DockPanel.Dock="Left" Text="{l:Loc Import.Plan.Title}" Style="{StaticResource Text.Section}" VerticalAlignment="Center" />
|
||||
<TextBlock DockPanel.Dock="Right" Text="{Binding SpaceText}" Foreground="{DynamicResource Brush.TextMuted}" Margin="12,0,0,0" VerticalAlignment="Center"
|
||||
ToolTip="{l:Loc Tooltips.Import.Space}" Visibility="{Binding IsSpaceShort, Converter={x:Static ui:InverseBoolToVisibilityConverter.Instance}}" />
|
||||
<ui:StatusGlyph DockPanel.Dock="Right" Kind="Warning" Text="{Binding SpaceText}" FontSize="13" Margin="12,0,0,0" VerticalAlignment="Center"
|
||||
ToolTip="{l:Loc Tooltips.Import.Space}" Visibility="{Binding IsSpaceShort, Converter={StaticResource BoolToVisibility}}" />
|
||||
<TextBlock DockPanel.Dock="Right" Text="{Binding ImportedBeforeText}" Foreground="{DynamicResource Brush.TextMuted}" Margin="12,0,0,0" VerticalAlignment="Center"
|
||||
ToolTip="{l:Loc Tooltips.Import.ImportedBefore}" />
|
||||
<ui:StatusGlyph DockPanel.Dock="Right" Kind="{Binding DuplicatesKind}" Text="{Binding DuplicatesText}" FontSize="13" Margin="12,0,0,0" VerticalAlignment="Center"
|
||||
ToolTip="{l:Loc Tooltips.Import.Duplicates}" Visibility="{Binding HasPlan, Converter={StaticResource BoolToVisibility}}" />
|
||||
<TextBlock Text="{Binding TotalsText}" Foreground="{DynamicResource Brush.TextMuted}" Margin="12,0,0,0" VerticalAlignment="Center"
|
||||
Typography.NumeralAlignment="Tabular" TextTrimming="CharacterEllipsis" ToolTip="{Binding TotalsText}" />
|
||||
</DockPanel>
|
||||
|
||||
<!-- No source, reading the card, or the reason no plan can be made. -->
|
||||
<StackPanel Grid.Row="1" VerticalAlignment="Center" HorizontalAlignment="Center" Visibility="{Binding ShowsStatus, Converter={StaticResource BoolToVisibility}}">
|
||||
<TextBlock Text="{Binding StatusText}" Foreground="{DynamicResource Brush.TextMuted}" TextAlignment="Center" TextWrapping="Wrap" MaxWidth="420" />
|
||||
<ProgressBar IsIndeterminate="{Binding IsBusyPlanning}" Width="240" Margin="0,12,0,0"
|
||||
Visibility="{Binding IsBusyPlanning, Converter={StaticResource BoolToVisibility}}" />
|
||||
</StackPanel>
|
||||
|
||||
<!-- Sessions of the plan with editable titles. -->
|
||||
<Grid Grid.Row="1" Visibility="{Binding HasPlan, Converter={StaticResource BoolToVisibility}}">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="*" />
|
||||
</Grid.RowDefinitions>
|
||||
<Grid TextElement.FontSize="12" Margin="0,0,0,4">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1.35*" MinWidth="110" />
|
||||
<ColumnDefinition Width="0.85*" MinWidth="70" />
|
||||
<ColumnDefinition Width="0.6*" MinWidth="56" />
|
||||
<ColumnDefinition Width="0.8*" MinWidth="64" />
|
||||
<ColumnDefinition Width="1.9*" MinWidth="150" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<TextBlock Style="{StaticResource Text.Header}" Text="{l:Loc Import.Session.Column.Session}" />
|
||||
<TextBlock Grid.Column="1" Style="{StaticResource Text.Header}" Text="{l:Loc Import.Session.Column.Frames}" Margin="10,0,0,0" />
|
||||
<TextBlock Grid.Column="2" Style="{StaticResource Text.Header}" Text="{l:Loc Import.Session.Column.Size}" Margin="10,0,0,0" TextAlignment="Right" />
|
||||
<TextBlock Grid.Column="3" Style="{StaticResource Text.Header}" Text="{l:Loc Import.Session.Column.Camera}" Margin="10,0,0,0" />
|
||||
<TextBlock Grid.Column="4" Style="{StaticResource Text.Header}" Text="{l:Loc Import.Session.Column.Sequence}" Margin="10,0,0,0" />
|
||||
</Grid>
|
||||
<ListBox Grid.Row="1" ItemsSource="{Binding Sessions}" ItemContainerStyle="{StaticResource ListBoxItem.PlainRow}" AutomationProperties.Name="{l:Loc Import.Plan.Title}">
|
||||
<ListBox.ItemTemplate>
|
||||
<DataTemplate DataType="{x:Type imp:ImportSessionRowViewModel}">
|
||||
<Grid Style="{StaticResource Session.Grid}" TextElement.FontSize="12">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1.35*" MinWidth="110" />
|
||||
<ColumnDefinition Width="0.85*" MinWidth="70" />
|
||||
<ColumnDefinition Width="0.6*" MinWidth="56" />
|
||||
<ColumnDefinition Width="0.8*" MinWidth="64" />
|
||||
<ColumnDefinition Width="1.9*" MinWidth="150" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<TextBlock Style="{StaticResource Text.Cell}" Text="{Binding Row.TimeText}" ToolTip="{Binding Row.TimeText}" />
|
||||
<TextBlock Grid.Column="1" Style="{StaticResource Text.Cell}" Text="{Binding Row.FramesText}" Margin="10,0,0,0" />
|
||||
<TextBlock Grid.Column="2" Style="{StaticResource Text.CellNumber}" Text="{Binding Row.SizeText}" Margin="10,0,0,0" />
|
||||
<TextBlock Grid.Column="3" Style="{StaticResource Text.Cell}" Text="{Binding Row.CameraText}" Margin="10,0,0,0" ToolTip="{Binding Row.CameraText}" />
|
||||
<DockPanel Grid.Column="4" Margin="10,0,0,0">
|
||||
<TextBlock x:Name="Target" DockPanel.Dock="Right" Text="{l:Loc Import.Session.NewShort}" Foreground="{DynamicResource Brush.Accent}"
|
||||
VerticalAlignment="Center" Margin="8,0,0,0" ToolTip="{Binding Row.TargetText}" />
|
||||
<TextBox Height="26" Padding="8,0" Text="{Binding Title.Text, UpdateSourceTrigger=PropertyChanged}" shell:EditBehavior.Field="{Binding Title}"
|
||||
ui:Field.Placeholder="{Binding Placeholder}" ToolTip="{Binding Title.ToolTip}" AutomationProperties.Name="{l:Loc Import.Session.Column.Sequence}" />
|
||||
</DockPanel>
|
||||
</Grid>
|
||||
<DataTemplate.Triggers>
|
||||
<DataTrigger Binding="{Binding Row.IsNew}" Value="False">
|
||||
<Setter TargetName="Target" Property="Text" Value="{l:Loc Import.Session.AddsShort}" />
|
||||
<Setter TargetName="Target" Property="Foreground" Value="{DynamicResource Brush.TextMuted}" />
|
||||
</DataTrigger>
|
||||
</DataTemplate.Triggers>
|
||||
</DataTemplate>
|
||||
</ListBox.ItemTemplate>
|
||||
</ListBox>
|
||||
</Grid>
|
||||
|
||||
<!-- The verification result and the after-import actions. -->
|
||||
<Grid Grid.Row="1" Grid.RowSpan="2" DataContext="{Binding Result}" Visibility="{Binding DataContext.IsDone, RelativeSource={RelativeSource AncestorType=UserControl}, Converter={StaticResource BoolToVisibility}}">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="*" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
</Grid.RowDefinitions>
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<ui:StatusGlyph Kind="{Binding ResultKind}" Text="{Binding ResultText}" FontSize="16" FontWeight="SemiBold" ToolTip="{l:Loc Tooltips.Import.Result}" />
|
||||
<TextBlock Text="{Binding DetailText}" Foreground="{DynamicResource Brush.TextMuted}" Margin="14,0,0,0" VerticalAlignment="Center" />
|
||||
</StackPanel>
|
||||
<ListBox Grid.Row="1" ItemsSource="{Binding Failures}" Margin="0,8,0,0" ItemContainerStyle="{StaticResource ListBoxItem.PlainRow}"
|
||||
Visibility="{Binding HasFailures, Converter={StaticResource BoolToVisibility}}" AutomationProperties.Name="{l:Loc Import.Result.FailuresName}">
|
||||
<ListBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding}" Style="{StaticResource Text.Cell}" Foreground="{DynamicResource Brush.Error}" Height="28" Padding="0,6,0,0" ToolTip="{Binding}" />
|
||||
</DataTemplate>
|
||||
</ListBox.ItemTemplate>
|
||||
</ListBox>
|
||||
<StackPanel Grid.Row="2" Margin="0,10,0,0" Visibility="{Binding OffersCheck, Converter={StaticResource BoolToVisibility}}">
|
||||
<TextBlock Text="{Binding EraseText}" Typography.NumeralAlignment="Tabular" />
|
||||
<TextBlock Text="{Binding BusyText}" Foreground="{DynamicResource Brush.TextMuted}" Margin="0,4,0,0"
|
||||
Visibility="{Binding BusyText, Converter={x:Static ui:NullToCollapsedConverter.Instance}}" />
|
||||
<ItemsControl ItemsSource="{Binding KeptReasons}" Focusable="False" MaxHeight="80" Margin="0,4,0,0">
|
||||
<ItemsControl.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<ui:StatusGlyph Kind="Warning" Text="{Binding}" FontSize="12" ToolTip="{l:Loc Tooltips.Import.Kept}" />
|
||||
</DataTemplate>
|
||||
</ItemsControl.ItemTemplate>
|
||||
</ItemsControl>
|
||||
</StackPanel>
|
||||
<WrapPanel Grid.Row="3" Margin="0,12,0,0">
|
||||
<Button Content="{l:Loc Import.Result.Check}" Command="{Binding CheckCommand}" ToolTip="{Binding CheckToolTip}" Margin="0,0,8,0"
|
||||
Visibility="{Binding OffersCheck, Converter={StaticResource BoolToVisibility}}" />
|
||||
<Button Style="{StaticResource Button.Destructive}" Content="{Binding DeleteText}" Command="{Binding DeleteCommand}" ToolTip="{Binding DeleteToolTip}"
|
||||
Margin="0,0,8,0" Visibility="{Binding OffersDelete, Converter={StaticResource BoolToVisibility}}" />
|
||||
<Button Style="{StaticResource Button.Destructive}" Content="{l:Loc Import.Result.Format}" Command="{Binding FormatCommand}" ToolTip="{Binding FormatToolTip}"
|
||||
Margin="0,0,8,0" Visibility="{Binding OffersFormat, Converter={StaticResource BoolToVisibility}}" />
|
||||
<Button Command="{Binding EjectCommand}" ToolTip="{Binding EjectToolTip}" Margin="0,0,8,0">
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<ui:Icon Glyph="{StaticResource Icon.Eject}" Margin="0,0,6,0" />
|
||||
<TextBlock Text="{l:Loc Import.Result.Eject}" />
|
||||
</StackPanel>
|
||||
</Button>
|
||||
<Button Content="{l:Loc Import.Result.Library}" Command="{Binding OpenLibraryCommand}" ToolTip="{l:Loc Tooltips.Import.Library}" Margin="0,0,8,0" />
|
||||
<Button Content="{l:Loc Import.Result.New}" Command="{Binding DataContext.NewImportCommand, RelativeSource={RelativeSource AncestorType=UserControl}}"
|
||||
ToolTip="{l:Loc Tooltips.Import.New}" />
|
||||
</WrapPanel>
|
||||
</Grid>
|
||||
|
||||
<!-- The import failed or was cancelled. -->
|
||||
<StackPanel Grid.Row="1" VerticalAlignment="Center" HorizontalAlignment="Center" Visibility="{Binding IsFailed, Converter={StaticResource BoolToVisibility}}">
|
||||
<ui:StatusGlyph Kind="Failed" Text="{Binding ErrorText}" FontSize="13" HorizontalAlignment="Center" ToolTip="{l:Loc Tooltips.Import.Failed}" />
|
||||
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center" Margin="0,12,0,0">
|
||||
<Button Content="{l:Loc Import.Failed.Retry}" Command="{Binding RetryCommand}" ToolTip="{l:Loc Tooltips.Import.Retry}" Margin="0,0,8,0" />
|
||||
<Button Content="{l:Loc Shell.Nav.Jobs}" Command="{Binding Shell.NavigateCommand}" CommandParameter="Jobs" ToolTip="{l:Loc Tooltips.Nav.Jobs}" />
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
|
||||
<!-- Footer: Show plan and Import, or the progress while copying. -->
|
||||
<DockPanel Grid.Row="2" Margin="0,10,0,0" Visibility="{Binding HasPlan, Converter={StaticResource BoolToVisibility}}">
|
||||
<Button DockPanel.Dock="Left" Content="{l:Loc Import.Plan.Show}" Command="{Binding ShowPlanCommand}" ToolTip="{l:Loc Tooltips.Import.ShowPlan}"
|
||||
Visibility="{Binding IsRunning, Converter={x:Static ui:InverseBoolToVisibilityConverter.Instance}}" />
|
||||
<Button DockPanel.Dock="Right" Style="{StaticResource Button.Primary}" Height="36" Padding="22,0" Content="{Binding StartText}" Command="{Binding StartCommand}"
|
||||
ToolTip="{Binding StartToolTip}" Visibility="{Binding IsRunning, Converter={x:Static ui:InverseBoolToVisibilityConverter.Instance}}" />
|
||||
<Button DockPanel.Dock="Right" Content="{l:Loc Import.Progress.Cancel}" Command="{Binding CancelCommand}" ToolTip="{l:Loc Tooltips.Import.Cancel}" Margin="12,0,0,0"
|
||||
Visibility="{Binding IsRunning, Converter={StaticResource BoolToVisibility}}" />
|
||||
<Grid Visibility="{Binding IsRunning, Converter={StaticResource BoolToVisibility}}" VerticalAlignment="Center">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<ProgressBar Maximum="1" Value="{Binding Progress, Mode=OneWay}" VerticalAlignment="Center" />
|
||||
<TextBlock Grid.Column="1" Text="{Binding ProgressText}" Foreground="{DynamicResource Brush.TextMuted}" Margin="12,0,0,0" Typography.NumeralAlignment="Tabular" />
|
||||
</Grid>
|
||||
</DockPanel>
|
||||
</Grid>
|
||||
</Border>
|
||||
|
||||
<!-- ===================== Show plan ===================== -->
|
||||
<Border Grid.RowSpan="3" Style="{StaticResource Border.Panel}" Background="{DynamicResource Brush.Surface}" Padding="0" Margin="-8"
|
||||
Visibility="{Binding IsDetailsOpen, Converter={StaticResource BoolToVisibility}}">
|
||||
<Grid DataContext="{Binding Details}" Margin="16,12">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="*" />
|
||||
</Grid.RowDefinitions>
|
||||
<DockPanel>
|
||||
<Button DockPanel.Dock="Right" Style="{StaticResource Button.IconSubtle}" ui:ButtonIcon.Glyph="{StaticResource Icon.Close}"
|
||||
Command="{Binding DataContext.CloseDetailsCommand, RelativeSource={RelativeSource AncestorType=UserControl}}" ToolTip="{l:Loc Tooltips.Import.ClosePlan}"
|
||||
AutomationProperties.Name="{l:Loc Import.Details.Close}" />
|
||||
<TextBlock Text="{l:Loc Import.Details.Title}" Style="{StaticResource Text.Title}" VerticalAlignment="Center" />
|
||||
<TextBlock Text="{Binding TotalsText}" Foreground="{DynamicResource Brush.TextMuted}" Margin="14,0,0,0" VerticalAlignment="Center" TextTrimming="CharacterEllipsis"
|
||||
Typography.NumeralAlignment="Tabular" />
|
||||
</DockPanel>
|
||||
<ItemsControl Grid.Row="1" ItemsSource="{Binding Conflicts}" Focusable="False" Margin="0,8,0,0" MaxHeight="96">
|
||||
<ItemsControl.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<ui:StatusGlyph Kind="Warning" Text="{Binding}" FontSize="12" Margin="0,2" ToolTip="{l:Loc Tooltips.Import.Conflict}" />
|
||||
</DataTemplate>
|
||||
</ItemsControl.ItemTemplate>
|
||||
</ItemsControl>
|
||||
<Grid Grid.Row="2" Margin="0,10,0,4" TextElement.FontSize="12">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1.2*" MinWidth="140" />
|
||||
<ColumnDefinition Width="1.8*" MinWidth="180" />
|
||||
<ColumnDefinition Width="0.8*" MinWidth="90" />
|
||||
<ColumnDefinition Width="0.5*" MinWidth="64" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<TextBlock Style="{StaticResource Text.Header}" Text="{l:Loc Import.Details.Column.Source}" />
|
||||
<TextBlock Grid.Column="1" Style="{StaticResource Text.Header}" Text="{l:Loc Import.Details.Column.Destination}" Margin="10,0,0,0" />
|
||||
<TextBlock Grid.Column="2" Style="{StaticResource Text.Header}" Text="{l:Loc Import.Details.Column.Action}" Margin="10,0,0,0" />
|
||||
<TextBlock Grid.Column="3" Style="{StaticResource Text.Header}" Text="{l:Loc Import.Session.Column.Size}" Margin="10,0,0,0" TextAlignment="Right" />
|
||||
</Grid>
|
||||
<ListBox Grid.Row="3" ItemsSource="{Binding Rows}" ItemContainerStyle="{StaticResource ListBoxItem.PlainRow}" AutomationProperties.Name="{l:Loc Import.Details.Title}">
|
||||
<ListBox.ItemTemplate>
|
||||
<DataTemplate DataType="{x:Type imp:PlanDetailRow}">
|
||||
<Grid x:Name="Row" Height="30" TextElement.FontSize="12">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1.2*" MinWidth="140" />
|
||||
<ColumnDefinition Width="1.8*" MinWidth="180" />
|
||||
<ColumnDefinition Width="0.8*" MinWidth="90" />
|
||||
<ColumnDefinition Width="0.5*" MinWidth="64" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<TextBlock x:Name="Source" Style="{StaticResource Text.Cell}" Text="{Binding Source}" ToolTip="{Binding Source}" />
|
||||
<TextBlock Grid.Column="1" Style="{StaticResource Text.Cell}" Text="{Binding Destination}" Margin="10,0,0,0" ToolTip="{Binding Destination}" />
|
||||
<TextBlock x:Name="Action" Grid.Column="2" Style="{StaticResource Text.Cell}" Text="{Binding ActionText}" Margin="10,0,0,0" />
|
||||
<TextBlock Grid.Column="3" Style="{StaticResource Text.CellNumber}" Text="{Binding SizeText}" Margin="10,0,0,0" />
|
||||
</Grid>
|
||||
<DataTemplate.Triggers>
|
||||
<DataTrigger Binding="{Binding Kind}" Value="Session">
|
||||
<Setter TargetName="Source" Property="FontWeight" Value="SemiBold" />
|
||||
<Setter TargetName="Row" Property="Height" Value="34" />
|
||||
</DataTrigger>
|
||||
<DataTrigger Binding="{Binding IsSkipped}" Value="True">
|
||||
<Setter TargetName="Row" Property="Opacity" Value="0.6" />
|
||||
<Setter TargetName="Action" Property="Foreground" Value="{DynamicResource Brush.TextMuted}" />
|
||||
</DataTrigger>
|
||||
</DataTemplate.Triggers>
|
||||
</DataTemplate>
|
||||
</ListBox.ItemTemplate>
|
||||
</ListBox>
|
||||
</Grid>
|
||||
</Border>
|
||||
</Grid>
|
||||
</Border>
|
||||
</Grid>
|
||||
</UserControl>
|
||||
@@ -1,8 +1,28 @@
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Controls.Primitives;
|
||||
using System.Windows.Input;
|
||||
|
||||
namespace Titano.App.Sections;
|
||||
|
||||
public partial class ImportView : UserControl
|
||||
{
|
||||
public ImportView() => InitializeComponent();
|
||||
|
||||
private ImportViewModel? Model => DataContext as ImportViewModel;
|
||||
|
||||
/// <summary>"Edit ▾" and "{ }" open their menu under themselves.</summary>
|
||||
private void OnOpenMenu(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (sender is not Button { ContextMenu: { } menu } button) return;
|
||||
menu.DataContext = DataContext;
|
||||
menu.PlacementTarget = button;
|
||||
menu.Placement = PlacementMode.Bottom;
|
||||
menu.IsOpen = true;
|
||||
}
|
||||
|
||||
/// <summary>The "{ }" menu writes into the template field used last.</summary>
|
||||
private void OnFolderTemplateFocus(object sender, KeyboardFocusChangedEventArgs e) => Model?.SetActiveTemplate(folder: true);
|
||||
|
||||
private void OnFileTemplateFocus(object sender, KeyboardFocusChangedEventArgs e) => Model?.SetActiveTemplate(folder: false);
|
||||
}
|
||||
File diff suppressed because it is too large.
Load diff
@@ -14,6 +14,11 @@
|
||||
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" />
|
||||
</Border>
|
||||
<StackPanel x:Name="Typing" Margin="0,16,0,0" Visibility="Collapsed">
|
||||
<TextBlock Text="{Binding TypedPrompt}" Foreground="{DynamicResource Brush.TextMuted}" TextWrapping="Wrap" />
|
||||
<TextBox x:Name="Typed" Margin="0,6,0,0" ui:Field.Placeholder="{Binding TypedConfirmation}" ToolTip="{Binding TypedPrompt}"
|
||||
AutomationProperties.Name="{Binding TypedPrompt}" TextChanged="OnTyped" />
|
||||
</StackPanel>
|
||||
<StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="0,24,0,0">
|
||||
<Button Content="{Binding SafeText}" ToolTip="{Binding SafeToolTip}" IsDefault="True" IsCancel="True" MinWidth="96" Click="OnSafe" />
|
||||
<Button x:Name="Action" Content="{Binding ActionText}" ToolTip="{Binding ActionToolTip}" MinWidth="96" Margin="8,0,0,0" Click="OnAction" />
|
||||
|
||||
@@ -12,6 +12,10 @@ public sealed partial class ConfirmDialog : TitanoWindow
|
||||
DataContext = request;
|
||||
InitializeComponent();
|
||||
Action.SetResourceReference(StyleProperty, request.IsDestructive ? "Button.Destructive" : "Button.Primary");
|
||||
if (request.TypedConfirmation is null) return;
|
||||
Typing.Visibility = Visibility.Visible;
|
||||
Action.IsEnabled = false;
|
||||
Loaded += (_, _) => Typed.Focus();
|
||||
}
|
||||
|
||||
/// <summary>True when the user chose the action.</summary>
|
||||
@@ -26,4 +30,7 @@ public sealed partial class ConfirmDialog : TitanoWindow
|
||||
private void OnSafe(object sender, RoutedEventArgs e) => DialogResult = false;
|
||||
|
||||
private void OnAction(object sender, RoutedEventArgs e) => DialogResult = true;
|
||||
|
||||
private void OnTyped(object sender, System.Windows.Controls.TextChangedEventArgs e) =>
|
||||
Action.IsEnabled = string.Equals(Typed.Text.Trim(), ((ConfirmRequest)DataContext).TypedConfirmation, StringComparison.CurrentCultureIgnoreCase);
|
||||
}
|
||||
@@ -3,7 +3,9 @@ using System.Windows;
|
||||
using System.Windows.Media;
|
||||
using System.Windows.Media.Imaging;
|
||||
using System.Windows.Threading;
|
||||
using Titano.App.Archiving;
|
||||
using Titano.App.DesignTime;
|
||||
using Titano.App.Import;
|
||||
using Titano.App.Settings;
|
||||
using Titano.Core.Diagnostics;
|
||||
using Titano.Ui.Theming;
|
||||
@@ -91,10 +93,20 @@ public static class ScreenCapture
|
||||
shell.Navigate(SectionKey.About);
|
||||
written += await SaveAsync(window, directory, "about", theme);
|
||||
|
||||
foreach (var key in new[] { SectionKey.Import, SectionKey.Sequence, SectionKey.Archive })
|
||||
shell.Navigate(SectionKey.Sequence);
|
||||
written += await SaveAsync(window, directory, "sequence", theme);
|
||||
|
||||
DismissToasts(window);
|
||||
foreach (var state in ImportScenes.States)
|
||||
{
|
||||
shell.Navigate(key);
|
||||
written += await SaveAsync(window, directory, key.ToString().ToLowerInvariant(), theme);
|
||||
await ImportScenes.ShowAsync(shell, state);
|
||||
written += await SaveAsync(window, directory, "import-" + state, theme);
|
||||
}
|
||||
DismissToasts(window);
|
||||
foreach (var view in ArchiveScenes.Views)
|
||||
{
|
||||
await ArchiveScenes.ShowAsync(shell, view);
|
||||
written += await SaveAsync(window, directory, "archive-" + view, theme);
|
||||
}
|
||||
}
|
||||
Log.Info("capture", $"{written} screenshot(s) written to {Path.GetFullPath(directory)}");
|
||||
@@ -111,6 +123,12 @@ public static class ScreenCapture
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Toasts of one screen's scene stay out of the next screen's picture.</summary>
|
||||
private static void DismissToasts(MainWindow window)
|
||||
{
|
||||
foreach (var toast in window.Toasts.Toasts.ToList()) window.Toasts.Dismiss(toast);
|
||||
}
|
||||
|
||||
private static async Task<int> SaveAsync(Window window, string directory, string screen, AppTheme theme, ShellViewModel? waitForThumbnails = null)
|
||||
{
|
||||
await Settle(window);
|
||||
|
||||
@@ -42,10 +42,10 @@ public sealed class CardPoolTests
|
||||
Assert.Equal("New card", pool[0].StateText);
|
||||
Assert.Equal("EOS R5 · card A", pool[1].Title);
|
||||
Assert.Equal("Known card", pool[1].StateText);
|
||||
Assert.Equal(@"F:\ · 128 GB · 96.2 GB used", pool[1].Subtitle);
|
||||
Assert.Equal(@"F:\ · 128 GB · serial 3F2A-9C11 · Canon EOS R5 #0431", pool[1].IdentityText);
|
||||
Assert.Equal("128 GB · 96.2 GB used", pool[1].Subtitle);
|
||||
Assert.Equal("128 GB · serial 3F2A-9C11 · Canon EOS R5 #0431", pool[1].IdentityText);
|
||||
Assert.Equal(SourceKind.Drive, pool[2].Kind);
|
||||
Assert.Equal(@"G:\ · no DCIM · 1.8 TB free", pool[2].Subtitle);
|
||||
Assert.Equal("no DCIM · 1.8 TB free", pool[2].Subtitle);
|
||||
Assert.False(pool[3].IsInserted);
|
||||
Assert.Null(pool[3].Root);
|
||||
Assert.Equal("Canon EOS R5 · not inserted", pool[3].Subtitle);
|
||||
|
||||
Reference in new issue
Block a user