Verified Commit 7fabfe41 authored by ynerant's avatar ynerant
Browse files

Enforce true color profile

parent c4de4bce
......@@ -12,6 +12,7 @@ import (
bm "github.com/charmbracelet/wish/bubbletea"
lm "github.com/charmbracelet/wish/logging"
"github.com/gliderlabs/ssh"
"github.com/muesli/termenv"
"io/ioutil"
"log"
"math"
......@@ -47,7 +48,7 @@ func main() {
wish.WithHostKeyPath(".ssh/term_info_ed25519"),
wish.WithMiddleware(
lm.Middleware(),
bm.Middleware(teaHandler),
bm.MiddlewareWithColorProfile(teaHandler, termenv.TrueColor),
),
)
if err != nil {
......@@ -110,6 +111,7 @@ func teaHandler(s ssh.Session) (tea.Model, []tea.ProgramOption) {
err: nil,
dictionary: dictionary,
textInput: ti,
username: s.User(),
ip: s.RemoteAddr().String(),
words: []word{},
progressBar: progress.New(progress.WithScaledGradient("#FF7CCB", "#FDFF8C")),
......@@ -130,6 +132,7 @@ type model struct {
err error
dictionary map[string]word
textInput textinput.Model
username string
ip string
words []word
wordsViewport viewport.Model
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment