mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-11-21 03:26:07 +00:00
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:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user