Titano: time-lapse ecosystem (client, server, uploader) — in progress #1
No files matched your search
@@ -61,10 +61,18 @@ public sealed record Sequence
|
|||||||
public int WarningCount { get; init; }
|
public int WarningCount { get; init; }
|
||||||
public DateTimeOffset UpdatedAt { get; init; }
|
public DateTimeOffset UpdatedAt { get; init; }
|
||||||
|
|
||||||
/// <summary>User title or "{date} {camera}".</summary>
|
/// <summary>The title, else capture date and camera, else the folder name (never empty).</summary>
|
||||||
public string DisplayTitle => !string.IsNullOrWhiteSpace(Title)
|
public string DisplayTitle
|
||||||
? Title!
|
{
|
||||||
: $"{FirstCapture:yyyy-MM-dd} {CameraModel}".Trim();
|
get
|
||||||
|
{
|
||||||
|
if (!string.IsNullOrWhiteSpace(Title)) return Title;
|
||||||
|
var described = $"{FirstCapture:yyyy-MM-dd} {CameraModel}".Trim();
|
||||||
|
if (described.Length > 0) return described;
|
||||||
|
var folder = Folder.TrimEnd('/');
|
||||||
|
return folder.Length > 0 ? folder[(folder.LastIndexOf('/') + 1)..] : Id.ToString("N")[..8];
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>One photo of a sequence.</summary>
|
/// <summary>One photo of a sequence.</summary>
|
||||||
|
|||||||
@@ -120,7 +120,8 @@ public static class RolePermissions
|
|||||||
{
|
{
|
||||||
UserRole.Admin => Permissions.All,
|
UserRole.Admin => Permissions.All,
|
||||||
UserRole.Editor => Permissions.Read | Permissions.Upload | Permissions.Edit | Permissions.Delete | Permissions.Render | Permissions.RenderNode,
|
UserRole.Editor => Permissions.Read | Permissions.Upload | Permissions.Edit | Permissions.Delete | Permissions.Render | Permissions.RenderNode,
|
||||||
UserRole.Uploader => Permissions.Read | Permissions.Upload,
|
// Upload only: an uploader lists sequences to pick a target but cannot open them (AdminUsers mockup).
|
||||||
|
UserRole.Uploader => Permissions.Upload,
|
||||||
_ => Permissions.Read,
|
_ => Permissions.Read,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
Reference in new issue
Block a user