feat(videos): board of published and workspace renders; card line starts with the preset
The Videos section and the admin Videos page gain a Board view with two
lanes, newest first, each with a count and the list's filters: Published
(library and server renders, including those sent from a workspace) and
Workspace (workspace exports, unsent ones plus sent ones marked Sent).
Cards show the sequence, project and version when known, preset, kind,
date and state chips, and reuse the existing actions; no new store.
Video cards now start with the preset ("4K archive · HEVC · 0:41 · 1.4 GB")
and Formatting.Bytes keeps number and unit together with a no-break space
(#28). The capture tool adds the videos-board scene in both themes.
Refs #29
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
fe50b87726
commit
5a6efbb72f
27 files changed
+792
-74
No files matched your search
@@ -565,7 +565,7 @@ public sealed class SettingsLogicTests
|
||||
pending.SetResult(new WorkspaceUsage(MediaBytes: 9_000_000_000, TotalBytes: 12_400_000_000, TrashBytes: 1_200_000_000, TrashItems: 3));
|
||||
await measuring;
|
||||
Assert.False(rows.IsMeasuring);
|
||||
Assert.Equal(("12.4 GB used", "3 items, 1.2 GB"), (rows.UsageText, rows.TrashText));
|
||||
Assert.Equal(("12.4\u00A0GB used", "3 items, 1.2\u00A0GB"), (rows.UsageText, rows.TrashText));
|
||||
Assert.True(rows.HasUsageText);
|
||||
Assert.True(rows.HasTrash);
|
||||
Assert.True(rows.EmptyTrashCommand.CanExecute(null));
|
||||
@@ -573,13 +573,13 @@ public sealed class SettingsLogicTests
|
||||
|
||||
workspace.Measure = _ => Task.FromResult(new WorkspaceUsage(0, 4_000, 0, 0));
|
||||
await rows.MeasureAsync();
|
||||
Assert.Equal(("4 KB used", "Nothing in trash"), (rows.UsageText, rows.TrashText));
|
||||
Assert.Equal(("4\u00A0KB used", "Nothing in trash"), (rows.UsageText, rows.TrashText));
|
||||
Assert.False(rows.HasTrash);
|
||||
Assert.False(rows.EmptyTrashCommand.CanExecute(null));
|
||||
Assert.Equal(Loc.L("Tooltips.Settings.Workspace.EmptyTrash.Disabled"), rows.EmptyTrashToolTip);
|
||||
workspace.Measure = _ => Task.FromResult(new WorkspaceUsage(0, 1_000, 2_000, 1));
|
||||
await rows.MeasureAsync();
|
||||
Assert.Equal("1 item, 2 KB", rows.TrashText);
|
||||
Assert.Equal("1 item, 2\u00A0KB", rows.TrashText);
|
||||
}
|
||||
|
||||
[Test]
|
||||
@@ -600,7 +600,7 @@ public sealed class SettingsLogicTests
|
||||
Assert.True(firstToken.IsCancellationRequested, "the older measure is told to stop");
|
||||
first.SetResult(new WorkspaceUsage(0, 9_000_000_000, 0, 5));
|
||||
await older;
|
||||
Assert.Equal(("2 MB used", false, false), (rows.UsageText, rows.HasTrash, rows.IsMeasuring));
|
||||
Assert.Equal(("2\u00A0MB used", false, false), (rows.UsageText, rows.HasTrash, rows.IsMeasuring));
|
||||
|
||||
workspace.Measure = _ => Task.FromException<WorkspaceUsage>(new IOException("the drive went away"));
|
||||
await rows.MeasureAsync();
|
||||
@@ -631,9 +631,9 @@ public sealed class SettingsLogicTests
|
||||
Assert.Equal((Loc.L("Settings.Workspace.TrashPlan.Action"), Loc.L("Tooltips.Settings.Workspace.TrashPlan.Action"), Loc.L("Tooltips.Settings.Workspace.TrashPlan.Keep")),
|
||||
(request.ActionText, request.ActionToolTip, request.SafeToolTip));
|
||||
var lines = request.Detail!.Split(Environment.NewLine);
|
||||
Assert.Equal(("Entries: 8", "Size: 36 MB"), (lines[0], lines[1]));
|
||||
Assert.Equal(("Entries: 8", "Size: 36\u00A0MB"), (lines[0], lines[1]));
|
||||
// The newest entries are named, the rest counted.
|
||||
Assert.Equal(Loc.L("Settings.Workspace.TrashPlan.Item", items[7].Name, "8 MB", Formatting.Date(items[7].Trashed)), lines[2]);
|
||||
Assert.Equal(Loc.L("Settings.Workspace.TrashPlan.Item", items[7].Name, "8\u00A0MB", Formatting.Date(items[7].Trashed)), lines[2]);
|
||||
Assert.Equal(2 + DeletePlansListed + 1, lines.Length);
|
||||
Assert.Equal(Loc.Plural("Archive.Delete.More", 2), lines[^1]);
|
||||
|
||||
@@ -642,7 +642,7 @@ public sealed class SettingsLogicTests
|
||||
workspace.Measure = _ => Task.FromResult(new WorkspaceUsage(0, 14_000_000, 0, 0));
|
||||
await rows.EmptyTrashAsync();
|
||||
Assert.Same(plan, Assert.Contains(workspace.Emptied, _ => true));
|
||||
Assert.Equal((Loc.L("Settings.Workspace.TrashEmptied"), "36 MB", false), Assert.Contains(workspace.Notices, _ => true));
|
||||
Assert.Equal((Loc.L("Settings.Workspace.TrashEmptied"), "36\u00A0MB", false), Assert.Contains(workspace.Notices, _ => true));
|
||||
Assert.Equal("Nothing in trash", rows.TrashText);
|
||||
|
||||
// An empty trash asks nothing.
|
||||
@@ -666,7 +666,7 @@ public sealed class SettingsLogicTests
|
||||
var (_, rows, _) = WorkspaceRows(workspace);
|
||||
await rows.EmptyTrashAsync();
|
||||
Assert.Equal((Loc.L("Settings.Workspace.TrashNotEmptied"), Loc.L("Errors.Workspace.TrashChanged"), true), Assert.Contains(workspace.Notices, _ => true));
|
||||
Assert.Equal("1 item, 1 KB", rows.TrashText);
|
||||
Assert.Equal("1 item, 1\u00A0KB", rows.TrashText);
|
||||
|
||||
workspace.Notices.Clear();
|
||||
workspace.Empty = _ => throw new UnauthorizedAccessException("denied");
|
||||
|
||||
Reference in new issue
Block a user