feat(email encrypt): implement base64 encoding for contact email config, only supports HEO theme

This commit is contained in:
anime
2025-04-12 02:50:09 +08:00
parent b946a08ba0
commit a01d15d883
4 changed files with 35 additions and 8 deletions

View File

@@ -0,0 +1,12 @@
export const handleEmailClick = (e, emailIcon, CONTACT_EMAIL) => {
if (CONTACT_EMAIL && emailIcon && !emailIcon.current.href) {
e.preventDefault()
try {
const email = decodeURIComponent(escape(atob(CONTACT_EMAIL)))
emailIcon.current.href = `mailto:${email}`
emailIcon.current.click()
} catch (error) {
console.error('解密邮箱失败:', error)
}
}
}