diff --git a/gui/dashboard/app.svelte b/gui/dashboard/app.svelte index d53656e..0d391ea 100644 --- a/gui/dashboard/app.svelte +++ b/gui/dashboard/app.svelte @@ -88,7 +88,10 @@ onMount(() => { proportionalGrid(); - const ws = new WebSocket('ws://__SERVER__/status/dashboard/socket'); + + const ws = new WebSocket( + window.location.href.replace('http', 'ws') + '/socket' + ); ws.onmessage = async evt => { const data = JSON.parse(evt.data || '""'); diff --git a/gui/dashboard/lib.js b/gui/dashboard/lib.js index a7d441d..c9cff01 100644 --- a/gui/dashboard/lib.js +++ b/gui/dashboard/lib.js @@ -42,7 +42,7 @@ export const shuffle = crossfade({ }); export function ringBell() { - const bell = new Audio('http://__SERVER__/statusdashboard/sound'); + const bell = new Audio(window.location.href + '/sound'); bell.addEventListener('canplaythrough', () => bell.play()); }