Accessibility fixes.
This commit is contained in:
parent
4aacb26c4b
commit
88c94aaaf4
12 changed files with 276 additions and 260 deletions
|
|
@ -256,22 +256,21 @@ const copyCalendarLink = async () => {
|
|||
const { openLoginModal } = useLoginModal();
|
||||
|
||||
// Handle authentication check on page load
|
||||
// server: false ensures this always runs on the client, even on a hard page load.
|
||||
// The auth middleware only fires for client-side navigations in Nuxt 4, so we
|
||||
// can't rely on it to open the modal when the user lands directly on this URL.
|
||||
const { pending: authPending } = await useLazyAsyncData(
|
||||
"dashboard-auth",
|
||||
async () => {
|
||||
// Only check authentication on client side
|
||||
if (process.server) return null;
|
||||
|
||||
// If no member data, try to authenticate
|
||||
if (!memberData.value) {
|
||||
const isAuthenticated = await checkMemberStatus();
|
||||
|
||||
if (!isAuthenticated) {
|
||||
// Show login modal instead of redirecting
|
||||
openLoginModal({
|
||||
title: "Sign in to your dashboard",
|
||||
description: "Enter your email to access your member dashboard",
|
||||
title: "Sign in to continue",
|
||||
description: "You need to be signed in to access this page",
|
||||
dismissible: true,
|
||||
redirectTo: "/member/dashboard",
|
||||
});
|
||||
return null;
|
||||
}
|
||||
|
|
@ -279,6 +278,7 @@ const { pending: authPending } = await useLazyAsyncData(
|
|||
|
||||
return memberData.value;
|
||||
},
|
||||
{ server: false },
|
||||
);
|
||||
|
||||
// Load registered events
|
||||
|
|
|
|||
|
|
@ -188,7 +188,10 @@
|
|||
<div class="section-label">Visibility</div>
|
||||
|
||||
<div class="toggle-field">
|
||||
<USwitch v-model="formData.showInDirectory" />
|
||||
<USwitch
|
||||
v-model="formData.showInDirectory"
|
||||
aria-label="Show in Member Directory"
|
||||
/>
|
||||
<div class="toggle-label">
|
||||
Show in Member Directory
|
||||
<span class="toggle-sub"
|
||||
|
|
@ -206,7 +209,10 @@
|
|||
<div class="section-label">Peer Support</div>
|
||||
|
||||
<div class="toggle-field">
|
||||
<USwitch v-model="formData.peerSupportEnabled" />
|
||||
<USwitch
|
||||
v-model="formData.peerSupportEnabled"
|
||||
aria-label="Offer Peer Support"
|
||||
/>
|
||||
<div class="toggle-label">
|
||||
Offer Peer Support
|
||||
<span class="toggle-sub"
|
||||
|
|
@ -291,7 +297,10 @@
|
|||
<div class="section-label">Notifications</div>
|
||||
|
||||
<div class="toggle-field">
|
||||
<USwitch v-model="formData.notifyEvents" />
|
||||
<USwitch
|
||||
v-model="formData.notifyEvents"
|
||||
aria-label="Event reminders"
|
||||
/>
|
||||
<div class="toggle-label">
|
||||
Event reminders
|
||||
<span class="toggle-sub"
|
||||
|
|
@ -301,7 +310,10 @@
|
|||
</div>
|
||||
|
||||
<div class="toggle-field">
|
||||
<USwitch v-model="formData.notifyUpdates" />
|
||||
<USwitch
|
||||
v-model="formData.notifyUpdates"
|
||||
aria-label="Community updates"
|
||||
/>
|
||||
<div class="toggle-label">
|
||||
Community updates
|
||||
<span class="toggle-sub"
|
||||
|
|
@ -311,7 +323,10 @@
|
|||
</div>
|
||||
|
||||
<div class="toggle-field">
|
||||
<USwitch v-model="formData.notifyPeerRequests" />
|
||||
<USwitch
|
||||
v-model="formData.notifyPeerRequests"
|
||||
aria-label="Peer support requests"
|
||||
/>
|
||||
<div class="toggle-label">
|
||||
Peer support requests
|
||||
<span class="toggle-sub"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue