mirror of
https://github.com/HolgerHatGarKeineNode/einundzwanzig-app.git
synced 2026-05-18 20:34:52 +00:00
🔄 **Refactor and extend meetup membership-based authorization**
- Updated `authorizeAccess` to restrict `meetups.edit` views and updates to users in "My-Meetups". - Attached creators to `meetup_user` pivot for default membership. - Adjusted related tests to validate membership-based edit permissions. 📱 **Improve sidebar and mobile navigation accessibility** - Added `aria-labels` to improve screen reader support for sidebar and mobile header elements. - Updated desktop and mobile user menus alignment for consistency. ⚡ **Enhance Lightning login flow** - Introduced `lightningLoginInProgress` for smoother polling synchronization with the redirect flow. - Updated logic to dispatch `lightning-login-ready` event instead of immediate redirect, avoiding race conditions.
This commit is contained in:
@@ -7,11 +7,18 @@
|
||||
<flux:toast.group>
|
||||
<flux:toast/>
|
||||
</flux:toast.group>
|
||||
<flux:sidebar sticky stashable class="border-e border-zinc-200 bg-zinc-50 dark:border-zinc-700 dark:bg-zinc-900">
|
||||
<flux:sidebar.toggle class="lg:hidden" icon="x-mark"/>
|
||||
<flux:sidebar
|
||||
sticky
|
||||
stashable
|
||||
aria-label="{{ __('Hauptnavigation') }}"
|
||||
class="border-e border-zinc-200 bg-zinc-50 pb-[max(1rem,calc(env(safe-area-inset-bottom)+1rem))] dark:border-zinc-700 dark:bg-zinc-900"
|
||||
>
|
||||
<flux:sidebar.toggle class="lg:hidden" icon="x-mark" aria-label="{{ __('Menü schließen') }}"/>
|
||||
|
||||
<a href="{{ route('welcome') }}" class="me-5 flex items-center space-x-2 rtl:space-x-reverse"
|
||||
wire:navigate>
|
||||
<a href="{{ route('welcome') }}"
|
||||
class="me-5 flex items-center space-x-2 rtl:space-x-reverse"
|
||||
wire:navigate
|
||||
aria-label="{{ __('Zur Startseite') }}">
|
||||
<x-app-logo/>
|
||||
</a>
|
||||
|
||||
@@ -148,14 +155,15 @@
|
||||
</flux:navlist.group>
|
||||
</flux:navlist>
|
||||
|
||||
<!-- Desktop User Menu -->
|
||||
<!-- User Menu (Desktop + Mobile in sidebar) -->
|
||||
@auth
|
||||
<flux:dropdown class="hidden lg:block" position="bottom" align="start">
|
||||
<flux:dropdown position="top" align="start">
|
||||
<flux:profile
|
||||
:name="auth()->user()->name"
|
||||
:avatar="auth()->user()->profile_photo_url"
|
||||
:initials="auth()->user()->initials()"
|
||||
icon:trailing="chevrons-up-down"
|
||||
aria-label="{{ __('Benutzermenü') }}"
|
||||
/>
|
||||
|
||||
<flux:menu class="w-[220px]">
|
||||
@@ -201,66 +209,18 @@
|
||||
@endauth
|
||||
</flux:sidebar>
|
||||
|
||||
<!-- Mobile User Menu -->
|
||||
<!-- Mobile Header (Toggle + Quick Country Chooser) -->
|
||||
@auth
|
||||
<flux:header class="lg:hidden">
|
||||
<flux:sidebar.toggle class="lg:hidden" icon="bars-2" inset="left"/>
|
||||
<flux:sidebar.toggle class="lg:hidden" icon="bars-2" inset="left" aria-label="{{ __('Menü öffnen') }}"/>
|
||||
|
||||
<flux:spacer/>
|
||||
|
||||
<flux:navlist variant="outline" class="mr-6">
|
||||
<flux:navlist variant="outline" class="me-1">
|
||||
<flux:navlist.group class="grid">
|
||||
<livewire:country.chooser/>
|
||||
</flux:navlist.group>
|
||||
</flux:navlist>
|
||||
|
||||
<flux:dropdown position="top" align="end">
|
||||
<flux:profile
|
||||
:avatar="auth()->user()->profile_photo_url"
|
||||
:initials="auth()->user()->initials()"
|
||||
icon-trailing="chevron-down"
|
||||
/>
|
||||
|
||||
<flux:menu>
|
||||
<flux:menu.radio.group>
|
||||
<div class="p-0 text-sm font-normal">
|
||||
<div class="flex items-center gap-2 px-1 py-1.5 text-start text-sm">
|
||||
<flux:avatar :src="auth()->user()->profile_photo_url" size="sm" class="shrink-0"/>
|
||||
|
||||
<div class="grid flex-1 text-start text-sm leading-tight">
|
||||
<span class="truncate font-semibold">{{ auth()->user()?->name }}</span>
|
||||
<span class="truncate text-xs">
|
||||
@if(strlen(auth()->user()?->name) > 12)
|
||||
{{ Str::substr(auth()->user()?->name, 0, 4) }}
|
||||
...{{ Str::substr(auth()->user()?->name, -4) }}
|
||||
@else
|
||||
{{ auth()->user()?->name }}
|
||||
@endif
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</flux:menu.radio.group>
|
||||
|
||||
<flux:menu.separator/>
|
||||
|
||||
<flux:menu.radio.group>
|
||||
<flux:menu.item
|
||||
:href="route('settings.profile', ['country' => str(session('lang_country', 'de'))->after('-')->lower()])"
|
||||
icon="cog"
|
||||
wire:navigate>{{ __('Settings') }}</flux:menu.item>
|
||||
</flux:menu.radio.group>
|
||||
|
||||
<flux:menu.separator/>
|
||||
|
||||
<form method="POST" action="{{ route('logout') }}" class="w-full">
|
||||
@csrf
|
||||
<flux:menu.item as="button" type="submit" icon="arrow-right-start-on-rectangle" class="w-full">
|
||||
{{ __('Log Out') }}
|
||||
</flux:menu.item>
|
||||
</form>
|
||||
</flux:menu>
|
||||
</flux:dropdown>
|
||||
</flux:header>
|
||||
@endauth
|
||||
|
||||
|
||||
Reference in New Issue
Block a user