feat(subsite): show bound custom domains + add open-confirmation dialog#759
Merged
Conversation
Two UX polish items on the "我的分站 / My Subsites" settings tab:
1. **Display custom domains in the domain column.** Previously the
column only showed the platform-issued <slug>.<subdomain_zone>
address. Operators who'd CNAME'd their own brand domain to a
subsite had no way to see that binding here — they had to drill
into the subsite's settings dialog. Now each row lists every
bound SiteDomain underneath the default subdomain:
- Active hostname → clickable link with a green "Active" tag.
- Pending hostname → muted text with a yellow "Pending" tag
(DNS / TLS not yet green, so not link-able).
- Failed hostname → muted text with a red "Failed" tag.
Fetched via siteDomainOperator.getAll({ site: id }) fanned out
per subsite, bounded by max_subsites_per_user (default 5). Per-row
failures are swallowed so one RBAC hiccup doesn't hide every
other row's domains. Mirrors the proven filter pattern in
CustomDomain.vue.
2. **Confirmation dialog before opening.** The "打开 / Open"
button used to immediately window.open the default subdomain in
a new tab, which (a) gave no chance to cancel and (b) was
useless once a custom domain was bound — there was no way to
land on the custom URL from this page.
Replaced with an el-dialog ("打开分站 / Open Subsite") that
acts as both the confirmation step AND the URL picker. The
dialog lists every reachable URL for the subsite:
- The default subdomain (always present, "Default" tag).
- Every Active custom hostname ("Custom" tag).
Pending / Failed customs are intentionally excluded — they
wouldn't actually load. Clicking any URL opens it in a new tab
and dismisses the dialog. A cancel button is always present.
i18n: adds 4 new keys (title.openSite, message.openSiteHint,
field.defaultLabel, field.customLabel) hand-translated across all
18 locales so scripts/check_i18n_coverage.py passes in one go;
the auto-translate CronJob may later refine wording per locale.
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
nexior | bbc9ab6 | Commit Preview URL Branch Preview URL |
May 16 2026, 08:50 AM |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Two related UX polish items on the "我的分站 / My Subsites" settings tab in Nexior (the modal in the user's screenshot):
Bound custom domains are now shown in the domain column. Previously the table only showed the platform-issued
<slug>.<subdomain_zone>address (e.g.germey123.studio.acedata.cloud). Operators who'd CNAME'd their own brand domain to a subsite had no way to see that binding from the parent site — they had to drill into each subsite's own settings dialog. Now each row lists every boundSiteDomainunderneath the default subdomain:The "打开 / Open" button now shows a confirmation dialog instead of immediately
window.open-ing the default subdomain. The new dialog doubles as a URL picker, listing every reachable URL for the subsite:Pending / Failed custom domains are intentionally excluded from the picker — they wouldn't actually load. Clicking any URL opens that exact URL in a new tab and dismisses the dialog. A cancel button is always present.
Screenshots
Before — single subdomain link, immediate
window.openon click:After — domain column shows bound custom domain(s); 打开 pops a picker dialog:
Design notes
el-dropdown? A dialog is more discoverable on mobile, gives explicit affirmative-action semantics ("I really want to open this URL"), and renders cleanly even when there's only one URL — the user explicitly asked for a confirmation step ("跳转的时候,有个弹窗确认啊?").siteDomainOperator.getAll({ user_id })is declared on the operator interface but only{ site: id }is known to be wired up server-side (seeCustomDomain.vue). The per-row swarm is bounded bymax_subsites_per_user(default 5) so it stays cheap. Per-row failures are swallowed so one RBAC hiccup doesn't hide every other row's domains.i18n
Adds 4 new keys (
title.openSite,message.openSiteHint,field.defaultLabel,field.customLabel) hand-translated across all 18 locales soscripts/check_i18n_coverage.pypasses immediately. The existingsubsite.status.{pending,active,failed}keys are reused for the per-domain tags in the column.The auto-translate CronJob may later refine the wording per locale; the initial copy is human-reviewed enough to ship.
Verification
npx eslint src/components/setting/Subsite.vue→ clean.npx vue-tsc --noEmit -p tsconfig.app.json→ no new errors onSubsite.vue(a pre-existing unrelatedmustachetypecheck onApiCodeDialog.vueis present onorigin/maintoo).python3 scripts/check_i18n_coverage.py→OK: 17 locale(s) × 39 namespace(s) all match zh-CN.Out of scope
管理already lands inside the subsite's settings whereCustomDomain.vuelives.This pull request was generated and committed by the GitHub Copilot coding agent on behalf of @CQUPTQiCu.