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

accepted · opened on 2024-07-19T03:34:10Z by erock
Help
# 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
# remove patchset
ssh pr.pico.sh ps rm ps-x
# checkout all patches
ssh pr.pico.sh pr print 2 | git am -3
# print a diff between the last two patches in a patch request
ssh pr.pico.sh pr diff 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
 1diff --git a/go.mod b/go.mod
 2index 54ece0d..b7084ba 100644
 3--- a/go.mod
 4+++ b/go.mod
 5@@ -30,6 +30,7 @@ require (
 6 	github.com/minio/minio-go/v7 v7.0.70
 7 	github.com/mmcdole/gofeed v1.3.0
 8 	github.com/muesli/reflow v0.3.0
 9+	github.com/muesli/termenv v0.15.2
10 	github.com/neurosnap/go-exif-remove v0.0.0-20221010134343-50d1e3c35577
11 	github.com/picosh/pobj v0.0.0-20240709135546-27097077b26a
12 	github.com/picosh/send v0.0.0-20240709135413-81b1dd703a11
13@@ -114,7 +115,6 @@ require (
14 	github.com/modern-go/reflect2 v1.0.2 // indirect
15 	github.com/muesli/ansi v0.0.0-20230316100256-276c6243b2f6 // indirect
16 	github.com/muesli/cancelreader v0.2.2 // indirect
17-	github.com/muesli/termenv v0.15.2 // indirect
18 	github.com/neurosnap/go-jpeg-image-structure v0.0.0-20221010133817-70b1c1ff679e // indirect
19 	github.com/olekukonko/tablewriter v0.0.5 // indirect
20 	github.com/philhofer/fwd v1.1.2 // indirect
pico/ssh.go link
+2 -1
 1diff --git a/pico/ssh.go b/pico/ssh.go
 2index 0f428c8..cef0a3f 100644
 3--- a/pico/ssh.go
 4+++ b/pico/ssh.go
 5@@ -12,6 +12,7 @@ import (
 6 	"github.com/charmbracelet/ssh"
 7 	"github.com/charmbracelet/wish"
 8 	bm "github.com/charmbracelet/wish/bubbletea"
 9+	"github.com/muesli/termenv"
10 	"github.com/picosh/pico/db/postgres"
11 	"github.com/picosh/pico/shared"
12 	"github.com/picosh/pico/tui"
13@@ -38,7 +39,7 @@ func createRouter(cfg *shared.ConfigSite, handler *UploadHandler, cliHandler *Cl
14 			scp.Middleware(handler),
15 			wishrsync.Middleware(handler),
16 			auth.Middleware(handler),
17-			wsh.PtyMdw(bm.Middleware(tui.CmsMiddleware(cfg))),
18+			wsh.PtyMdw(bm.MiddlewareWithColorProfile(tui.CmsMiddleware(cfg), termenv.ANSI256)),
19 			WishMiddleware(cliHandler),
20 			wsh.LogMiddleware(handler.GetLogger()),
21 		}