100000000x Speed improvement first toast then submit in the background

This commit is contained in:
ayntk-ai
2024-09-02 23:30:47 +02:00
parent ff1e08cf8b
commit 70043c24cf

View File

@@ -276,26 +276,24 @@
<template x-if="step === 2"> <template x-if="step === 2">
<x-forms.button x-bind:disabled="confirmWithText && userConfirmationText !== confirmationText" class="w-auto" isError @click=" <x-forms.button x-bind:disabled="confirmWithText && userConfirmationText !== confirmationText" class="w-auto" isError @click="
confirmWithPassword ? step++ : submitForm().then(() => { if (dispatchEvent) {
if (dispatchEvent) { $wire.dispatch(dispatchEventType, dispatchEventMessage);
$wire.dispatch(dispatchEventType, dispatchEventMessage); }
} modalOpen = false;
modalOpen = false; resetModal();
resetModal(); confirmWithPassword ? step++ : submitForm()">
})">
<span x-text="step2ButtonText"></span> <span x-text="step2ButtonText"></span>
</x-forms.button> </x-forms.button>
</template> </template>
<template x-if="step === 3 && confirmWithPassword"> <template x-if="step === 3 && confirmWithPassword">
<x-forms.button x-bind:disabled="!password" class="w-auto" isError @click=" <x-forms.button x-bind:disabled="!password" class="w-auto" isError @click="
submitForm().then(() => { if (dispatchEvent) {
if (dispatchEvent) { $wire.dispatch(dispatchEventType, dispatchEventMessage);
$wire.dispatch(dispatchEventType, dispatchEventMessage); }
} modalOpen = false;
modalOpen = false; resetModal();
resetModal(); submitForm()">
})">
<span x-text="step3ButtonText"></span> <span x-text="step3ButtonText"></span>
</x-forms.button> </x-forms.button>
</template> </template>