web/saving-handler: destructure params, reuse request if passed

This commit is contained in:
wukko
2025-03-06 17:02:06 +06:00
parent d98cb4c2d7
commit 158ba6f28f
3 changed files with 13 additions and 7 deletions

View File

@@ -79,7 +79,7 @@
if (!isBotCheckOngoing) {
await tick(); // wait for button to render
savingHandler($link);
savingHandler({ url: $link });
}
}
};
@@ -98,7 +98,7 @@
}
if (e.key === "Enter" && validLink($link) && isFocused) {
savingHandler($link);
savingHandler({ url: $link });
}
if (["Escape", "Clear"].includes(e.key) && isFocused) {

View File

@@ -58,7 +58,7 @@
{disabled}
on:click={() => {
hapticSwitch();
savingHandler(url);
savingHandler({ url });
}}
aria-label={buttonAltText}
>