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
@@ -22,6 +22,9 @@ public enum LibraryLayout
|
||||
|
||||
/// <summary>Year bands with photos per month above the card grid.</summary>
|
||||
Timeline,
|
||||
|
||||
/// <summary>The Videos section's two lanes, Published and Workspace (the Library has no board).</summary>
|
||||
Board,
|
||||
}
|
||||
|
||||
/// <summary>Rendering quality profile (Settings › Rendering).</summary>
|
||||
@@ -164,7 +167,10 @@ public sealed class AppSettings
|
||||
public LibraryLayout LibraryLayout { get; set; } = LibraryLayout.Grid;
|
||||
public SequenceSort LibrarySort { get; set; } = SequenceSort.Newest;
|
||||
|
||||
/// <summary>The Videos section as cards (<see cref="LibraryLayout.Grid"/>) or as a list (<see cref="LibraryLayout.List"/>).</summary>
|
||||
/// <summary>
|
||||
/// The Videos section as cards (<see cref="LibraryLayout.Grid"/>), as a list (<see cref="LibraryLayout.List"/>) or as the
|
||||
/// Board (<see cref="LibraryLayout.Board"/>).
|
||||
/// </summary>
|
||||
public LibraryLayout VideosLayout { get; set; } = LibraryLayout.Grid;
|
||||
|
||||
// ---- Rendering ----
|
||||
|
||||
@@ -5,10 +5,16 @@ namespace Chronos.App.Infrastructure;
|
||||
/// <summary>Culture-aware number, size and duration formatting for the UI.</summary>
|
||||
public static class Formatting
|
||||
{
|
||||
/// <summary>U+00A0, which joins a number to its unit.</summary>
|
||||
public const char NoBreakSpace = '\u00A0';
|
||||
|
||||
/// <summary>Localized "{0} KB" formats from bytes to petabytes (BRIEF §16: sizes follow the language, "96,2 Go").</summary>
|
||||
private static readonly string[] ByteUnits = ["Common.Size.B", "Common.Size.KB", "Common.Size.MB", "Common.Size.GB", "Common.Size.TB", "Common.Size.PB"];
|
||||
|
||||
/// <summary>1,536 → "1.5 KB" (decimal units, as Explorer shows for drives).</summary>
|
||||
/// <summary>
|
||||
/// 1,536 → "1.5 KB" (decimal units, as Explorer shows for drives), the number and its unit held together by a no-break
|
||||
/// space (U+00A0) so a wrapped or trimmed line never parts them (issue #28).
|
||||
/// </summary>
|
||||
public static string Bytes(long bytes)
|
||||
{
|
||||
double value = bytes;
|
||||
@@ -19,7 +25,7 @@ public static class Formatting
|
||||
unit++;
|
||||
}
|
||||
var format = unit == 0 || value >= 100 ? "0" : "0.#";
|
||||
return Loc.L(ByteUnits[unit], value.ToString(format, Loc.Culture));
|
||||
return Loc.L(ByteUnits[unit], value.ToString(format, Loc.Culture)).Replace(' ', NoBreakSpace);
|
||||
}
|
||||
|
||||
public static string Count(long n) => n.ToString("N0", Loc.Culture);
|
||||
|
||||
Reference in new issue
Block a user