Move password payload to cookie
Improve invalid password message
This commit is contained in:
Alan Grainger
2025-02-02 21:03:13 +08:00
parent f4a2cd17b7
commit 5f19270df7
7 changed files with 133 additions and 35 deletions
+5 -2
View File
@@ -20,7 +20,11 @@
placeholder="Password"
aria-label="Password"
required
autofocus
/>
<% if (notifyInvalidPassword) { %>
<small>Invalid password</small>
<% } %>
<input
type="hidden"
name="key"
@@ -53,8 +57,7 @@
})
if (res.status === 200) {
// Valid password - redirect to the gallery
const params = await res.json()
window.location = window.location.href.split('?')[0] + '?' + new URLSearchParams(params).toString()
window.location.reload()
}
} catch (e) { }
}