Files
3x-ui/frontend/src/lib/inbounds/label.ts
T
MHSanaei 41cb0b8ae7 fix(inbounds): show remark first, else inbound tag, in client labels
Revert formatInboundLabel to the pre-#5151 behavior: display the inbound
remark when set, otherwise the inbound tag, instead of "tag (remark)".
Affects the Attach clients / Attached inbounds views and client lists.
Routing keeps its own tag (remark) formatting.
2026-06-12 20:37:37 +02:00

10 lines
342 B
TypeScript

/**
* Display label for an inbound: the remark when one is set, otherwise the
* inbound tag. Falls back to an empty string when neither is present.
*/
export function formatInboundLabel(tag?: string, remark?: string): string {
const remarkText = (remark || '').trim();
if (remarkText) return remarkText;
return (tag || '').trim();
}