mailbox: show unseen message count in page title
This commit is contained in:
parent
7ba4275471
commit
2d86413876
1 changed files with 4 additions and 0 deletions
|
@ -142,6 +142,10 @@ func handleGetMailbox(ctx *alps.Context) error {
|
|||
title = "Inbox"
|
||||
}
|
||||
|
||||
if mbox.Unseen > 0 {
|
||||
title = fmt.Sprintf("(%d) %s", mbox.Unseen, title)
|
||||
}
|
||||
|
||||
return ctx.Render(http.StatusOK, "mailbox.html", &MailboxRenderData{
|
||||
BaseRenderData: *alps.NewBaseRenderData(ctx).WithTitle(title),
|
||||
Mailbox: mbox,
|
||||
|
|
Loading…
Reference in a new issue