updated/consolidated lit+zustand

This commit is contained in:
authentik Default Admin 2026-03-04 18:11:14 -08:00
parent 648412dd6d
commit 2178304c76
7 changed files with 83 additions and 307 deletions

View file

@ -6,7 +6,6 @@ import "./page-home.js";
import "./page-items.js";
class AppRoot extends LitElement {
#hydrated = new StoreController(this, store, s => s._hydrated);
#user = new StoreController(this, store, s => s.user);
#route = new StoreController(this, store, s => s.route);
@ -15,19 +14,9 @@ class AppRoot extends LitElement {
display: block;
min-height: 100vh;
}
.loading {
display: grid;
place-items: center;
height: 100vh;
opacity: 0.4;
}
`;
render() {
if (!this.#hydrated.value) {
return html`<div class="loading">loading...</div>`;
}
return html`
<nav-bar .user=${this.#user.value}></nav-bar>
<main>${this.#renderRoute()}</main>