History in DB switch

This commit is contained in:
aceberg 2024-08-30 01:22:45 +07:00
parent 0187d9b1bb
commit 316a02fa2f

View file

@ -1,6 +1,8 @@
function getHistHTML(hist) {
hist = sortHistByDate(hist);
let html = '', col, title;
for (let h of hist) {
@ -17,4 +19,11 @@ function getHistHTML(hist) {
</svg></i>`;
}
return html;
}
function sortHistByDate(hist) {
hist.sort((a, b) => (a.Date > b.Date));
return hist;
}