mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-07-08 05:36:09 +00:00
41cb0b8ae7
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.
10 lines
342 B
TypeScript
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();
|
|
}
|