From 27fd02b9c93afb63ba4140f25155b8dbcb016fd0 Mon Sep 17 00:00:00 2001 From: spinline Date: Sat, 31 Jan 2026 14:47:08 +0300 Subject: [PATCH] fix(frontend): robust loading spinner removal using css class --- frontend/index.html | 4 ++++ frontend/src/lib.rs | 6 ++++++ 2 files changed, 10 insertions(+) diff --git a/frontend/index.html b/frontend/index.html index 3cada68..1a9df36 100644 --- a/frontend/index.html +++ b/frontend/index.html @@ -42,6 +42,10 @@ transform: rotate(360deg); } } + + body.app-loaded #app-loading { + display: none !important; + } diff --git a/frontend/src/lib.rs b/frontend/src/lib.rs index b85bb2a..58cbff9 100644 --- a/frontend/src/lib.rs +++ b/frontend/src/lib.rs @@ -14,6 +14,12 @@ pub fn main() { let window = web_sys::window().unwrap(); let document = window.document().unwrap(); + let body = document.body().unwrap(); + + // Add app-loaded class to body to hide spinner via CSS + let _ = body.class_list().add_1("app-loaded"); + + // Also try to remove it directly if let Some(loader) = document.get_element_by_id("app-loading") { loader.remove(); }