...
This commit is contained in:
parent
3913979bc9
commit
ce93a54cfa
2 changed files with 10 additions and 1 deletions
|
@ -90,8 +90,13 @@ func (p *Page) Filter(
|
|||
}
|
||||
|
||||
func (p *Page) Serve(c *Context) {
|
||||
pth := c.Path()
|
||||
if p.Action != nil {
|
||||
c.Run(p.Action, c.Update)
|
||||
if pth != c.Path() {
|
||||
// If we went somewhere else then do nothing.
|
||||
return
|
||||
}
|
||||
}
|
||||
msgs, _ := c.Render(p)
|
||||
inlineMsg := msgs["page/inline"]
|
||||
|
|
|
@ -221,5 +221,9 @@ func (c *Context) ReadString(pref string, args ...any) string {
|
|||
// Change screen to the previous.
|
||||
// To get to the parent screen use GoUp.
|
||||
func (c *Context) GoPrev() {
|
||||
c.Go(c.PrevPath())
|
||||
pth := c.PrevPath()
|
||||
if pth == "" {
|
||||
c.Go("/")
|
||||
}
|
||||
c.Go(pth)
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue