(change): Confirmation on cancel
This commit is contained in:
1 parent
56d7d1068d
commit
17061e5c37
1 file changed
+12
-3
@@ -40,7 +40,7 @@
|
|||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<div class="flex flex-row gap-1 py-1 justify-between">
|
<div class="flex flex-row justify-between gap-1 py-1">
|
||||||
<div class="flex flex-row gap-1">
|
<div class="flex flex-row gap-1">
|
||||||
{#if functions.dupDown}
|
{#if functions.dupDown}
|
||||||
<button class={bS[prefix.color]} title="Alt + J" onclick={() => functions.dupDown()}
|
<button class={bS[prefix.color]} title="Alt + J" onclick={() => functions.dupDown()}
|
||||||
@@ -79,8 +79,17 @@
|
|||||||
>
|
>
|
||||||
{/if}
|
{/if}
|
||||||
{#if functions.cancel}
|
{#if functions.cancel}
|
||||||
<button class={bS[prefix.color]} title="Alt + S" onclick={() => functions.cancel()}
|
<button
|
||||||
>Cancel Marked</button
|
class={bS[prefix.color]}
|
||||||
|
title="Alt + S"
|
||||||
|
onclick={() => {
|
||||||
|
const yes_no = confirm(
|
||||||
|
'This will cancel all pending changes. Are you sure you want to cancel?'
|
||||||
|
);
|
||||||
|
if (yes_no) {
|
||||||
|
functions.cancel();
|
||||||
|
}
|
||||||
|
}}>Cancel Marked</button
|
||||||
>
|
>
|
||||||
{/if}
|
{/if}
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in new issue
Block a user