fix(desktop): don't persist fallback server urls

This commit is contained in:
Adam 2025-12-30 10:31:48 -06:00
commit 72ab4260ee
No known key found for this signature in database
GPG key ID: 9CB48779AF150E75
2 changed files with 24 additions and 11 deletions

View file

@ -63,9 +63,14 @@ export function DialogSelectServer() {
onCleanup(() => clearInterval(interval))
})
function select(value: string) {
if (store.status[value]?.healthy === false) return
function select(value: string, persist?: boolean) {
if (!persist && store.status[value]?.healthy === false) return
dialog.close()
if (persist) {
server.add(value)
navigate("/")
return
}
server.setActive(value)
navigate("/")
}
@ -87,7 +92,7 @@ export function DialogSelectServer() {
}
setStore("url", "")
select(value)
select(value, true)
}
return (