adata-ui 2.0.52 → 2.0.53

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -92,8 +92,10 @@ function onClose() {
92
92
  confirmAccountOtpModal.value = false
93
93
  }
94
94
 
95
+ const isResendLoading = ref(false)
95
96
  async function onResend() {
96
97
  try {
98
+ isResendLoading.value = true
97
99
  await $fetch(`${removeTrailingSlash(authApiURL)}/email/resend-otp`, {
98
100
  method: 'GET',
99
101
  credentials: 'include',
@@ -106,6 +108,7 @@ async function onResend() {
106
108
  })
107
109
  resetOtp()
108
110
  runTimer()
111
+ isResendLoading.value = false
109
112
  }
110
113
  catch (error) {
111
114
  $toast.error(error.data)
@@ -158,6 +161,7 @@ onBeforeUnmount(() => {
158
161
  <button
159
162
  v-else
160
163
  class="text-blue-700 dark:text-blue-500"
164
+ :disabled="isResendLoading"
161
165
  @click="onResend"
162
166
  >
163
167
  {{ t('actions.resend') }}
@@ -57,8 +57,10 @@ function onClose() {
57
57
  resetPasswordOtpModal.value = false
58
58
  }
59
59
 
60
+ const isResendLoading = ref(false)
60
61
  async function onResend() {
61
62
  try {
63
+ isResendLoading.value = true
62
64
  await $fetch(`${removeTrailingSlash(authApiURL)}/password/email-otp`, {
63
65
  method: 'POST',
64
66
  credentials: 'include',
@@ -71,6 +73,7 @@ async function onResend() {
71
73
  })
72
74
  resetOtp()
73
75
  runTimer()
76
+ isResendLoading.value = false
74
77
  }
75
78
  catch (error) {
76
79
  $toast.error(error.data.message)
@@ -124,6 +127,7 @@ onBeforeUnmount(() => {
124
127
  v-else
125
128
  class="text-blue-700 dark:text-blue-500"
126
129
  @click="onResend"
130
+ :disabled="isResendLoading"
127
131
  >
128
132
  {{ t('actions.resend') }}
129
133
  </button>
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "adata-ui",
3
3
  "type": "module",
4
- "version": "2.0.52",
4
+ "version": "2.0.53",
5
5
  "main": "./nuxt.config.ts",
6
6
  "scripts": {
7
7
  "dev": "nuxi dev .playground",