mirror of
https://github.com/donaldzou/WGDashboard.git
synced 2024-11-10 08:53:51 +08:00
Compare commits
2 commits
4dbbc32108
...
d458a28337
Author | SHA1 | Date | |
---|---|---|---|
|
d458a28337 | ||
|
a102a780f8 |
7 changed files with 40 additions and 12 deletions
|
@ -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()
|
||||
|
||||
|
||||
|
|
|
@ -370,7 +370,11 @@ export default {
|
|||
});
|
||||
|
||||
const result = this.wireguardConfigurationStore.searchString ?
|
||||
fuse.search(this.wireguardConfigurationStore.searchString).map(x => x.item) : this.configurationPeers;
|
||||
this.configurationPeers.filter(x => {
|
||||
return x.name.includes(this.wireguardConfigurationStore.searchString) ||
|
||||
x.id.includes(this.wireguardConfigurationStore.searchString) ||
|
||||
x.allowed_ip.includes(this.wireguardConfigurationStore.searchString)
|
||||
}) : this.configurationPeers;
|
||||
|
||||
if (this.dashboardConfigurationStore.Configuration.Server.dashboard_sort === "restricted"){
|
||||
return result.slice().sort((a, b) => {
|
||||
|
|
|
@ -95,9 +95,10 @@ export default {
|
|||
@click="this.downloadAllPeer()">
|
||||
<i class="bi bi-download me-2"></i> Download All
|
||||
</button>
|
||||
<div class="flex-grow-1 mt-3 mt-md-0">
|
||||
<div class="mt-3 mt-md-0 flex-grow-1">
|
||||
|
||||
<input class="form-control rounded-3 bg-secondary-subtle border-1 border-secondary-subtle shadow-sm w-100"
|
||||
placeholder="Search..."
|
||||
placeholder="Search Peers..."
|
||||
id="searchPeers"
|
||||
@keyup="this.debounce()"
|
||||
v-model="this.searchString">
|
||||
|
@ -105,7 +106,7 @@ export default {
|
|||
<button
|
||||
@click="this.showDisplaySettings = true"
|
||||
class="btn text-secondary-emphasis bg-secondary-subtle rounded-3 border-1 border-secondary-subtle shadow-sm"
|
||||
type="button" aria-expanded="false">
|
||||
type="button" aria-expanded="false">
|
||||
<i class="bi bi-filter-circle me-2"></i>
|
||||
Display
|
||||
</button>
|
||||
|
|
|
@ -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 a new issue