mirror of
https://github.com/AdguardTeam/AdGuardHome.git
synced 2025-05-01 05:31:38 +03:00
+ client: added name for client
This commit is contained in:
parent
5210d214ec
commit
bc0b0af06b
8 changed files with 86 additions and 8 deletions
client/src/helpers
|
@ -203,3 +203,8 @@ export const redirectToCurrentProtocol = (values, httpPort = 80) => {
|
|||
};
|
||||
|
||||
export const normalizeTextarea = text => text && text.replace(/[;, ]/g, '\n').split('\n').filter(n => n);
|
||||
|
||||
export const getClientName = (clients, ip) => {
|
||||
const client = clients.find(item => ip === item.ip);
|
||||
return (client && client.name) || '';
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue