Przeglądaj źródła

mailbox: show unseen message count in page title

master
Drew DeVault 4 lat temu
committed by Simon Ser
rodzic
commit
2d86413876
Nie znaleziono w bazie danych klucza dla tego podpisu ID klucza GPG: FDE7BE0E88F5E48
1 zmienionych plików z 4 dodań i 0 usunięć
  1. +4
    -0
      plugins/base/routes.go

+ 4
- 0
plugins/base/routes.go Wyświetl plik

@@ -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,


Ładowanie…
Anuluj
Zapisz