1
0
Fork 0
mirror of https://github.com/immich-app/immich.git synced 2024-12-28 22:51:59 +00:00

fix(web): confirm button is disabled if two dialogs are shown subsequently (#10440)

This commit is contained in:
Alex 2024-06-17 11:44:25 -07:00 committed by GitHub
parent 1b67ea2d91
commit e8994d9ffd
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -16,10 +16,7 @@
export let onCancel: () => void;
export let onConfirm: () => void;
let isConfirmButtonDisabled = false;
const handleConfirm = () => {
isConfirmButtonDisabled = true;
onConfirm();
};
</script>
@ -37,7 +34,7 @@
{cancelText}
</Button>
{/if}
<Button color={confirmColor} fullwidth on:click={handleConfirm} disabled={disabled || isConfirmButtonDisabled}>
<Button color={confirmColor} fullwidth on:click={handleConfirm} {disabled}>
{confirmText}
</Button>
</svelte:fragment>