From ef5ea6cfc94e2ad4e36fc9dfa679185dac19bdaa Mon Sep 17 00:00:00 2001 From: Zakk Date: Fri, 18 Sep 2026 02:54:20 +1000 Subject: [PATCH] feat(gui): let the import dialog say whether it holds a server link or a subscription Backend PR #1959 makes POST /api/import take "kind" so the server no longer guesses from the URL scheme. The import dialog gets a "server link / subscription address" toggle whose value is sent as kind; the batch dialog and the server edit form always send "server". An older backend ignores the field and keeps guessing. Keys for the toggle are added to all six locales and the combined prompt key is dropped. --- gui/src/locales/en.js | 5 ++++- gui/src/locales/fa-ir.js | 5 ++++- gui/src/locales/ko.js | 5 ++++- gui/src/locales/pt-br.js | 5 ++++- gui/src/locales/ru.js | 5 ++++- gui/src/locales/zh.js | 5 ++++- gui/src/node.vue | 29 ++++++++++++++++++++++++++++- 7 files changed, 52 insertions(+), 7 deletions(-) diff --git a/gui/src/locales/en.js b/gui/src/locales/en.js index 974802d4..4a358c7c 100644 --- a/gui/src/locales/en.js +++ b/gui/src/locales/en.js @@ -360,7 +360,10 @@ export default { title: "Configure Subscription", }, import: { - message: "Input a server link or subscription address:", + server: "Server link", + subscription: "Subscription address", + serverMessage: "Input a server link:", + subscriptionMessage: "Input a subscription address:", batchMessage: "One server link per line:", qrcodeError: "No QR code found in the image. Try a clearer image", notImage: "Choose an image file", diff --git a/gui/src/locales/fa-ir.js b/gui/src/locales/fa-ir.js index 13b93e67..b5f503c0 100644 --- a/gui/src/locales/fa-ir.js +++ b/gui/src/locales/fa-ir.js @@ -359,7 +359,10 @@ export default { title: "پیکربندی اشتراک", }, import: { - message: "پیوند سرور یا نشانی اشتراک را وارد کنید:", + server: "پیوند سرور", + subscription: "نشانی اشتراک", + serverMessage: "پیوند سرور را وارد کنید:", + subscriptionMessage: "نشانی اشتراک را وارد کنید:", batchMessage: "در هر خط یک پیوند سرور وارد کنید:", qrcodeError: "هیچ کد QRای در تصویر پیدا نشد. تصویر واضح‌تری را امتحان کنید", notImage: "یک فایل تصویری انتخاب کنید", diff --git a/gui/src/locales/ko.js b/gui/src/locales/ko.js index ecce434e..fb66c50c 100644 --- a/gui/src/locales/ko.js +++ b/gui/src/locales/ko.js @@ -363,7 +363,10 @@ export default { title: "구독 구성", }, import: { - message: "서버 링크 또는 구독 주소를 입력하세요:", + server: "서버 링크", + subscription: "구독 주소", + serverMessage: "서버 링크를 입력하세요:", + subscriptionMessage: "구독 주소를 입력하세요:", batchMessage: "한 줄에 서버 링크 하나:", qrcodeError: "이미지에서 QR 코드를 찾을 수 없습니다. 더 선명한 이미지를 사용해 보세요", notImage: "이미지 파일을 선택하세요", diff --git a/gui/src/locales/pt-br.js b/gui/src/locales/pt-br.js index ce351035..adcc5919 100644 --- a/gui/src/locales/pt-br.js +++ b/gui/src/locales/pt-br.js @@ -351,7 +351,10 @@ export default { title: "Configurar assinatura", }, import: { - message: "Insira um link de servidor ou endereço de assinatura:", + server: "Link do servidor", + subscription: "Endereço da assinatura", + serverMessage: "Digite um link de servidor:", + subscriptionMessage: "Digite um endereço de assinatura:", batchMessage: "Um link de servidor por linha:", qrcodeError: "Nenhum código QR encontrado na imagem. Tente uma imagem mais nítida.", notImage: "Escolha um arquivo de imagem", diff --git a/gui/src/locales/ru.js b/gui/src/locales/ru.js index 7b9a99a9..0b161129 100644 --- a/gui/src/locales/ru.js +++ b/gui/src/locales/ru.js @@ -359,7 +359,10 @@ export default { title: "Настройка подписки", }, import: { - message: "Введите ссылку на сервер или адрес подписки:", + server: "Ссылка на сервер", + subscription: "Адрес подписки", + serverMessage: "Введите ссылку на сервер:", + subscriptionMessage: "Введите адрес подписки:", batchMessage: "Одна ссылка на сервер в строке:", qrcodeError: "На изображении не найден QR-код. Попробуйте изображение более высокого качества", notImage: "Выберите файл изображения", diff --git a/gui/src/locales/zh.js b/gui/src/locales/zh.js index c3ddbf16..9e22733f 100644 --- a/gui/src/locales/zh.js +++ b/gui/src/locales/zh.js @@ -358,7 +358,10 @@ export default { title: "订阅配置", }, import: { - message: "填入节点链接或订阅地址:", + server: "节点链接", + subscription: "订阅地址", + serverMessage: "填入节点链接:", + subscriptionMessage: "填入订阅地址:", batchMessage: "一行一个节点链接:", qrcodeError: "图片中未识别到二维码,请换一张更清晰的图片", notImage: "请选择图片文件", diff --git a/gui/src/node.vue b/gui/src/node.vue index 4d041e8a..b280d1c9 100644 --- a/gui/src/node.vue +++ b/gui/src/node.vue @@ -660,7 +660,29 @@