fix(app): Library and Archive delete, quick actions and toolbar after review
Delete… runs in an in-window dialog shared by the Library and the Archive manager: the dry run and the move into the trash report progress and stop on Cancel, the toast counts only what really moved, and its Undo reports failures. The confirmation names at most six moves and three refusals in the UI font. Delete… stands apart at the far right of both bars and last in the tab order. The toolbar's filters wrap instead of pushing out the right-hand group at 1200 px. Card and row quick actions show while selected or focused, so Tab reaches them; Analyse and Render are disabled with a reason when nothing can run them, and say so in a toast if the session drops. Remote cards get their own card, Analyse and Render tooltips; the details panel's Folder and the saved-view menu say why they are disabled. Status offers Rendered, Not rendered and Synced. Remote cards count in the Year and Camera choices and the timeline. The trash dialog shows one sentence when empty. --capture adds archive-trash and library-viewname. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012iLMBNwBE2GnphAsu4cjaC
This commit is contained in:
29 files changed
+602
-170
No files matched your search
@@ -74,7 +74,11 @@ public sealed class LibraryActions(ShellViewModel shell)
|
||||
{
|
||||
if (sequence is { Origin: SequenceOrigin.Server, SyncState: SyncState.RemoteOnly })
|
||||
{
|
||||
if (Remote() is not { } remote) return;
|
||||
if (Remote() is not { } remote)
|
||||
{
|
||||
NotConnected();
|
||||
return;
|
||||
}
|
||||
await PostAsync(async () =>
|
||||
{
|
||||
var (project, width, height) = await RemoteProjectAsync(remote, sequence.Id);
|
||||
@@ -127,7 +131,11 @@ public sealed class LibraryActions(ShellViewModel shell)
|
||||
/// </summary>
|
||||
public async Task<Guid?> OpenRemoteAsync(Sequence sequence)
|
||||
{
|
||||
if (Remote() is not { } remote || Services.Engine is not { } engine) return null;
|
||||
if (Remote() is not { } remote || Services.Engine is not { } engine)
|
||||
{
|
||||
NotConnected();
|
||||
return null;
|
||||
}
|
||||
if (remote.Service.OpenRemote(remote.Server, sequence.Id) is not null)
|
||||
{
|
||||
shell.OpenSequence(sequence.Id);
|
||||
@@ -173,7 +181,12 @@ public sealed class LibraryActions(ShellViewModel shell)
|
||||
|
||||
private async Task QueueAsync(ArchiveJobRequest request)
|
||||
{
|
||||
if (Services.Engine is not { } engine || request.Targets.Count == 0) return;
|
||||
if (request.Targets.Count == 0) return;
|
||||
if (Services.Engine is not { } engine)
|
||||
{
|
||||
shell.Notify(Loc.L("Library.Blocked.NoIndex"));
|
||||
return;
|
||||
}
|
||||
await engine.EnqueueAsync(request);
|
||||
Queued(request.Kind, request.Label ?? string.Empty);
|
||||
}
|
||||
@@ -182,7 +195,11 @@ public sealed class LibraryActions(ShellViewModel shell)
|
||||
private async Task PostAsync(Func<Task<CreateJobRequest>> build, JobKind kind, string label)
|
||||
{
|
||||
var session = Services.Server;
|
||||
if (!CanPost || session.Flow is not { Address: { } address, Token: { } token }) return;
|
||||
if (!CanPost || session.Flow is not { Address: { } address, Token: { } token })
|
||||
{
|
||||
NotConnected();
|
||||
return;
|
||||
}
|
||||
try
|
||||
{
|
||||
var request = await build();
|
||||
@@ -197,6 +214,9 @@ public sealed class LibraryActions(ShellViewModel shell)
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>A remote card's action could not start: the session ended since the card was drawn.</summary>
|
||||
private void NotConnected() => shell.Notify(Loc.L("Library.Remote.Unavailable"), Loc.L("Library.Blocked.NotConnected"));
|
||||
|
||||
/// <summary>The project of a remote card: from its proxy cache when it was opened here, else from the server's manifest; and its frame size when cached.</summary>
|
||||
private static async Task<(ProjectSettings Project, int Width, int Height)> RemoteProjectAsync(RemoteSource remote, Guid id)
|
||||
{
|
||||
|
||||
@@ -7,11 +7,12 @@ namespace Titano.App.Library;
|
||||
/// <summary>
|
||||
/// The Library states that <c>--capture</c> renders (<c>library-<scene>-<theme>.png</c>) and the screen smoke
|
||||
/// tests check, on the sample index while signed in to the sample server: the timeline with a month chosen, a selection
|
||||
/// with the whole mass actions bar, and the server's sequences without a copy here as remote cards.
|
||||
/// with the whole mass actions bar, the server's sequences without a copy here as remote cards, and "Save view" naming
|
||||
/// the filters on screen.
|
||||
/// </summary>
|
||||
public static class LibraryScenes
|
||||
{
|
||||
public static readonly IReadOnlyList<string> Scenes = ["timeline", "mass", "remote"];
|
||||
public static readonly IReadOnlyList<string> Scenes = ["timeline", "mass", "remote", "viewname"];
|
||||
|
||||
/// <summary>Sequences selected for the mass actions bar.</summary>
|
||||
public const int MassSelection = 3;
|
||||
@@ -20,6 +21,7 @@ public static class LibraryScenes
|
||||
{
|
||||
var library = shell.Library;
|
||||
shell.Navigate(SectionKey.Library);
|
||||
library.Dialog?.CloseCommand.Execute(null);
|
||||
library.ClearSelectionCommand.Execute(null);
|
||||
library.ClearFiltersCommand.Execute(null);
|
||||
library.LayoutIndex = 0;
|
||||
@@ -45,6 +47,12 @@ public static class LibraryScenes
|
||||
// Remote thumbnails come through the sync engine's connection, not the local thumbnail service.
|
||||
for (var i = 0; i < 60 && library.Items.Any(item => item.Thumbnail is null); i++) await Task.Delay(50);
|
||||
break;
|
||||
case "viewname":
|
||||
library.SelectedStatus = library.Statuses.First(o => o.Value == StatusFilter.NotRendered);
|
||||
await library.RefreshAsync();
|
||||
library.OpenSaveView();
|
||||
if (library.Dialog is ViewNameDialogViewModel naming) naming.Name.Text = library.SelectedStatus.Label;
|
||||
break;
|
||||
default:
|
||||
throw new ArgumentOutOfRangeException(nameof(scene), scene, "Unknown Library scene.");
|
||||
}
|
||||
|
||||
@@ -6,7 +6,7 @@ using Titano.Data.Repositories;
|
||||
|
||||
namespace Titano.App.Library;
|
||||
|
||||
/// <summary>A named set of Library filters and sort ("Night, 4K, not analysed"), BRIEF §12.2.</summary>
|
||||
/// <summary>A named set of Library filters and sort ("Night, 4K, not rendered"), BRIEF §12.2.</summary>
|
||||
public sealed record SavedView
|
||||
{
|
||||
public const int MaxName = 40;
|
||||
|
||||
Reference in new issue
Block a user