Set active title for setting

This commit is contained in:
philipp lang 2024-10-25 00:46:03 +02:00
parent c67ae040de
commit e6d33ba2de
2 changed files with 3 additions and 3 deletions

View File

@ -7,7 +7,7 @@ use Illuminate\View\Component;
class Layout extends Component
{
public function __construct(public string $pageClass = '')
public function __construct(public string $pageClass = '', public string $title = '')
{
}
@ -26,7 +26,7 @@ class Layout extends Component
return <<<'HTML'
<div class="grow flex flex-col" @refresh-page.window="$wire.$refresh">
<div class="grow bg-gray-900 flex flex-col duration-300 navbar:ml-60">
<x-page::header title="{{ session()->get('title') }}">
<x-page::header :title="$title">
<x-slot:beforeTitle>
<a href="#" class="lg:hidden" wire:click.prevent="dispatch('toggle-sidebar')">
<x-ui::sprite src="menu" class="text-gray-100 w-5 h-5"></x-ui::sprite>

View File

@ -23,7 +23,7 @@ class SettingLayout extends Component
public function render()
{
return <<<'HTML'
<x-page::layout>
<x-page::layout :title="$active::title()">
<x-slot:right>
{{ $right ?? '' }}
</x-slot:right>