2023-03-20 12:04:22 +00:00
|
|
|
<!DOCTYPE html>
|
2023-05-18 11:26:35 +00:00
|
|
|
<html data-theme="coollabs" 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">
|
2023-05-12 13:39:07 +00:00
|
|
|
<link rel="preconnect" href="https://api.fonts.coollabs.io" crossorigin>
|
|
|
|
<link href="https://api.fonts.coollabs.io/css2?family=Inter&display=swap" rel="stylesheet">
|
2023-05-04 06:33:06 +00:00
|
|
|
@env('local')
|
|
|
|
<title>Coolify - localhost</title>
|
2023-05-17 07:08:32 +00:00
|
|
|
<link rel="icon" href="{{ asset('favicon-dev.png') }}" type="image/x-icon" />
|
2023-05-04 06:33:06 +00:00
|
|
|
@endenv
|
|
|
|
@env('production')
|
2023-05-17 07:08:32 +00:00
|
|
|
<link rel="icon" href="{{ asset('favicon.png') }}" type="image/x-icon" />
|
2023-03-20 12:04:22 +00:00
|
|
|
<title>{{ $title ?? 'Coolify' }}</title>
|
2023-05-04 06:33:06 +00:00
|
|
|
@endenv
|
2023-03-20 12:04:22 +00:00
|
|
|
<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>
|
|
|
|
|
2023-05-18 11:26:35 +00:00
|
|
|
<body>
|
2023-05-08 19:56:44 +00:00
|
|
|
@livewireScripts
|
2023-06-15 08:48:13 +00:00
|
|
|
<x-toaster-hub />
|
2023-04-27 09:29:02 +00:00
|
|
|
@auth
|
|
|
|
<x-navbar />
|
|
|
|
@endauth
|
2023-06-06 11:48:20 +00:00
|
|
|
<div class="fixed top-3 left-4" id="vue">
|
2023-06-05 22:18:48 +00:00
|
|
|
<magic-bar></magic-bar>
|
2023-05-22 20:30:33 +00:00
|
|
|
</div>
|
2023-05-22 13:47:40 +00:00
|
|
|
<main>
|
2023-03-20 12:04:22 +00:00
|
|
|
{{ $slot }}
|
|
|
|
</main>
|
2023-06-01 10:15:33 +00:00
|
|
|
<x-version class="fixed left-2 bottom-1" />
|
2023-04-28 09:54:01 +00:00
|
|
|
@auth
|
|
|
|
<script>
|
2023-06-15 09:55:17 +00:00
|
|
|
let checkHealthInterval = null;
|
|
|
|
let checkIfIamDeadInterval = null;
|
|
|
|
|
|
|
|
function revive() {
|
|
|
|
console.log('Checking server\'s health...')
|
|
|
|
checkHealthInterval = setInterval(() => {
|
|
|
|
fetch('/api/health')
|
|
|
|
.then(response => {
|
|
|
|
if (response.ok) {
|
|
|
|
Toaster.success('Coolify is back online. Reloading...')
|
|
|
|
if (checkHealthInterval) clearInterval(checkHealthInterval);
|
|
|
|
setTimeout(() => {
|
|
|
|
window.location.reload();
|
|
|
|
}, 5000)
|
|
|
|
} else {
|
|
|
|
console.log('Waiting for server to come back from dead...');
|
|
|
|
}
|
|
|
|
})
|
|
|
|
return;
|
|
|
|
}, 2000);
|
|
|
|
}
|
|
|
|
|
|
|
|
function upgrade() {
|
|
|
|
console.log('Update initiated.')
|
|
|
|
checkIfIamDeadInterval = setInterval(() => {
|
|
|
|
fetch('/api/health')
|
|
|
|
.then(response => {
|
|
|
|
if (response.ok) {
|
|
|
|
console.log('It\'s alive. Waiting for server to be dead...');
|
|
|
|
} else {
|
|
|
|
Toaster.success('Update done, restarting Coolify!')
|
|
|
|
console.log('It\'s dead. Reviving... Standby... Bzz... Bzz...')
|
|
|
|
if (checkIfIamDeadInterval) clearInterval(checkIfIamDeadInterval);
|
|
|
|
revive();
|
|
|
|
}
|
|
|
|
})
|
|
|
|
return;
|
|
|
|
}, 2000);
|
|
|
|
}
|
|
|
|
|
2023-06-12 10:00:01 +00:00
|
|
|
function copyToClipboard(text) {
|
|
|
|
navigator.clipboard.writeText(text);
|
|
|
|
Livewire.emit('message', 'Copied to clipboard.');
|
|
|
|
}
|
2023-05-04 13:45:53 +00:00
|
|
|
Livewire.on('reloadWindow', () => {
|
|
|
|
window.location.reload();
|
|
|
|
})
|
2023-06-15 08:48:13 +00:00
|
|
|
Livewire.on('info', (message) => {
|
|
|
|
if (message) Toaster.info(message)
|
|
|
|
})
|
2023-05-04 20:29:14 +00:00
|
|
|
Livewire.on('error', (message) => {
|
2023-06-15 08:48:13 +00:00
|
|
|
if (message) Toaster.error(message)
|
2023-05-04 20:29:14 +00:00
|
|
|
})
|
2023-06-15 08:48:13 +00:00
|
|
|
Livewire.on('warning', (message) => {
|
|
|
|
if (message) Toaster.warning(message)
|
2023-06-12 10:00:01 +00:00
|
|
|
})
|
2023-06-15 08:48:13 +00:00
|
|
|
Livewire.on('success', (message) => {
|
|
|
|
if (message) Toaster.success(message)
|
2023-05-09 07:54:43 +00:00
|
|
|
})
|
2023-04-28 09:54:01 +00:00
|
|
|
</script>
|
|
|
|
@endauth
|
2023-06-15 11:51:31 +00:00
|
|
|
<script>
|
|
|
|
function changePasswordFieldType(id) {
|
|
|
|
const input = document.getElementById(id);
|
|
|
|
if (input.type === 'password') {
|
|
|
|
input.type = 'text';
|
|
|
|
} else {
|
|
|
|
input.type = 'password';
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</script>
|
2023-03-20 12:04:22 +00:00
|
|
|
</body>
|
|
|
|
|
|
|
|
</html>
|