From b2323081234b8635681062d7737daabd7ab837a9 Mon Sep 17 00:00:00 2001 From: Nathan Reiner Date: Mon, 24 Nov 2025 16:41:59 +0100 Subject: add modules to importmap --- static/index.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'static/index.js') diff --git a/static/index.js b/static/index.js index 28c6228..c5bfccc 100644 --- a/static/index.js +++ b/static/index.js @@ -1,10 +1,8 @@ import * as sfw from 'sfw'; -import * as api from './api/index.js'; +import * as api from 'api'; import { literal as m } from './month.js'; import * as service_worker from './service-worker/index.js'; -//service_worker.register(); - import LoginView from './pages/login/index.js'; import MainView from './pages/main/index.js'; import ImageViewer from './pages/image-viewer/index.js'; @@ -124,8 +122,10 @@ document.body.append( upload_bar, ); - -if (await api.session.is_valid()) { +if (!await api.session.is_online()) { + login.hide(); + reload(); +} if (await api.session.is_valid()) { login.hide(); reload(); } else { -- cgit v1.2.3-70-g09d2