pico
created pr with
53.1
cmds
checkout latest patchset:
ssh pr.pico.sh print 53 | git am -3checkout any patchset in a patch request:
ssh pr.pico.sh print 53.[rev] | git am -3add changes to patch request:
git format-patch main --stdout | ssh pr.pico.sh pr add 53
Patchset
53.1
feat(tui): tuns
Eric Bower
2025-03-17T16:21:46ZSemantic diff summary
4 added,
2 modified,
0 signature changed,
0 removed
across 3 analyzed files
+25
-0
pkg/tui/tuns.go
#
| ... | ... | @@ -0,0 +1,25 @@ | |
| 1 | + | package tui | |
| 2 | + | ||
| 3 | + | import ( | |
| 4 | + | "git.sr.ht/~rockorager/vaxis" | |
| 5 | + | "git.sr.ht/~rockorager/vaxis/vxfw" | |
| 6 | + | ) | |
| 7 | + | ||
| 8 | + | type TunsPage struct { | |
| 9 | + | shared *SharedModel | |
| 10 | + | } | |
| 11 | + | ||
| 12 | + | func NewTunsPage(shrd *SharedModel) *TunsPage { | |
| 13 | + | return &TunsPage{ | |
| 14 | + | shared: shrd, | |
| 15 | + | } | |
| 16 | + | } | |
| 17 | + | ||
| 18 | + | func (m *TunsPage) HandleEvent(ev vaxis.Event, ph vxfw.EventPhase) (vxfw.Command, error) { | |
| 19 | + | return nil, nil | |
| 20 | + | } | |
| 21 | + | ||
| 22 | + | func (m *TunsPage) Draw(ctx vxfw.DrawContext) (vxfw.Surface, error) { | |
| 23 | + | root := vxfw.NewSurface(ctx.Max.Width, ctx.Max.Height, m) | |
| 24 | + | return root, nil | |
| 25 | + | } |