aboutsummaryrefslogtreecommitdiff
path: root/public/admin.html
diff options
context:
space:
mode:
authordax <me@dax.ist>2026-08-05 17:52:07 +0100
committerdax <me@dax.ist>2026-08-05 17:52:07 +0100
commitd2a8b2abc908311fc249454086d0d0eacfe861e1 (patch)
tree513532ac99400e0e3e7c94e40e04c9e1d7e4837b /public/admin.html
parent70ce625487b5e0b7540b70de2ae59f0086134a9e (diff)
admin auth: fixed pathways-admin username shown in setup/login so browser saves password; server verifies username
Diffstat (limited to 'public/admin.html')
-rw-r--r--public/admin.html17
1 files changed, 10 insertions, 7 deletions
diff --git a/public/admin.html b/public/admin.html
index 61fd6e1..9fe1b5a 100644
--- a/public/admin.html
+++ b/public/admin.html
@@ -5,16 +5,17 @@
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="color-scheme" content="dark">
<title>pathways ยท admin</title>
- <link rel="stylesheet" href="/admin.css?v=3">
+ <link rel="stylesheet" href="/admin.css?v=4">
</head>
<body>
<main id="app">
<section id="view-setup" hidden>
<h1>pathways<span class="dot">.</span> admin</h1>
<p class="sub">no admin password is set yet. create one to manage the walk graph and uploads.</p>
- <form id="setup-form" autocomplete="off">
- <input type="password" id="setup-pw" minlength="8" required placeholder="password (min 8 chars)">
- <input type="password" id="setup-pw2" required placeholder="repeat password">
+ <form id="setup-form" action="/admin" method="post" autocomplete="new-password">
+ <input type="text" id="setup-user" name="username" value="pathways-admin" readonly autocomplete="username">
+ <input type="password" id="setup-pw" name="new-password" autocomplete="new-password" minlength="8" required placeholder="password (min 8 chars)">
+ <input type="password" id="setup-pw2" name="confirm-password" autocomplete="new-password" required placeholder="repeat password">
<button type="submit">set password</button>
</form>
<p class="err" id="setup-err"></p>
@@ -22,8 +23,9 @@
<section id="view-login" hidden>
<h1>pathways<span class="dot">.</span> admin</h1>
- <form id="login-form">
- <input type="password" id="login-pw" required placeholder="password" autocomplete="current-password">
+ <form id="login-form" action="/admin" method="post" autocomplete="on">
+ <input type="text" id="login-user" name="username" value="pathways-admin" readonly autocomplete="username">
+ <input type="password" id="login-pw" name="password" autocomplete="current-password" required placeholder="password">
<label class="remember"><input type="checkbox" id="login-remember" checked> remember this device</label>
<button type="submit">sign in</button>
</form>
@@ -33,6 +35,7 @@
<section id="view-dash" hidden>
<header class="top">
<h1>pathways<span class="dot">.</span> admin</h1>
+ <p class="signed-in">signed in as <span id="dash-user">pathways-admin</span></p>
<nav>
<button class="tab active" data-tab="status">status</button>
<button class="tab" data-tab="import">import</button>
@@ -84,6 +87,6 @@
</section>
</main>
<div id="toast"></div>
- <script src="/admin.js?v=3"></script>
+ <script src="/admin.js?v=4"></script>
</body>
</html>