Skip to content

Commit

Permalink
Fix artificial 150 ms delay for mainv iew
Browse files Browse the repository at this point in the history
  • Loading branch information
phil294 committed Sep 28, 2024
1 parent 99395eb commit 9edb92f
Showing 1 changed file with 7 additions and 12 deletions.
19 changes: 7 additions & 12 deletions web/src/components/PromiseForm.vue
Original file line number Diff line number Diff line change
Expand Up @@ -58,18 +58,13 @@ export default {
array_values[form_key] = form_values
}
try {
await Promise.all([
this.action({
...values,
form_data,
values,
array_values,
event,
}),
// force delay when the network response is quick, because overly fast button responses are confusing
// FIXME: main log delayed by this
new Promise((ok) => setTimeout(ok, 150)),
])
await this.action({
...values,
form_data,
values,
array_values,
event,
})
this.$emit('success')
} catch (e) {
if (! (e instanceof Error))
Expand Down

0 comments on commit 9edb92f

Please sign in to comment.