Files
2026-05-09 17:32:17 +02:00

76 lines
2.7 KiB
PHP
Executable File

<div class="max-w-7xl min-h-[60px] px-4 md:flex md:items-center md:justify-between md:mx-auto">
{{-- Linkerkant: Currencies --}}
<div class="flex gap-x-6">
<x-top-header-currency icon="nav-credit-icon">
<x-slot:currency>{{ auth()->user()->credits }}</x-slot:currency>
{{ __('Credits') }}
</x-top-header-currency>
<x-top-header-currency icon="nav-ducket-icon">
<x-slot:currency>{{ auth()->user()->currency('duckets') }}</x-slot:currency>
{{ __('Duckets') }}
</x-top-header-currency>
<x-top-header-currency icon="nav-diamond-icon">
<x-slot:currency>{{ auth()->user()->currency('diamonds') }}</x-slot:currency>
{{ __('Diamonds') }}
</x-top-header-currency>
</div>
{{-- Rechterkant: Admin & User Menu --}}
<div class="flex items-center gap-x-3">
{{-- 1. Administratie Dropdown --}}
@if(hasPermission('view_server_logs') || hasPermission('housekeeping_access') || hasPermission('generate_logo'))
<x-navigation.dropdown classes="!border-none" style="color: var(--color-text)">
{{ __('Administration') }}
<x-slot:children>
@if (hasPermission('generate_logo'))
<x-navigation.dropdown-child route="{{ route('logo-generator.index') }}" :turbolink="false" target="_blank">
{{ __('Logo generator') }}
</x-navigation.dropdown-child>
@if (hasPermission('view_server_logs'))
<x-navigation.dropdown-child route="/log-viewer" :turbolink="false" target="_blank">
{{ __('Error logs') }}
</x-navigation.dropdown-child>
@endif
@if(Auth::check())
<a data-turbolinks="false" href="{{ setting('housekeeping_url') }}" target="_blank" class="dropdown-item block px-4 py-2 text-sm" style="color: var(--color-text)">
{{ __('Housekeeping') }}
</a>
@endif
@endif
</x-slot:children>
</x-navigation.dropdown>
@endif
{{-- 2. Gebruiker Dropdown (Avatar + Logout) --}}
<x-navigation.dropdown classes="!border-none">
<div class="flex items-center">
<div @class([
'!bg-no-repeat !bg-center',
'w-[54px] h-[62px]' => Str::contains(setting('avatar_imager'), 'www.habbo.com'),
'w-[64px] h-[110px]' => !Str::contains(setting('avatar_imager'), 'www.habbo.com'),
])
style="background: url({{ setting('avatar_imager') }}{{ auth()->user()->look }}&direction=2&headonly=1&head_direction=2&gesture=sml)">
</div>
<span class="-ml-2">{{ auth()->user()->username }}</span>
</div>
<x-slot:children>
<x-navigation.dropdown-child :route="route('settings.account.show')">
{{ __('User settings') }}
</x-navigation.dropdown-child>
<form action="{{ route('logout') }}" method="POST" class="block">
@csrf
<button type="submit" class="dropdown-item w-full text-left hover:!bg-red-500/20" style="color: var(--button-danger-color);">
{{ __('Logout') }}
</button>
</form>
</x-slot:children>
</x-navigation.dropdown>
</div>
</div>