web/saving-handler: destructure params, reuse request if passed
This commit is contained in:
@@ -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) {
|
||||
|
||||
@@ -58,7 +58,7 @@
|
||||
{disabled}
|
||||
on:click={() => {
|
||||
hapticSwitch();
|
||||
savingHandler(url);
|
||||
savingHandler({ url });
|
||||
}}
|
||||
aria-label={buttonAltText}
|
||||
>
|
||||
|
||||
Reference in New Issue
Block a user