aboutsummaryrefslogtreecommitdiff
path: root/public
diff options
context:
space:
mode:
authorSimon Ser <contact@emersion.fr>2019-12-03 17:52:56 +0100
committerSimon Ser <contact@emersion.fr>2019-12-03 17:52:56 +0100
commitb386d1c2bb0efacea2484b4aa2088c769e048a9c (patch)
tree03eb53b286715ce894e91f73aa5e77bb65b2705d /public
parentb7be271560d2c24c9811076a58f8b8c799292659 (diff)
downloadalps-b386d1c2bb0efacea2484b4aa2088c769e048a9c.tar.gz
alps-b386d1c2bb0efacea2484b4aa2088c769e048a9c.zip
Fix mailbox view when empty
This fixes the second part of #14. References: https://todo.sr.ht/~sircmpwn/koushin/14
Diffstat (limited to 'public')
-rw-r--r--public/mailbox.html20
1 files changed, 12 insertions, 8 deletions
diff --git a/public/mailbox.html b/public/mailbox.html
index d8c7209..e56efcb 100644
--- a/public/mailbox.html
+++ b/public/mailbox.html
@@ -15,13 +15,17 @@
{{end}}
</ul>
-<p>Messages:</p>
-<ul>
- {{range .Messages}}
- <li><a href="/message/{{$.Mailbox.Name | pathescape}}/{{.Uid}}?part={{.TextPartName}}">
- {{.Envelope.Subject}}
- </a></li>
- {{end}}
-</ul>
+{{if .Messages}}
+ <p>Messages:</p>
+ <ul>
+ {{range .Messages}}
+ <li><a href="/message/{{$.Mailbox.Name | pathescape}}/{{.Uid}}?part={{.TextPartName}}">
+ {{.Envelope.Subject}}
+ </a></li>
+ {{end}}
+ </ul>
+{{else}}
+ <p>Mailbox is empty.</p>
+{{end}}
{{template "foot"}}