An open-source, self-hostable PaaS alternative to Vercel, Heroku & Netlify that lets you easily deploy static sites, databases, full-stack applications and 360+ one-click services on your own servers.
PHP coolifydatabasesdeploymentdockerdocker-composeinertiajslaravelmariadbmysqlnextjsnodejsphppostgresredisself-hostedself-hostingserverstatic-sitesveltesvelte5
fix: realtime check
Andras Bacsaiaf6d94c0d8c7
diff --git a/app/Livewire/RealtimeConnection.php b/app/Livewire/RealtimeConnection.phpindex 59fb12ca4f..89b6802776 100644--- a/app/Livewire/RealtimeConnection.php+++ b/app/Livewire/RealtimeConnection.php@@ -8,6 +8,7 @@ class RealtimeConnection extends Component{public $checkConnection = false;public $showNotification = false;+ public $isNotificationEnabled = true;public function render(){return view('livewire.realtime-connection');@@ -18,8 +19,7 @@ class RealtimeConnection extends Component$this->showNotification = false;}public function mount() {- $isRoot = auth()->user()->id === 0;- $showNotification = data_get(auth()->user(), 'is_notification_realtime_enabled');- $this->checkConnection = $isRoot && $showNotification;+ $this->isNotificationEnabled = auth()->user()->is_notification_realtime_enabled;+ $this->checkConnection = auth()->user()->id === 0;}}diff --git a/resources/views/livewire/realtime-connection.blade.php b/resources/views/livewire/realtime-connection.blade.phpindex 46e3a1dfc2..7ff23d096c 100644--- a/resources/views/livewire/realtime-connection.blade.php+++ b/resources/views/livewire/realtime-connection.blade.php@@ -8,28 +8,40 @@if (window.Echo) {if (window.Echo.connector.pusher.connection.state !== 'connected') {checkNumber++;- if (checkNumber > 5) {- $wire.showNotification = true;+ if (checkNumber > 4) {+ @if ($isNotificationEnabled)+ $wire.showNotification = true;+ @endif+ console.error(+ 'Coolify 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 documentation (https://coolify.io/docs/cloudflare-tunnels) or get help on Discord (https://coollabs.io/discord).)'+ );clearInterval(checkPusherInterval);}} else {console.log('Coolify is now connected to the new realtime service introduced in beta.154.');clearInterval(checkPusherInterval);- $wire.showNotification = true;}} else {- $wire.showNotification = true;+ @if ($isNotificationEnabled)+ $wire.showNotification = true;+ @endif+ console.error(+ 'Coolify 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 documentation (https://coolify.io/docs/cloudflare-tunnels) or get help on Discord (https://coollabs.io/discord).)'+ );clearInterval(checkPusherInterval);}- }, 2000);+ }, 1000);</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">- <span><span class="font-bold text-left text-red-500">WARNING: </span>Coolify could not connect to the new realtime service introduced in beta.154. <br>This will cause unusual problems on the UI if not fixed!<br><br>Please check the+ <span><span class="font-bold text-left text-red-500">WARNING: </span>Coolify could not connect to the new+ realtime service introduced in beta.154. <br>This will cause unusual problems on the UI if not+ fixed!<br><br>Please check therelated <a href='https://coolify.io/docs/cloudflare-tunnels' target='_blank'>documentation</a> or gethelp on <a href='https://coollabs.io/discord' target='_blank'>Discord</a>.</span>- <x-forms.button class="bg-coolgray-400" wire:click='disable'>Acknowledge the problem and disable this popup</x-forms.button>+ <x-forms.button class="bg-coolgray-400" wire:click='disable'>Acknowledge the problem and disable this+ popup</x-forms.button></div></div>@endif