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

Closes #634
pull/678/head
Tyrrrz 3 years ago
parent abf7498667
commit 92766b580b

@ -1,6 +1,7 @@
@using System @using System
@using System.Linq @using System.Linq
@using System.Threading.Tasks @using System.Threading.Tasks
@using DiscordChatExporter.Core.Exporting.Writers.Html;
@namespace DiscordChatExporter.Core.Exporting.Writers.Html @namespace DiscordChatExporter.Core.Exporting.Writers.Html
@inherits MiniRazor.TemplateBase<MessageGroupTemplateContext> @inherits MiniRazor.TemplateBase<MessageGroupTemplateContext>
@ -61,6 +62,10 @@
{ {
@Raw(FormatEmbedMarkdown(Model.MessageGroup.ReferencedMessage.Content)) @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 else
{ {
<em>Click to see original message</em> <em>Click to see original message</em>

@ -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> @inherits MiniRazor.TemplateBase<PostambleTemplateContext>
@{/* Close elements opened by preamble */} @{/* Close elements opened by preamble */}

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

Loading…
Cancel
Save