feat: implement custom domain management for tenants

- Introduced a new TenantDomainRepository and TenantDomainService to handle domain-related operations.
- Added endpoints in TenantController for listing, requesting, verifying, and deleting custom domains.
- Implemented domain verification logic with CNAME and TXT record support.
- Enhanced UI components for domain management, including CustomDomainCard and DomainListItem.
- Updated localization files to include new keys for domain management features.

Signed-off-by: Innei <tukon479@gmail.com>
This commit is contained in:
Innei
2025-11-20 20:54:12 +08:00
parent dc23b2868e
commit a1710924a8
48 changed files with 2526 additions and 36 deletions

View File

@@ -476,8 +476,38 @@
"settings.account.title": "Account & Login",
"settings.data.description": "Run database maintenance tasks to keep photo data consistent with object storage.",
"settings.data.title": "Data Management",
"settings.domain.actions.verify": "Verify",
"settings.domain.banner.pending": "Pending verification for {{domain}}. DNS changes may take a few minutes to propagate.",
"settings.domain.bound-list.empty": "No custom domains yet. Add one on the left to start verification.",
"settings.domain.bound-list.title": "Bound domains",
"settings.domain.description": "Bind your own domain to serve the gallery under a branded URL. We support CNAME or TXT verification.",
"settings.domain.input.cta": "Bind domain",
"settings.domain.input.helper": "Use the root domain or a subdomain. Avoid the platform base domain {{base}} itself.",
"settings.domain.input.label": "Custom domain",
"settings.domain.input.placeholder": "photos.yourdomain.com",
"settings.domain.status.disabled": "Disabled",
"settings.domain.status.pending": "Pending DNS",
"settings.domain.status.verified": "Active",
"settings.domain.steps.cname.desc": "Create a CNAME record pointing to your workspace entry. This is the recommended approach.",
"settings.domain.steps.cname.title": "Add a CNAME record",
"settings.domain.steps.title": "Verification steps",
"settings.domain.steps.txt.desc": "Alternatively, add a TXT record with the verification token below if CNAME is not available.",
"settings.domain.steps.txt.title": "Optional TXT verification",
"settings.domain.steps.verify.desc": "After DNS propagates, click Verify. We will also accept the TXT token if present.",
"settings.domain.steps.verify.title": "Verify and publish",
"settings.domain.title": "Custom domain",
"settings.domain.toast.delete-failed": "Failed to remove domain",
"settings.domain.toast.delete-success": "Domain removed",
"settings.domain.toast.input-required": "Please enter a domain before binding.",
"settings.domain.toast.request-failed": "Failed to bind domain",
"settings.domain.toast.request-success": "Domain added. Please complete DNS and verify.",
"settings.domain.toast.verify-failed": "Verification failed. Please verify DNS and try again.",
"settings.domain.toast.verify-success": "Domain verified and activated",
"settings.domain.token.helper": "Place this token in a TXT record if you cannot point a CNAME.",
"settings.domain.token.label": "Verification token",
"settings.nav.account": "Account & Login",
"settings.nav.data": "Data Management",
"settings.nav.domain": "Custom Domain",
"settings.nav.site": "Site Settings",
"settings.nav.user": "User Profile",
"settings.site.description": "Configure branding, social links, and map display for the public site.",

View File

@@ -476,8 +476,38 @@
"settings.account.title": "账号与登录",
"settings.data.description": "执行数据库级别的维护操作,以保持照片数据与对象存储一致。",
"settings.data.title": "数据管理",
"settings.domain.actions.verify": "验证",
"settings.domain.banner.pending": "{{domain}} 正在验证中DNS 生效可能需要几分钟。",
"settings.domain.bound-list.empty": "还没有绑定域名,请在左侧输入后开始验证。",
"settings.domain.bound-list.title": "已绑定域名",
"settings.domain.description": "绑定自己的域名,让相册以品牌化地址访问。支持 CNAME 或 TXT 验证。",
"settings.domain.input.cta": "绑定域名",
"settings.domain.input.helper": "可以使用根域或子域,避免直接填写平台基础域名 {{base}}。",
"settings.domain.input.label": "自定义域名",
"settings.domain.input.placeholder": "photos.example.com",
"settings.domain.status.disabled": "已停用",
"settings.domain.status.pending": "等待 DNS",
"settings.domain.status.verified": "已生效",
"settings.domain.steps.cname.desc": "创建指向工作空间入口的 CNAME 记录,推荐优先使用。",
"settings.domain.steps.cname.title": "添加 CNAME 记录",
"settings.domain.steps.title": "验证步骤",
"settings.domain.steps.txt.desc": "若无法使用 CNAME可添加 TXT 记录并填写下方验证 Token。",
"settings.domain.steps.txt.title": "可选 TXT 验证",
"settings.domain.steps.verify.desc": "DNS 生效后点击验证。如果存在 TXT Token 也会一并校验。",
"settings.domain.steps.verify.title": "完成验证并生效",
"settings.domain.title": "自定义域名",
"settings.domain.toast.delete-failed": "移除域名失败",
"settings.domain.toast.delete-success": "域名已移除",
"settings.domain.toast.input-required": "请先输入要绑定的域名。",
"settings.domain.toast.request-failed": "绑定域名失败",
"settings.domain.toast.request-success": "域名已添加,请完成 DNS 配置后再验证。",
"settings.domain.toast.verify-failed": "验证失败,请检查 DNS 后重试。",
"settings.domain.toast.verify-success": "域名已验证并启用",
"settings.domain.token.helper": "无法配置 CNAME 时,可将此 Token 写入 TXT 记录完成验证。",
"settings.domain.token.label": "验证 Token",
"settings.nav.account": "账号与登录",
"settings.nav.data": "数据管理",
"settings.nav.domain": "自定义域名",
"settings.nav.site": "站点设置",
"settings.nav.user": "用户信息",
"settings.site.description": "配置前台站点的品牌信息、社交渠道与地图展示。",