Add message page for displaying errors

This commit is contained in:
NeilClack
2026-03-30 09:58:00 -05:00
parent 12a20b336f
commit 95647334ee
3 changed files with 117 additions and 2 deletions
+5 -1
View File
@@ -18,7 +18,7 @@ const (
EMAIL_ADDRESS
LOGS
CHECK_UPDATES
ERROR
MESSAGE
)
type PageCtx struct {
@@ -27,6 +27,8 @@ type PageCtx struct {
W, H int32
RefreshConfig func()
NavigateTo func(pageType)
Msg string // Message to be displayed by MessagePage
Inst string // Instructions to be displayed on MessagePage
}
type Router struct {
@@ -69,6 +71,8 @@ func (r *Router) NavigateTo(p pageType) {
r.ActivePage = &LogViewerPage{}
case CHECK_UPDATES:
r.ActivePage = &UpdateCheckPage{}
case MESSAGE:
r.ActivePage = &MessagePage{}
}
r.ActivePage.Init(&r.Context)