MCPcopy Create free account
hub / github.com/Roy3838/Observer / TutorialDemoBanner

Function TutorialDemoBanner

app/src/components/Observer/TutorialDemoBanner.tsx:13–38  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

11import { isTauri, openExternal } from '@utils/platform';
12
13const TutorialDemoBanner: React.FC = () => {
14 const { phase, demo } = useTutorialFlow();
15 if (!demo || (phase !== 'building' && phase !== 'monitoring')) return null;
16
17 const body = phase === 'monitoring' ? (
18 <><strong>Observer is watching the demo.</strong> You'll get your notification when it finishes.</>
19 ) : isTauri() ? (
20 <><strong>Your demo is open in your browser.</strong> Keep it visible on screen; Observer will watch that window.</>
21 ) : (
22 <><strong>Your demo is open in a new tab.</strong> When Observer asks to share your screen, choose <strong>Chrome Tab → "{demoTabTitle(demo)}"</strong>.</>
23 );
24
25 return (
26 <div className="mx-auto mt-3 w-[calc(100%-2rem)] max-w-2xl flex items-start gap-3 rounded-2xl bg-slate-900 text-white px-4 py-3 shadow-lg text-sm relative z-30">
27 <div className="flex-1 min-w-0">
28 <p>{body}</p>
29 <button onClick={() => void openExternal(demoUrl(demo))} className="mt-1 text-xs text-white/60 hover:text-white underline underline-offset-2 transition-colors">
30 Tab didn't open? Open demo
31 </button>
32 </div>
33 <button onClick={tutorialFlow.reset} className="text-white/50 hover:text-white transition-colors flex-shrink-0" aria-label="Dismiss">
34 <X className="h-4 w-4" />
35 </button>
36 </div>
37 );
38};
39
40export default TutorialDemoBanner;

Callers

nothing calls this directly

Calls 5

useTutorialFlowFunction · 0.90
isTauriFunction · 0.90
demoTabTitleFunction · 0.90
openExternalFunction · 0.90
demoUrlFunction · 0.90

Tested by

no test coverage detected