1
0
mirror of https://github.com/coalaura/whiskr.git synced 2025-09-08 17:06:42 +00:00

improve sorting

This commit is contained in:
Laura
2025-08-09 22:20:18 +02:00
parent 91d9ce4449
commit b258085d5e
2 changed files with 5 additions and 2 deletions

View File

@@ -2,6 +2,7 @@ package main
import (
"context"
"sort"
"strings"
)
@@ -22,6 +23,10 @@ func LoadModels() ([]*Model, error) {
return nil, err
}
sort.Slice(list, func(i, j int) bool {
return list[i].Created > list[j].Created
})
models := make([]*Model, len(list))
for index, model := range list {

View File

@@ -380,8 +380,6 @@
return [];
}
models.sort((a, b) => a.name > b.name);
$model.innerHTML = "";
for (const model of models) {