From 88443bbc2d4a4825dbcfd0bff107a3ed23c82aac Mon Sep 17 00:00:00 2001 From: Nathan Reiner Date: Wed, 26 Nov 2025 11:12:26 +0100 Subject: fix login --- static/icon.svg | 10 +++++----- static/pages/login/index.js | 19 +++++++++---------- 2 files changed, 14 insertions(+), 15 deletions(-) (limited to 'static') diff --git a/static/icon.svg b/static/icon.svg index a510cd3..83fc1bd 100644 --- a/static/icon.svg +++ b/static/icon.svg @@ -9,9 +9,9 @@ id="svg1" inkscape:version="1.4.2 (ebf0e940d0, 2025-05-08)" sodipodi:docname="icon.svg" - inkscape:export-filename="icons/192.png" - inkscape:export-xdpi="36" - inkscape:export-ydpi="36" + inkscape:export-filename="icon.png" + inkscape:export-xdpi="96" + inkscape:export-ydpi="96" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns="http://www.w3.org/2000/svg" @@ -68,8 +68,8 @@ transform="matrix(9.4165391,0,0,9.677421,-2291.1707,-2987.8748)">M + id="tspan2">M diff --git a/static/pages/login/index.js b/static/pages/login/index.js index dae12e6..15a6016 100644 --- a/static/pages/login/index.js +++ b/static/pages/login/index.js @@ -34,11 +34,6 @@ export default class LoginView extends sfw.element.Container { id: 'username', placeholder: 'Username', autocomplete: 'username', - onkeydown: (e) => { - if (e.key === 'Enter') { - return this.#go_to_password(); - } - }, }), this.#password = Input.new({ id: 'password', @@ -73,16 +68,17 @@ export default class LoginView extends sfw.element.Container { } #next() { - if (this.#username.style.display == '') { - this.#login(); - } else { + if (this.#username.style.display != 'none') { this.#go_to_password(); + } else { + this.#login(); } } #go_to_password() { if (this.#username.value === '') return; + this.#user.innerText = this.#username.value; this.#username.style.display = 'none'; this.#password.style.display = ''; this.#password.focus(); @@ -94,8 +90,11 @@ export default class LoginView extends sfw.element.Container { } #reset() { - this.#username.value = ''; - this.#password.value = ''; + this.#user.innerText = ''; + this.#username.value = ''; + this.#password.value = ''; + this.#username.style.display = ''; + this.#password.style.display = 'none'; } set comment(value) { -- cgit v1.2.3-70-g09d2