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

Function LocalServerSetupDialog

app/src/components/LocalServerSetupDialog.tsx:13–81  ·  view source on GitHub ↗
({ onDismiss }: LocalServerSetupDialogProps)

Source from the content-addressed store, hash-verified

11}
12
13const LocalServerSetupDialog = ({ onDismiss }: LocalServerSetupDialogProps) => {
14 if (!isTauri()) return null;
15
16 const handleDownloadModel = () => {
17 window.dispatchEvent(new CustomEvent('openModelHub', {
18 detail: { autoDownloadPreset: _p },
19 }));
20 onDismiss();
21 };
22
23 return createPortal(
24 <div className="fixed inset-0 bg-black/50 flex items-center justify-center z-[110] backdrop-blur-sm">
25 <div className="bg-white rounded-2xl shadow-2xl p-8 max-w-md w-full mx-4 overflow-hidden">
26 <div className="text-center mb-6">
27 <div className="inline-flex items-center justify-center w-16 h-16 rounded-2xl bg-gradient-to-br from-green-100 to-emerald-100 mb-4">
28 <Sparkles className="h-8 w-8 text-green-600" />
29 </div>
30 <h2 className="text-2xl font-bold text-gray-900 mb-2">Welcome to Observer!</h2>
31 <p className="text-gray-600">
32 Let's get you started with a local AI model that runs entirely on your device.
33 </p>
34 </div>
35
36 <div className="bg-gradient-to-r from-green-50 to-emerald-50 border border-green-200 rounded-xl p-5 mb-6">
37 <div className="flex items-center gap-3 mb-3">
38 <div className="w-10 h-10 rounded-lg bg-green-200 flex items-center justify-center">
39 <Cpu size={20} className="text-green-700" />
40 </div>
41 <div>
42 <h3 className="font-semibold text-gray-900">{_p.name}</h3>
43 <p className="text-sm text-gray-600">{_p.sizeLabel} - Vision capable</p>
44 </div>
45 </div>
46 <ul className="space-y-2 text-sm text-gray-700">
47 <li className="flex items-center gap-2">
48 <CheckCircle2 size={16} className="text-green-600 flex-shrink-0" />
49 <span>Runs 100% on your device - no internet needed</span>
50 </li>
51 <li className="flex items-center gap-2">
52 <CheckCircle2 size={16} className="text-green-600 flex-shrink-0" />
53 <span>Understands images and text</span>
54 </li>
55 <li className="flex items-center gap-2">
56 <CheckCircle2 size={16} className="text-green-600 flex-shrink-0" />
57 <span>Fast and efficient - optimized for your hardware</span>
58 </li>
59 </ul>
60 </div>
61
62 <div className="flex gap-3">
63 <button
64 onClick={onDismiss}
65 className="flex-1 py-3 px-4 border border-gray-300 text-gray-700 rounded-xl hover:bg-gray-50 transition-colors font-medium"
66 >
67 Skip for Now
68 </button>
69 <button
70 onClick={handleDownloadModel}

Callers

nothing calls this directly

Calls 1

isTauriFunction · 0.90

Tested by

no test coverage detected