structure updates
This commit is contained in:
@@ -1,39 +1,66 @@
|
||||
<flux:dropdown position="bottom" align="start">
|
||||
<flux:sidebar.profile
|
||||
:name="auth()->user()->name"
|
||||
:initials="auth()->user()->initials()"
|
||||
icon:trailing="chevrons-up-down"
|
||||
data-test="sidebar-menu-button"
|
||||
/>
|
||||
@php
|
||||
$user = auth()->user();
|
||||
@endphp
|
||||
|
||||
<flux:menu>
|
||||
<div class="flex items-center gap-2 px-1 py-1.5 text-start text-sm">
|
||||
<flux:avatar
|
||||
:name="auth()->user()->name"
|
||||
:initials="auth()->user()->initials()"
|
||||
/>
|
||||
<div class="grid flex-1 text-start text-sm leading-tight">
|
||||
<flux:heading class="truncate">{{ auth()->user()->name }}</flux:heading>
|
||||
<flux:text class="truncate">{{ auth()->user()->email }}</flux:text>
|
||||
<details class="hd-account-menu hd-account-menu--legacy">
|
||||
<summary class="hd-account-button" data-test="sidebar-menu-button">
|
||||
<span class="hd-user-avatar hd-user-avatar--gravatar">
|
||||
<span class="hd-user-avatar-fallback">{{ $user->initials() }}</span>
|
||||
<img
|
||||
src="{{ $user->gravatarUrl(160) }}"
|
||||
alt="{{ $user->name }}"
|
||||
loading="lazy"
|
||||
referrerpolicy="no-referrer"
|
||||
onerror="this.style.display='none'"
|
||||
>
|
||||
</span>
|
||||
|
||||
<span class="hd-account-copy">
|
||||
<strong>{{ $user->name }}</strong>
|
||||
<small>{{ $user->email }}</small>
|
||||
</span>
|
||||
|
||||
<i class="fa-solid fa-chevron-down hd-account-chevron"></i>
|
||||
</summary>
|
||||
|
||||
<div class="hd-account-dropdown" role="menu">
|
||||
<div class="hd-account-dropdown-user">
|
||||
<span class="hd-user-avatar hd-user-avatar--gravatar hd-user-avatar--large">
|
||||
<span class="hd-user-avatar-fallback">{{ $user->initials() }}</span>
|
||||
<img
|
||||
src="{{ $user->gravatarUrl(160) }}"
|
||||
alt="{{ $user->name }}"
|
||||
loading="lazy"
|
||||
referrerpolicy="no-referrer"
|
||||
onerror="this.style.display='none'"
|
||||
>
|
||||
</span>
|
||||
|
||||
<div class="hd-account-dropdown-copy">
|
||||
<strong>{{ $user->name }}</strong>
|
||||
<span>{{ $user->email }}</span>
|
||||
</div>
|
||||
</div>
|
||||
<flux:menu.separator />
|
||||
<flux:menu.radio.group>
|
||||
<flux:menu.item :href="route('profile.edit')" icon="cog" wire:navigate>
|
||||
{{ __('Settings') }}
|
||||
</flux:menu.item>
|
||||
<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 cursor-pointer"
|
||||
data-test="logout-button"
|
||||
>
|
||||
{{ __('Log out') }}
|
||||
</flux:menu.item>
|
||||
</form>
|
||||
</flux:menu.radio.group>
|
||||
</flux:menu>
|
||||
</flux:dropdown>
|
||||
|
||||
<div class="hd-account-dropdown-divider"></div>
|
||||
|
||||
<nav class="hd-account-dropdown-nav" aria-label="Account">
|
||||
@if(Route::has('profile.edit'))
|
||||
<a href="{{ route('profile.edit') }}" wire:navigate role="menuitem">
|
||||
<i class="fa-solid fa-gear"></i>
|
||||
<span>Settings</span>
|
||||
</a>
|
||||
@endif
|
||||
</nav>
|
||||
|
||||
<div class="hd-account-dropdown-divider"></div>
|
||||
|
||||
<form method="POST" action="{{ route('logout') }}">
|
||||
@csrf
|
||||
<button class="hd-account-logout" type="submit" data-test="logout-button" role="menuitem">
|
||||
<i class="fa-solid fa-arrow-right-from-bracket"></i>
|
||||
<span>Log out</span>
|
||||
</button>
|
||||
</form>
|
||||
</div>
|
||||
</details>
|
||||
|
||||
Reference in New Issue
Block a user