diff --git a/frontend/setup.mts b/frontend/setup.mts index b4084d9..ed9bd4c 100644 --- a/frontend/setup.mts +++ b/frontend/setup.mts @@ -30,6 +30,7 @@ document.addEventListener('DOMContentLoaded', () => { // * Setup button click handler Elements.submitButton.addEventListener('click', async () => { + Elements.submitButton.disabled = true; // Base configuration values const config: UserConfiguration = { @@ -81,6 +82,7 @@ document.addEventListener('DOMContentLoaded', () => { if (!data.success) alert(data.message); else alert('good?'); }) - .catch((err) => errAlert('POST to /setup failed!', err)); + .catch((err) => errAlert('POST to /setup failed!', err)) + .finally(() => Elements.submitButton.disabled = false); }); });