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

@@ -157,9 +157,14 @@ export async function getConfigMapFromConfigPage(allPages) {
// 只导入生效的配置
if (config.enable) {
// console.log('[Notion配置]', config.key, config.value)
notionConfig[config.key] =
parseTextToJson(config.value) || config.value || null
// 配置不能是undefined至少是null
if (config.key === 'CONTACT_EMAIL') {
notionConfig[config.key] =
(config.value && btoa(unescape(encodeURIComponent(config.value)))) || null
} else {
notionConfig[config.key] =
parseTextToJson(config.value) || config.value || null
// 配置不能是undefined至少是null
}
}
}
}