Certificate manager built on Laravel 13, Livewire 4, and Flux. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
24 lines
778 B
PHP
24 lines
778 B
PHP
@props(['sidebar' => false])
|
|
|
|
<flux:dropdown position="top" align="start">
|
|
@if ($sidebar)
|
|
<flux:sidebar.item icon="language">
|
|
{{ \App\Enums\Locale::from(app()->getLocale())->label() }}
|
|
</flux:sidebar.item>
|
|
@else
|
|
<flux:button icon="language" variant="ghost" size="sm">
|
|
{{ strtoupper(app()->getLocale()) }}
|
|
</flux:button>
|
|
@endif
|
|
|
|
<flux:menu>
|
|
@foreach (\App\Enums\Locale::cases() as $locale)
|
|
<flux:menu.item
|
|
:href="route('language.switch', $locale->value)"
|
|
:icon="app()->getLocale() === $locale->value ? 'check' : null"
|
|
>
|
|
{{ $locale->label() }}
|
|
</flux:menu.item>
|
|
@endforeach
|
|
</flux:menu>
|
|
</flux:dropdown>
|