alps theme: fix nil on emails without a text part
Closes: https://todo.sr.ht/~emersion/alps/100
This commit is contained in:
parent
0aff774c5d
commit
50e131244a
2 changed files with 4 additions and 4 deletions
|
@ -47,7 +47,7 @@
|
||||||
{{ end }}
|
{{ end }}
|
||||||
</div>
|
</div>
|
||||||
<div class="message-list-subject message-list-item {{ if not (.HasFlag "\\Seen") }}message-list-unread{{ end }}">
|
<div class="message-list-subject message-list-item {{ if not (.HasFlag "\\Seen") }}message-list-unread{{ end }}">
|
||||||
<a href="{{.TextPart.URL false}}">
|
<a href="{{if .TextPart}}{{.TextPart.URL false}}{{else}}{{.URL}}{{end}}">
|
||||||
{{if .Envelope.Subject}}
|
{{if .Envelope.Subject}}
|
||||||
{{.Envelope.Subject}}
|
{{.Envelope.Subject}}
|
||||||
{{else}}
|
{{else}}
|
||||||
|
|
|
@ -128,10 +128,10 @@
|
||||||
|
|
||||||
<span class="followups">
|
<span class="followups">
|
||||||
{{if .Message.HasFlag "\\Draft"}}
|
{{if .Message.HasFlag "\\Draft"}}
|
||||||
<a class="action-group button-link" href="{{.Message.URL}}/edit?part={{.Message.TextPart.PathString}}">Edit draft</a>
|
<a class="action-group button-link" href="{{.Message.URL}}/edit{{if .Message.TextPart}}?part={{.Message.TextPart.PathString}}{{end}}">Edit draft</a>
|
||||||
{{else}}
|
{{else}}
|
||||||
<a class="action-group button-link" href="{{.Message.URL}}/reply?part={{.Message.TextPart.PathString}}">Reply</a>
|
<a class="action-group button-link" href="{{.Message.URL}}/reply{{if .Message.TextPart}}?part={{.Message.TextPart.PathString}}{{end}}">Reply</a>
|
||||||
<a class="action-group button-link" href="{{.Message.URL}}/forward?part={{.Message.TextPart.PathString}}">Forward</a>
|
<a class="action-group button-link" href="{{.Message.URL}}/forward{{if .Message.TextPart}}?part={{.Message.TextPart.PathString}}{{end}}">Forward</a>
|
||||||
{{end}}
|
{{end}}
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in a new issue