fix: resolve runtime bugs (i18n export, chat crypto, async getUser, event leak) and remove dead code

This commit is contained in:
2026-02-06 13:44:19 +01:00
parent 5c66ca28b9
commit 1aa723728e
11 changed files with 65 additions and 334 deletions

View File

@@ -5,9 +5,10 @@ class PageSettings extends HTMLElement {
constructor() {
super()
this.isLoggedIn = false
this.user = null
}
connectedCallback() {
async connectedCallback() {
this.isLoggedIn = auth.isLoggedIn()
if (!this.isLoggedIn) {
@@ -15,6 +16,7 @@ class PageSettings extends HTMLElement {
return
}
this.user = await auth.getUser()
this.render()
this.setupEventListeners()
@@ -137,7 +139,7 @@ class PageSettings extends HTMLElement {
render() {
const currentTheme = this.getCurrentTheme()
const currentLang = i18n.getLocale()
const user = auth.getUser()
const user = this.user
this.innerHTML = /* html */`
<div class="settings-page">