|
|
|
@ -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>
|
|
|
|
@ -251,11 +262,14 @@
|
|
|
|
|
|
|
|
|
|
@if (embed.Thumbnail is not null && !string.IsNullOrWhiteSpace(embed.Thumbnail.Url))
|
|
|
|
|
{
|
|
|
|
|
<div class="chatlog__embed-thumbnail-container">
|
|
|
|
|
<a class="chatlog__embed-thumbnail-link" href="@await ResolveUrlAsync(embed.Thumbnail.ProxyUrl ?? embed.Thumbnail.Url)">
|
|
|
|
|
<img class="chatlog__embed-thumbnail" src="@await ResolveUrlAsync(embed.Thumbnail.ProxyUrl ?? embed.Thumbnail.Url)" alt="Thumbnail">
|
|
|
|
|
</a>
|
|
|
|
|
</div>
|
|
|
|
|
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)">
|
|
|
|
|
<img class="chatlog__embed-thumbnail" src="@await ResolveUrlAsync(embed.Thumbnail.ProxyUrl ?? embed.Thumbnail.Url)" alt="Thumbnail">
|
|
|
|
|
</a>
|
|
|
|
|
</div>
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|