[HTML] Show "Click to see attachment" on replies to attachment or embed messages without content

Closes #634
This commit is contained in:
Tyrrrz
2021-07-19 01:12:30 +03:00
parent abf7498667
commit 92766b580b
3 changed files with 9 additions and 1 deletions

View File

@@ -1,6 +1,7 @@
@using System
@using System.Linq
@using System.Threading.Tasks
@using DiscordChatExporter.Core.Exporting.Writers.Html;
@namespace DiscordChatExporter.Core.Exporting.Writers.Html
@inherits MiniRazor.TemplateBase<MessageGroupTemplateContext>
@@ -61,6 +62,10 @@
{
@Raw(FormatEmbedMarkdown(Model.MessageGroup.ReferencedMessage.Content))
}
else if (Model.MessageGroup.ReferencedMessage.Attachments.Any() || Model.MessageGroup.ReferencedMessage.Embeds.Any())
{
<em>Click to see attachment</em> <span>🖼️</span>
}
else
{
<em>Click to see original message</em>

View File

@@ -1,4 +1,6 @@
@namespace DiscordChatExporter.Core.Exporting.Writers.Html
@using DiscordChatExporter.Core.Exporting.Writers.Html;
@namespace DiscordChatExporter.Core.Exporting.Writers.Html
@inherits MiniRazor.TemplateBase<PostambleTemplateContext>
@{/* Close elements opened by preamble */}

View File

@@ -1,5 +1,6 @@
@using System
@using System.Threading.Tasks
@using DiscordChatExporter.Core.Exporting.Writers.Html;
@namespace DiscordChatExporter.Core.Exporting.Writers.Html
@inherits MiniRazor.TemplateBase<PreambleTemplateContext>