Introduced a new Livewire component for statistics redirection and added a corresponding route to enhance navigation within the Proxmox extension. This update lays the groundwork for future statistics-related features.
45 lines
2.3 KiB
PHP
45 lines
2.3 KiB
PHP
<?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php if(filament()->hasUnsavedChangesAlerts()): ?>
|
|
<?php
|
|
$__scriptKey = '384828647-0';
|
|
ob_start();
|
|
?>
|
|
<script>
|
|
window.addEventListener('beforeunload', (event) => {
|
|
if (typeof window.Livewire.find('<?php echo e($_instance->getId()); ?>') === 'undefined') {
|
|
return
|
|
}
|
|
|
|
if (
|
|
[
|
|
...(<?php echo \Illuminate\Support\Js::from($this instanceof \Filament\Actions\Contracts\HasActions)->toHtml() ?> ? ($wire.mountedActions ?? []) : []),
|
|
...(<?php echo \Illuminate\Support\Js::from($this instanceof \Filament\Forms\Contracts\HasForms)->toHtml() ?>
|
|
? ($wire.mountedFormComponentActions ?? [])
|
|
: []),
|
|
...(<?php echo \Illuminate\Support\Js::from($this instanceof \Filament\Infolists\Contracts\HasInfolists)->toHtml() ?>
|
|
? ($wire.mountedInfolistActions ?? [])
|
|
: []),
|
|
...(<?php echo \Illuminate\Support\Js::from($this instanceof \Filament\Tables\Contracts\HasTable)->toHtml() ?>
|
|
? [
|
|
...($wire.mountedTableActions ?? []),
|
|
...($wire.mountedTableBulkAction
|
|
? [$wire.mountedTableBulkAction]
|
|
: []),
|
|
]
|
|
: []),
|
|
].length &&
|
|
!$wire?.__instance?.effects?.redirect
|
|
) {
|
|
event.preventDefault()
|
|
event.returnValue = true
|
|
|
|
return
|
|
}
|
|
})
|
|
</script>
|
|
<?php
|
|
$__output = ob_get_clean();
|
|
|
|
\Livewire\store($this)->push('scripts', $__output, $__scriptKey)
|
|
?>
|
|
<?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
|
|
<?php /**PATH C:\Users\Owner\Virtnet.bond\vendor\filament\filament\resources\views\components\unsaved-action-changes-alert.blade.php ENDPATH**/ ?>
|