2023-12-11 11:03:32 +00:00
< div x - data = " { showNotification: @entangle('showNotification') } " >
@ if ( $checkConnection )
@ script
< script >
let checkPusherInterval = null ;
let checkNumber = 0 ;
checkPusherInterval = setInterval (() => {
if ( window . Echo ) {
if ( window . Echo . connector . pusher . connection . state !== 'connected' ) {
checkNumber ++ ;
2023-12-11 11:40:56 +00:00
if ( checkNumber > 4 ) {
@ if ( $isNotificationEnabled )
$wire . showNotification = true ;
@ endif
console . error (
2024-03-02 02:37:31 +00:00
'Last Hour Cloud could not connect to the new realtime service introduced in beta.154. This will cause unusual problems on the UI if not fixed! Please check the related upstream documentation (https://coolify.io/docs/cloudflare/tunnels) or get help on Discord (https://coollabs.io/discord).)'
2023-12-11 11:40:56 +00:00
);
2023-12-11 11:03:32 +00:00
clearInterval ( checkPusherInterval );
}
} else {
2024-03-02 02:37:31 +00:00
console . log ( 'Last Hour Cloud Realtime Service is connected!' );
2023-12-11 11:03:32 +00:00
clearInterval ( checkPusherInterval );
}
} else {
2023-12-11 11:40:56 +00:00
@ if ( $isNotificationEnabled )
$wire . showNotification = true ;
@ endif
console . error (
2024-03-02 02:37:31 +00:00
'Last Hour Cloud could not connect to the new realtime service introduced in beta.154. This will cause unusual problems on the UI if not fixed! Please check the related upstream documentation (https://coolify.io/docs/cloudflare/tunnels) or get help on Discord (https://coollabs.io/discord).)'
2023-12-11 11:40:56 +00:00
);
2023-12-11 11:03:32 +00:00
clearInterval ( checkPusherInterval );
}
2023-12-11 11:40:56 +00:00
}, 1000 );
2023-12-11 11:03:32 +00:00
</ script >
@ endscript
< div class = " toast z-[9999] " x - cloak x - show = " showNotification " >
< div class = " flex flex-col text-white border border-red-500 border-dashed rounded alert bg-coolgray-200 " >
2024-03-02 02:37:31 +00:00
< span >< span class = " font-bold text-left text-red-500 " > WARNING : </ span > Last Hour Cloud could not connect to the new
2023-12-11 11:40:56 +00:00
realtime service introduced in beta . 154. < br > This will cause unusual problems on the UI if not
fixed !< br >< br > Please check the
2024-03-02 02:37:31 +00:00
related upstream < a href = 'https://coolify.io/docs/cloudflare/tunnels' target = '_blank' > documentation </ a > or get
2023-12-11 11:03:32 +00:00
help on < a href = 'https://coollabs.io/discord' target = '_blank' > Discord </ a >.</ span >
2023-12-11 11:40:56 +00:00
< x - forms . button class = " bg-coolgray-400 " wire : click = 'disable' > Acknowledge the problem and disable this
popup </ x - forms . button >
2023-12-11 11:03:32 +00:00
</ div >
</ div >
@ endif
</ div >