|
|
|
@ -41,35 +41,52 @@
|
|
|
|
|
|
|
|
|
|
<div class="chatlog__message @isPinnedStyle" data-message-id="@message.Id" id="message-@message.Id">
|
|
|
|
|
<div class="chatlog__content">
|
|
|
|
|
<div class="markdown">@Raw(FormatMarkdown(message.Content)) @if (message.EditedTimestamp != null) {<span class="chatlog__edited-timestamp" title="@FormatDate(message.EditedTimestamp.Value)">(edited)</span>}</div>
|
|
|
|
|
<div class="markdown">@Raw(FormatMarkdown(message.Content)) @if (message.EditedTimestamp != null)
|
|
|
|
|
{<span class="chatlog__edited-timestamp" title="@FormatDate(message.EditedTimestamp.Value)">(edited)</span>}</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@foreach (var attachment in message.Attachments)
|
|
|
|
|
{
|
|
|
|
|
<div class="chatlog__attachment">
|
|
|
|
|
@if (attachment.IsSpoiler)
|
|
|
|
|
<div class="@((attachment.IsSpoiler ? "spoiler spoiler--hidden" : ""))" onclick="@((attachment.IsSpoiler ? "showSpoiler(event, this)" : ""))">
|
|
|
|
|
<div class="@((attachment.IsSpoiler ? "spoiler-image" : ""))">
|
|
|
|
|
|
|
|
|
|
@if (attachment.IsImage)
|
|
|
|
|
{
|
|
|
|
|
<div class="spoiler spoiler--hidden" onclick="showSpoiler(event, this)">
|
|
|
|
|
<div class="spoiler-image">
|
|
|
|
|
<a href="@await ResolveUrlAsync(attachment.Url)">
|
|
|
|
|
@($"Image: {attachment.FileName} ({attachment.FileSize})")
|
|
|
|
|
<br />
|
|
|
|
|
<img class="chatlog__attachment-thumbnail" src="@await ResolveUrlAsync(attachment.Url)" alt="Attachment">
|
|
|
|
|
</a>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
else if (attachment.IsVideo)
|
|
|
|
|
{
|
|
|
|
|
<a href="@await ResolveUrlAsync(attachment.Url)">
|
|
|
|
|
@if (attachment.IsImage)
|
|
|
|
|
@($"Video: {attachment.FileName} ({attachment.FileSize})")
|
|
|
|
|
</a>
|
|
|
|
|
<br />
|
|
|
|
|
<video controls class="chatlog__attachment-thumbnail">
|
|
|
|
|
<source src="@await ResolveUrlAsync(attachment.Url)" alt="Video Attachment">
|
|
|
|
|
</video>
|
|
|
|
|
}
|
|
|
|
|
else if (attachment.IsAudio)
|
|
|
|
|
{
|
|
|
|
|
<img class="chatlog__attachment-thumbnail" src="@await ResolveUrlAsync(attachment.Url)" alt="Attachment">
|
|
|
|
|
<a href="@await ResolveUrlAsync(attachment.Url)">
|
|
|
|
|
@($"Audio: {attachment.FileName} ({attachment.FileSize})")
|
|
|
|
|
</a>
|
|
|
|
|
<br />
|
|
|
|
|
<audio controls class="chatlog__attachment-thumbnail" src="@await ResolveUrlAsync(attachment.Url)" alt="Audio Attachment" />
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
<a href="@await ResolveUrlAsync(attachment.Url)">
|
|
|
|
|
@($"Attachment: {attachment.FileName} ({attachment.FileSize})")
|
|
|
|
|
}
|
|
|
|
|
</a>
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|