fix(desktop): few WSL bugs (#31095)

This commit is contained in:
Filip
2026-06-08 02:05:54 +00:00
committed by GitHub
parent b1d14acc35
commit 65a3f7f749
13 changed files with 231 additions and 50 deletions
@@ -509,11 +509,16 @@ export function useServerManagementController(options: { onSelect?: () => void;
resetEdit()
})
async function handleRemove(url: ServerConnection.Key) {
tabs.removeServer(url)
server.remove(url)
if ((await platform.getDefaultServer?.()) === url) {
void platform.setDefaultServer?.(null)
async function handleRemove(key: ServerConnection.Key) {
try {
if (key.startsWith("wsl:")) await platform.wslServers?.removeServer(key)
tabs.removeServer(key)
server.remove(key)
if ((await platform.getDefaultServer?.()) === key) {
await setDefault(null)
}
} catch (err) {
showRequestError(language, err)
}
}