finished pruning for lit-only demo

This commit is contained in:
authentik Default Admin 2026-03-04 14:18:44 -08:00
parent 648412dd6d
commit 3736d7278b
10 changed files with 217 additions and 281 deletions

View file

@ -1,23 +0,0 @@
export class StoreController {
constructor(host, store, selector) {
this.host = host
this.store = store
this.selector = selector
host.addController(this)
}
hostConnected() {
this._unsub = this.store.subscribe(
(state) => {
const next = this.selector(state)
if (next !== this.value) {
this.value = next
this.host.requestUpdate()
}
}
)
this.value = this.selector(this.store.getState())
}
hostDisconnected() { this._unsub?.() }
}