fix(realtime): force-WS option and polish connection popup UI

Add PUSHER_FORCE_WS so Echo/Pusher can prefer plain WebSocket
transports, redesign the real-time connection warning popup, and
give copy-button inputs durable right padding in settings forms.
This commit is contained in:
Andras Bacsai committed 2026-08-04 19:36:36 +02:00
1 parent 07933640f2
commit dbc6f5e08c
12 files changed
+188 -52

No files matched your search

+10 -4
View File
@@ -171,7 +171,15 @@
}
}
@auth
@php
$pusherForceWs = (bool) config('constants.pusher.force_ws');
@endphp
window.Pusher = Pusher;
@if ($pusherForceWs)
if (window.Pusher && window.Pusher.Runtime) {
window.Pusher.Runtime.getProtocol = function () { return 'http:'; };
}
@endif
const EchoConstructor = typeof Echo === 'function' ? Echo : Echo.default;
window.Echo = new EchoConstructor({
broadcaster: 'pusher',
@@ -181,13 +189,11 @@
wsPort: "{{ getRealtime() }}",
wssPort: "{{ getRealtime() }}",
forceTLS: false,
encrypted: true,
encrypted: @json($pusherForceWs ? false : true),
enableStats: false,
enableLogging: true,
enabledTransports: ['ws', 'wss'],
disableStats: true,
// Add auto reconnection settings
enabledTransports: ['ws', 'wss'],
enabledTransports: @json($pusherForceWs ? ['ws'] : ['ws', 'wss']),
disabledTransports: ['sockjs', 'xhr_streaming', 'xhr_polling'],
// Attempt to reconnect on connection lost
autoReconnect: true,