diff --git a/src/dashboard.py b/src/dashboard.py index 94b23b1..3ca9b07 100644 --- a/src/dashboard.py +++ b/src/dashboard.py @@ -1107,7 +1107,8 @@ class DashboardConfig: "dashboard_refresh_interval": "60000", "dashboard_sort": "status", "dashboard_theme": "dark", - "dashboard_api_key": "false" + "dashboard_api_key": "false", + "dashboard_language": "en" }, "Peers": { "peer_global_DNS": "1.1.1.1", @@ -2125,13 +2126,10 @@ def API_Welcome_Finish(): "repeatNewPassword": data["repeatNewPassword"], "currentPassword": "admin" }) - # updateEnableTotp, updateEnableTotpErr = DashboardConfig.SetConfig("Account", "enable_totp", data["enable_totp"]) - if not updateUsername or not updatePassword: return ResponseObject(False, f"{updateUsernameErr},{updatePasswordErr}".strip(",")) DashboardConfig.SetConfig("Other", "welcome_session", False) - return ResponseObject() @@ -2208,4 +2206,4 @@ def startThreads(): if __name__ == "__main__": startThreads() - app.run(host=app_ip, debug=False, port=app_port) + app.run(host=app_ip, debug=False, port=app_port) \ No newline at end of file diff --git a/src/static/app/src/router/index.js b/src/static/app/src/router/index.js index 47c6a64..84ec48f 100644 --- a/src/static/app/src/router/index.js +++ b/src/static/app/src/router/index.js @@ -28,7 +28,6 @@ const checkAuth = async () => { const router = createRouter({ history: createWebHashHistory(), routes: [ - { name: "Index", path: '/', diff --git a/src/static/lang/active_languages.json b/src/static/lang/active_languages.json new file mode 100644 index 0000000..d29e704 --- /dev/null +++ b/src/static/lang/active_languages.json @@ -0,0 +1,10 @@ +[ + { + "lang_id": "en", + "lang_name": "English" + }, + { + "lang_id": "zh-cn", + "lang_name": "Chinese (Simplified)" + } +] \ No newline at end of file diff --git a/src/static/lang/en.json b/src/static/lang/en.json new file mode 100644 index 0000000..7a58053 --- /dev/null +++ b/src/static/lang/en.json @@ -0,0 +1,8 @@ +{ + "Index": { + "configurationList": { + "mainTitle": "WireGuard Configurations", + "addConfigurationBtn": "Configuration" + } + } +} \ No newline at end of file diff --git a/src/static/lang/zh-cn.json b/src/static/lang/zh-cn.json new file mode 100644 index 0000000..5bf984c --- /dev/null +++ b/src/static/lang/zh-cn.json @@ -0,0 +1,8 @@ +{ + "Index": { + "configurationList": { + "mainTitle": "WireGuard 配置", + "addConfigurationBtn": "配置" + } + } +} \ No newline at end of file