create very rough UI

This commit is contained in:
2026-06-03 00:31:35 +00:00
parent 2efe08b247
commit b379b7a5af
9 changed files with 1157 additions and 0 deletions
+13
View File
@@ -0,0 +1,13 @@
export async function requireAuth() {
const res = await fetch('/api/whoami')
if (res.status === 401) {
window.location.href = '/login.html'
}
}
export async function redirectIfAuthed() {
const res = await fetch('/api/whoami')
if (res.ok) {
window.location.href = '/'
}
}