fix(notify): add duplicate email check message and improve extra email UX
This commit is contained in:
@@ -49,14 +49,16 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Verified extra emails -->
|
||||
<!-- Verified extra emails with toggle -->
|
||||
<div v-if="extraEmails.length > 0" class="space-y-2 mb-3">
|
||||
<div v-for="email in extraEmails" :key="email"
|
||||
class="flex items-center justify-between px-3 py-2 bg-gray-50 dark:bg-dark-700 rounded-lg">
|
||||
<span class="text-sm text-gray-700 dark:text-gray-300">{{ email }}</span>
|
||||
<button @click="handleRemoveEmail(email)" class="text-red-500 hover:text-red-700 text-sm">
|
||||
{{ t('profile.balanceNotify.removeEmail') }}
|
||||
</button>
|
||||
<div class="flex items-center gap-2">
|
||||
<button @click="handleRemoveEmail(email)" class="text-red-500 hover:text-red-700 text-xs">
|
||||
{{ t('profile.balanceNotify.removeEmail') }}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -185,7 +187,7 @@ function addPendingEmail() {
|
||||
const email = newEmail.value.trim()
|
||||
if (!email) return
|
||||
if (email === props.userEmail || extraEmails.value.includes(email) || pendingEmails.value.some(p => p.email === email)) {
|
||||
appStore.showError(t('common.error'))
|
||||
appStore.showError(t('profile.balanceNotify.emailDuplicate'))
|
||||
return
|
||||
}
|
||||
pendingEmails.value.push({ email, codeSent: false, code: '', sending: false, verifying: false, countdown: 0, timer: null })
|
||||
|
||||
@@ -929,6 +929,7 @@ export default {
|
||||
verifySuccess: 'Email added successfully',
|
||||
removeEmail: 'Remove',
|
||||
removeSuccess: 'Email removed',
|
||||
emailDuplicate: 'This email already exists',
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
@@ -933,6 +933,7 @@ export default {
|
||||
verifySuccess: '邮箱添加成功',
|
||||
removeEmail: '移除',
|
||||
removeSuccess: '邮箱已移除',
|
||||
emailDuplicate: '该邮箱已存在',
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user