mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2025-03-01 01:20:49 +03:00
Restart xray in xray page #1286
This commit is contained in:
parent
5bcaf7ba4b
commit
12dfe8a35f
@ -47,8 +47,8 @@
|
|||||||
<a-row>
|
<a-row>
|
||||||
<a-col :xs="24" :sm="8" style="padding: 4px;">
|
<a-col :xs="24" :sm="8" style="padding: 4px;">
|
||||||
<a-space direction="horizontal">
|
<a-space direction="horizontal">
|
||||||
<a-button type="primary" :disabled="saveBtnDisable" @click="updateXraySetting">{{ i18n "pages.settings.save" }}</a-button>
|
<a-button type="primary" :disabled="saveBtnDisable" @click="updateXraySetting">{{ i18n "pages.xray.save" }}</a-button>
|
||||||
<a-button type="danger" :disabled="!saveBtnDisable" @click="restartPanel">{{ i18n "pages.settings.restartPanel" }}</a-button>
|
<a-button type="danger" :disabled="!saveBtnDisable" @click="restartXray">{{ i18n "pages.xray.restart" }}</a-button>
|
||||||
</a-space>
|
</a-space>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :xs="24" :sm="16">
|
<a-col :xs="24" :sm="16">
|
||||||
@ -332,28 +332,11 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
async restartPanel() {
|
async restartPanel() {
|
||||||
await new Promise(resolve => {
|
|
||||||
this.$confirm({
|
|
||||||
title: '{{ i18n "pages.settings.restartPanel" }}',
|
|
||||||
content: '{{ i18n "pages.settings.restartPanelDesc" }}',
|
|
||||||
class: themeSwitcher.currentTheme,
|
|
||||||
okText: '{{ i18n "sure" }}',
|
|
||||||
cancelText: '{{ i18n "cancel" }}',
|
|
||||||
onOk: () => resolve(),
|
|
||||||
});
|
|
||||||
});
|
|
||||||
this.loading(true);
|
this.loading(true);
|
||||||
const msg = await HttpUtil.post("/panel/setting/restartPanel");
|
const msg = await HttpUtil.post("server/restartXrayService");
|
||||||
this.loading(false);
|
this.loading(false);
|
||||||
if (msg.success) {
|
if (msg.success) {
|
||||||
this.loading(true);
|
this.loading(true);
|
||||||
await PromiseUtil.sleep(5000);
|
|
||||||
var { webCertFile, webKeyFile, webDomain: host, webPort: port, webBasePath: base } = this.xraySetting;
|
|
||||||
if (host == this.oldXraySetting.webDomain) host = null;
|
|
||||||
if (port == this.oldXraySetting.webPort) port = null;
|
|
||||||
const isTLS = webCertFile !== "" || webKeyFile !== "";
|
|
||||||
const url = buildURL({ host, port, isTLS, base, path: "panel/settings" });
|
|
||||||
window.location.replace(url);
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
async fetchUserSecret() {
|
async fetchUserSecret() {
|
||||||
|
@ -287,6 +287,8 @@
|
|||||||
|
|
||||||
[pages.xray]
|
[pages.xray]
|
||||||
"title" = "Xray Settings"
|
"title" = "Xray Settings"
|
||||||
|
"save" = "Save Settings"
|
||||||
|
"restart" = "Reastart Xray"
|
||||||
"basicTemplate" = "Basic Template"
|
"basicTemplate" = "Basic Template"
|
||||||
"advancedTemplate" = "Advanced Template"
|
"advancedTemplate" = "Advanced Template"
|
||||||
"completeTemplate" = "Complete Template"
|
"completeTemplate" = "Complete Template"
|
||||||
|
@ -287,6 +287,8 @@
|
|||||||
|
|
||||||
[pages.xray]
|
[pages.xray]
|
||||||
"title" = "Xray Configuración"
|
"title" = "Xray Configuración"
|
||||||
|
"save" = "Guardar configuración"
|
||||||
|
"restart" = "Reiniciar Xray"
|
||||||
"basicTemplate" = "Plantilla Básica"
|
"basicTemplate" = "Plantilla Básica"
|
||||||
"advancedTemplate" = "Plantilla Avanzada"
|
"advancedTemplate" = "Plantilla Avanzada"
|
||||||
"completeTemplate" = "Plantilla Completa"
|
"completeTemplate" = "Plantilla Completa"
|
||||||
|
@ -287,6 +287,8 @@
|
|||||||
|
|
||||||
[pages.xray]
|
[pages.xray]
|
||||||
"title" = "الگوها"
|
"title" = "الگوها"
|
||||||
|
"save" = "ذخیره تنظیمات"
|
||||||
|
"restart" = "ریستارت ایکسری"
|
||||||
"basicTemplate" = "بخش الگو پایه"
|
"basicTemplate" = "بخش الگو پایه"
|
||||||
"advancedTemplate" = "بخش الگو پیشرفته"
|
"advancedTemplate" = "بخش الگو پیشرفته"
|
||||||
"completeTemplate" = "بخش الگو کامل"
|
"completeTemplate" = "بخش الگو کامل"
|
||||||
|
@ -286,6 +286,8 @@
|
|||||||
|
|
||||||
[pages.xray]
|
[pages.xray]
|
||||||
"title" = "Xray Настройки"
|
"title" = "Xray Настройки"
|
||||||
|
"save" = "Сохранить настройки"
|
||||||
|
"restart" = "Перезапустить рентген"
|
||||||
"basicTemplate" = "Базовый шаблон"
|
"basicTemplate" = "Базовый шаблон"
|
||||||
"advancedTemplate" = "Расширенный шаблон"
|
"advancedTemplate" = "Расширенный шаблон"
|
||||||
"completeTemplate" = "Полный шаблон"
|
"completeTemplate" = "Полный шаблон"
|
||||||
|
@ -288,6 +288,8 @@
|
|||||||
|
|
||||||
[pages.xray]
|
[pages.xray]
|
||||||
"title" = "Xray Cài đặt"
|
"title" = "Xray Cài đặt"
|
||||||
|
"save" = "Lưu cài đặt"
|
||||||
|
"restart" = "Khởi động lại Xray"
|
||||||
"basicTemplate" = "Mẫu Cơ bản"
|
"basicTemplate" = "Mẫu Cơ bản"
|
||||||
"advancedTemplate" = "Mẫu Nâng cao"
|
"advancedTemplate" = "Mẫu Nâng cao"
|
||||||
"completeTemplate" = "Mẫu Đầy đủ"
|
"completeTemplate" = "Mẫu Đầy đủ"
|
||||||
|
@ -287,6 +287,8 @@
|
|||||||
|
|
||||||
[pages.xray]
|
[pages.xray]
|
||||||
"title" = "Xray 设置"
|
"title" = "Xray 设置"
|
||||||
|
"save" = "保存设置"
|
||||||
|
"restart" = "重新启动 Xray"
|
||||||
"basicTemplate" = "基本模板"
|
"basicTemplate" = "基本模板"
|
||||||
"advancedTemplate" = "高级模板部件"
|
"advancedTemplate" = "高级模板部件"
|
||||||
"completeTemplate" = "Xray 配置的完整模板"
|
"completeTemplate" = "Xray 配置的完整模板"
|
||||||
|
Loading…
Reference in New Issue
Block a user