Web UI: static HTML/CSS/JS frontend, hosted separately from the API
CI / lint (push) Successful in 9s
CI / test (push) Successful in 31s
CI / notify (push) Successful in 5s

- Plain HTML + vanilla JS modules, no build step; talks to /api/v1 with
  a bearer token and only ever inserts server data as text
- Overview: now-playing dot-matrix display with live progress, totals,
  30-day plays meter, top artists/tracks by period, recent plays
- History (paged, grouped by day), Apps (create/delete, reveal/copy
  keys, player setup details), Sessions (revoke), sign-in approval page
  for the Last.fm desktop auth flow, sign in and registration
- Light and dark themes, responsive to phone widths, vendored fonts
  (SIL OFL) so the UI has no third-party requests

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MK52BGoJbPhZ1vSFuKcGUW
This commit is contained in:
mattandClaude Opus 5.5 committed 2026-09-25 14:11:37 +01:00
1 parent 0d49311848
commit b509cd2b60
24 files changed
+1879

No files matched your search

+31
View File
@@ -0,0 +1,31 @@
import { api, describeError, setToken } from "./api.js";
import { errorBox, replace } from "./dom.js";
import { publicPage } from "./layout.js";
publicPage();
const form = document.getElementById("register");
const messages = document.getElementById("messages");
form.addEventListener("submit", async (event) => {
event.preventDefault();
if (!form.reportValidity()) return;
const button = form.querySelector("button");
button.disabled = true;
replace(messages);
try {
const { token } = await api("/auth/register", {
method: "POST",
auth: false,
body: {
username: form.elements.username.value.trim(),
email: form.elements.email.value.trim(),
password: form.elements.password.value,
},
});
setToken(token);
location.href = "apps.html";
} catch (error) {
replace(messages, errorBox(describeError(error)));
button.disabled = false;
}
});