aboutsummaryrefslogtreecommitdiff
path: root/plugins/base/public
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/base/public')
-rw-r--r--plugins/base/public/assets/style.css6
-rw-r--r--plugins/base/public/message.html7
2 files changed, 11 insertions, 2 deletions
diff --git a/plugins/base/public/assets/style.css b/plugins/base/public/assets/style.css
index 8f414f5..c27f10f 100644
--- a/plugins/base/public/assets/style.css
+++ b/plugins/base/public/assets/style.css
@@ -1 +1,5 @@
-/* TODO */
+iframe {
+ width: 100%;
+ height: 400px;
+ border: 0;
+}
diff --git a/plugins/base/public/message.html b/plugins/base/public/message.html
index 89fd4dd..6ce633b 100644
--- a/plugins/base/public/message.html
+++ b/plugins/base/public/message.html
@@ -112,7 +112,12 @@
{{if .Body}}
<p><a href="{{.Message.Uid}}/reply?part={{.PartPath}}">Reply</a></p>
- <pre>{{.Body}}</pre>
+ {{if .IsHTML}}
+ <!-- TODO: add a src fallback -->
+ <iframe srcdoc="{{.Body}}" sandbox></iframe>
+ {{else}}
+ <pre>{{.Body}}</pre>
+ {{end}}
{{else}}
<p>Can't preview this message part.</p>
<a href="{{.Message.Uid}}/raw?part={{.PartPath}}">Download</a>