Skip to content

Commit

Permalink
style: Moved notification streams to account wrapper
Browse files Browse the repository at this point in the history
  • Loading branch information
lewislarsen committed Jul 28, 2024
1 parent 19f4103 commit f0c5563
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,14 @@ public function submit(): RedirectResponse|Redirector
'user_id' => $user->getAttribute('id'),
]);

Toaster::success(__('Notification stream has been added.'));
Toaster::success('Notification stream has been added.');

return Redirect::route('notification-streams.index');
}

public function render(): View
{
return view('livewire.notification-streams.forms.create-notification-stream');
return view('livewire.notification-streams.forms.create-notification-stream')
->layout('components.layouts.account-app');
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public function submit(): RedirectResponse|Redirector
'receive_failed_backup_notifications' => $this->form->failed_notification ? now() : null,
]);

Toaster::success(__('Notification stream has been updated.'));
Toaster::success('Notification stream has been updated.');

return Redirect::route('notification-streams.index');
}
Expand All @@ -58,6 +58,6 @@ public function render(): View
{
return view('livewire.notification-streams.forms.update-notification-stream', [
'notificationStream' => $this->notificationStream,
]);
])->layout('components.layouts.account-app');
}
}
3 changes: 2 additions & 1 deletion app/Livewire/NotificationStreams/Index.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ class Index extends Component
{
public function render(): View
{
return view('livewire.notification-streams.index');
return view('livewire.notification-streams.index')
->layout('components.layouts.account-app');
}
}
2 changes: 1 addition & 1 deletion resources/views/account/partials/sidebar.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
</x-sidebar-nav-link>
</li>
<li class="flex-1 lg:flex-initial">
<x-sidebar-nav-link :href="route('notification-streams.index')" :active="request()->routeIs('notification-streams.index')" wire:navigate>
<x-sidebar-nav-link :href="route('notification-streams.index')" :active="request()->routeIs('notification-streams.*')" wire:navigate>
<span class="flex flex-col lg:flex-row items-center justify-center lg:justify-start py-2 lg:py-1.5">
@svg('heroicon-o-bell', 'h-6 w-6 lg:h-5 lg:w-5 lg:mr-2')
<span class="text-xs mt-1 lg:mt-0 lg:text-sm">{{ __('Notifications') }}</span>
Expand Down
6 changes: 6 additions & 0 deletions resources/views/components/layouts/account-app.blade.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
@section('title', $header )
<x-account-wrapper pageTitle=" {{ $header }}">
<div class="py-4 sm:py-6">
{{ $slot }}
</div>
</x-account-wrapper>

0 comments on commit f0c5563

Please sign in to comment.