feat: enhance learn-number with dynamic SVG icons, multi-page support, and modular UI
Build and Push Docker Image / build (push) Successful in 2m26s

This commit is contained in:
2026-02-25 23:29:35 -08:00
parent 0be94026c5
commit 7cd611140e
12 changed files with 4330 additions and 279 deletions
+11 -4
View File
@@ -9,6 +9,7 @@ import (
"log"
"net/http"
"os"
"sort"
"strconv"
"toolbox/pkg/base"
_ "toolbox/pkg/learnnumber"
@@ -81,11 +82,17 @@ func main() {
r.GET("/", serveIndex)
r.GET("/api/tools", func(c *gin.Context) {
var list []map[string]string
for _, t := range base.Registry {
ids := make([]string, 0, len(base.Registry))
for id := range base.Registry { ids = append(ids, id) }
sort.Strings(ids)
for _, id := range ids {
t := base.Registry[id]
list = append(list, map[string]string{
"id": t.ID(),
"name": t.Name(),
"desc": t.Description(),
"id": t.ID(),
"name": t.Name(),
"desc": t.Description(),
"emoji": t.Emoji(),
})
}
c.JSON(http.StatusOK, list)