Compare commits

..

2 Commits

Author SHA1 Message Date
MHSanaei b5ef412b8d v3.3.1 2026-06-12 20:39:13 +02:00
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
5 changed files with 10 additions and 13 deletions
+2 -2
View File
@@ -1,12 +1,12 @@
{ {
"name": "3x-ui-frontend", "name": "3x-ui-frontend",
"version": "0.3.0", "version": "0.3.1",
"lockfileVersion": 3, "lockfileVersion": 3,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "3x-ui-frontend", "name": "3x-ui-frontend",
"version": "0.3.0", "version": "0.3.1",
"dependencies": { "dependencies": {
"@ant-design/icons": "^6.2.5", "@ant-design/icons": "^6.2.5",
"@codemirror/lang-json": "^6.0.2", "@codemirror/lang-json": "^6.0.2",
+2 -2
View File
@@ -1,7 +1,7 @@
{ {
"name": "3x-ui-frontend", "name": "3x-ui-frontend",
"private": true, "private": true,
"version": "0.3.0", "version": "0.3.1",
"type": "module", "type": "module",
"description": "3x-ui panel frontend (React 19 + Ant Design 6 + Vite 8).", "description": "3x-ui panel frontend (React 19 + Ant Design 6 + Vite 8).",
"engines": { "engines": {
@@ -73,4 +73,4 @@
"core-js-pure": false, "core-js-pure": false,
"tree-sitter-json": false "tree-sitter-json": false
} }
} }
+4 -7
View File
@@ -1,12 +1,9 @@
/** /**
* Display label for an inbound: `tag (remark)` when a distinct remark exists, * Display label for an inbound: the remark when one is set, otherwise the
* otherwise just the tag. Falls back to the remark when no tag is set, and to an * inbound tag. Falls back to an empty string when neither is present.
* empty string when neither is present.
*/ */
export function formatInboundLabel(tag?: string, remark?: string): string { export function formatInboundLabel(tag?: string, remark?: string): string {
const tagText = (tag || '').trim();
const remarkText = (remark || '').trim(); const remarkText = (remark || '').trim();
if (!tagText) return remarkText; if (remarkText) return remarkText;
if (!remarkText || remarkText === tagText) return tagText; return (tag || '').trim();
return `${tagText} (${remarkText})`;
} }
+1 -1
View File
@@ -1 +1 @@
3.3.0 3.3.1
+1 -1
View File
@@ -418,7 +418,7 @@ func GetApiToken(getApiToken bool) {
if len(tokens) > 0 { if len(tokens) > 0 {
fmt.Printf("There are %d API token(s) configured. Existing tokens cannot be retrieved in plaintext because only hashes are stored.\n", len(tokens)) fmt.Printf("There are %d API token(s) configured. Existing tokens cannot be retrieved in plaintext because only hashes are stored.\n", len(tokens))
fmt.Println("If you have lost your token, you can manage and generate new tokens through the Panel UI (Settings -> API Tokens).") fmt.Println("If you have lost your token, you can manage and generate new tokens through the Panel UI (Settings -> API Tokens).")
// Create a new fallback token so the CLI is still useful without the UI // Create a new fallback token so the CLI is still useful without the UI
fallbackName := fmt.Sprintf("cli-fallback-%d", time.Now().Unix()) fallbackName := fmt.Sprintf("cli-fallback-%d", time.Now().Unix())
created, err := apiTokenService.Create(fallbackName) created, err := apiTokenService.Create(fallbackName)