diff options
| author | Nathan Reiner <nathan@nathanreiner.xyz> | 2025-11-24 16:41:59 +0100 |
|---|---|---|
| committer | Nathan Reiner <nathan@nathanreiner.xyz> | 2025-11-24 16:41:59 +0100 |
| commit | b2323081234b8635681062d7737daabd7ab837a9 (patch) | |
| tree | b4385a3bbdeb461c1bce00b9d8b01d50cd595529 /static/index.js | |
| parent | 4b6e37397d3a9a80db0c20484b712175c7b9c9c7 (diff) | |
add modules to importmap
Diffstat (limited to 'static/index.js')
| -rw-r--r-- | static/index.js | 10 |
1 files changed, 5 insertions, 5 deletions
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 { |