Files
gsfdc/demo-dify/dify/web/app/components/header/utils/util.ts
T
wuzilongandCursor c2cb845a32 feat(dify): 把本地控制台的中文与去外链改动入库
这些界面改动和专家服务草稿停在工作区,没有随上一笔主分支提交进入仓库。

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-11-23 09:44:09 +08:00

30 lines
823 B
TypeScript

export const generateMailToLink = (email: string, subject?: string, body?: string): string => {
let mailtoLink = `mailto:${email}`
if (subject) mailtoLink += `?subject=${encodeURIComponent(subject)}`
if (body) mailtoLink += `&body=${encodeURIComponent(body)}`
return mailtoLink
}
export const mailToSupport = (
account: string,
plan: string,
version: string,
supportEmailAddress?: string,
) => {
const subject = `Technical Support Request ${plan} ${account}`
const body = `
Please do not remove the following information:
-----------------------------------------------
Current Plan: ${plan}
Account: ${account}
Version: ${version}
Platform:
Problem Description:
`
if (!supportEmailAddress) return ''
return generateMailToLink(supportEmailAddress, subject, body)
}