mirror of
https://github.com/coalaura/whiskr.git
synced 2025-09-08 17:06:42 +00:00
improve sorting
This commit is contained in:
@@ -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 {
|
||||
|
@@ -380,8 +380,6 @@
|
||||
return [];
|
||||
}
|
||||
|
||||
models.sort((a, b) => a.name > b.name);
|
||||
|
||||
$model.innerHTML = "";
|
||||
|
||||
for (const model of models) {
|
||||
|
Reference in New Issue
Block a user