feat(app): Reorganize existing sequences from the Archive manager, the Library and Settings
Owner review 2, R7 asks to rename and move sequences after import on the desktop too.
The desktop now uses the engine's Reorganize, the same plan and job as the web panel.
- One Reorganize… dialog replaces Rename… and Move… in the Archive manager and Move… in
the Library. It has three templates: folders, file names and titles. Each one has a
switch and is checked as it is typed. Folders and file names start on, filled from the
archive's settings; titles start off as {title}. Renaming only titles is the Titles
switch alone.
- The dry run stays in the dialog and follows the typing. Each sequence shows its folder,
title and first file names before and after. Sequences carried along with a folder are
marked, and photos that keep their names are listed with the reason. A summary counts
the sequences that change, the files renamed and the names kept.
- Apply no longer changes the archive from the dialog. It queues the engine's move job
with exactly the plan shown (its fingerprint), so the work can be paused, resumed after
a restart and followed in Jobs. The job refuses the plan if the archive changed after
the dry run.
- The Library's Reorganize… works on the selected sequences of one archive. The Archive
screen reads the archive again when a move job ends.
- After Settings › Archive saves a new folder or file template to an archive that holds
sequences, a toast offers Reorganize… for every sequence. Its templates are the ones
changed since; a second change made while the toast is up adds to that toast instead of
opening another.
- Strings in en and it. The keys of the old Rename and Move were removed and pruned from
every translation, so the 36 other languages show the new keys as untranslated instead
of keeping "Move".
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
(cherry picked from commit 7bbf451f737a71b768dcd70a77b998daaef851f3)
This commit is contained in:
1 parent
17efb50e11
commit
ad72501f11
134 files changed
+998
-888
No files matched your search
@@ -94,17 +94,18 @@ public sealed class ArchiveScreenSmokeTests
|
||||
Assert.Equal(0, ((SolidColorBrush)frame.Background).Color.A, "the disabled tree keeps its panel's fill instead of the system's white");
|
||||
AssertNoErrorShown(app);
|
||||
|
||||
await ArchiveScenes.ShowAsync(app.Shell, "move");
|
||||
var move = Assert.NotNull(archive.Dialog as RenameDialogViewModel);
|
||||
Assert.NotEmpty(move.Rows, "the dry run lists the folders that change");
|
||||
Assert.Null(move.ErrorText);
|
||||
await app.ExpectAsync<ArchiveView>("archive-move");
|
||||
Assert.True(ButtonFor(app, move.ApplyCommand).IsEnabled, "Apply follows the dry run");
|
||||
Assert.True(ButtonFor(app, move.CloseCommand).IsDefault, "Enter takes the safe way out");
|
||||
await ArchiveScenes.ShowAsync(app.Shell, "reorganize");
|
||||
var reorganize = Assert.NotNull(archive.Dialog as ReorganizeDialogViewModel);
|
||||
Assert.NotEmpty(reorganize.Rows, "the dry run lists the sequences that change");
|
||||
Assert.Null(reorganize.ErrorText);
|
||||
await app.ExpectAsync<ArchiveView>("archive-reorganize");
|
||||
Assert.True(ButtonFor(app, reorganize.ApplyCommand).IsEnabled, "Apply follows the dry run");
|
||||
Assert.True(ButtonFor(app, reorganize.CloseCommand).IsDefault, "Enter takes the safe way out");
|
||||
foreach (var box in app.FindAll<CheckBox>().Where(c => c.IsVisible)) Assert.NotNull(box.ToolTip, "every template switch says what it does");
|
||||
AssertNoErrorShown(app);
|
||||
AssertEveryButtonIsNamed(app);
|
||||
|
||||
move.CloseCommand.Execute(null);
|
||||
reorganize.CloseCommand.Execute(null);
|
||||
archive.RetagSetCommand.Execute(null);
|
||||
var retag = Assert.NotNull(archive.Dialog as RetagDialogViewModel);
|
||||
retag.Add.Text = "sunset";
|
||||
@@ -134,14 +135,15 @@ public sealed class ArchiveScreenSmokeTests
|
||||
await app.ExpectAsync<ArchiveView>("archive-rebuild-ar");
|
||||
Assert.Equal(FlowDirection.LeftToRight, TextFor(app, archive.SelectedArchive!.RootPath).FlowDirection, "the archive folder reads left to right");
|
||||
|
||||
await ArchiveScenes.ShowAsync(app.Shell, "move");
|
||||
var move = Assert.NotNull(archive.Dialog as RenameDialogViewModel);
|
||||
await app.ExpectAsync<ArchiveView>("archive-move-ar");
|
||||
var template = Assert.NotNull(app.FindAll<TextBox>().FirstOrDefault(t => t.IsVisible && EditBehavior.GetField(t) == move.Template));
|
||||
await ArchiveScenes.ShowAsync(app.Shell, "reorganize");
|
||||
var reorganize = Assert.NotNull(archive.Dialog as ReorganizeDialogViewModel);
|
||||
await app.ExpectAsync<ArchiveView>("archive-reorganize-ar");
|
||||
var template = Assert.NotNull(app.FindAll<TextBox>().FirstOrDefault(t => t.IsVisible && EditBehavior.GetField(t) == reorganize.Folders.Field));
|
||||
Assert.Equal(FlowDirection.LeftToRight, template.FlowDirection, "the naming template reads left to right");
|
||||
Assert.Equal(FlowDirection.LeftToRight, TextFor(app, move.Rows[0].From).FlowDirection, "a folder before the move reads left to right");
|
||||
Assert.Equal(FlowDirection.LeftToRight, TextFor(app, move.Rows[0].To).FlowDirection, "a folder after the move reads left to right");
|
||||
move.CloseCommand.Execute(null);
|
||||
var folder = reorganize.Rows.SelectMany(r => r.Lines).First(l => l.IsPath);
|
||||
Assert.Equal(FlowDirection.LeftToRight, TextFor(app, folder.From).FlowDirection, "a folder before the move reads left to right");
|
||||
Assert.Equal(FlowDirection.LeftToRight, TextFor(app, folder.To).FlowDirection, "a folder after the move reads left to right");
|
||||
reorganize.CloseCommand.Execute(null);
|
||||
}
|
||||
finally
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user