返回 JoyAI-Echo
index.html
1 <!doctype html>
2 <html lang="en">
3 <head>
4 <meta charset="UTF-8" />
5 <meta name="viewport" content="width=device-width, initial-scale=1.0" />
6 <meta name="color-scheme" content="light dark" />
7 <meta
8 name="description"
9 content="Echo Director web UI — chat with your Echo Director workspace."
10 data-i18n-meta="description"
11 />
12 <meta
13 name="theme-color"
14 content="#fafaf9"
15 media="(prefers-color-scheme: light)"
16 />
17 <meta
18 name="theme-color"
19 content="#161618"
20 media="(prefers-color-scheme: dark)"
21 />
22 <style>
23 html,
24 body,
25 #root {
26 height: 100%;
27 }
28
29 body {
30 margin: 0;
31 background: #ffffff;
32 color: #0a0a0a;
33 font-family:
34 system-ui,
35 -apple-system,
36 BlinkMacSystemFont,
37 "Segoe UI",
38 Roboto,
39 "Helvetica Neue",
40 Arial,
41 "Noto Sans",
42 "Noto Sans SC",
43 "PingFang SC",
44 "Hiragino Sans GB",
45 "Microsoft YaHei",
46 sans-serif;
47 }
48
49 html.dark body {
50 background: #1a1a1a;
51 color: #fafafa;
52 }
53
54 .boot-splash {
55 display: flex;
56 height: 100%;
57 align-items: center;
58 justify-content: center;
59 }
60
61 .boot-splash-inner {
62 display: flex;
63 align-items: center;
64 gap: 10px;
65 color: rgba(255, 255, 255, 0.74);
66 font-size: 14px;
67 }
68
69 html:not(.dark) .boot-splash-inner {
70 color: rgba(10, 10, 10, 0.64);
71 }
72
73 .boot-dot {
74 width: 8px;
75 height: 8px;
76 border-radius: 9999px;
77 background: currentColor;
78 opacity: 0.75;
79 animation: boot-pulse 1s ease-in-out infinite;
80 }
81
82 @keyframes boot-pulse {
83 0%,
84 100% {
85 transform: scale(0.9);
86 opacity: 0.45;
87 }
88 50% {
89 transform: scale(1);
90 opacity: 0.85;
91 }
92 }
93 </style>
94 <script>
95 (function () {
96 try {
97 var stored = localStorage.getItem("nanobot-webui.theme");
98 var dark =
99 stored === "dark" ||
100 (!stored &&
101 window.matchMedia &&
102 window.matchMedia("(prefers-color-scheme: dark)").matches);
103 localStorage.setItem("nanobot.locale", "en");
104 if (dark) document.documentElement.classList.add("dark");
105 document.documentElement.lang = "en";
106 } catch {}
107 })();
108 </script>
109 <script>
110 (function () {
111 var localeKey = "nanobot.locale";
112 var copy = {
113 en: {
114 boot: "Loading Echo Director…",
115 description:
116 "Echo Director web UI — chat with your Echo Director workspace.",
117 },
118 "zh-CN": {
119 boot: "正在加载 Echo Director…",
120 description:
121 "Echo Director Web UI —— 与你的 Echo Director 工作区对话。",
122 },
123 "zh-TW": {
124 boot: "正在載入 Echo Director…",
125 description:
126 "Echo Director Web UI —— 與你的 Echo Director 工作區對話。",
127 },
128 fr: {
129 boot: "Chargement de Echo Director…",
130 description:
131 "Interface web Echo Director — discutez avec votre espace de travail Echo Director.",
132 },
133 ja: {
134 boot: "Echo Director を読み込み中…",
135 description:
136 "Echo Director Web UI — Echo Director ワークスペースと会話します。",
137 },
138 ko: {
139 boot: "Echo Director 불러오는 중…",
140 description:
141 "Echo Director 웹 UI — Echo Director 작업공간과 대화하세요.",
142 },
143 es: {
144 boot: "Cargando Echo Director…",
145 description:
146 "Interfaz web de Echo Director: conversa con tu espacio de trabajo de Echo Director.",
147 },
148 vi: {
149 boot: "Đang tải Echo Director…",
150 description:
151 "Giao diện web Echo Director — trò chuyện với workspace Echo Director của bạn.",
152 },
153 id: {
154 boot: "Memuat Echo Director…",
155 description:
156 "UI web Echo Director — ngobrol dengan workspace Echo Director Anda.",
157 },
158 };
159
160 function normalizeLocale(input) {
161 if (!input) return "en";
162 var raw = String(input).trim();
163 if (!raw) return "en";
164 if (copy[raw]) return raw;
165 var lower = raw.toLowerCase();
166 if (
167 lower === "zh" ||
168 lower.indexOf("zh-cn") === 0 ||
169 lower.indexOf("zh-sg") === 0
170 ) {
171 return "zh-CN";
172 }
173 if (
174 lower.indexOf("zh-tw") === 0 ||
175 lower.indexOf("zh-hk") === 0 ||
176 lower.indexOf("zh-mo") === 0 ||
177 lower.indexOf("zh-hant") === 0
178 ) {
179 return "zh-TW";
180 }
181 var base = lower.split("-")[0];
182 return copy[base] ? base : "en";
183 }
184
185 try {
186 var stored = localStorage.getItem(localeKey);
187 var detected =
188 stored ||
189 (navigator.languages && navigator.languages[0]) ||
190 navigator.language ||
191 "en";
192 var locale = normalizeLocale(detected);
193 var localized = copy[locale] || copy.en;
194 document.documentElement.lang = locale;
195 var description = document.querySelector(
196 '[data-i18n-meta=\"description\"]',
197 );
198 if (description)
199 description.setAttribute("content", localized.description);
200 var boot = document.querySelector("[data-boot-copy]");
201 if (boot) boot.textContent = localized.boot;
202 } catch {}
203 })();
204 </script>
205 <title>Echo Director</title>
206 </head>
207 <body class="bg-background text-foreground antialiased">
208 <div id="root">
209 <!-- <div class="boot-splash">
210 <div class="boot-splash-inner">
211 <span class="boot-dot" aria-hidden="true"></span>
212 <span data-boot-copy>Loading Echo Director…</span>
213 </div>
214 </div> -->
215 </div>
216 <script type="module" src="/src/main.tsx"></script>
217 </body>
218 </html>
219
219 lines HTML