+
{autoId ? "S" : (selectedProfile?.username?.substring(0, 1).toUpperCase() || "U")}
{autoId ? (
-
+
) : (
-
{selectedProfile?.username || "Select User"}
+
{selectedProfile?.username || "Select User"}
)}
@@ -245,9 +248,15 @@ function App() {
// Pre-flight quality gate: { info: {max_height, min_height, cookies_invalid}, data }
const [qualityGate, setQualityGate] = useState(null);
const [logs, setLogs] = useState([]);
- const [logsVisible, setLogsVisible] = useState(true);
+ // Collapsed on phones: the log tail is the least useful thing on a 360px
+ // screen and it was pushing the actual clips a full scroll down.
+ const [logsVisible, setLogsVisible] = useState(() => {
+ try { return window.innerWidth >= 768; } catch { return true; }
+ });
const [processingMedia, setProcessingMedia] = useState(null);
const [activeTab, setActiveTab] = useState('dashboard'); // dashboard, settings
+ // Mobile only: the full nav lives in a drawer behind the header's menu button.
+ const [navOpen, setNavOpen] = useState(false);
// Reopened-project state (paid mode): per-clip {index, server_file, active_layers}
// restored from the backend so ResultCards resume editing where they left off.
const [projectState, setProjectState] = useState(null);
@@ -854,98 +863,236 @@ function App() {
// --- UI Components ---
- const Sidebar = () => {
- const navItems = [
- { id: 'dashboard', ord: '01', icon: LayoutDashboard, label: 'Clip Generator' },
- { id: 'saasshorts', ord: '02', icon: Sparkles, label: 'AI Shorts', byok: true },
- { id: 'ai-agent', ord: '03', icon: Bot, label: 'AI Agent', byok: true },
- { id: 'ugc-gallery', ord: '04', icon: LayoutGrid, label: 'UGC Gallery' },
- { id: 'thumbnails', ord: '05', icon: Image, label: 'YouTube Studio' },
- ...(billingEnabled && isSignedIn ? [{ id: 'history', ord: '06', icon: History, label: 'History' }] : []),
- { id: 'settings', ord: '07', icon: Settings, label: 'Settings' },
- ];
+ // One nav definition drives all three surfaces: the desktop rail, the mobile
+ // drawer, and the bottom tab bar. `short` is the tab-bar label — the full one
+ // wraps to two lines in a 5-up bar on a 360px phone.
+ const navItems = [
+ { id: 'dashboard', ord: '01', icon: LayoutDashboard, label: 'Clip Generator', short: 'clips', primary: true },
+ { id: 'saasshorts', ord: '02', icon: Sparkles, label: 'AI Shorts', short: 'ai shorts', byok: true, primary: true },
+ { id: 'ai-agent', ord: '03', icon: Bot, label: 'AI Agent', short: 'agent', byok: true },
+ { id: 'ugc-gallery', ord: '04', icon: LayoutGrid, label: 'UGC Gallery', short: 'gallery', primary: true },
+ { id: 'thumbnails', ord: '05', icon: Image, label: 'YouTube Studio', short: 'studio', primary: true },
+ ...(billingEnabled && isSignedIn ? [{ id: 'history', ord: '06', icon: History, label: 'History', short: 'history' }] : []),
+ { id: 'settings', ord: '07', icon: Settings, label: 'Settings', short: 'settings' },
+ ];
+ const activeNav = navItems.find((n) => n.id === activeTab);
- return (
-
-
-
-

-
- openshorts
+ // Escape closes the mobile drawer. The shell itself is overflow-hidden, so
+ // there is no body scroll to lock behind it.
+ useEffect(() => {
+ if (!navOpen) return;
+ const onKey = (e) => { if (e.key === 'Escape') setNavOpen(false); };
+ document.addEventListener('keydown', onKey);
+ return () => document.removeEventListener('keydown', onKey);
+ }, [navOpen]);
+
+ const goToTab = (id) => { setActiveTab(id); setNavOpen(false); };
+
+ // Shared footer links (landing, repo, pricing, contact) — same list in the
+ // desktop rail and the mobile drawer, so they can never drift apart.
+ const NavFooterLinks = ({ collapsed = false }) => (
+ <>
+
+
+ landing page
+
+
+
+ open source
+
+ {billingEnabled && (
+
+
+ plans & pricing
+ )}
+
+
+ info@openshorts.app
+
+ >
+ );
-