~migadu/alps-devel

alps: themes/alps: handle messages without text parts v1 SUPERSEDED

~koukas: 1
 themes/alps: handle messages without text parts

 1 files changed, 3 insertions(+), 1 deletions(-)
#1034563 .build.yml success
Export patchset (mbox)
How do I use this?

Copy & paste the following snippet into your terminal to import this patchset into git:

curl -s https://lists.sr.ht/~migadu/alps-devel/patches/43251/mbox | git am -3
Learn more about email & git

[PATCH alps] themes/alps: handle messages without text parts Export this patch

From: Konstantinos Koukas <contact@koukas.org>

Fixes: https://todo.sr.ht/~migadu/alps/165
---
 themes/alps/message.html | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/themes/alps/message.html b/themes/alps/message.html
index ee5aa02..93cc5c9 100644
--- a/themes/alps/message.html
+++ b/themes/alps/message.html
@@ -185,6 +185,7 @@
      {{ $text := .Message.TextPart }}
      <div class="tabs">
        {{/* https://github.com/golang/go/issues/31103 */}}
        {{ if $text }}
        <a
          href="?part={{$text.PathString}}"
          {{ if eq $text.PathString .Part.PathString }}
@@ -197,7 +198,7 @@
        Plain text
        {{ end }}
        </a>
        {{ if and $html $text }}
        {{ if $html }}
        {{ if ne $html.PathString $text.PathString }}
        <a
          href="?part={{$html.PathString}}"
@@ -207,6 +208,7 @@
        >HTML</a>
        {{ end }}
        {{ end }}
        {{ end }}
        <a href="{{.Message.URL}}/raw?plain=1">Raw email</a>
      </div>

-- 
2.38.5
Hm, what if an e-mail has only an HTML part without a text part?
alps/patches/.build.yml: SUCCESS in 1m15s

[themes/alps: handle messages without text parts][0] from [~koukas][1]

[0]: https://lists.sr.ht/~migadu/alps-devel/patches/43251
[1]: mailto:contact@koukas.org

✓ #1034563 SUCCESS alps/patches/.build.yml https://builds.sr.ht/~migadu/job/1034563