mirror of
https://github.com/yusufipk/OpenFrame.git
synced 2026-09-11 09:36:08 +00:00
feat: Hide the global header on video player pages and ensure video content always uses full screen height.
This commit is contained in:
@@ -4,13 +4,13 @@ import { useState } from 'react';
|
||||
import Link from 'next/link';
|
||||
import dynamic from 'next/dynamic';
|
||||
import { usePathname } from 'next/navigation';
|
||||
import {
|
||||
Video,
|
||||
FolderOpen,
|
||||
import {
|
||||
Video,
|
||||
FolderOpen,
|
||||
Building2,
|
||||
Plus,
|
||||
Settings,
|
||||
LogOut,
|
||||
Plus,
|
||||
Settings,
|
||||
LogOut,
|
||||
User,
|
||||
Menu,
|
||||
Keyboard
|
||||
@@ -56,6 +56,10 @@ export function Header({ user }: HeaderProps) {
|
||||
const pathname = usePathname();
|
||||
const [shortcutsOpen, setShortcutsOpen] = useState(false);
|
||||
|
||||
// Hide header on video player pages — they use full viewport with their own back button
|
||||
const isVideoPage = /\/videos\/[^/]+$/.test(pathname) || pathname.startsWith('/watch/');
|
||||
if (isVideoPage) return null;
|
||||
|
||||
return (
|
||||
<header className="sticky top-0 z-50 w-full border-b bg-background/95 backdrop-blur supports-[backdrop-filter]:bg-background/60">
|
||||
<div className="px-6 lg:px-8 flex h-14 items-center w-full">
|
||||
@@ -121,7 +125,7 @@ export function Header({ user }: HeaderProps) {
|
||||
New Project
|
||||
</Link>
|
||||
</Button>
|
||||
|
||||
|
||||
<Button asChild size="icon" variant="ghost" className="sm:hidden">
|
||||
<Link href="/projects/new">
|
||||
<Plus className="h-5 w-5" />
|
||||
|
||||
@@ -1370,7 +1370,7 @@ export function VideoPageContent({ mode, videoId, projectId: propProjectId }: Vi
|
||||
}
|
||||
};
|
||||
|
||||
const containerHeight = mode === 'dashboard' ? 'h-[calc(100vh-3.5rem)]' : 'h-screen';
|
||||
const containerHeight = 'h-screen';
|
||||
const backHref = mode === 'dashboard'
|
||||
? `/projects/${propProjectId}`
|
||||
: (video?.projectId ? `/projects/${video.projectId}` : '/');
|
||||
|
||||
Reference in New Issue
Block a user