feat(proxmox): add statistics redirect component and route
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.
This commit is contained in:
61
storage/framework/views/e4dca386e7b95fb1643dc35c52acff0a.php
Normal file
61
storage/framework/views/e4dca386e7b95fb1643dc35c52acff0a.php
Normal file
@@ -0,0 +1,61 @@
|
||||
<?php
|
||||
$__assetKey = '2437269684-0';
|
||||
|
||||
ob_start();
|
||||
?>
|
||||
<script src="https://challenges.cloudflare.com/turnstile/v0/api.js?render=explicit"></script>
|
||||
<?php
|
||||
$__output = ob_get_clean();
|
||||
|
||||
// If the asset has already been loaded anywhere during this request, skip it...
|
||||
if (in_array($__assetKey, \Livewire\Features\SupportScriptsAndAssets\SupportScriptsAndAssets::$alreadyRunAssetKeys)) {
|
||||
// Skip it...
|
||||
} else {
|
||||
\Livewire\Features\SupportScriptsAndAssets\SupportScriptsAndAssets::$alreadyRunAssetKeys[] = $__assetKey;
|
||||
|
||||
// Check if we're in a Livewire component or not and store the asset accordingly...
|
||||
if (isset($this)) {
|
||||
\Livewire\store($this)->push('assets', $__output, $__assetKey);
|
||||
} else {
|
||||
\Livewire\Features\SupportScriptsAndAssets\SupportScriptsAndAssets::$nonLivewireAssets[$__assetKey] = $__output;
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
||||
<div id="cf-turnstile"></div>
|
||||
|
||||
<script>
|
||||
function renderTurnstile() {
|
||||
const isDarkMode = localStorage.getItem('_x_darkMode') === 'true';
|
||||
const theme = isDarkMode ? 'dark' : 'light';
|
||||
|
||||
turnstile.render('#cf-turnstile', {
|
||||
sitekey: '<?php echo e(config('settings.captcha_site_key')); ?>',
|
||||
size: 'flexible',
|
||||
theme: theme,
|
||||
callback: token => window.Livewire.find('<?php echo e($_instance->getId()); ?>').set('captcha', token, false),
|
||||
});
|
||||
}
|
||||
|
||||
document.addEventListener('livewire:initialized', () => {
|
||||
// On livewire validation error reset captcha
|
||||
Livewire.hook('request', ({ succeed }) => {
|
||||
succeed(() => {
|
||||
turnstile.reset();
|
||||
});
|
||||
})
|
||||
});
|
||||
</script>
|
||||
|
||||
<?php
|
||||
$__scriptKey = '2437269684-1';
|
||||
ob_start();
|
||||
?>
|
||||
<script>
|
||||
renderTurnstile();
|
||||
</script>
|
||||
<?php
|
||||
$__output = ob_get_clean();
|
||||
|
||||
\Livewire\store($this)->push('scripts', $__output, $__scriptKey)
|
||||
?><?php /**PATH C:\Users\Owner\Virtnet.bond\resources\views\components\captcha.blade.php ENDPATH**/ ?>
|
||||
Reference in New Issue
Block a user