mirror of
https://github.com/Termix-SSH/Termix.git
synced 2026-10-29 22:55:24 +00:00
fix(sidebar): sort hosts by IP address numerically (#1629)
This commit is contained in:
1 parent
25e58a6425
commit
4c9ee5923e
2 files changed
+40
-2
No files matched your search
@@ -70,9 +70,9 @@ export function sortHostTree(
|
||||
case "name-desc":
|
||||
return hostB.name.localeCompare(hostA.name);
|
||||
case "ip-asc":
|
||||
return hostA.ip.localeCompare(hostB.ip);
|
||||
return hostA.ip.localeCompare(hostB.ip, undefined, { numeric: true });
|
||||
case "ip-desc":
|
||||
return hostB.ip.localeCompare(hostA.ip);
|
||||
return hostB.ip.localeCompare(hostA.ip, undefined, { numeric: true });
|
||||
case "status-online":
|
||||
return Number(hostB.online) - Number(hostA.online);
|
||||
case "status-offline":
|
||||
|
||||
Reference in new issue
Block a user