Fix wireNavigate on external links and url()->previous()

Remove wireNavigate() from:
- External links (docs, GitHub) - can't be handled by Livewire SPA
- url()->previous() in all error pages - dynamic URL can't prefetch
- Links with target="_blank" - conflicts with wire:navigate semantics

Keep wireNavigate() on internal Dashboard links in error pages.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Andras Bacsai 2025-12-17 13:25:27 +01:00
parent e5019bb44f
commit 28cd582d63
14 changed files with 14 additions and 14 deletions

View File

@ -12,7 +12,7 @@
</p>
@endif
<div class="flex items-center mt-10 gap-x-2">
<a href="{{ url()->previous() }}" {{ wireNavigate() }}>
<a href="{{ url()->previous() }}">
<x-forms.button>Go back</x-forms.button>
</a>
<a href="{{ route('dashboard') }}" {{ wireNavigate() }}>

View File

@ -6,7 +6,7 @@
<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-2">
<a href="{{ url()->previous() }}" {{ wireNavigate() }}>
<a href="{{ url()->previous() }}">
<x-forms.button>Go back</x-forms.button>
</a>
<a href="{{ route('dashboard') }}" {{ wireNavigate() }}>

View File

@ -5,7 +5,7 @@
<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-2">
<a href="{{ url()->previous() }}" {{ wireNavigate() }}>
<a href="{{ url()->previous() }}">
<x-forms.button>Go back</x-forms.button>
</a>
<a href="{{ route('dashboard') }}" {{ wireNavigate() }}>

View File

@ -6,7 +6,7 @@
<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-2">
<a href="{{ url()->previous() }}" {{ wireNavigate() }}>
<a href="{{ url()->previous() }}">
<x-forms.button>Go back</x-forms.button>
</a>
<a href="{{ route('dashboard') }}" {{ wireNavigate() }}>

View File

@ -7,7 +7,7 @@
for.
</p>
<div class="flex items-center mt-10 gap-x-2">
<a href="{{ url()->previous() }}" {{ wireNavigate() }}>
<a href="{{ url()->previous() }}">
<x-forms.button>Go back</x-forms.button>
</a>
<a href="{{ route('dashboard') }}" {{ wireNavigate() }}>

View File

@ -7,7 +7,7 @@
for.
</p>
<div class="flex items-center mt-10 gap-x-2">
<a href="{{ url()->previous() }}" {{ wireNavigate() }}>
<a href="{{ url()->previous() }}">
<x-forms.button>Go back</x-forms.button>
</a>
<a href="{{ route('dashboard') }}" {{ wireNavigate() }}>

View File

@ -8,7 +8,7 @@
seconds before trying again.
</p>
<div class="flex items-center mt-10 gap-x-2">
<a href="{{ url()->previous() }}" {{ wireNavigate() }}>
<a href="{{ url()->previous() }}">
<x-forms.button>Go back</x-forms.button>
</a>
<a href="{{ route('dashboard') }}" {{ wireNavigate() }}>

View File

@ -11,7 +11,7 @@
</div>
@endif
<div class="flex items-center mt-10 gap-x-2">
<a href="{{ url()->previous() }}" {{ wireNavigate() }}>
<a href="{{ url()->previous() }}">
<x-forms.button>Go back</x-forms.button>
</a>
<a href="{{ route('dashboard') }}" {{ wireNavigate() }}>

View File

@ -8,7 +8,7 @@
patience.
</p>
<div class="flex items-center mt-10 gap-x-2">
<a href="{{ url()->previous() }}" {{ wireNavigate() }}>
<a href="{{ url()->previous() }}">
<x-forms.button>Go back</x-forms.button>
</a>
<a href="{{ route('dashboard') }}" {{ wireNavigate() }}>

View File

