diff options
| author | Nathan Reiner <nathan@nathanreiner.xyz> | 2025-11-26 11:12:26 +0100 |
|---|---|---|
| committer | Nathan Reiner <nathan@nathanreiner.xyz> | 2025-11-26 11:12:26 +0100 |
| commit | 88443bbc2d4a4825dbcfd0bff107a3ed23c82aac (patch) | |
| tree | c368e79111aa47d7d417f0fef11751f86d38509b /static | |
| parent | 4d5754d86c74b55e9ac8ce5996c3558201f8a72a (diff) | |
fix login
Diffstat (limited to 'static')
| -rw-r--r-- | static/icon.svg | 10 | ||||
| -rw-r--r-- | static/pages/login/index.js | 19 |
2 files changed, 14 insertions, 15 deletions
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)"><tspan x="254.17958" y="345.31635" - id="tspan4"><tspan + id="tspan3"><tspan style="font-family:Pacifico;-inkscape-font-specification:Pacifico" - id="tspan1">M</tspan></tspan></text> + id="tspan2">M</tspan></tspan></text> </g> </svg> 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) { |