mirror of
https://github.com/WGDashboard/WGDashboard.git
synced 2026-12-01 08:57:45 +00:00
co-authored by
DaanSelen
parent
02a7beaf01
commit
9977ff0d56
@@ -191,6 +191,12 @@ const searchPeers = computed(() => {
|
|||||||
wireguardConfigurationStore.Filter.ShowAllPeersWhenHiddenTags || (!wireguardConfigurationStore.Filter.ShowAllPeersWhenHiddenTags && taggedPeers.value.includes(x.id))
|
wireguardConfigurationStore.Filter.ShowAllPeersWhenHiddenTags || (!wireguardConfigurationStore.Filter.ShowAllPeersWhenHiddenTags && taggedPeers.value.includes(x.id))
|
||||||
));
|
));
|
||||||
|
|
||||||
|
if (dashboardStore.Configuration.Server.dashboard_sort === "traffic"){
|
||||||
|
return result.sort((a, b) => {
|
||||||
|
return (b.total_data + b.cumu_data) - (a.total_data + a.cumu_data)
|
||||||
|
}).slice(0, showPeersCount.value);
|
||||||
|
}
|
||||||
|
|
||||||
if (dashboardStore.Configuration.Server.dashboard_sort === "restricted"){
|
if (dashboardStore.Configuration.Server.dashboard_sort === "restricted"){
|
||||||
return result.sort((a, b) => {
|
return result.sort((a, b) => {
|
||||||
if ( a[dashboardStore.Configuration.Server.dashboard_sort]
|
if ( a[dashboardStore.Configuration.Server.dashboard_sort]
|
||||||
|
|||||||
@@ -24,6 +24,7 @@ export default {
|
|||||||
status: GetLocale("Status"),
|
status: GetLocale("Status"),
|
||||||
name: GetLocale("Name"),
|
name: GetLocale("Name"),
|
||||||
allowed_ip: GetLocale("Allowed IPs"),
|
allowed_ip: GetLocale("Allowed IPs"),
|
||||||
|
traffic: GetLocale("Total Usage"),
|
||||||
restricted: GetLocale("Restricted")
|
restricted: GetLocale("Restricted")
|
||||||
},
|
},
|
||||||
interval: {
|
interval: {
|
||||||
|
|||||||
Reference in New Issue
Block a user