dashboard / erock/pico / feat(tui): tuns #53 rss

accepted · opened on 2025-03-17T16:22:05Z by erock
Help
checkout latest patchset:
ssh pr.pico.sh print pr-53 | git am -3
checkout any patchset in a patch request:
ssh pr.pico.sh print ps-X | git am -3
add changes to patch request:
git format-patch main --stdout | ssh pr.pico.sh pr add 53
add review to patch request:
git format-patch main --stdout | ssh pr.pico.sh pr add --review 53
accept PR:
ssh pr.pico.sh pr accept 53
close PR:
ssh pr.pico.sh pr close 53

Logs

erock created pr with ps-111 on 2025-03-17T16:22:05Z
erock changed status on 2025-03-28T14:48:45Z {"status":"accepted"}

Patchsets

ps-111 by erock on 2025-03-17T16:22:05Z

Patchset ps-111

feat(tui): tuns

Eric Bower
2025-03-17T16:21:46Z
Back to top

feat(tui): tuns

pkg/tui/menu.go link
+1 -0
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
diff --git a/pkg/tui/menu.go b/pkg/tui/menu.go
index 9121c65..90b9ad1 100644
--- a/pkg/tui/menu.go
+++ b/pkg/tui/menu.go
@@ -13,6 +13,7 @@ var menuChoices = []string{
 	"tokens",
 	"logs",
 	"analytics",
+	"tuns",
 	"pico+",
 	"chat",
 }
pkg/tui/tuns.go link
+25 -0
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
diff --git a/pkg/tui/tuns.go b/pkg/tui/tuns.go
new file mode 100644
index 0000000..dd9552a
--- /dev/null
+++ b/pkg/tui/tuns.go
@@ -0,0 +1,25 @@
+package tui
+
+import (
+	"git.sr.ht/~rockorager/vaxis"
+	"git.sr.ht/~rockorager/vaxis/vxfw"
+)
+
+type TunsPage struct {
+	shared *SharedModel
+}
+
+func NewTunsPage(shrd *SharedModel) *TunsPage {
+	return &TunsPage{
+		shared: shrd,
+	}
+}
+
+func (m *TunsPage) HandleEvent(ev vaxis.Event, ph vxfw.EventPhase) (vxfw.Command, error) {
+	return nil, nil
+}
+
+func (m *TunsPage) Draw(ctx vxfw.DrawContext) (vxfw.Surface, error) {
+	root := vxfw.NewSurface(ctx.Max.Width, ctx.Max.Height, m)
+	return root, nil
+}
pkg/tui/ui.go link
+1 -0
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
diff --git a/pkg/tui/ui.go b/pkg/tui/ui.go
index b2f2bec..bb962de 100644
--- a/pkg/tui/ui.go
+++ b/pkg/tui/ui.go
@@ -337,6 +337,7 @@ func NewTui(opts vaxis.Options, shrd *SharedModel) {
 		"logs":       NewLogsPage(shrd),
 		"analytics":  NewAnalyticsPage(shrd),
 		"chat":       NewChatPage(shrd),
+		"tuns":       NewTunsPage(shrd),
 	}
 	root := &App{
 		shared: shrd,