www.spaceplanner.app

Web client to the spaceplanner API
git clone git://jacobedwards.org/www.spaceplanner.app
Log | Files | Refs

commit 20d94a05733b617b71567cac34beb6fedb509c98
parent 1dceb06d8abbdfffb7a6e98a7ef47852834a35db
Author: Jacob R. Edwards <jacob@jacobedwards.org>
Date:   Fri, 11 Oct 2024 12:45:34 -0700

Fix email verification warning

It behaved differently if you had an no verified email and a verified
email different then the setting. Now it behaves the same no matter
what. Importantly, you can now access the verification page in
either scenario, which is good because there's no other way to get
to the email verification page.

Diffstat:
Mfiles/settings/main.js | 17++++++-----------
1 file changed, 6 insertions(+), 11 deletions(-)

diff --git a/files/settings/main.js b/files/settings/main.js @@ -159,17 +159,12 @@ function update_verified_email() { if (old_warning != null) { old_warning.remove() } - } else if (verified != setting_form.value) { - let content - if (verified == null) - content = ui.warning("This email is not verified.") - else { - content = document.createElement("p") - content.appendChild(document.createTextNode("This email is not verified. Please verify it ")) - let a = content.appendChild(document.createElement("a")) - a.href = "./verify-email" - a.appendChild(document.createTextNode("here.")) - } + } else if (verified == null || verified != setting_form.value) { + let content = document.createElement("p") + content.appendChild(document.createTextNode("This email is not verified. Please verify it ")) + let a = content.appendChild(document.createElement("a")) + a.href = "./verify-email" + a.appendChild(document.createTextNode("here.")) let warning = ui.warning(content) warning.id = "unverified_email_warning"