mirror of
https://github.com/v2rayA/v2rayA.git
synced 2026-11-20 23:02:25 +03:00
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.
This commit is contained in:
7 files changed
+52
-7
No files matched your search
@@ -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",
|
||||
|
||||
@@ -359,7 +359,10 @@ export default {
|
||||
title: "پیکربندی اشتراک",
|
||||
},
|
||||
import: {
|
||||
message: "پیوند سرور یا نشانی اشتراک را وارد کنید:",
|
||||
server: "پیوند سرور",
|
||||
subscription: "نشانی اشتراک",
|
||||
serverMessage: "پیوند سرور را وارد کنید:",
|
||||
subscriptionMessage: "نشانی اشتراک را وارد کنید:",
|
||||
batchMessage: "در هر خط یک پیوند سرور وارد کنید:",
|
||||
qrcodeError: "هیچ کد QRای در تصویر پیدا نشد. تصویر واضحتری را امتحان کنید",
|
||||
notImage: "یک فایل تصویری انتخاب کنید",
|
||||
|
||||
@@ -363,7 +363,10 @@ export default {
|
||||
title: "구독 구성",
|
||||
},
|
||||
import: {
|
||||
message: "서버 링크 또는 구독 주소를 입력하세요:",
|
||||
server: "서버 링크",
|
||||
subscription: "구독 주소",
|
||||
serverMessage: "서버 링크를 입력하세요:",
|
||||
subscriptionMessage: "구독 주소를 입력하세요:",
|
||||
batchMessage: "한 줄에 서버 링크 하나:",
|
||||
qrcodeError: "이미지에서 QR 코드를 찾을 수 없습니다. 더 선명한 이미지를 사용해 보세요",
|
||||
notImage: "이미지 파일을 선택하세요",
|
||||
|
||||
@@ -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",
|
||||
|
||||
@@ -359,7 +359,10 @@ export default {
|
||||
title: "Настройка подписки",
|
||||
},
|
||||
import: {
|
||||
message: "Введите ссылку на сервер или адрес подписки:",
|
||||
server: "Ссылка на сервер",
|
||||
subscription: "Адрес подписки",
|
||||
serverMessage: "Введите ссылку на сервер:",
|
||||
subscriptionMessage: "Введите адрес подписки:",
|
||||
batchMessage: "Одна ссылка на сервер в строке:",
|
||||
qrcodeError: "На изображении не найден QR-код. Попробуйте изображение более высокого качества",
|
||||
notImage: "Выберите файл изображения",
|
||||
|
||||
@@ -358,7 +358,10 @@ export default {
|
||||
title: "订阅配置",
|
||||
},
|
||||
import: {
|
||||
message: "填入节点链接或订阅地址:",
|
||||
server: "节点链接",
|
||||
subscription: "订阅地址",
|
||||
serverMessage: "填入节点链接:",
|
||||
subscriptionMessage: "填入订阅地址:",
|
||||
batchMessage: "一行一个节点链接:",
|
||||
qrcodeError: "图片中未识别到二维码,请换一张更清晰的图片",
|
||||
notImage: "请选择图片文件",
|
||||
|
||||
+28
-1
@@ -660,7 +660,29 @@
|
||||
<p class="modal-card-title">{{ $t("operations.import") }}</p>
|
||||
</header>
|
||||
<section class="modal-card-body">
|
||||
{{ $t("import.message") }}
|
||||
<b-field>
|
||||
<b-radio-button
|
||||
v-model="importKind"
|
||||
native-value="server"
|
||||
type="is-primary is-light"
|
||||
size="is-small"
|
||||
>
|
||||
{{ $t("import.server") }}
|
||||
</b-radio-button>
|
||||
<b-radio-button
|
||||
v-model="importKind"
|
||||
native-value="subscription"
|
||||
type="is-primary is-light"
|
||||
size="is-small"
|
||||
>
|
||||
{{ $t("import.subscription") }}
|
||||
</b-radio-button>
|
||||
</b-field>
|
||||
{{
|
||||
importKind === "subscription"
|
||||
? $t("import.subscriptionMessage")
|
||||
: $t("import.serverMessage")
|
||||
}}
|
||||
<b-input
|
||||
ref="importInput"
|
||||
v-model="importWhat"
|
||||
@@ -672,6 +694,7 @@
|
||||
</section>
|
||||
<footer class="modal-card-foot">
|
||||
<button
|
||||
v-if="importKind === 'server'"
|
||||
class="button is-link is-light"
|
||||
type="button"
|
||||
@click="handleClickImportInBatch"
|
||||
@@ -816,6 +839,7 @@ export default {
|
||||
showSidebar: false,
|
||||
importWhat: "",
|
||||
importing: false,
|
||||
importKind: "server",
|
||||
showModalImport: false,
|
||||
showModalImportInBatch: false,
|
||||
currentPage: { servers: 1, subscriptions: 1 },
|
||||
@@ -1428,6 +1452,8 @@ export default {
|
||||
timeout: 120000,
|
||||
data: {
|
||||
url: value || this.importWhat,
|
||||
// the batch dialog only takes server links
|
||||
kind: this.showModalImportInBatch ? "server" : this.importKind,
|
||||
},
|
||||
}).then((res) => {
|
||||
if (res.data.code === "SUCCESS") {
|
||||
@@ -2004,6 +2030,7 @@ export default {
|
||||
method: "post",
|
||||
data: {
|
||||
url: url,
|
||||
kind: "server",
|
||||
which: this.which,
|
||||
},
|
||||
timeout: 0,
|
||||
|
||||
Reference in new issue
Block a user