fix(frontend): robust loading spinner removal using css class

This commit is contained in:
spinline
2026-01-31 14:47:08 +03:00
parent 0cf5841023
commit 27fd02b9c9
2 changed files with 10 additions and 0 deletions

View File

@@ -42,6 +42,10 @@
transform: rotate(360deg); transform: rotate(360deg);
} }
} }
body.app-loaded #app-loading {
display: none !important;
}
</style> </style>
</body> </body>

View File

@@ -14,6 +14,12 @@ pub fn main() {
let window = web_sys::window().unwrap(); let window = web_sys::window().unwrap();
let document = window.document().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") { if let Some(loader) = document.get_element_by_id("app-loading") {
loader.remove(); loader.remove();
} }