mirror of
https://github.com/tiennm99/coolify.git
synced 2026-04-17 17:21:04 +00:00
Add toggleable wire:navigate SPA navigation with prefetching
Implement instance-wide SPA navigation toggle that enables smooth page transitions with prefetching on hover. Excludes terminal links which require full page lifecycle for WebSocket connections. Adds defensive checks to global-search component for SPA navigation compatibility. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -2916,6 +2916,18 @@ function instanceSettings()
|
||||
return InstanceSettings::get();
|
||||
}
|
||||
|
||||
function wireNavigate(): string
|
||||
{
|
||||
try {
|
||||
$settings = instanceSettings();
|
||||
|
||||
// Return wire:navigate.hover for SPA navigation with prefetching, or empty string if disabled
|
||||
return ($settings->is_wire_navigate_enabled ?? true) ? 'wire:navigate.hover' : '';
|
||||
} catch (\Exception $e) {
|
||||
return 'wire:navigate.hover';
|
||||
}
|
||||
}
|
||||
|
||||
function getHelperVersion(): string
|
||||
{
|
||||
$settings = instanceSettings();
|
||||
|
||||
Reference in New Issue
Block a user