diff --git a/cmd/sojuboy/main.go b/cmd/sojuboy/main.go index 51a55cd..7c14f98 100644 --- a/cmd/sojuboy/main.go +++ b/cmd/sojuboy/main.go @@ -122,6 +122,7 @@ func main() { Commit: commit, BuiltAt: builtAt, StartedAt: time.Now(), + KnownChannels: cfg.Channels, } go func() { if err := api.Start(ctx); err != nil && err != http.ErrServerClosed { diff --git a/internal/httpapi/server.go b/internal/httpapi/server.go index 05004d9..801ad33 100644 --- a/internal/httpapi/server.go +++ b/internal/httpapi/server.go @@ -40,6 +40,8 @@ type Server struct { Commit string BuiltAt string StartedAt time.Time + // Optional seed list from config for /api/channels when DB is empty + KnownChannels []string } func (s *Server) Start(ctx context.Context) error { @@ -217,6 +219,10 @@ func (s *Server) handleUI(w http.ResponseWriter, r *http.Request) { body { padding: 1rem; } pre { max-height: 50vh; overflow: auto; } .row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; } + @media (max-width: 768px) { + .grid { grid-template-columns: 1fr !important; } + pre { max-height: 40vh; } + }