pico

created pr with 53.1 on 2025-03-17T16:22:05Z · by c8ef7d19
cmds
checkout latest patchset:
ssh pr.pico.sh print 53 | git am -3
checkout any patchset in a patch request:
ssh pr.pico.sh print 53.[rev] | git am -3
add changes to patch request:
git format-patch main --stdout | ssh pr.pico.sh pr add 53
+1 -0 pkg/tui/menu.go #
......@@ -13,6 +13,7 @@ var menuChoices = []string{
1313 "tokens",
1414 "logs",
1515 "analytics",
16+ "tuns",
1617 "pico+",
1718 "chat",
1819 }
+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+}
+1 -0 pkg/tui/ui.go #
......@@ -337,6 +337,7 @@ func NewTui(opts vaxis.Options, shrd *SharedModel) {
337337 "logs": NewLogsPage(shrd),
338338 "analytics": NewAnalyticsPage(shrd),
339339 "chat": NewChatPage(shrd),
340+ "tuns": NewTunsPage(shrd),
340341 }
341342 root := &App{
342343 shared: shrd,
Back to top