feat: remove glassmorphism from notification toast; improve video player UX
Task 4 — Event Registration Confirmation (glassmorphism removal): - Replace translucent gradient + backdrop-blur-md toast in use-realtime.tsx with a solid bg-card container, full-opacity border, and a colored left accent bar — high contrast, readable in all themes, no blur Task 5 — Video player UX (within anti-cheat constraints): - Keyboard shortcuts: Space (play/pause), M (mute), ← (seek back 10s), F (fullscreen) — active globally, disabled when an input is focused - Fullscreen button added to the control bar (F key shortcut) - Volume slider (0–100%) replaces mute-only toggle; volume is persisted to localStorage across sessions under key `pargar:volume` - Buffer range visualized as a translucent white bar behind the playback progress track so users see how much is buffered - Exponential backoff auto-retry on video error: 1s, 2s, 4s … 30s cap; retry count shown in error message; manual retry clears the timer - Speed controls (0.75x–2x) are intentionally absent: the verified-watch anti-cheat locks playbackRate=1; changing it would break the heartbeat accumulation that gates quiz unlock and certification - HLS/ABR requires backend FFmpeg transcoding; the player is structured so swapping src=mp4 → src=.m3u8 + hls.js is a one-file change when the backend pipeline is ready Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -68,16 +68,19 @@ export function useRealtimeGateway() {
|
||||
toast.dismiss(id);
|
||||
if (n.route) router.push(n.route);
|
||||
}}
|
||||
className="w-[min(22rem,calc(100vw-1.5rem))] rounded-xl border border-primary/40 bg-gradient-to-br from-primary/25 via-primary/12 to-accent/20 px-3 py-2.5 text-start shadow-[0_16px_40px_-16px_color-mix(in_srgb,var(--color-primary)_75%,transparent)] backdrop-blur-md"
|
||||
className="flex w-[min(22rem,calc(100vw-1.5rem))] items-stretch overflow-hidden rounded-xl border border-border bg-card text-start shadow-lg"
|
||||
>
|
||||
<span dir="auto" className="block truncate text-sm font-semibold text-foreground [unicode-bidi:plaintext]">
|
||||
{title}
|
||||
</span>
|
||||
{body ? (
|
||||
<span dir="auto" className="mt-0.5 block line-clamp-2 text-xs text-foreground/75 [unicode-bidi:plaintext]">
|
||||
{body}
|
||||
<span className="w-1 shrink-0 bg-primary" aria-hidden />
|
||||
<span className="flex min-w-0 flex-col px-3 py-2.5">
|
||||
<span dir="auto" className="block truncate text-sm font-semibold text-foreground [unicode-bidi:plaintext]">
|
||||
{title}
|
||||
</span>
|
||||
) : null}
|
||||
{body ? (
|
||||
<span dir="auto" className="mt-0.5 block line-clamp-2 text-xs text-muted-foreground [unicode-bidi:plaintext]">
|
||||
{body}
|
||||
</span>
|
||||
) : null}
|
||||
</span>
|
||||
</button>
|
||||
),
|
||||
{ duration: 5000 },
|
||||
|
||||
Reference in New Issue
Block a user