ShareLinks: keep player back button, disable in-item links, hide add-to-playlist, generalize guest plugin hiding

Hiding .headerBackButton for guests also removed the video player's back
button (same class), so a guest could not return from playback to the
movie page. Stop hiding that class; keep home/drawer/search hidden.

Cast, studio, genre and tag links on the detail page now have
pointer-events disabled for guests so they stay visible but inert
(clicking Studio no longer spins on a page the guest cannot load), and
the add-to-playlist/add-to-collection actions are hidden.

Add a GuestHiddenSelectors config field (comma-separated CSS selectors,
surfaced through GuestState since guests cannot read plugin config) so
other plugins injected UI can be suppressed for guest sessions without
code changes; defaults to hiding the AI Search elements.
Cette révision appartient à :
Franciskid
2026-07-07 00:35:10 +02:00
Parent e560c65d5a
révision 0fecbb6697
4 fichiers modifiés avec 60 ajouts et 6 suppressions
+6 -2
Voir le fichier
@@ -91,6 +91,8 @@ public sealed class ShareLinkGuestStateDto
public DateTimeOffset? ExpiresAtUtc { get; set; }
public bool LockdownEnabled { get; set; }
public string? HiddenSelectors { get; set; }
}
/// <summary>ShareLinks API surface.</summary>
@@ -291,7 +293,8 @@ public sealed class ShareLinksController : ControllerBase
AllowedItemId = match.ItemId,
ShareId = match.Id,
ExpiresAtUtc = match.ExpiresAtUtc,
LockdownEnabled = config.GuestModeLockdownEnabled
LockdownEnabled = config.GuestModeLockdownEnabled,
HiddenSelectors = config.GuestHiddenSelectors
});
}
}
@@ -299,7 +302,8 @@ public sealed class ShareLinksController : ControllerBase
return Ok(new ShareLinkGuestStateDto
{
IsGuest = false,
LockdownEnabled = config.GuestModeLockdownEnabled
LockdownEnabled = config.GuestModeLockdownEnabled,
HiddenSelectors = config.GuestHiddenSelectors
});
}