mirror of
https://gitee.com/wanwujie/sub2api
synced 2026-05-04 21:20:51 +08:00
fix(notify): add duplicate email check message and improve extra email UX
This commit is contained in:
@@ -49,14 +49,16 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Verified extra emails -->
|
<!-- Verified extra emails with toggle -->
|
||||||
<div v-if="extraEmails.length > 0" class="space-y-2 mb-3">
|
<div v-if="extraEmails.length > 0" class="space-y-2 mb-3">
|
||||||
<div v-for="email in extraEmails" :key="email"
|
<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">
|
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>
|
<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">
|
<div class="flex items-center gap-2">
|
||||||
{{ t('profile.balanceNotify.removeEmail') }}
|
<button @click="handleRemoveEmail(email)" class="text-red-500 hover:text-red-700 text-xs">
|
||||||
</button>
|
{{ t('profile.balanceNotify.removeEmail') }}
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -185,7 +187,7 @@ function addPendingEmail() {
|
|||||||
const email = newEmail.value.trim()
|
const email = newEmail.value.trim()
|
||||||
if (!email) return
|
if (!email) return
|
||||||
if (email === props.userEmail || extraEmails.value.includes(email) || pendingEmails.value.some(p => p.email === email)) {
|
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
|
return
|
||||||
}
|
}
|
||||||
pendingEmails.value.push({ email, codeSent: false, code: '', sending: false, verifying: false, countdown: 0, timer: null })
|
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',
|
verifySuccess: 'Email added successfully',
|
||||||
removeEmail: 'Remove',
|
removeEmail: 'Remove',
|
||||||
removeSuccess: 'Email removed',
|
removeSuccess: 'Email removed',
|
||||||
|
emailDuplicate: 'This email already exists',
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
@@ -933,6 +933,7 @@ export default {
|
|||||||
verifySuccess: '邮箱添加成功',
|
verifySuccess: '邮箱添加成功',
|
||||||
removeEmail: '移除',
|
removeEmail: '移除',
|
||||||
removeSuccess: '邮箱已移除',
|
removeSuccess: '邮箱已移除',
|
||||||
|
emailDuplicate: '该邮箱已存在',
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user