Add message page for displaying errors
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user