|
|
|
@ -214,8 +214,19 @@
|
|
|
|
|
}
|
|
|
|
|
</div>
|
|
|
|
|
}
|
|
|
|
|
@if (!string.IsNullOrWhiteSpace(embed.Url) && embed.Url.IndexOf("youtube.com/watch?v=") != -1)
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
@if (!string.IsNullOrWhiteSpace(embed.Description))
|
|
|
|
|
if (embed.Thumbnail is not null && !string.IsNullOrWhiteSpace(embed.Thumbnail.Url))
|
|
|
|
|
{
|
|
|
|
|
<div class="chatlog__embed-youtube-container">
|
|
|
|
|
<iframe class="chatlog__embed-youtube" width="400" height="225" frameBorder="0" style="border-radius: 5px"
|
|
|
|
|
src="@embed.Url.Replace("/watch?v=", "/embed/")">
|
|
|
|
|
</iframe>
|
|
|
|
|
</div>
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
else if (!string.IsNullOrWhiteSpace(embed.Description))
|
|
|
|
|
{
|
|
|
|
|
<div class="chatlog__embed-description">
|
|
|
|
|
<div class="markdown preserve-whitespace">@Raw(FormatEmbedMarkdown(embed.Description))</div>
|
|
|
|
@ -250,6 +261,8 @@
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
@if (embed.Thumbnail is not null && !string.IsNullOrWhiteSpace(embed.Thumbnail.Url))
|
|
|
|
|
{
|
|
|
|
|
if (string.IsNullOrWhiteSpace(embed.Url) || embed.Url.IndexOf("youtube.com/watch?v=") == -1)
|
|
|
|
|
{
|
|
|
|
|
<div class="chatlog__embed-thumbnail-container">
|
|
|
|
|
<a class="chatlog__embed-thumbnail-link" href="@await ResolveUrlAsync(embed.Thumbnail.ProxyUrl ?? embed.Thumbnail.Url)">
|
|
|
|
@ -257,6 +270,7 @@
|
|
|
|
|
</a>
|
|
|
|
|
</div>
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
@if (embed.Image is not null && !string.IsNullOrWhiteSpace(embed.Image.Url))
|
|
|
|
|