aboutsummaryrefslogtreecommitdiff
path: root/plugins/base
diff options
context:
space:
mode:
authorDrew DeVault <sir@cmpwn.com>2020-05-13 15:02:02 -0400
committerSimon Ser <contact@emersion.fr>2020-05-20 15:28:36 +0200
commit2d86413876411339a27a09a025e0e77bd22a04ca (patch)
treeffb3a012c03058705a9468b1241034b8b4106a90 /plugins/base
parent7ba42754717562da904f67b5d8030cce81da8471 (diff)
downloadalps-2d86413876411339a27a09a025e0e77bd22a04ca.tar.gz
alps-2d86413876411339a27a09a025e0e77bd22a04ca.zip
mailbox: show unseen message count in page title
Diffstat (limited to 'plugins/base')
-rw-r--r--plugins/base/routes.go4
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,