From db892365dc0f2dcbb654fd432d6aa9bdc56d101a Mon Sep 17 00:00:00 2001 From: Leo Vasanko Date: Thu, 4 Dec 2025 00:29:42 +0000 Subject: [PATCH] Improved auth profile UX, consistent transparent-blur dialog background everywhere. --- examples/style.css | 4 +- frontend/src/assets/style.css | 14 ++-- frontend/src/components/Modal.vue | 5 +- frontend/src/components/ProfileView.vue | 8 +-- .../src/components/RegistrationLinkModal.vue | 22 +++---- frontend/src/utils/api.js | 29 ++++++++- frontend/src/utils/awaitable-websocket.js | 10 ++- frontend/src/utils/passkey.js | 64 ++++++++++++++----- passkey/fastapi/ws.py | 26 ++++++-- 9 files changed, 126 insertions(+), 56 deletions(-) diff --git a/examples/style.css b/examples/style.css index 615ec1b..9e6ddfa 100644 --- a/examples/style.css +++ b/examples/style.css @@ -16,6 +16,6 @@ body:has(#auth-iframe) { z-index: 9999; color-scheme: auto; background: transparent; - backdrop-filter: blur(4px) brightness(0.7); - -webkit-backdrop-filter: blur(4px) brightness(0.7); + backdrop-filter: blur(.1rem) brightness(0.7); + -webkit-backdrop-filter: blur(.1rem) brightness(0.7); } diff --git a/frontend/src/assets/style.css b/frontend/src/assets/style.css index be06fe1..f1b1fde 100644 --- a/frontend/src/assets/style.css +++ b/frontend/src/assets/style.css @@ -389,8 +389,9 @@ th { .dialog-overlay { position: fixed; inset: 0; - background: #1e293b; - backdrop-filter: blur(6px); + background: transparent; + backdrop-filter: blur(.1rem) brightness(0.7); + -webkit-backdrop-filter: blur(.1rem) brightness(0.7); z-index: 1100; display: flex; align-items: center; @@ -670,8 +671,9 @@ th { left: 0; width: 100vw; height: 100vh; - background: #334155; - backdrop-filter: blur(4px); + background: transparent; + backdrop-filter: blur(.1rem) brightness(0.7); + -webkit-backdrop-filter: blur(.1rem) brightness(0.7); display: flex; align-items: center; justify-content: center; @@ -724,6 +726,6 @@ body:has(#auth-iframe) { z-index: 9999; color-scheme: auto; background: transparent; - backdrop-filter: blur(4px) brightness(0.7); - -webkit-backdrop-filter: blur(4px) brightness(0.7); + backdrop-filter: blur(.1rem) brightness(0.7); + -webkit-backdrop-filter: blur(.1rem) brightness(0.7); } diff --git a/frontend/src/components/Modal.vue b/frontend/src/components/Modal.vue index 07c9a2d..2ce84a1 100644 --- a/frontend/src/components/Modal.vue +++ b/frontend/src/components/Modal.vue @@ -17,8 +17,9 @@ defineEmits(['close']) left: 0; right: 0; bottom: 0; - background: #334155; - backdrop-filter: blur(.1rem); + background: transparent; + backdrop-filter: blur(.1rem) brightness(0.7); + -webkit-backdrop-filter: blur(.1rem) brightness(0.7); display: flex; align-items: center; justify-content: center; diff --git a/frontend/src/components/ProfileView.vue b/frontend/src/components/ProfileView.vue index 68c1168..7b8e5a9 100644 --- a/frontend/src/components/ProfileView.vue +++ b/frontend/src/components/ProfileView.vue @@ -120,15 +120,15 @@ onUnmounted(() => { if (updateInterval.value) clearInterval(updateInterval.value const addNewCredential = async () => { try { - authStore.isLoading = true - authStore.showMessage('Adding new passkey...', 'info') - await passkey.register() + await passkey.register(null, null, () => { + authStore.showMessage('Adding new passkey...', 'info') + }) await authStore.loadUserInfo() authStore.showMessage('New passkey added successfully!', 'success', 3000) } catch (error) { console.error('Failed to add new passkey:', error) authStore.showMessage(error.message, 'error') - } finally { authStore.isLoading = false } + } } const handleDelete = async (credential) => { diff --git a/frontend/src/components/RegistrationLinkModal.vue b/frontend/src/components/RegistrationLinkModal.vue index 6a5102d..37de7a4 100644 --- a/frontend/src/components/RegistrationLinkModal.vue +++ b/frontend/src/components/RegistrationLinkModal.vue @@ -1,5 +1,5 @@