diff options
author | Drew DeVault <sir@cmpwn.com> | 2020-05-13 15:02:02 -0400 |
---|---|---|
committer | Simon Ser <contact@emersion.fr> | 2020-05-20 15:28:36 +0200 |
commit | 2d86413876411339a27a09a025e0e77bd22a04ca (patch) | |
tree | ffb3a012c03058705a9468b1241034b8b4106a90 | |
parent | 7ba42754717562da904f67b5d8030cce81da8471 (diff) | |
download | alps-2d86413876411339a27a09a025e0e77bd22a04ca.tar.gz alps-2d86413876411339a27a09a025e0e77bd22a04ca.zip |
mailbox: show unseen message count in page title
-rw-r--r-- | plugins/base/routes.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/plugins/base/routes.go b/plugins/base/routes.go index 780cffb..3b47668 100644 --- a/plugins/base/routes.go +++ b/plugins/base/routes.go @@ -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, |