lasthourcloud/resources/views/components/layout.blade.php

50 lines
1.3 KiB
PHP
Raw Normal View History

2023-03-20 12:04:22 +00:00
<!DOCTYPE html>
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}">
2023-03-20 12:04:22 +00:00
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>{{ $title ?? 'Coolify' }}</title>
<meta name="csrf-token" content="{{ csrf_token() }}">
@vite(['resources/js/app.js', 'resources/css/app.css'])
2023-04-25 08:06:45 +00:00
<style>
[x-cloak] {
display: none !important;
}
</style>
2023-03-20 12:04:22 +00:00
@livewireStyles
</head>
<body x-data="confirmModal">
2023-04-27 09:29:02 +00:00
@auth
<x-navbar />
@endauth
<main>
2023-03-20 12:04:22 +00:00
{{ $slot }}
</main>
<x-confirm-modal />
2023-03-20 12:04:22 +00:00
@livewireScripts
2023-04-28 09:54:01 +00:00
@auth
<script>
Livewire.on('updateInitiated', () => {
let checkStatus = null;
console.log('Update initiated')
setInterval(async () => {
const res = await fetch('/api/health');
if (res.ok) {
console.log('Server is back online')
clearInterval(checkStatus);
window.location.reload();
} else {
console.log('Waiting for server to come back online...');
}
return;
}, 2000);
})
</script>
@endauth
2023-03-20 12:04:22 +00:00
</body>
</html>