feat(www): add sort clients by name (#1227)

Co-authored-by: Philip H. <47042125+pheiduck@users.noreply.github.com>
This commit is contained in:
Võ Hoàng 2024-08-17 00:40:24 +07:00 committed by GitHub
parent 7c521e8733
commit ca7ee32052
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 60 additions and 2 deletions

View file

@ -34,6 +34,7 @@ const {
UI_TRAFFIC_STATS,
UI_CHART_TYPE,
UI_SHOW_LINKS,
UI_ENABLE_SORT_CLIENTS,
} = require('../config');
const requiresPassword = !!PASSWORD_HASH;
@ -101,7 +102,12 @@ module.exports = class Server {
.get('/api/ui-show-links', defineEventHandler((event) => {
setHeader(event, 'Content-Type', 'application/json');
return `${UI_SHOW_LINKS}`;
return `"${UI_SHOW_LINKS}"`;
}))
.get('/api/ui-sort-clients', defineEventHandler((event) => {
setHeader(event, 'Content-Type', 'application/json');
return `"${UI_ENABLE_SORT_CLIENTS}"`;
}))
// Authentication