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:
8 files changed
+97
-37
No files matched your search
@@ -13,7 +13,7 @@ export class AllSetting {
|
|||||||
pageSize = 25;
|
pageSize = 25;
|
||||||
expireDiff = 0;
|
expireDiff = 0;
|
||||||
trafficDiff = 0;
|
trafficDiff = 0;
|
||||||
remarkTemplate = '{{INBOUND}}|📊{{TRAFFIC_LEFT}}|⏳{{DAYS_LEFT}}D';
|
remarkTemplate = '{{INBOUND}}-{{EMAIL}}|📊{{TRAFFIC_LEFT}}|⏳{{DAYS_LEFT}}D';
|
||||||
datepicker: 'gregorian' | 'jalalian' = 'gregorian';
|
datepicker: 'gregorian' | 'jalalian' = 'gregorian';
|
||||||
tgBotEnable = false;
|
tgBotEnable = false;
|
||||||
tgBotToken = '';
|
tgBotToken = '';
|
||||||
|
|||||||
@@ -106,7 +106,7 @@ export default function ClientQrModal({
|
|||||||
children: (
|
children: (
|
||||||
<QrPanel
|
<QrPanel
|
||||||
value={link}
|
value={link}
|
||||||
remark={`${client?.email || ''} #${idx + 1}`}
|
remark={parts?.remark || `${client?.email || ''} #${idx + 1}`}
|
||||||
showQr={!isPostQuantumLink(link)}
|
showQr={!isPostQuantumLink(link)}
|
||||||
/>
|
/>
|
||||||
),
|
),
|
||||||
|
|||||||
@@ -421,7 +421,7 @@ export default function SubPage() {
|
|||||||
const parts = parseLinkParts(link);
|
const parts = parseLinkParts(link);
|
||||||
const fallback = `Link ${idx + 1}`;
|
const fallback = `Link ${idx + 1}`;
|
||||||
const rowTitle = parts?.remark || fallback;
|
const rowTitle = parts?.remark || fallback;
|
||||||
const qrLabel = [parts?.remark, linkEmails[idx]].filter(Boolean).join('-') || rowTitle;
|
const qrLabel = parts?.remark || rowTitle;
|
||||||
const canQr = !isPostQuantumLink(link);
|
const canQr = !isPostQuantumLink(link);
|
||||||
return (
|
return (
|
||||||
<div key={link} className="sub-link-row">
|
<div key={link} className="sub-link-row">
|
||||||
|
|||||||
Loaded 3 of 8 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user