42 lines
1.7 KiB
PHP
Raw Normal View History

2023-08-29 16:31:46 +02:00
@extends('layouts.base')
@section('body')
@parent
<x-navbar />
2023-12-07 19:06:32 +01:00
@persist('magic-bar')
<div class="fixed z-30 top-[4.5rem] left-4" id="vue">
<magic-bar></magic-bar>
</div>
@endpersist
<livewire:sponsorship />
<main class="pb-10 main max-w-screen-2xl">
2023-08-29 14:36:17 +02:00
{{ $slot }}
2023-08-29 16:31:46 +02:00
</main>
2023-12-08 22:51:42 +01:00
<script data-navigate-once>
@auth
if ("{{ auth()->user()->id }}" == 0) {
let checkPusherInterval = null;
let checkNumber = 0;
let errorMessage =
"Coolify could not connect to the new realtime service introduced in beta.154.<br>Please check the related <a href='https://coolify.io/docs/cloudflare-tunnels' target='_blank'>documentation</a> or get help on <a href='https://coollabs.io/discord' target='_blank'>Discord</a>.";
checkPusherInterval = setInterval(() => {
if (window.Echo) {
if (window.Echo.connector.pusher.connection.state !== 'connected') {
checkNumber++;
if (checkNumber > 2) {
2023-12-08 22:51:42 +01:00
clearInterval(checkPusherInterval);
window.Livewire.dispatch('error', errorMessage);
2023-12-08 22:51:42 +01:00
}
} else {
console.log('Coolify is now connected to the new realtime service introduced in beta.154.');
clearInterval(checkPusherInterval);
}
} else {
clearInterval(checkPusherInterval);
window.Livewire.dispatch('error', errorMessage);
2023-12-08 22:51:42 +01:00
}
}, 2000);
}
@endauth
</script>
2023-08-29 16:31:46 +02:00
@endsection