The VM list is now sorted alphabetically
This commit is contained in:
parent
c8708df551
commit
8dce6c9ac8
1 changed files with 9 additions and 1 deletions
10
src/index.js
10
src/index.js
|
@ -449,11 +449,19 @@ function multicollab(url) {
|
|||
card.appendChild(img);
|
||||
card.appendChild(bdy);
|
||||
div.appendChild(card);
|
||||
vmlist.children[0].appendChild(div);
|
||||
list[i].element = div;
|
||||
reloadVMList();
|
||||
}
|
||||
res(true);
|
||||
});
|
||||
}
|
||||
function reloadVMList() {
|
||||
vms.sort(function(a, b) {
|
||||
return a.id > b.id ? 1 : -1;
|
||||
});
|
||||
vmlist.children[0].innerHTML = "";
|
||||
vms.forEach((v) => vmlist.children[0].appendChild(v.element));
|
||||
}
|
||||
function chatMessage(username, msg) {
|
||||
var tr = document.createElement("tr");
|
||||
var td = document.createElement("td");
|
||||
|
|
Loading…
Reference in a new issue