diff --git a/src_assets/common/assets/web/apps.html b/src_assets/common/assets/web/apps.html index 73e5b274ca8..66e264e3c8d 100644 --- a/src_assets/common/assets/web/apps.html +++ b/src_assets/common/assets/web/apps.html @@ -441,7 +441,7 @@

{{ $t('apps.env_vars_about') }}

); if (resp) { fetch("./api/apps/" + id, { method: "DELETE" }).then((r) => { - if (r.status == 200) document.location.reload(); + if (r.status === 200) document.location.reload(); }); } }, @@ -557,7 +557,7 @@

{{ $t('apps.env_vars_about') }}

method: "POST", body: JSON.stringify(this.editForm), }).then((r) => { - if (r.status == 200) document.location.reload(); + if (r.status === 200) document.location.reload(); }); }, }, diff --git a/src_assets/common/assets/web/password.html b/src_assets/common/assets/web/password.html index 7c0163fdf3a..854ee596271 100644 --- a/src_assets/common/assets/web/password.html +++ b/src_assets/common/assets/web/password.html @@ -94,10 +94,10 @@

{{ $t('password.new_creds') }}

method: "POST", body: JSON.stringify(this.passwordData), }).then((r) => { - if (r.status == 200) { + if (r.status === 200) { r.json().then((rj) => { - if (rj.status.toString() === "true") { - this.success = true; + this.success = rj.status; + if (this.success === true) { setTimeout(() => { document.location.reload(); }, 5000); diff --git a/src_assets/common/assets/web/pin.html b/src_assets/common/assets/web/pin.html index 8b9c794bc6e..a5dcdb5dd6b 100644 --- a/src_assets/common/assets/web/pin.html +++ b/src_assets/common/assets/web/pin.html @@ -42,7 +42,7 @@

{{ $t('pin.pin_pairing') }}

fetch("./api/pin", {method: "POST", body: b}) .then((response) => response.json()) .then((response) => { - if (response.status.toString().toLowerCase() === "true") { + if (response.status === true) { document.querySelector( "#status" ).innerHTML = ``; diff --git a/src_assets/common/assets/web/troubleshooting.html b/src_assets/common/assets/web/troubleshooting.html index 9ac45698e23..46d7218b671 100644 --- a/src_assets/common/assets/web/troubleshooting.html +++ b/src_assets/common/assets/web/troubleshooting.html @@ -120,13 +120,14 @@

{{ $t('troubleshooting.unpair_title' - +
@@ -176,7 +177,7 @@

{{ $t('troubleshooting.logs') }}

actualLogs() { if (!this.logFilter) return this.logs; let lines = this.logs.split("\n"); - lines = lines.filter(x => x.indexOf(this.logFilter) != -1); + lines = lines.filter(x => x.indexOf(this.logFilter) !== -1); return lines.join("\n"); } }, @@ -210,7 +211,7 @@

{{ $t('troubleshooting.logs') }}

.then((r) => r.json()) .then((r) => { this.closeAppPressed = false; - this.closeAppStatus = r.status.toString() === "true"; + this.closeAppStatus = r.status; setTimeout(() => { this.closeAppStatus = null; }, 5000); @@ -222,7 +223,7 @@

{{ $t('troubleshooting.logs') }}

.then((r) => r.json()) .then((r) => { this.unpairAllPressed = false; - this.unpairAllStatus = r.status.toString() === "true"; + this.unpairAllStatus = r.status; setTimeout(() => { this.unpairAllStatus = null; }, 5000); @@ -240,9 +241,9 @@

{{ $t('troubleshooting.logs') }}

.then((response) => response.json()) .then((response) => { const clientList = document.querySelector("#client-list"); - if (response.status === 'true' && response.named_certs && response.named_certs.length) { + if (response.status === true && response.named_certs && response.named_certs.length) { this.clients = response.named_certs.sort((a, b) => { - return (a.name.toLowerCase() > b.name.toLowerCase() || a.name == "" ? 1 : -1) + return (a.name.toLowerCase() > b.name.toLowerCase() || a.name === "" ? 1 : -1) }); } else { this.clients = []; @@ -270,7 +271,7 @@

{{ $t('troubleshooting.logs') }}

.then((r) => r.json()) .then((r) => { this.ddResetPressed = false; - this.ddResetStatus = r.status.toString() === "true"; + this.ddResetStatus = r.status; setTimeout(() => { this.ddResetStatus = null; }, 5000); diff --git a/src_assets/common/assets/web/welcome.html b/src_assets/common/assets/web/welcome.html index 4765aeb5db9..2f06c8a1f3a 100644 --- a/src_assets/common/assets/web/welcome.html +++ b/src_assets/common/assets/web/welcome.html @@ -81,10 +81,10 @@

body: JSON.stringify(this.passwordData), }).then((r) => { this.loading = false; - if (r.status == 200) { + if (r.status === 200) { r.json().then((rj) => { - if (rj.status.toString() === "true") { - this.success = true; + this.success = rj.status; + if (this.success === true) { setTimeout(() => { document.location.reload(); }, 5000);