This commit is contained in:
2026-02-13 21:33:21 +01:00
parent fd29e602e8
commit 4282b8d8cb
2 changed files with 10 additions and 5 deletions
+7
View File
@@ -7,6 +7,7 @@ import (
"os" "os"
"os/exec" "os/exec"
"path/filepath" "path/filepath"
"sort"
"strings" "strings"
"sync" "sync"
"time" "time"
@@ -324,6 +325,12 @@ func (m *Manager) GetStacks() []Stack {
for _, s := range m.stacks { for _, s := range m.stacks {
result = append(result, *s) result = append(result, *s)
} }
// Sort alphabetically by display name for consistent UI ordering
sort.Slice(result, func(i, j int) bool {
return result[i].Meta.DisplayName < result[j].Meta.DisplayName
})
return result return result
} }
+2 -4
View File
@@ -390,11 +390,9 @@ func (s *Server) serveAsset(w http.ResponseWriter, r *http.Request, filename str
func (s *Server) appDetailHandler(w http.ResponseWriter, r *http.Request, slug string) { func (s *Server) appDetailHandler(w http.ResponseWriter, r *http.Request, slug string) {
for _, stack := range s.stackMgr.GetStacks() { for _, stack := range s.stackMgr.GetStacks() {
if stack.Meta.Slug == slug { if stack.Meta.Slug == slug {
if !stack.Deployed { // Always redirect to deploy page — it has a read-only mode for
// deployed apps showing current settings, plus the external link
http.Redirect(w, r, "/stacks/"+stack.Name+"/deploy", http.StatusFound) http.Redirect(w, r, "/stacks/"+stack.Name+"/deploy", http.StatusFound)
} else {
http.Redirect(w, r, "/stacks", http.StatusFound)
}
return return
} }
} }