Files
SealShare/resources/views/partials/app-bar.blade.php
T
Andreas Reinhold / reiniandClaude Opus 5 c4a17b65c8 Move SealShare onto Livewire Material
Replaces maryUI and daisyUI with nonameweb/livewire-material: the Vibrant
indigo scheme, a system/light/dark theme under sealshare-theme, one top
app bar with the account menu, the upload drop zone and link-ready
moments, M3 fields, dialogs instead of wire:confirm, snackbars instead of
flashed messages, a sortable admin table, and the starter-kit cleanup.
Docker builds assets after Composer; CI drops the Flux step.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01V9NnLxnPp8vaaurb3Z1MFy
2026-09-13 10:49:38 +02:00

48 lines
2.2 KiB
PHP

{{-- The one top app bar on every page: the site's logo and title, then the account menu for a
signed-in user, or the theme toggle and a way to sign in for everyone else. --}}
@php
$siteTitle = \App\Models\Setting::get('site_title') ?: config('app.name', 'SealShare');
$siteLogo = \App\Models\Setting::get('site_logo');
@endphp
<x-app-bar>
<x-slot:navigation>
<a href="{{ route('home') }}" class="focus-ring flex min-w-0 items-center gap-3 rounded-corner-full py-2 ps-3 pe-4" data-test="app-bar-home">
@if ($siteLogo)
<img src="{{ Storage::disk('public')->url($siteLogo) }}" alt="" class="h-8 w-auto" />
@else
<x-app-logo-icon class="size-8 shrink-0 text-primary" />
@endif
<span class="truncate type-title-lg text-on-surface">{{ $siteTitle }}</span>
</a>
</x-slot:navigation>
<x-slot:actions>
@auth
<span class="me-2 inline-flex">
<x-account-menu :name="auth()->user()->name" :email="auth()->user()->email">
<x-menu-item :label="__('Upload')" icon="upload" :link="route('upload')" />
@if (auth()->user()->is_admin)
<x-menu-item :label="__('Admin dashboard')" icon="dashboard" :link="route('admin.dashboard')" />
<x-menu-item :label="__('Admin settings')" icon="admin_panel_settings" :link="route('admin.settings')" />
@endif
<x-menu-item :label="__('Settings')" icon="settings" :link="route('profile.edit')" />
<x-slot:footer>
<form method="POST" action="{{ route('logout') }}">
@csrf
<x-menu-item :label="__('Log out')" icon="logout" type="submit" data-test="logout-button" />
</form>
</x-slot:footer>
</x-account-menu>
</span>
@else
<x-theme-toggle />
@if (Route::has('login') && ! request()->routeIs('login'))
<span class="me-1 inline-flex"><x-button :label="__('Log in')" :link="route('login')" /></span>
@endif
@endauth
</x-slot:actions>
</x-app-bar>