-
3X-UI
+
+ 3X-UI
+ {panelVersion && v{panelVersion}}
+
+
LanguageManager.supportedLanguages.map((l: { value: string; name: string; icon: string }) => ({
- value: l.value,
- label: (
- <>
- {l.icon}
- {l.name}
- >
- ),
- })),
+ const langList = useMemo(
+ () => LanguageManager.supportedLanguages as { value: string; name: string; icon: string }[],
[],
);
@@ -154,26 +144,31 @@ export default function LoginPage() {
-
-
+
+ {langList.map((l) => (
+ -
+
+
+ ))}
+
}
>
}
+ aria-label={t('pages.settings.language')}
+ icon={}
/>
diff --git a/frontend/vite.config.js b/frontend/vite.config.js
index b0db7012..5fc6f6c9 100644
--- a/frontend/vite.config.js
+++ b/frontend/vite.config.js
@@ -67,8 +67,17 @@ function refreshBasePath() {
return cachedBasePath;
}
+function readPanelVersion() {
+ try {
+ const versionFile = path.resolve(__dirname, '..', 'config', 'version');
+ return fs.readFileSync(versionFile, 'utf8').trim();
+ } catch (_e) {
+ return '';
+ }
+}
+
// `apply: 'serve'` keeps the injection out of `vite build` — dist.go
-// already injects webBasePath at runtime in production.
+// already injects webBasePath and version at runtime in production.
function injectBasePathPlugin() {
return {
name: 'xui-inject-base-path',
@@ -76,7 +85,8 @@ function injectBasePathPlugin() {
transformIndexHtml(html) {
const basePath = refreshBasePath();
const escaped = basePath.replace(/\\/g, '\\\\').replace(/"/g, '\\"');
- const tag = ``;
+ const version = readPanelVersion().replace(/\\/g, '\\\\').replace(/"/g, '\\"');
+ const tag = ``;
return html.replace('', `${tag}`);
},
};
diff --git a/web/translation/ar-EG.json b/web/translation/ar-EG.json
index e1ed1aed..7a2b288c 100644
--- a/web/translation/ar-EG.json
+++ b/web/translation/ar-EG.json
@@ -102,7 +102,8 @@
"xray": "إعدادات Xray",
"apiDocs": "توثيق API",
"logout": "تسجيل خروج",
- "link": "إدارة"
+ "link": "إدارة",
+ "donate": "تبرع"
},
"pages": {
"login": {
diff --git a/web/translation/en-US.json b/web/translation/en-US.json
index 89a2a9f8..667ac0bc 100644
--- a/web/translation/en-US.json
+++ b/web/translation/en-US.json
@@ -102,7 +102,8 @@
"xray": "Xray Configs",
"apiDocs": "API Docs",
"logout": "Log Out",
- "link": "Manage"
+ "link": "Manage",
+ "donate": "Donate"
},
"pages": {
"login": {
diff --git a/web/translation/es-ES.json b/web/translation/es-ES.json
index 4415d864..1cf78b39 100644
--- a/web/translation/es-ES.json
+++ b/web/translation/es-ES.json
@@ -102,7 +102,8 @@
"xray": "Ajustes Xray",
"apiDocs": "Documentación de la API",
"logout": "Cerrar Sesión",
- "link": "Gestionar"
+ "link": "Gestionar",
+ "donate": "Donar"
},
"pages": {
"login": {
diff --git a/web/translation/fa-IR.json b/web/translation/fa-IR.json
index 71dc3d68..fe863164 100644
--- a/web/translation/fa-IR.json
+++ b/web/translation/fa-IR.json
@@ -102,7 +102,8 @@
"xray": "پیکربندی ایکسری",
"apiDocs": "مستندات API",
"logout": "خروج",
- "link": "مدیریت"
+ "link": "مدیریت",
+ "donate": "حمایت مالی"
},
"pages": {
"login": {
diff --git a/web/translation/id-ID.json b/web/translation/id-ID.json
index ce740d50..452f6897 100644
--- a/web/translation/id-ID.json
+++ b/web/translation/id-ID.json
@@ -102,7 +102,8 @@
"xray": "Konfigurasi Xray",
"apiDocs": "Dokumentasi API",
"logout": "Keluar",
- "link": "Kelola"
+ "link": "Kelola",
+ "donate": "Donasi"
},
"pages": {
"login": {
diff --git a/web/translation/ja-JP.json b/web/translation/ja-JP.json
index 7cba08ed..7d1970b1 100644
--- a/web/translation/ja-JP.json
+++ b/web/translation/ja-JP.json
@@ -102,7 +102,8 @@
"xray": "Xray設定",
"apiDocs": "API ドキュメント",
"logout": "ログアウト",
- "link": "リンク管理"
+ "link": "リンク管理",
+ "donate": "寄付"
},
"pages": {
"login": {
diff --git a/web/translation/pt-BR.json b/web/translation/pt-BR.json
index 711021a9..c977db3d 100644
--- a/web/translation/pt-BR.json
+++ b/web/translation/pt-BR.json
@@ -102,7 +102,8 @@
"xray": "Xray Configs",
"apiDocs": "Documentação da API",
"logout": "Sair",
- "link": "Gerenciar"
+ "link": "Gerenciar",
+ "donate": "Doar"
},
"pages": {
"login": {
diff --git a/web/translation/ru-RU.json b/web/translation/ru-RU.json
index 27d7c129..4208b59b 100644
--- a/web/translation/ru-RU.json
+++ b/web/translation/ru-RU.json
@@ -102,7 +102,8 @@
"xray": "Настройки Xray",
"apiDocs": "Документация API",
"logout": "Выход",
- "link": "Управление"
+ "link": "Управление",
+ "donate": "Поддержать"
},
"pages": {
"login": {
diff --git a/web/translation/tr-TR.json b/web/translation/tr-TR.json
index 0999658b..a2ffa111 100644
--- a/web/translation/tr-TR.json
+++ b/web/translation/tr-TR.json
@@ -102,7 +102,8 @@
"xray": "Xray Yapılandırmaları",
"apiDocs": "API Belgeleri",
"logout": "Çıkış Yap",
- "link": "Yönet"
+ "link": "Yönet",
+ "donate": "Bağış Yap"
},
"pages": {
"login": {
diff --git a/web/translation/uk-UA.json b/web/translation/uk-UA.json
index cb9f789b..e015bafd 100644
--- a/web/translation/uk-UA.json
+++ b/web/translation/uk-UA.json
@@ -102,7 +102,8 @@
"xray": "Конфігурації Xray",
"apiDocs": "Документація API",
"logout": "Вийти",
- "link": "Керувати"
+ "link": "Керувати",
+ "donate": "Підтримати"
},
"pages": {
"login": {
diff --git a/web/translation/vi-VN.json b/web/translation/vi-VN.json
index b2ffa275..be74b9ec 100644
--- a/web/translation/vi-VN.json
+++ b/web/translation/vi-VN.json
@@ -102,7 +102,8 @@
"xray": "Cài đặt Xray",
"apiDocs": "Tài liệu API",
"logout": "Đăng xuất",
- "link": "Quản lý"
+ "link": "Quản lý",
+ "donate": "Quyên góp"
},
"pages": {
"login": {
diff --git a/web/translation/zh-CN.json b/web/translation/zh-CN.json
index 3ff99e4d..8e800ac7 100644
--- a/web/translation/zh-CN.json
+++ b/web/translation/zh-CN.json
@@ -102,7 +102,8 @@
"xray": "Xray 设置",
"apiDocs": "API 文档",
"logout": "退出登录",
- "link": "管理"
+ "link": "管理",
+ "donate": "捐赠"
},
"pages": {
"login": {
diff --git a/web/translation/zh-TW.json b/web/translation/zh-TW.json
index 6965c9b1..2e335d09 100644
--- a/web/translation/zh-TW.json
+++ b/web/translation/zh-TW.json
@@ -102,7 +102,8 @@
"xray": "Xray 設定",
"apiDocs": "API 文件",
"logout": "退出登入",
- "link": "管理"
+ "link": "管理",
+ "donate": "捐贈"
},
"pages": {
"login": {