From 01ad65efd2180bcfdfbec89597fc50c0242497db Mon Sep 17 00:00:00 2001 From: Max Berger Date: Sun, 15 Mar 2026 00:32:47 +0100 Subject: [PATCH] LoadingScene: use proper class syntax --- radicale/web/internal_data/js/main.js | 5 ++++- .../web/internal_data/js/scenes/LoadingScene.js | 16 ++++++++-------- 2 files changed, 12 insertions(+), 9 deletions(-) diff --git a/radicale/web/internal_data/js/main.js b/radicale/web/internal_data/js/main.js index c8495878..2a7fe17a 100644 --- a/radicale/web/internal_data/js/main.js +++ b/radicale/web/internal_data/js/main.js @@ -20,8 +20,11 @@ */ import { LoginScene } from "./scenes/LoginScene.js"; +import { LoadingScene } from "./scenes/LoadingScene.js"; import { push_scene } from "./scenes/scene_manager.js"; // Hide startup loading message -document.getElementById("loadingscene").classList.add("hidden"); +// This works because the LoadingScene is the one that is already active in index.html, +// and all other scenes are hidden. +new LoadingScene().hide(); push_scene(new LoginScene()); \ No newline at end of file diff --git a/radicale/web/internal_data/js/scenes/LoadingScene.js b/radicale/web/internal_data/js/scenes/LoadingScene.js index e48b2198..84a376e4 100644 --- a/radicale/web/internal_data/js/scenes/LoadingScene.js +++ b/radicale/web/internal_data/js/scenes/LoadingScene.js @@ -26,13 +26,13 @@ import { Scene } from "./scene_manager.js"; */ export class LoadingScene { constructor() { - let html_scene = document.getElementById("loadingscene"); - this.show = function () { - html_scene.classList.remove("hidden"); - }; - this.hide = function () { - html_scene.classList.add("hidden"); - }; - this.release = function () { }; + this.html_scene = document.getElementById("loadingscene"); } + show() { + this.html_scene.classList.remove("hidden"); + } + hide() { + this.html_scene.classList.add("hidden"); + } + release() { } } \ No newline at end of file