diff --git a/desktop/local-app/src/App.svelte b/desktop/local-app/src/App.svelte index f5045791..b0f9ca46 100644 --- a/desktop/local-app/src/App.svelte +++ b/desktop/local-app/src/App.svelte @@ -10,7 +10,7 @@ const Settings = () => import("~/views/Settings.svelte"); const Server = () => import("~/views/Server.svelte"); - let insideElectron = api.desktop; + let insideElectron = api?.desktop; {#if insideElectron} diff --git a/desktop/local-app/src/lib/Sidebar.svelte b/desktop/local-app/src/lib/Sidebar.svelte index 5b0f6f3c..9ffa2914 100644 --- a/desktop/local-app/src/lib/Sidebar.svelte +++ b/desktop/local-app/src/lib/Sidebar.svelte @@ -25,6 +25,8 @@ console.log("selected server changed", e); }); + $: serverWithSelection = $servers.map((s) => ({ ...s, isSelected: $selectedServer === s._id })) + onMount(async () => { await loadServers(); isDevelopment = await api.isDevelopment(); @@ -33,11 +35,11 @@