dashboard / erock/pico / fix(tui): force minimum color profile #2 rss

accepted · opened on 2024-07-19T03:34:10Z by erock
Help
checkout latest patchset:
ssh pr.pico.sh print pr-2 | git am -3
checkout any patchset in a patch request:
ssh pr.pico.sh print ps-X | git am -3
add changes to patch request:
git format-patch main --stdout | ssh pr.pico.sh pr add 2
add review to patch request:
git format-patch main --stdout | ssh pr.pico.sh pr add --review 2
accept PR:
ssh pr.pico.sh pr accept 2
close PR:
ssh pr.pico.sh pr close 2

Logs

erock created pr with ps-2 on 2024-07-19T03:34:10Z
erock changed status on 2024-07-19T17:49:07Z {"status":"accepted"}

Patchsets

ps-2 by erock on 2024-07-19T03:34:10Z

Patchset ps-2

fix(tui): force minimum color profile

Eric Bower
2024-07-19T03:33:26Z
go.mod
+1 -1
pico/ssh.go
+2 -1
Back to top

fix(tui): force minimum color profile

go.mod link
+1 -1
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
diff --git a/go.mod b/go.mod
index 54ece0d..b7084ba 100644
--- a/go.mod
+++ b/go.mod
@@ -30,6 +30,7 @@ require (
 	github.com/minio/minio-go/v7 v7.0.70
 	github.com/mmcdole/gofeed v1.3.0
 	github.com/muesli/reflow v0.3.0
+	github.com/muesli/termenv v0.15.2
 	github.com/neurosnap/go-exif-remove v0.0.0-20221010134343-50d1e3c35577
 	github.com/picosh/pobj v0.0.0-20240709135546-27097077b26a
 	github.com/picosh/send v0.0.0-20240709135413-81b1dd703a11
@@ -114,7 +115,6 @@ require (
 	github.com/modern-go/reflect2 v1.0.2 // indirect
 	github.com/muesli/ansi v0.0.0-20230316100256-276c6243b2f6 // indirect
 	github.com/muesli/cancelreader v0.2.2 // indirect
-	github.com/muesli/termenv v0.15.2 // indirect
 	github.com/neurosnap/go-jpeg-image-structure v0.0.0-20221010133817-70b1c1ff679e // indirect
 	github.com/olekukonko/tablewriter v0.0.5 // indirect
 	github.com/philhofer/fwd v1.1.2 // indirect
pico/ssh.go link
+2 -1
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
diff --git a/pico/ssh.go b/pico/ssh.go
index 0f428c8..cef0a3f 100644
--- a/pico/ssh.go
+++ b/pico/ssh.go
@@ -12,6 +12,7 @@ import (
 	"github.com/charmbracelet/ssh"
 	"github.com/charmbracelet/wish"
 	bm "github.com/charmbracelet/wish/bubbletea"
+	"github.com/muesli/termenv"
 	"github.com/picosh/pico/db/postgres"
 	"github.com/picosh/pico/shared"
 	"github.com/picosh/pico/tui"
@@ -38,7 +39,7 @@ func createRouter(cfg *shared.ConfigSite, handler *UploadHandler, cliHandler *Cl
 			scp.Middleware(handler),
 			wishrsync.Middleware(handler),
 			auth.Middleware(handler),
-			wsh.PtyMdw(bm.Middleware(tui.CmsMiddleware(cfg))),
+			wsh.PtyMdw(bm.MiddlewareWithColorProfile(tui.CmsMiddleware(cfg), termenv.ANSI256)),
 			WishMiddleware(cliHandler),
 			wsh.LogMiddleware(handler.GetLogger()),
 		}