diff --git a/src_assets/common/assets/web/login.html b/src_assets/common/assets/web/login.html index 0bd4ccb5..39a15247 100644 --- a/src_assets/common/assets/web/login.html +++ b/src_assets/common/assets/web/login.html @@ -15,7 +15,7 @@

{{ $t('welcome.greeting') }}

-
+
return data }, methods: { - save() { + login() { this.error = null; this.loading = true; + if (!this.savePassword) { + localStorage.removeItem('login') + } fetch("./api/login", { method: "POST", body: JSON.stringify(this.passwordData), @@ -92,7 +95,9 @@

this.loading = false; if (res.status === 200) { this.success = true; - localStorage.setItem('login', JSON.stringify(this.passwordData)); + if (this.savePassword) { + localStorage.setItem('login', JSON.stringify(this.passwordData)); + } const url = new URL(window.location); const redirectUrl = url.searchParams.get('redir'); const hash = url.hash;