diff --git a/web/src/App.tsx b/web/src/App.tsx index 544e402..7d6e16c 100644 --- a/web/src/App.tsx +++ b/web/src/App.tsx @@ -30,7 +30,6 @@ export default function App() { const [chaosMode, setChaosMode] = useState(false); const chaosTimeoutRef = useRef(null); const chaosModeRef = useRef(false); - const [buildInfo, setBuildInfo] = useState<{version: string, channel: string}>({version: '1.0.0', channel: 'stable'}); useEffect(() => { chaosModeRef.current = chaosMode; }, [chaosMode]); useEffect(() => { @@ -47,12 +46,11 @@ export default function App() { } catch (e: any) { setError(e?.message || 'Fehler beim Laden der Channels'); } - try { setIsAdmin(await adminStatus()); } catch {} - try { - const h = await fetch('/api/health').then(r => r.json()).catch(() => null); - if (h && typeof h.totalPlays === 'number') setTotalPlays(h.totalPlays); - if (h && h.buildInfo) setBuildInfo(h.buildInfo); - } catch {} + try { setIsAdmin(await adminStatus()); } catch {} + try { + const h = await fetch('/api/health').then(r => r.json()).catch(() => null); + if (h && typeof h.totalPlays === 'number') setTotalPlays(h.totalPlays); + } catch {} })(); }, []); @@ -117,7 +115,6 @@ export default function App() { try { const h = await fetch('/api/health').then(r => r.json()).catch(() => null); if (h && typeof h.totalPlays === 'number') setTotalPlays(h.totalPlays); - if (h && h.buildInfo) setBuildInfo(h.buildInfo); } catch {} }; @@ -255,14 +252,14 @@ export default function App() {
-

+

Jukebox 420 -
- v{buildInfo.version} - {buildInfo.channel === 'nightly' && ( + {import.meta.env.VITE_BUILD_CHANNEL === 'nightly' && ( +
+ v{import.meta.env.VITE_APP_VERSION || ''} • Nightly - )} -
+
+ )}

{clock}