From 7036338b336d39b388d67751d8dfd3e6b26fc70c Mon Sep 17 00:00:00 2001 From: Leo Vasanko Date: Mon, 1 Sep 2025 18:48:59 -0600 Subject: [PATCH] Use rp-name for frontend branding --- frontend/admin/index.html | 2 +- frontend/index.html | 2 +- frontend/src/App.vue | 2 ++ frontend/src/admin/AdminApp.vue | 8 ++++++-- frontend/src/components/LoginView.vue | 2 +- frontend/src/stores/auth.js | 14 ++++++++++++++ passkey/fastapi/api.py | 12 ++++++++++++ 7 files changed, 37 insertions(+), 5 deletions(-) diff --git a/frontend/admin/index.html b/frontend/admin/index.html index e945f9e..c8661e7 100644 --- a/frontend/admin/index.html +++ b/frontend/admin/index.html @@ -4,7 +4,7 @@ - Passkey Admin + Admin
diff --git a/frontend/index.html b/frontend/index.html index ddb2818..be039d6 100644 --- a/frontend/index.html +++ b/frontend/index.html @@ -4,7 +4,7 @@ - Passkey Authentication + Authentication
diff --git a/frontend/src/App.vue b/frontend/src/App.vue index 4da6214..d99223f 100644 --- a/frontend/src/App.vue +++ b/frontend/src/App.vue @@ -26,6 +26,8 @@ onMounted(async () => { if (!location.pathname.startsWith('/auth/')) { store.setRestrictedMode(true) } + // Load branding / settings first (non-blocking for auth flow) + await store.loadSettings() // Was an error message passed in the URL hash? const message = location.hash.substring(1) if (message) { diff --git a/frontend/src/admin/AdminApp.vue b/frontend/src/admin/AdminApp.vue index acd9f2b..2bda01b 100644 --- a/frontend/src/admin/AdminApp.vue +++ b/frontend/src/admin/AdminApp.vue @@ -277,8 +277,12 @@ function deletePermission(p) { } }) } -onMounted(() => { +onMounted(async () => { window.addEventListener('hashchange', parseHash) + await authStore.loadSettings() + if (authStore.settings?.rp_name) { + document.title = authStore.settings.rp_name + ' Admin' + } load() }) @@ -435,7 +439,7 @@ async function submitDialog() {