fix(sub): drive display remarks from the template and split multi-host subpage links

Unify remark generation around the Remark Template. Display contexts (Clients-page QR/Info modals and the HTML sub info page) now render the template name-only client/identity part instead of a hardcoded fallback; the subscription body keeps the full template on a client first link and name-only thereafter. The default template gains the email token so the client email shows by default again (#5532).

BuildPageData now splits each multi-link entry (one link per host of an inbound) into a separate row, so the sub page no longer collapses several host links onto a single mangled line. QR captions on the Clients QR modal and the sub page reuse the link fragment remark.
This commit is contained in:
MHSanaei
2026-06-24 16:45:23 +02:00
parent 5dbd5b1d12
commit b0c1156dd6
8 changed files with 97 additions and 37 deletions
+1 -1
View File
@@ -13,7 +13,7 @@ export class AllSetting {
pageSize = 25;
expireDiff = 0;
trafficDiff = 0;
remarkTemplate = '{{INBOUND}}|📊{{TRAFFIC_LEFT}}|⏳{{DAYS_LEFT}}D';
remarkTemplate = '{{INBOUND}}-{{EMAIL}}|📊{{TRAFFIC_LEFT}}|⏳{{DAYS_LEFT}}D';
datepicker: 'gregorian' | 'jalalian' = 'gregorian';
tgBotEnable = false;
tgBotToken = '';
+1 -1
View File
@@ -106,7 +106,7 @@ export default function ClientQrModal({
children: (
<QrPanel
value={link}
remark={`${client?.email || ''} #${idx + 1}`}
remark={parts?.remark || `${client?.email || ''} #${idx + 1}`}
showQr={!isPostQuantumLink(link)}
/>
),
+1 -1
View File
@@ -421,7 +421,7 @@ export default function SubPage() {
const parts = parseLinkParts(link);
const fallback = `Link ${idx + 1}`;
const rowTitle = parts?.remark || fallback;
const qrLabel = [parts?.remark, linkEmails[idx]].filter(Boolean).join('-') || rowTitle;
const qrLabel = parts?.remark || rowTitle;
const canQr = !isPostQuantumLink(link);
return (
<div key={link} className="sub-link-row">