refactor(ui/root): align help model with updated tview api (#779)
This commit is contained in:
parent
ac5198636c
commit
89639247a8
3 changed files with 12 additions and 12 deletions
4
go.mod
4
go.mod
|
|
@ -11,7 +11,7 @@ require (
|
|||
github.com/alecthomas/chroma/v2 v2.23.1
|
||||
github.com/andybalholm/brotli v1.2.0
|
||||
github.com/ayn2op/clipboard v0.0.0-20260308203959-c5ad7df3fc97
|
||||
github.com/ayn2op/tview v0.0.0-20260318094340-298d0ba151a8
|
||||
github.com/ayn2op/tview v0.0.0-20260320054125-de17d441f27e
|
||||
github.com/deckarep/gosx-notifier v0.0.0-20180201035817-e127226297fb
|
||||
github.com/diamondburned/arikawa/v3 v3.6.1-0.20260311205148-176ad9b9440f
|
||||
github.com/diamondburned/ningen/v3 v3.0.1-0.20260306213430-5a08d3a709b4
|
||||
|
|
@ -26,7 +26,7 @@ require (
|
|||
github.com/sahilm/fuzzy v0.1.1
|
||||
github.com/skip2/go-qrcode v0.0.0-20200617195104-da1b6568686e
|
||||
github.com/skratchdot/open-golang v0.0.0-20200116055534-eef842397966
|
||||
github.com/yuin/goldmark v1.7.16
|
||||
github.com/yuin/goldmark v1.7.17
|
||||
github.com/zalando/go-keyring v0.2.6
|
||||
)
|
||||
|
||||
|
|
|
|||
8
go.sum
8
go.sum
|
|
@ -16,8 +16,8 @@ github.com/andybalholm/brotli v1.2.0 h1:ukwgCxwYrmACq68yiUqwIWnGY0cTPox/M94sVwTo
|
|||
github.com/andybalholm/brotli v1.2.0/go.mod h1:rzTDkvFWvIrjDXZHkuS16NPggd91W3kUSvPlQ1pLaKY=
|
||||
github.com/ayn2op/clipboard v0.0.0-20260308203959-c5ad7df3fc97 h1:WujETUV+v0DEJyZgjeLzQvihWyL80c0Tg4qf0dDo+Io=
|
||||
github.com/ayn2op/clipboard v0.0.0-20260308203959-c5ad7df3fc97/go.mod h1:3kFnpNCa3dF6WryzOMCDao7PfZ7DTCh+pievlfuwV80=
|
||||
github.com/ayn2op/tview v0.0.0-20260318094340-298d0ba151a8 h1:po9BL01TxfLjrGARciJGuUMIlHFS7SCX0lE8Jxr6CHg=
|
||||
github.com/ayn2op/tview v0.0.0-20260318094340-298d0ba151a8/go.mod h1:xgkca32kuEswK7Kzkfk3Pk24WHcKPjqK4xGmDi9QqOY=
|
||||
github.com/ayn2op/tview v0.0.0-20260320054125-de17d441f27e h1:rLP1eGCJZzhdhI3/9jiSpFFV3wLdXmrleItD8BnMQzg=
|
||||
github.com/ayn2op/tview v0.0.0-20260320054125-de17d441f27e/go.mod h1:xgkca32kuEswK7Kzkfk3Pk24WHcKPjqK4xGmDi9QqOY=
|
||||
github.com/danieljoos/wincred v1.2.3 h1:v7dZC2x32Ut3nEfRH+vhoZGvN72+dQ/snVXo/vMFLdQ=
|
||||
github.com/danieljoos/wincred v1.2.3/go.mod h1:6qqX0WNrS4RzPZ1tnroDzq9kY3fu1KwE7MRLQK4X0bs=
|
||||
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||
|
|
@ -107,8 +107,8 @@ github.com/twmb/murmur3 v1.1.8/go.mod h1:Qq/R7NUyOfr65zD+6Q5IHKsJLwP7exErjN6lyyq
|
|||
github.com/xyproto/randomstring v1.0.5 h1:YtlWPoRdgMu3NZtP45drfy1GKoojuR7hmRcnhZqKjWU=
|
||||
github.com/xyproto/randomstring v1.0.5/go.mod h1:rgmS5DeNXLivK7YprL0pY+lTuhNQW3iGxZ18UQApw/E=
|
||||
github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY=
|
||||
github.com/yuin/goldmark v1.7.16 h1:n+CJdUxaFMiDUNnWC3dMWCIQJSkxH4uz3ZwQBkAlVNE=
|
||||
github.com/yuin/goldmark v1.7.16/go.mod h1:ip/1k0VRfGynBgxOz0yCqHrbZXhcjxyuS66Brc7iBKg=
|
||||
github.com/yuin/goldmark v1.7.17 h1:p36OVWwRb246iHxA/U4p8OPEpOTESm4n+g+8t0EE5uA=
|
||||
github.com/yuin/goldmark v1.7.17/go.mod h1:ip/1k0VRfGynBgxOz0yCqHrbZXhcjxyuS66Brc7iBKg=
|
||||
github.com/zalando/go-keyring v0.2.6 h1:r7Yc3+H+Ux0+M72zacZoItR3UDxeWfKTcabvkI8ua9s=
|
||||
github.com/zalando/go-keyring v0.2.6/go.mod h1:2TCrxYrbUNYfNS/Kgy/LSrkSQzZ5UPVH85RwfczwvcI=
|
||||
go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto=
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ type Model struct {
|
|||
app *tview.Application
|
||||
rootFlex *flex.Model // inner + help
|
||||
inner tview.Model
|
||||
help *help.Help
|
||||
help *help.Model
|
||||
|
||||
cfg *config.Config
|
||||
}
|
||||
|
|
@ -31,7 +31,7 @@ func NewModel(cfg *config.Config, app *tview.Application) *Model {
|
|||
m := &Model{
|
||||
app: app,
|
||||
rootFlex: flex.NewModel(),
|
||||
help: help.New(),
|
||||
help: help.NewModel(),
|
||||
|
||||
cfg: cfg,
|
||||
}
|
||||
|
|
@ -39,10 +39,10 @@ func NewModel(cfg *config.Config, app *tview.Application) *Model {
|
|||
m.rootFlex.SetDirection(flex.DirectionRow)
|
||||
|
||||
styles := help.DefaultStyles()
|
||||
styles.ShortKeyStyle = cfg.Theme.Help.ShortKeyStyle.Style
|
||||
styles.ShortDescStyle = cfg.Theme.Help.ShortDescStyle.Style
|
||||
styles.FullKeyStyle = cfg.Theme.Help.FullKeyStyle.Style
|
||||
styles.FullDescStyle = cfg.Theme.Help.FullDescStyle.Style
|
||||
styles.ShortKey = cfg.Theme.Help.ShortKeyStyle.Style
|
||||
styles.ShortDesc = cfg.Theme.Help.ShortDescStyle.Style
|
||||
styles.FullKey = cfg.Theme.Help.FullKeyStyle.Style
|
||||
styles.FullDesc = cfg.Theme.Help.FullDescStyle.Style
|
||||
m.help.SetStyles(styles)
|
||||
|
||||
m.help.SetKeyMap(m)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue