fix(errors): update error pages to provide navigation options

- Modified error pages (400, 401, 402, 403, 404, 419, 429, 500, 503) to replace "Go back home" button with "Go back" and added a "Dashboard" button for improved navigation.
- Updated links to use `url()->previous()` for returning to the previous page and `route('dashboard')` for accessing the dashboard directly.
This commit is contained in:
Andras Bacsai
2025-08-22 14:00:01 +02:00
parent d8d01e6886
commit 6c75e89303
9 changed files with 60 additions and 28 deletions

View File

@@ -11,9 +11,12 @@
malformed syntax.
</p>
@endif
<div class="flex items-center mt-10 gap-x-6">
<a href="/">
<x-forms.button>Go back home</x-forms.button>
<div class="flex items-center mt-10 gap-x-2">
<a href="{{ url()->previous() }}">
<x-forms.button>Go back</x-forms.button>
</a>
<a href="{{ route('dashboard') }}">
<x-forms.button>Dashboard</x-forms.button>
</a>
<a target="_blank" class="text-xs" href="{{ config('constants.urls.contact') }}">Contact
support

View File

@@ -5,9 +5,12 @@
<h1 class="mt-4 font-bold tracking-tight dark:text-white">You shall not pass!</h1>
<p class="text-base leading-7 dark:text-neutral-400 text-black">You don't have permission to access this page.
</p>
<div class="flex items-center mt-10 gap-x-6">
<a href="/">
<x-forms.button>Go back home</x-forms.button>
<div class="flex items-center mt-10 gap-x-2">
<a href="{{ url()->previous() }}">
<x-forms.button>Go back</x-forms.button>
</a>
<a href="{{ route('dashboard') }}">
<x-forms.button>Dashboard</x-forms.button>
</a>
<a target="_blank" class="text-xs" href="{{ config('constants.urls.contact') }}">Contact
support

View File

@@ -4,9 +4,12 @@
<div>
<p class="font-mono font-semibold text-7xl dark:text-warning">402</p>
<h1 class="mt-4 font-bold tracking-tight dark:text-white">Payment required.</h1>
<div class="flex items-center mt-10 gap-x-6">
<a href="/">
<x-forms.button>Go back home</x-forms.button>
<div class="flex items-center mt-10 gap-x-2">
<a href="{{ url()->previous() }}">
<x-forms.button>Go back</x-forms.button>
</a>
<a href="{{ route('dashboard') }}">
<x-forms.button>Dashboard</x-forms.button>
</a>
<a target="_blank" class="text-xs" href="{{ config('constants.urls.contact') }}">Contact
support

View File

@@ -5,9 +5,12 @@
<h1 class="mt-4 font-bold tracking-tight dark:text-white">You shall not pass!</h1>
<p class="text-base leading-7 dark:text-neutral-400 text-black">You don't have permission to access this page.
</p>
<div class="flex items-center mt-10 gap-x-6">
<a href="/">
<x-forms.button>Go back home</x-forms.button>
<div class="flex items-center mt-10 gap-x-2">
<a href="{{ url()->previous() }}">
<x-forms.button>Go back</x-forms.button>
</a>
<a href="{{ route('dashboard') }}">
<x-forms.button>Dashboard</x-forms.button>
</a>
<a target="_blank" class="text-xs" href="{{ config('constants.urls.contact') }}">Contact
support

View File

@@ -6,9 +6,12 @@
<p class="text-base leading-7 dark:text-neutral-400 text-black">Sorry, we couldnt find the page youre looking
for.
</p>
<div class="flex items-center mt-10 gap-x-6">
<a href="/">
<x-forms.button>Go back home</x-forms.button>
<div class="flex items-center mt-10 gap-x-2">
<a href="{{ url()->previous() }}">
<x-forms.button>Go back</x-forms.button>
</a>
<a href="{{ route('dashboard') }}">
<x-forms.button>Dashboard</x-forms.button>
</a>
<a target="_blank" class="text-xs" href="{{ config('constants.urls.contact') }}">Contact
support

View File

@@ -6,9 +6,12 @@
<p class="text-base leading-7 dark:text-neutral-300 text-black">Sorry, we couldnt find the page youre looking
for.
</p>
<div class="flex items-center mt-10 gap-x-6">
<a href="/">
<x-forms.button>Go back home</x-forms.button>
<div class="flex items-center mt-10 gap-x-2">
<a href="{{ url()->previous() }}">
<x-forms.button>Go back</x-forms.button>
</a>
<a href="{{ route('dashboard') }}">
<x-forms.button>Dashboard</x-forms.button>
</a>
<a target="_blank" class="text-xs" href="{{ config('constants.urls.contact') }}">Contact
support

View File

@@ -7,9 +7,12 @@
few
seconds before trying again.
</p>
<div class="flex items-center mt-10 gap-x-6">
<a href="/">
<x-forms.button>Go back home</x-forms.button>
<div class="flex items-center mt-10 gap-x-2">
<a href="{{ url()->previous() }}">
<x-forms.button>Go back</x-forms.button>
</a>
<a href="{{ route('dashboard') }}">
<x-forms.button>Dashboard</x-forms.button>
</a>
<a target="_blank" class="text-xs" href="{{ config('constants.urls.contact') }}">Contact
support

View File

@@ -10,9 +10,12 @@
{!! Purify::clean($exception->getMessage()) !!}
</div>
@endif
<div class="flex items-center mt-10 gap-6">
<a href="/">
<x-forms.button>Go back home</x-forms.button>
<div class="flex items-center mt-10 gap-x-2">
<a href="{{ url()->previous() }}">
<x-forms.button>Go back</x-forms.button>
</a>
<a href="{{ route('dashboard') }}">
<x-forms.button>Dashboard</x-forms.button>
</a>
<a target="_blank" class="text-xs" href="{{ config('constants.urls.contact') }}">Contact
support

View File

@@ -7,9 +7,17 @@
your
patience.
</p>
<a target="_blank" class="text-xs" href="{{ config('constants.urls.contact') }}">Contact
support
<x-external-link />
</a>
<div class="flex items-center mt-10 gap-x-2">
<a href="{{ url()->previous() }}">
<x-forms.button>Go back</x-forms.button>
</a>
<a href="{{ route('dashboard') }}">
<x-forms.button>Dashboard</x-forms.button>
</a>
<a target="_blank" class="text-xs" href="{{ config('constants.urls.contact') }}">Contact
support
<x-external-link />
</a>
</div>
</div>
</div>