- 83 Komponenten: Livewire\Volt\Component → Livewire\Component
- 73 Routen (admin, auth, customer): Volt::route() → Route::livewire()
- 88 Testdateien: Volt::test/actingAs → Livewire::test/actingAs
- VoltServiceProvider gelöscht; composer remove livewire/volt
- config/livewire.php auf v4-Schlüssel (component_layout, component_placeholder,
component_locations, make_command: SFC ohne ⚡). Der alte Schlüssel layout war
wirkungslos; alle gerouteten Komponenten setzen ihr Layout selbst.
- CLAUDE.md, AGENTS.md, boost.json, .cursorrules, Skill volt-development
- Roadmap: erledigt; Larastan erfasst SFCs weiterhin nicht (Blade-Dateien)
Suite 2.325 grün, einer übersprungen; Larastan und Pint ohne Meldung;
route:cache und view:cache laufen.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
80 lines
2.9 KiB
PHP
80 lines
2.9 KiB
PHP
<?php
|
|
|
|
use App\Enums\Portal;
|
|
use Livewire\Component;
|
|
|
|
new class extends Component
|
|
{
|
|
public string $activePortal = '';
|
|
|
|
public function mount(): void
|
|
{
|
|
$this->activePortal = session('admin_portal_filter', '');
|
|
}
|
|
|
|
public function switchPortal(string $portal): void
|
|
{
|
|
if ($portal === '') {
|
|
session()->forget('admin_portal_filter');
|
|
} else {
|
|
$valid = Portal::tryFrom($portal);
|
|
if ($valid === null) {
|
|
return;
|
|
}
|
|
session(['admin_portal_filter' => $valid->value]);
|
|
}
|
|
|
|
$this->activePortal = $portal;
|
|
$this->redirect($this->redirectTarget(), navigate: false);
|
|
}
|
|
|
|
public function with(): array
|
|
{
|
|
return [
|
|
'portals' => Portal::cases(),
|
|
];
|
|
}
|
|
|
|
private function redirectTarget(): string
|
|
{
|
|
return (string) request()->headers->get('referer', route('dashboard'));
|
|
}
|
|
}; ?>
|
|
|
|
<div class="px-1 py-2">
|
|
<div class="mb-2 px-2 text-[10.5px] uppercase tracking-[0.6px] font-semibold text-[color:var(--color-ink-3)]">
|
|
{{ __('Portal-Filter') }}
|
|
</div>
|
|
<div class="flex flex-col gap-0.5">
|
|
<button
|
|
wire:click="switchPortal('')"
|
|
@class([
|
|
'flex items-center gap-2 rounded-[4px] px-2 py-1.5 text-[12.5px] transition-colors',
|
|
'bg-[color:var(--color-bg-elev)] font-semibold text-[color:var(--color-ink)] border border-[color:var(--color-bg-rule)]' => $activePortal === '',
|
|
'text-[color:var(--color-ink-2)] hover:bg-[color:var(--color-bg-elev)]/60' => $activePortal !== '',
|
|
])
|
|
>
|
|
<span class="h-2 w-2 rounded-full bg-[color:var(--color-ink-3)]"></span>
|
|
{{ __('Alle Portale') }}
|
|
</button>
|
|
@foreach ($portals as $portal)
|
|
@if ($portal !== \App\Enums\Portal::Both)
|
|
<button
|
|
wire:click="switchPortal('{{ $portal->value }}')"
|
|
@class([
|
|
'flex items-center gap-2 rounded-[4px] px-2 py-1.5 text-[12.5px] transition-colors',
|
|
'bg-[color:var(--color-bg-elev)] font-semibold text-[color:var(--color-ink)] border border-[color:var(--color-bg-rule)]' => $activePortal === $portal->value,
|
|
'text-[color:var(--color-ink-2)] hover:bg-[color:var(--color-bg-elev)]/60' => $activePortal !== $portal->value,
|
|
])
|
|
>
|
|
<span @class([
|
|
'h-2 w-2 rounded-full',
|
|
'bg-[color:var(--color-ok)]' => $portal === \App\Enums\Portal::Presseecho,
|
|
'bg-[color:var(--color-err)]' => $portal !== \App\Enums\Portal::Presseecho,
|
|
])></span>
|
|
{{ $portal->label() }}
|
|
</button>
|
|
@endif
|
|
@endforeach
|
|
</div>
|
|
</div>
|