fix(airtrail): a new host does not inherit the stored API key

Saving the AirTrail settings with a different URL and the key field left
masked or blank kept the stored key, so the next sync sent the old
instance's key to the new host. The key now goes with the host, as it
already did for the connection test and for Dawarich: a new origin without
a new key clears it, a path edit on the same origin keeps it. The key is
cleared before the new address is written.
This commit is contained in:
Maurice
2026-11-12 16:58:24 +01:00
parent 56b9bac031
commit 74d243d8e0
3 changed files with 48 additions and 1 deletions
+1 -1
View File
@@ -115,7 +115,6 @@ async function fetchServerFeatures(): Promise<{ minNativeShellApi?: unknown }> {
return (await res.json()) as { minNativeShellApi?: unknown };
}
/** The scrolled list in the middle of the screen, else the page, back to its top. */
/** The launch link this web view has already followed, so a reload does not follow it again. */
const LAUNCH_LINK_KEY = 'trek_launch_link_done';
@@ -139,6 +138,7 @@ async function openLaunchLink(): Promise<void> {
}
}
/** The scrolled list in the middle of the screen, else the page, back to its top. */
export function scrollToTop(): void {
let el = document.elementFromPoint(window.innerWidth / 2, window.innerHeight / 2) as HTMLElement | null;
while (el && el !== document.body) {