alps/themes/alps/mailbox.html
Drew DeVault a5d2af2c4e Remove "this email was deleted by another client"
I was on the fence about adding this in the first place. The state of an
email being \Deleted but still in this inbox is unusual, and unlikely to
occur unless the user is already somewhat knowledgable about IMAP and
utilizing power-user-level tooling which could cause the situation to
arise. Alps does not target that kind of user, so this can be hidden.
2020-11-19 11:24:58 -05:00

88 lines
3.1 KiB
HTML

{{template "head.html" .}}
{{template "nav.html" .}}
{{template "util.html" .}}
<div class="page-wrap">
{{ template "aside" . }}
<div class="container">
<form id="messages-form" method="POST"></form>
<main class="message-list">
<section class="actions">
{{ template "messages-header.html" . }}
</section>
<section class="messages">
<div class="message-grid">
{{range .Messages}}
{{ $classes := "message-list-item" }}
{{ if not (.HasFlag "\\Seen") }}
{{ $classes = printf "%s %s" $classes "message-list-unread" }}
{{ end }}
{{ if (.HasFlag "\\Deleted") }}
{{ $classes = printf "%s %s" $classes "message-list-deleted" }}
{{ end }}
{{ if and (not (.HasFlag "\\Deleted")) .Envelope }}
<div class="message-list-checkbox {{$classes}}">
<input type="checkbox" name="uids" value="{{.Uid}}" form="messages-form">
</div>
<div class="message-list-sender {{$classes}}">
{{ range .Envelope.From }}
<a href='?query=from:"{{.MailboxName}}@{{.HostName}}"'>
{{ if .PersonalName }}
{{.PersonalName}}
{{ else }}
{{.MailboxName}}@{{.HostName}}
{{ end }}
</a>
{{ end }}
</div>
<div class="message-list-flags {{$classes}}">
{{if .Attachments}}<span class="Has attachments">📎</span>{{end}}
{{if .HasFlag "\\Answered"}}<span class="Replied"></span>{{end}}
{{if .HasFlag "$Forwarded"}}<span class="Forwarded"></span>{{end}}
<form method="POST" action="/message/{{.Mailbox}}/flag">
<input type="hidden" name="uids" value="{{.Message.Uid}}">
{{ if .HasFlag "\\Flagged" -}}
<input type="hidden" name="action" value="remove">
{{ else }}
<input type="hidden" name="action" value="add">
{{ end }}
<input type="hidden" name="flags" value="\Flagged">
<input type="hidden" name="next" value="{{$.GlobalData.URL.Path}}">
<button class="flag-button button-link" type="submit">
{{- if .HasFlag "\\Flagged" -}}
{{- else -}}
{{- end -}}
</button>
</form>
</div>
<div class="message-list-subject {{$classes}}">
<a href="{{if .TextPart}}{{.TextPart.URL false}}{{else}}{{.URL}}{{end}}">
{{if .Envelope.Subject}}
{{.Envelope.Subject}}
{{else}}
(No subject)
{{end}}
</a>
</div>
<div class="message-list-date {{$classes}}">
{{ .Envelope.Date | humantime }}
</div>
{{ end }}
{{ end }}
{{if not .Messages}}
<p class="empty-list">Nothing here yet.</p>
{{end}}
</div>
</section>
<section class="actions">
{{ template "messages-header.html" . }}
</section>
</main>
</div>
</div>
{{template "foot.html"}}