mirror of
https://github.com/donaldzou/WGDashboard.git
synced 2024-11-22 07:10:09 +01:00
Started working on localization 😏
This commit is contained in:
parent
a102a780f8
commit
d458a28337
@ -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)
|
@ -28,7 +28,6 @@ const checkAuth = async () => {
|
||||
const router = createRouter({
|
||||
history: createWebHashHistory(),
|
||||
routes: [
|
||||
|
||||
{
|
||||
name: "Index",
|
||||
path: '/',
|
||||
|
10
src/static/lang/active_languages.json
Normal file
10
src/static/lang/active_languages.json
Normal file
@ -0,0 +1,10 @@
|
||||
[
|
||||
{
|
||||
"lang_id": "en",
|
||||
"lang_name": "English"
|
||||
},
|
||||
{
|
||||
"lang_id": "zh-cn",
|
||||
"lang_name": "Chinese (Simplified)"
|
||||
}
|
||||
]
|
8
src/static/lang/en.json
Normal file
8
src/static/lang/en.json
Normal file
@ -0,0 +1,8 @@
|
||||
{
|
||||
"Index": {
|
||||
"configurationList": {
|
||||
"mainTitle": "WireGuard Configurations",
|
||||
"addConfigurationBtn": "Configuration"
|
||||
}
|
||||
}
|
||||
}
|
8
src/static/lang/zh-cn.json
Normal file
8
src/static/lang/zh-cn.json
Normal file
@ -0,0 +1,8 @@
|
||||
{
|
||||
"Index": {
|
||||
"configurationList": {
|
||||
"mainTitle": "WireGuard 配置",
|
||||
"addConfigurationBtn": "配置"
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user