Added loading page — SSE-driven splash screen for first-run UX

This commit is contained in:
Virgílio Santos
2026-03-14 15:47:09 -03:00
parent 15b4568140
commit 1933e063ae
4 changed files with 114 additions and 11 deletions

View File

@@ -230,9 +230,13 @@ if (discordAlerter.isConfigured) {
const app = express();
app.use(express.static(join(ROOT, 'dashboard/public')));
// Serve jarvis.html as the root page
// Serve loading page until first sweep completes, then the dashboard
app.get('/', (req, res) => {
res.sendFile(join(ROOT, 'dashboard/public/jarvis.html'));
if (!currentData) {
res.sendFile(join(ROOT, 'dashboard/public/loading.html'));
} else {
res.sendFile(join(ROOT, 'dashboard/public/jarvis.html'));
}
});
// API: current data