feat(release): front int PK with app-minted GUID EntryKey on the public addressing surface (P11 W5, 11.H)
This commit is contained in:
@@ -8,7 +8,7 @@ namespace DeepDrftPublic.Client.Controls;
|
||||
/// <summary>
|
||||
/// Share affordance with two modes from one source of clipboard/popover-chrome logic
|
||||
/// (Phase 11 §3b). Track mode (<see cref="EntryKey"/> set) offers a canonical-link copy plus an
|
||||
/// optional iframe embed snippet. Release mode (<see cref="ReleaseId"/> set) is copy-link-only —
|
||||
/// optional iframe embed snippet. Release mode (<see cref="ReleaseEntryKey"/> set) is copy-link-only —
|
||||
/// it copies the absolute form of the release's canonical detail URL and hides the embed
|
||||
/// affordance, since a release page is not a single-track embed. Clipboard writes go through
|
||||
/// navigator.clipboard; each copy shows a transient "Copied!" confirmation that resets after a
|
||||
@@ -19,8 +19,8 @@ public partial class SharePopover : ComponentBase, IDisposable
|
||||
/// <summary>Track mode: the vault entry key of the track to share. Mutually exclusive with the release target.</summary>
|
||||
[Parameter] public string? EntryKey { get; set; }
|
||||
|
||||
/// <summary>Release mode: the release id to share. When set (with <see cref="ReleaseMedium"/>), the popover shares the release detail URL and omits the embed option.</summary>
|
||||
[Parameter] public long? ReleaseId { get; set; }
|
||||
/// <summary>Release mode: the release's opaque public EntryKey to share. When set (with <see cref="ReleaseMedium"/>), the popover shares the release detail URL and omits the embed option.</summary>
|
||||
[Parameter] public string? ReleaseEntryKey { get; set; }
|
||||
|
||||
/// <summary>Release mode: the medium of the release, used to resolve its canonical detail route.</summary>
|
||||
[Parameter] public ReleaseMedium ReleaseMedium { get; set; }
|
||||
@@ -28,7 +28,7 @@ public partial class SharePopover : ComponentBase, IDisposable
|
||||
[Inject] public required NavigationManager Navigation { get; set; }
|
||||
[Inject] public required IJSRuntime JS { get; set; }
|
||||
|
||||
private bool IsReleaseMode => ReleaseId is not null;
|
||||
private bool IsReleaseMode => ReleaseEntryKey is not null;
|
||||
|
||||
private bool _open;
|
||||
private bool _embed;
|
||||
@@ -51,7 +51,7 @@ public partial class SharePopover : ComponentBase, IDisposable
|
||||
// route (which carries a leading slash) and composes it against BaseUri (which carries a
|
||||
// trailing slash) — trim one to avoid a doubled separator.
|
||||
private string LinkUrl => IsReleaseMode
|
||||
? $"{Navigation.BaseUri.TrimEnd('/')}{ReleaseRoutes.DetailHref(ReleaseId!.Value, ReleaseMedium)}"
|
||||
? $"{Navigation.BaseUri.TrimEnd('/')}{ReleaseRoutes.DetailHref(ReleaseEntryKey!, ReleaseMedium)}"
|
||||
: TrackUrl;
|
||||
|
||||
private string TrackUrl => $"{Navigation.BaseUri}track/{EntryKey}";
|
||||
|
||||
Reference in New Issue
Block a user