From 560e30d93c97a6416ab6dbf57b65bc764af478ed Mon Sep 17 00:00:00 2001 From: aewing Date: Wed, 17 Dec 2025 19:58:39 +0000 Subject: [PATCH] added preferences to pull from user_preferences collection. seems to be working. --- frontend/auth.js | 8 ++- frontend/index.html | 128 +++++++++++++++++++++++++++++++++++++++----- 2 files changed, 121 insertions(+), 15 deletions(-) diff --git a/frontend/auth.js b/frontend/auth.js index 145f755..323c570 100644 --- a/frontend/auth.js +++ b/frontend/auth.js @@ -20,6 +20,12 @@ ); } + function getEmail() { + const model = pb.authStore.model || {}; + // Prefer email, but fall back to username if email missing + return model.email || model.username || null; + } + async function ensureAuth() { if (pb.authStore.isValid) return true; const path = new URL(window.location.href).pathname; @@ -29,5 +35,5 @@ return false; } - global.Auth = { pb, authHeaders, ensureAuth, getDisplayName }; + global.Auth = { pb, authHeaders, ensureAuth, getDisplayName, getEmail }; })(window); diff --git a/frontend/index.html b/frontend/index.html index cc0ef52..122c885 100644 --- a/frontend/index.html +++ b/frontend/index.html @@ -56,7 +56,10 @@
-
v1.0.0-beta2
+
+ + v1.0.0-beta2 +
@@ -113,7 +116,7 @@