@ -28,7 +28,7 @@
</div>
@endif
<x-forms.input
helper="You can add custom docker run options that will be used when your container is started.<br>Note: Not all options are supported, as they could mess up Coolify's automation and could cause bad experience for users.<br><br>Check the <a class='underline dark:text-white' {{ wireNavigate() }} href='https://coolify.io/docs/knowledge-base/docker/custom-commands'>docs.</a>"
helper="You can add custom docker run options that will be used when your container is started.<br>Note: Not all options are supported, as they could mess up Coolify's automation and could cause bad experience for users.<br><br>Check the <a class='underline dark:text-white' target='_blank' href='https://coolify.io/docs/knowledge-base/docker/custom-commands'>docs.</a>"
placeholder="--cap-add SYS_ADMIN --device=/dev/fuse --security-opt apparmor:unconfined --ulimit nofile=1024:1024 --tmpfs /run:rw,noexec,nosuid,size=65536k"
id="customDockerRunOptions" label="Custom Docker Options" canGate="update" :canResource="$database" />
<div class="flex flex-col gap-2">

View File

@ -46,7 +46,7 @@
@endif
<div class="pt-2">
<x-forms.input
helper="You can add custom docker run options that will be used when your container is started.<br>Note: Not all options are supported, as they could mess up Coolify's automation and could cause bad experience for users.<br><br>Check the <a class='underline dark:text-white' {{ wireNavigate() }} href='https://coolify.io/docs/knowledge-base/docker/custom-commands'>docs.</a>"
helper="You can add custom docker run options that will be used when your container is started.<br>Note: Not all options are supported, as they could mess up Coolify's automation and could cause bad experience for users.<br><br>Check the <a class='underline dark:text-white' target='_blank' href='https://coolify.io/docs/knowledge-base/docker/custom-commands'>docs.</a>"
placeholder="--cap-add SYS_ADMIN --device=/dev/fuse --security-opt apparmor:unconfined --ulimit nofile=1024:1024 --tmpfs /run:rw,noexec,nosuid,size=65536k"
id="customDockerRunOptions" label="Custom Docker Options" canGate="update" :canResource="$database" />
</div>

View File

@ -13,7 +13,7 @@
</x-forms.button>
</div>
<div>
For example application deployments, checkout <a class="underline dark:text-white" {{ wireNavigate() }}
For example application deployments, checkout <a class="underline dark:text-white"
href="https://github.com/coollabsio/coolify-examples/" target="_blank">Coolify
Examples</a>.
</div>

View File

@ -23,7 +23,7 @@
<div class="w-96">
<x-forms.checkbox canGate="update" :canResource="$service" instantSave id="connectToDockerNetwork"
label="Connect To Predefined Network"
helper="By default, you do not reach the Coolify defined networks.<br>Starting a docker compose based resource will have an internal network. <br>If you connect to a Coolify defined network, you maybe need to use different internal DNS names to connect to a resource.<br><br>For more information, check <a class='underline dark:text-white' {{ wireNavigate() }} target='_blank' href='https://coolify.io/docs/knowledge-base/docker/compose#connect-to-predefined-networks'>this</a>." />
helper="By default, you do not reach the Coolify defined networks.<br>Starting a docker compose based resource will have an internal network. <br>If you connect to a Coolify defined network, you maybe need to use different internal DNS names to connect to a resource.<br><br>For more information, check <a class='underline dark:text-white' target='_blank' href='https://coolify.io/docs/knowledge-base/docker/compose#connect-to-predefined-networks'>this</a>." />
</div>
@if ($fields->count() > 0)
<div>

View File

@ -5,7 +5,7 @@
@if (!$healthCheckEnabled)
<x-modal-confirmation title="Confirm Healthcheck Enable?" buttonTitle="Enable Healthcheck"
submitAction="toggleHealthcheck" :actions="['Enable healthcheck for this resource.']"
warningMessage="If the health check fails, your application will become inaccessible. Please review the <a {{ wireNavigate() }} href='https://coolify.io/docs/knowledge-base/health-checks' target='_blank' class='underline text-white'>Health Checks</a> guide before proceeding!"
warningMessage="If the health check fails, your application will become inaccessible. Please review the <a href='https://coolify.io/docs/knowledge-base/health-checks' target='_blank' class='underline text-white'>Health Checks</a> guide before proceeding!"
step2ButtonText="Enable Healthcheck" :confirmWithText="false" :confirmWithPassword="false"
isHighlightedButton>
</x-modal-confirmation>