File tree Expand file tree Collapse file tree 2 files changed +8
-7
lines changed
Expand file tree Collapse file tree 2 files changed +8
-7
lines changed Original file line number Diff line number Diff line change 44 "context"
55 "encoding/json"
66 "fmt"
7+ "slices"
78 "strings"
89 "time"
910
@@ -46,9 +47,9 @@ type tab int
4647
4748const (
4849 tabCaddy tab = iota
50+ tabFrankenPHP
4951 tabConfig
5052 tabCertificates
51- tabFrankenPHP
5253)
5354
5455type tabState struct {
@@ -112,7 +113,7 @@ func NewApp(f fetcher.Fetcher, cfg Config) *App {
112113 tabs := []tab {tabCaddy , tabConfig , tabCertificates }
113114 activeTab := tabCaddy
114115 if cfg .HasFrankenPHP {
115- tabs = append (tabs , tabFrankenPHP )
116+ tabs = slices . Insert (tabs , 1 , tabFrankenPHP )
116117 }
117118
118119 ts := make (map [tab ]* tabState )
Original file line number Diff line number Diff line change @@ -8,22 +8,22 @@ import (
88
99var (
1010 activeTabStyle = lipgloss .NewStyle ().
11- Bold (true ).
12- Foreground (ember )
11+ Bold (true ).
12+ Foreground (ember )
1313 inactiveTabStyle = lipgloss .NewStyle ().
14- Foreground (subtle )
14+ Foreground (subtle )
1515)
1616
1717func tabLabel (t tab ) string {
1818 switch t {
1919 case tabCaddy :
2020 return "Caddy"
21+ case tabFrankenPHP :
22+ return "FrankenPHP"
2123 case tabConfig :
2224 return "Caddy Config"
2325 case tabCertificates :
2426 return "Certificates"
25- case tabFrankenPHP :
26- return "FrankenPHP"
2727 default :
2828 return "?"
2929 }
You can’t perform that action at this time.
0 commit comments