feat(dashboard): first-login Clip Generator tutorial
New accounts land on Clip Generator with other tools locked. A modal walks paste → generate → clips and celebrates the first successful job.
This commit is contained in:
parent
b4000ac9bc
commit
016267f204
5 changed files with 221 additions and 31 deletions
|
|
@ -1,5 +1,5 @@
|
|||
import React, { useState, useEffect, useRef, useMemo } from 'react';
|
||||
import { Upload, Sparkles, Youtube, Instagram, Share2, ChevronDown, Check, Activity, LayoutDashboard, Settings, Plus, History, X, Terminal, Shield, LayoutGrid, Image, Globe, RotateCcw, Calendar, AlertTriangle, KeyRound, Bot, Users, Smartphone, ExternalLink, Copy, CheckCircle2, Mail, Loader2, Download, Menu } from 'lucide-react';
|
||||
import { Upload, Sparkles, Youtube, Instagram, Share2, ChevronDown, Check, Activity, LayoutDashboard, Settings, Plus, History, X, Terminal, Shield, LayoutGrid, Image, Globe, RotateCcw, Calendar, AlertTriangle, KeyRound, Bot, Users, Smartphone, ExternalLink, Copy, CheckCircle2, Mail, Loader2, Download, Menu, Lock } from 'lucide-react';
|
||||
import KeyInput from './components/KeyInput';
|
||||
import MediaInput from './components/MediaInput';
|
||||
import McpConnectCard from './components/McpConnectCard';
|
||||
|
|
@ -16,6 +16,7 @@ import UsageMeter from './components/UsageMeter';
|
|||
import TopUpModal from './components/TopUpModal';
|
||||
import StarBanner from './components/StarBanner';
|
||||
import PlanChoiceModal from './components/PlanChoiceModal';
|
||||
import ClipTutorial from './components/ClipTutorial';
|
||||
import TrialUpgradeModal from './components/TrialUpgradeModal';
|
||||
import LoginModal from './components/LoginModal';
|
||||
import TrialGate from './components/TrialGate';
|
||||
|
|
@ -202,6 +203,7 @@ function App() {
|
|||
const [showLogin, setShowLogin] = useState(false);
|
||||
const [showTopUp, setShowTopUp] = useState(false);
|
||||
const [showPlanChoice, setShowPlanChoice] = useState(false);
|
||||
const [tutorialPhase, setTutorialPhase] = useState(null); // null | intro | coach | celebrate
|
||||
const [showTrialUpgrade, setShowTrialUpgrade] = useState(false);
|
||||
const [topUpInfo, setTopUpInfo] = useState({});
|
||||
// Durable R2 URLs (per clip index) for the current job — used as a fallback when
|
||||
|
|
@ -711,19 +713,72 @@ function App() {
|
|||
const keysMissing = !billingEnabled && (!geminiOk || !uploadPostKey);
|
||||
const needsPlan = billingEnabled && !isManaged; // hosted, signed-out or no active plan/trial
|
||||
|
||||
// Fresh sign-up: show the welcome plan-choice popup once (AuthContext set the
|
||||
// flag after the auth redirect). Fires for free users too, so it's gated on
|
||||
// being signed in rather than on entitlement.
|
||||
// Fresh sign-up: Clip Generator tutorial (AuthContext set os_show_clip_tutorial
|
||||
// after the auth redirect). QA: #app?tutorial=1. Resume coach if they refreshed
|
||||
// mid-job. Runs once on mount so a later isSignedIn flip cannot reset intro→coach.
|
||||
useEffect(() => {
|
||||
if (billingEnabled && isSignedIn) {
|
||||
let flagged = false;
|
||||
try { flagged = localStorage.getItem('os_show_plan_choice') === '1'; } catch (_) { /* ignore */ }
|
||||
if (flagged) {
|
||||
setShowPlanChoice(true);
|
||||
try { localStorage.removeItem('os_show_plan_choice'); } catch (_) { /* ignore */ }
|
||||
}
|
||||
let showTutorial = false;
|
||||
let resumeCoach = false;
|
||||
try {
|
||||
const q = new URLSearchParams((window.location.hash.split('?')[1] || ''));
|
||||
const qa = q.get('tutorial');
|
||||
if (qa === '1') showTutorial = true;
|
||||
if (qa === 'coach') resumeCoach = true;
|
||||
if (qa === 'celebrate') { setTutorialPhase('celebrate'); return; }
|
||||
if (localStorage.getItem('os_show_clip_tutorial') === '1') showTutorial = true;
|
||||
if (localStorage.getItem('os_clip_tutorial') === 'coach') resumeCoach = true;
|
||||
} catch (_) { /* ignore */ }
|
||||
if (showTutorial) {
|
||||
setTutorialPhase('intro');
|
||||
setActiveTab('dashboard');
|
||||
} else if (resumeCoach) {
|
||||
setTutorialPhase('coach');
|
||||
setActiveTab('dashboard');
|
||||
}
|
||||
}, [billingEnabled, isSignedIn]);
|
||||
}, []);
|
||||
|
||||
// Legacy: an older build may still have set os_show_plan_choice. Don't open it
|
||||
// on top of the tutorial.
|
||||
useEffect(() => {
|
||||
if (tutorialPhase) return;
|
||||
if (!(billingEnabled && isSignedIn)) return;
|
||||
let showPlans = false;
|
||||
try { showPlans = localStorage.getItem('os_show_plan_choice') === '1'; } catch (_) { /* ignore */ }
|
||||
if (showPlans) {
|
||||
setShowPlanChoice(true);
|
||||
try { localStorage.removeItem('os_show_plan_choice'); } catch (_) { /* ignore */ }
|
||||
}
|
||||
}, [billingEnabled, isSignedIn, tutorialPhase]);
|
||||
|
||||
const tutorialLock = tutorialPhase === 'intro' || tutorialPhase === 'coach' || tutorialPhase === 'celebrate';
|
||||
|
||||
useEffect(() => {
|
||||
if (tutorialLock && activeTab !== 'dashboard') setActiveTab('dashboard');
|
||||
}, [tutorialLock, activeTab]);
|
||||
|
||||
useEffect(() => {
|
||||
if (tutorialPhase === 'coach' && status === 'complete' && (results?.clips?.length > 0)) {
|
||||
setTutorialPhase('celebrate');
|
||||
track('ClipTutorialCompleted', { props: { clips: results.clips.length } });
|
||||
}
|
||||
}, [tutorialPhase, status, results]);
|
||||
|
||||
const finishTutorial = () => {
|
||||
try { localStorage.setItem('os_clip_tutorial', 'done'); } catch (_) { /* ignore */ }
|
||||
try { localStorage.removeItem('os_show_clip_tutorial'); } catch (_) { /* ignore */ }
|
||||
setTutorialPhase(null);
|
||||
};
|
||||
const startTutorial = () => {
|
||||
try { localStorage.setItem('os_clip_tutorial', 'coach'); } catch (_) { /* ignore */ }
|
||||
try { localStorage.removeItem('os_show_clip_tutorial'); } catch (_) { /* ignore */ }
|
||||
track('ClipTutorialStarted');
|
||||
setTutorialPhase('coach');
|
||||
setActiveTab('dashboard');
|
||||
};
|
||||
const skipTutorial = () => {
|
||||
track('ClipTutorialSkipped', { props: { phase: tutorialPhase } });
|
||||
finishTutorial();
|
||||
};
|
||||
// Included in the plan (fully managed, no keys): Clip Generator + YouTube Studio.
|
||||
// Advanced (bring your own fal.ai + ElevenLabs keys): AI Shorts + AI Agent.
|
||||
const INCLUDED_TOOL_TABS = ['dashboard', 'thumbnails'];
|
||||
|
|
@ -736,7 +791,7 @@ function App() {
|
|||
// connected yet. userProfiles being empty (not yet fetched / none created)
|
||||
// also counts as "not connected" — that is the 97% case.
|
||||
const connectedSocials = ((userProfiles.find((p) => p.username === uploadUserId) || userProfiles[0])?.connected) || [];
|
||||
const showSocialNudge = isManaged && !socialNudgeDismissed && connectedSocials.length === 0;
|
||||
const showSocialNudge = isManaged && !socialNudgeDismissed && connectedSocials.length === 0 && !tutorialLock;
|
||||
|
||||
// One Seen event per job, only when the banner actually rendered.
|
||||
const socialNudgeSeenRef = useRef(null);
|
||||
|
|
@ -913,7 +968,12 @@ function App() {
|
|||
return () => document.removeEventListener('keydown', onKey);
|
||||
}, [navOpen]);
|
||||
|
||||
const goToTab = (id) => { setActiveTab(id); setNavOpen(false); };
|
||||
const goToTab = (id) => {
|
||||
if (tutorialLock && id !== 'dashboard') return;
|
||||
setActiveTab(id);
|
||||
setNavOpen(false);
|
||||
};
|
||||
const tabLocked = (id) => tutorialLock && id !== 'dashboard';
|
||||
|
||||
// Shared footer links (landing, repo, pricing, contact) — same list in the
|
||||
// desktop rail and the mobile drawer, so they can never drift apart.
|
||||
|
|
@ -972,16 +1032,19 @@ function App() {
|
|||
return (
|
||||
<button
|
||||
key={item.id}
|
||||
onClick={() => setActiveTab(item.id)}
|
||||
title={item.label}
|
||||
className={`relative w-full flex items-center gap-3 px-3 py-2.5 rounded-input transition-colors ${isActive ? 'bg-paper3 text-ink' : 'text-muted hover:text-ink2 hover:bg-paper3/50'}`}
|
||||
onClick={() => goToTab(item.id)}
|
||||
title={tabLocked(item.id) ? 'Finish your first clips to unlock' : item.label}
|
||||
disabled={tabLocked(item.id)}
|
||||
className={`relative w-full flex items-center gap-3 px-3 py-2.5 rounded-input transition-colors ${isActive ? 'bg-paper3 text-ink' : 'text-muted hover:text-ink2 hover:bg-paper3/50'} ${tabLocked(item.id) ? 'opacity-40 cursor-not-allowed hover:bg-transparent hover:text-muted' : ''}`}
|
||||
>
|
||||
{isActive && (
|
||||
<span className="absolute left-0 top-1.5 bottom-1.5 w-0.5 bg-brass rounded-full" aria-hidden="true" />
|
||||
)}
|
||||
<NavIcon size={18} className={`shrink-0 ${isActive ? 'text-brass' : ''}`} />
|
||||
<span className="text-sm lowercase hidden lg:block flex-1 text-left truncate">{item.label}</span>
|
||||
{item.byok && <span className="readout hidden lg:block">BYOK</span>}
|
||||
{tabLocked(item.id)
|
||||
? <Lock size={12} className="shrink-0 hidden lg:block" />
|
||||
: item.byok ? <span className="readout hidden lg:block">BYOK</span> : null}
|
||||
<span className="readout hidden lg:block">{item.ord}</span>
|
||||
</button>
|
||||
);
|
||||
|
|
@ -1032,15 +1095,19 @@ function App() {
|
|||
<button
|
||||
key={item.id}
|
||||
onClick={() => goToTab(item.id)}
|
||||
disabled={tabLocked(item.id)}
|
||||
aria-current={isActive ? 'page' : undefined}
|
||||
className={`relative w-full flex items-center gap-3 px-3 py-3 rounded-input transition-colors ${isActive ? 'bg-paper3 text-ink' : 'text-muted active:bg-paper3/60'}`}
|
||||
title={tabLocked(item.id) ? 'Finish your first clips to unlock' : undefined}
|
||||
className={`relative w-full flex items-center gap-3 px-3 py-3 rounded-input transition-colors ${isActive ? 'bg-paper3 text-ink' : 'text-muted active:bg-paper3/60'} ${tabLocked(item.id) ? 'opacity-40 cursor-not-allowed' : ''}`}
|
||||
>
|
||||
{isActive && (
|
||||
<span className="absolute left-0 top-2 bottom-2 w-0.5 bg-brass rounded-full" aria-hidden="true" />
|
||||
)}
|
||||
<NavIcon size={18} className={`shrink-0 ${isActive ? 'text-brass' : ''}`} />
|
||||
<span className="text-[0.95rem] lowercase flex-1 text-left truncate">{item.label}</span>
|
||||
{item.byok && <span className="readout shrink-0">BYOK</span>}
|
||||
{tabLocked(item.id)
|
||||
? <Lock size={12} className="shrink-0" />
|
||||
: item.byok ? <span className="readout shrink-0">BYOK</span> : null}
|
||||
</button>
|
||||
);
|
||||
})}
|
||||
|
|
@ -1069,8 +1136,10 @@ function App() {
|
|||
<button
|
||||
key={item.id}
|
||||
onClick={() => goToTab(item.id)}
|
||||
disabled={tabLocked(item.id)}
|
||||
aria-current={isActive ? 'page' : undefined}
|
||||
className={`flex-1 min-w-0 flex flex-col items-center justify-center gap-1 py-2 min-h-[56px] transition-colors ${isActive ? 'text-ink' : 'text-muted active:text-ink2'}`}
|
||||
title={tabLocked(item.id) ? 'Finish your first clips to unlock' : undefined}
|
||||
className={`flex-1 min-w-0 flex flex-col items-center justify-center gap-1 py-2 min-h-[56px] transition-colors ${isActive ? 'text-ink' : 'text-muted active:text-ink2'} ${tabLocked(item.id) ? 'opacity-40 cursor-not-allowed' : ''}`}
|
||||
>
|
||||
<NavIcon size={19} className={isActive ? 'text-brass' : ''} />
|
||||
<span className="text-[10.5px] lowercase leading-none truncate max-w-full px-0.5">{item.short}</span>
|
||||
|
|
@ -1164,7 +1233,7 @@ function App() {
|
|||
same thing, and two warnings in a 360px header is just noise. */}
|
||||
{keysMissing && (
|
||||
<button
|
||||
onClick={() => (billingEnabled && !isSignedIn ? setShowLogin(true) : setActiveTab('settings'))}
|
||||
onClick={() => (billingEnabled && !isSignedIn ? setShowLogin(true) : goToTab('settings'))}
|
||||
className="badge-warn hover:brightness-125 transition-all hidden sm:inline-flex"
|
||||
title="Configure API keys or choose a plan"
|
||||
>
|
||||
|
|
@ -1199,7 +1268,7 @@ function App() {
|
|||
</div>
|
||||
</div>
|
||||
<button
|
||||
onClick={() => setActiveTab('settings')}
|
||||
onClick={() => goToTab('settings')}
|
||||
className="btn-quiet px-3 py-1.5 text-xs shrink-0 w-full sm:w-auto"
|
||||
>
|
||||
Go to Settings
|
||||
|
|
@ -1229,7 +1298,7 @@ function App() {
|
|||
{gateThisTab && <TrialGate toolName={TOOL_NAMES[activeTab] || 'this'} />}
|
||||
|
||||
{/* Advanced tools (AI Shorts, AI Agent): BYOK fal.ai + ElevenLabs notice. */}
|
||||
{advancedThisTab && <AdvancedBanner needsPlan={needsPlan} onKeys={() => setActiveTab('settings')} />}
|
||||
{advancedThisTab && <AdvancedBanner needsPlan={needsPlan} onKeys={() => goToTab('settings')} />}
|
||||
|
||||
{/* Main Workspace */}
|
||||
<div className="flex-1 overflow-hidden relative">
|
||||
|
|
@ -1645,16 +1714,18 @@ function App() {
|
|||
</p>
|
||||
{/* The same pipeline is an MCP server: point people at the
|
||||
one place that explains how to drive it from an agent. */}
|
||||
{!tutorialLock && (
|
||||
<p className="text-xs text-muted">
|
||||
Or let an agent do it:{' '}
|
||||
<a
|
||||
href={billingEnabled ? '#/account' : '#app'}
|
||||
onClick={(e) => { if (!billingEnabled) { e.preventDefault(); setActiveTab('settings'); } }}
|
||||
onClick={(e) => { if (!billingEnabled) { e.preventDefault(); goToTab('settings'); } }}
|
||||
className="text-ink2 underline underline-offset-2 hover:text-brass transition-colors"
|
||||
>
|
||||
connect Claude, ChatGPT or n8n →
|
||||
</a>
|
||||
</p>
|
||||
)}
|
||||
</div>
|
||||
|
||||
<MediaInput onProcess={handleProcess} isProcessing={status === 'processing'} />
|
||||
|
|
@ -1943,7 +2014,7 @@ function App() {
|
|||
Cancel
|
||||
</button>
|
||||
<button
|
||||
onClick={() => { setShowKeyModal(false); setActiveTab('settings'); }}
|
||||
onClick={() => { setShowKeyModal(false); goToTab('settings'); }}
|
||||
className="btn-primary flex-1 px-4 py-2 text-sm"
|
||||
>
|
||||
Go to Settings
|
||||
|
|
@ -2073,6 +2144,15 @@ function App() {
|
|||
/>
|
||||
)}
|
||||
{showLogin && <LoginModal onClose={() => setShowLogin(false)} />}
|
||||
{tutorialPhase && (
|
||||
<ClipTutorial
|
||||
phase={tutorialPhase}
|
||||
jobStatus={status}
|
||||
onStart={startTutorial}
|
||||
onSkip={skipTutorial}
|
||||
onDismissCelebrate={finishTutorial}
|
||||
/>
|
||||
)}
|
||||
{showPlanChoice && <PlanChoiceModal onClose={() => setShowPlanChoice(false)} />}
|
||||
{showTopUp && (
|
||||
<TopUpModal
|
||||
|
|
|
|||
106
dashboard/src/components/ClipTutorial.jsx
Normal file
106
dashboard/src/components/ClipTutorial.jsx
Normal file
|
|
@ -0,0 +1,106 @@
|
|||
import { ArrowRight, CheckCircle2, LayoutDashboard, Sparkles } from 'lucide-react';
|
||||
import Modal from './ui/Modal';
|
||||
import StepIndicator from './ui/StepIndicator';
|
||||
|
||||
const STEPS = ['Add a video', 'Generate', 'Your clips'];
|
||||
|
||||
function stepIndex(jobStatus) {
|
||||
if (jobStatus === 'processing') return 1;
|
||||
if (jobStatus === 'complete') return 2;
|
||||
return 0;
|
||||
}
|
||||
|
||||
function stepCopy(jobStatus) {
|
||||
if (jobStatus === 'processing') return 'Hang on — Clip Generator is finding the moments and cutting vertical shorts.';
|
||||
if (jobStatus === 'error') return 'That run failed. Try another YouTube link or file. The other tools stay locked until one job finishes.';
|
||||
if (jobStatus === 'complete') return 'Clips are ready.';
|
||||
return 'Paste a YouTube link or drop a video below, tick the rights box, then generate.';
|
||||
}
|
||||
|
||||
/**
|
||||
* First-login Clip Generator tutorial.
|
||||
* - intro: blocking modal (Start / skip)
|
||||
* - coach: non-blocking card that tracks idle → processing → complete
|
||||
* - celebrate: modal after the first successful job
|
||||
*
|
||||
* QA: open #app?tutorial=1 to force the intro without a fresh signup.
|
||||
*/
|
||||
export default function ClipTutorial({ phase, jobStatus, onStart, onSkip, onDismissCelebrate }) {
|
||||
if (phase === 'intro') {
|
||||
return (
|
||||
<Modal isOpen hideClose eyebrow="FIRST CLIPS" title="Let's make your first shorts" size="md">
|
||||
<div className="flex items-start gap-3 mb-4">
|
||||
<div className="w-10 h-10 rounded-input bg-paper3 flex items-center justify-center shrink-0">
|
||||
<LayoutDashboard size={18} className="text-brass" />
|
||||
</div>
|
||||
<p className="text-sm text-ink2 leading-relaxed">
|
||||
People come here for <b className="text-ink font-medium">Clip Generator</b>: a long video in,
|
||||
vertical shorts out. That is the only tool unlocked on this first run.
|
||||
</p>
|
||||
</div>
|
||||
<ol className="text-sm text-muted space-y-2 mb-6 list-decimal pl-5">
|
||||
<li>Paste a YouTube link or upload a file</li>
|
||||
<li>Generate</li>
|
||||
<li>Watch the clips</li>
|
||||
</ol>
|
||||
<button type="button" onClick={onStart} className="btn-primary w-full">
|
||||
Start with Clip Generator <ArrowRight size={16} />
|
||||
</button>
|
||||
<button
|
||||
type="button"
|
||||
onClick={onSkip}
|
||||
className="w-full mt-2 text-muted hover:text-ink text-sm lowercase py-2 transition-colors"
|
||||
>
|
||||
I'll explore later
|
||||
</button>
|
||||
</Modal>
|
||||
);
|
||||
}
|
||||
|
||||
if (phase === 'coach') {
|
||||
const current = stepIndex(jobStatus);
|
||||
return (
|
||||
<div
|
||||
className="fixed z-[80] left-3 right-3 md:left-auto md:right-6 md:w-[22rem]
|
||||
bottom-[4.75rem] md:bottom-6 card p-4 shadow-[0_12px_40px_rgba(0,0,0,0.35)]"
|
||||
role="status"
|
||||
>
|
||||
<p className="eyebrow mb-3">First clips</p>
|
||||
<StepIndicator steps={STEPS} current={current} />
|
||||
<p className={`text-sm leading-relaxed mt-3 ${jobStatus === 'error' ? 'text-danger' : 'text-muted'}`}>
|
||||
{stepCopy(jobStatus)}
|
||||
</p>
|
||||
<button
|
||||
type="button"
|
||||
onClick={onSkip}
|
||||
className="mt-3 text-xs lowercase text-muted hover:text-ink transition-colors"
|
||||
>
|
||||
skip — unlock the rest
|
||||
</button>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
if (phase === 'celebrate') {
|
||||
return (
|
||||
<Modal isOpen onClose={onDismissCelebrate} hideClose eyebrow="DONE" title="You made your first clips" size="sm">
|
||||
<div className="text-center py-2">
|
||||
<div className="inline-flex p-3 bg-paper3 rounded-full text-ok mb-4">
|
||||
<CheckCircle2 size={28} />
|
||||
</div>
|
||||
<p className="text-sm text-ink2 leading-relaxed mb-1">
|
||||
That is the whole product, on one video.
|
||||
</p>
|
||||
<p className="text-sm text-muted leading-relaxed mb-6">
|
||||
The other tools are unlocked. Come back to Clip Generator whenever you have another long video.
|
||||
</p>
|
||||
<button type="button" onClick={onDismissCelebrate} className="btn-primary w-full">
|
||||
<Sparkles size={16} /> See my clips
|
||||
</button>
|
||||
</div>
|
||||
</Modal>
|
||||
);
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
|
@ -76,15 +76,16 @@ export function AuthProvider({ children }) {
|
|||
// channel produced an account. Awaited but never allowed to throw.
|
||||
await reportAttribution(apiJson);
|
||||
}
|
||||
// Everyone lands in the app. Show the welcome plan-choice popup once per
|
||||
// browser (on the first auth) for anyone not already on a paid plan —
|
||||
// free is the default, paid is one click away. Never a pricing-page dump.
|
||||
// Everyone lands in the app. First-time (unpaid) sign-in gets the Clip
|
||||
// Generator tutorial, not a pricing dump — they need one successful job
|
||||
// before the rest of the tools unlock. os_welcomed keeps this once-only
|
||||
// even if they skip the tutorial.
|
||||
const paid = ['starter', 'creator', 'pro'].includes(signedInMe?.plan);
|
||||
let welcomed = false;
|
||||
try { welcomed = localStorage.getItem('os_welcomed') === '1'; } catch (_) { /* ignore */ }
|
||||
if (signedInMe?.user && !paid && !welcomed) {
|
||||
try {
|
||||
localStorage.setItem('os_show_plan_choice', '1');
|
||||
localStorage.setItem('os_show_clip_tutorial', '1');
|
||||
localStorage.setItem('os_welcomed', '1');
|
||||
} catch (_) { /* ignore */ }
|
||||
}
|
||||
|
|
|
|||
|
|
@ -19,6 +19,9 @@
|
|||
// - SocialNudgeSeen — post-generation "connect socials" banner rendered
|
||||
// - SocialNudgeConnect — its connect button clicked (opens hosted connect page)
|
||||
// - SocialNudgeDismissed — its X clicked (persisted, never shown again)
|
||||
// - ClipTutorialStarted — first-login tutorial: user hit Start
|
||||
// - ClipTutorialSkipped — first-login tutorial dismissed (intro or coach)
|
||||
// - ClipTutorialCompleted— first Clip Generator job finished with clips
|
||||
// The Started → Redirected → Subscribed chain is what separates "never reached
|
||||
// Stripe" from "reached Stripe and abandoned"; before 2-ago-2026 the modals
|
||||
// emitted only their own *Checkout event and the difference was invisible.
|
||||
|
|
|
|||
|
|
@ -78,7 +78,7 @@ function Root() {
|
|||
if (hash === '#legal') return 'legal';
|
||||
// #landing = explicit landing view (app logo); section anchors keep the landing mounted
|
||||
if (['#landing', '#features', '#how-it-works', '#pricing', '#comparison', '#faq'].includes(hash)) return 'landing';
|
||||
if (hash === '#app' || localStorage.getItem('openshorts_skip_landing') === '1') return 'app';
|
||||
if (hash === '#app' || hash.startsWith('#app?') || localStorage.getItem('openshorts_skip_landing') === '1') return 'app';
|
||||
return 'landing';
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue