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
2023-11-13 14:44:54 +01:00
< livewire : sponsorship />
2023-11-13 11:09:21 +01:00
< 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 ++ ;
2023-12-11 10:23:10 +01:00
if ( checkNumber > 2 ) {
2023-12-08 22:51:42 +01:00
clearInterval ( checkPusherInterval );
2023-12-11 10:23:10 +01:00
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 );
2023-12-11 10:23:10 +01:00
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