|
|
@ -40,9 +40,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
var authorMember = Context.TryGetMember(message.Author.Id);
|
|
|
|
var authorMember = Context.TryGetMember(message.Author.Id);
|
|
|
|
var authorColor = Context.TryGetUserColor(message.Author.Id);
|
|
|
|
var authorColor = Context.TryGetUserColor(message.Author.Id);
|
|
|
|
var authorNick = message.Author.IsBot
|
|
|
|
var authorDisplayName = message.Author.IsBot
|
|
|
|
? message.Author.Name
|
|
|
|
? message.Author.DisplayName
|
|
|
|
: authorMember?.Nick ?? message.Author.Name;
|
|
|
|
: authorMember?.DisplayName ?? message.Author.DisplayName;
|
|
|
|
|
|
|
|
|
|
|
|
<div id="chatlog__message-container-@message.Id" class="chatlog__message-container @(message.IsPinned ? "chatlog__message-container--pinned" : null)" data-message-id="@message.Id">
|
|
|
|
<div id="chatlog__message-container-@message.Id" class="chatlog__message-container @(message.IsPinned ? "chatlog__message-container--pinned" : null)" data-message-id="@message.Id">
|
|
|
|
<div class="chatlog__message">
|
|
|
|
<div class="chatlog__message">
|
|
|
@ -71,7 +71,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
<div class="chatlog__message-primary">
|
|
|
|
<div class="chatlog__message-primary">
|
|
|
|
@* Author name *@
|
|
|
|
@* Author name *@
|
|
|
|
<span class="chatlog__system-notification-author" style="@(authorColor is not null ? $"color: rgb({authorColor.Value.R}, {authorColor.Value.G}, {authorColor.Value.B})" : null)" title="@message.Author.FullName" data-user-id="@message.Author.Id">@authorNick</span>
|
|
|
|
<span class="chatlog__system-notification-author" style="@(authorColor is not null ? $"color: rgb({authorColor.Value.R}, {authorColor.Value.G}, {authorColor.Value.B})" : null)" title="@message.Author.FullName" data-user-id="@message.Author.Id">@authorDisplayName</span>
|
|
|
|
|
|
|
|
|
|
|
|
@* Space out the content *@
|
|
|
|
@* Space out the content *@
|
|
|
|
<span> </span>
|
|
|
|
<span> </span>
|
|
|
@ -81,7 +81,7 @@
|
|
|
|
@if (message.Kind == MessageKind.RecipientAdd && message.MentionedUsers.Any())
|
|
|
|
@if (message.Kind == MessageKind.RecipientAdd && message.MentionedUsers.Any())
|
|
|
|
{
|
|
|
|
{
|
|
|
|
<span>added </span>
|
|
|
|
<span>added </span>
|
|
|
|
<a class="chatlog__system-notification-link" title="@message.MentionedUsers.First().FullName">@message.MentionedUsers.First().Name</a>
|
|
|
|
<a class="chatlog__system-notification-link" title="@message.MentionedUsers.First().FullName">@message.MentionedUsers.First().DisplayName</a>
|
|
|
|
<span> to the group.</span>
|
|
|
|
<span> to the group.</span>
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else if (message.Kind == MessageKind.RecipientRemove && message.MentionedUsers.Any())
|
|
|
|
else if (message.Kind == MessageKind.RecipientRemove && message.MentionedUsers.Any())
|
|
|
@ -93,7 +93,7 @@
|
|
|
|
else
|
|
|
|
else
|
|
|
|
{
|
|
|
|
{
|
|
|
|
<span>removed </span>
|
|
|
|
<span>removed </span>
|
|
|
|
<a class="chatlog__system-notification-link" title="@message.MentionedUsers.First().FullName">@message.MentionedUsers.First().Name</a>
|
|
|
|
<a class="chatlog__system-notification-link" title="@message.MentionedUsers.First().FullName">@message.MentionedUsers.First().DisplayName</a>
|
|
|
|
<span> from the group.</span>
|
|
|
|
<span> from the group.</span>
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -168,12 +168,12 @@
|
|
|
|
{
|
|
|
|
{
|
|
|
|
var referencedUserMember = Context.TryGetMember(message.ReferencedMessage.Author.Id);
|
|
|
|
var referencedUserMember = Context.TryGetMember(message.ReferencedMessage.Author.Id);
|
|
|
|
var referencedUserColor = Context.TryGetUserColor(message.ReferencedMessage.Author.Id);
|
|
|
|
var referencedUserColor = Context.TryGetUserColor(message.ReferencedMessage.Author.Id);
|
|
|
|
var referencedUserNick = message.ReferencedMessage.Author.IsBot
|
|
|
|
var referencedUserDisplayName = message.ReferencedMessage.Author.IsBot
|
|
|
|
? message.ReferencedMessage.Author.Name
|
|
|
|
? message.ReferencedMessage.Author.DisplayName
|
|
|
|
: referencedUserMember?.Nick ?? message.ReferencedMessage.Author.Name;
|
|
|
|
: referencedUserMember?.DisplayName ?? message.ReferencedMessage.Author.DisplayName;
|
|
|
|
|
|
|
|
|
|
|
|
<img class="chatlog__reply-avatar" src="@await ResolveAssetUrlAsync(referencedUserMember?.AvatarUrl ?? message.ReferencedMessage.Author.AvatarUrl)" alt="Avatar" loading="lazy">
|
|
|
|
<img class="chatlog__reply-avatar" src="@await ResolveAssetUrlAsync(referencedUserMember?.AvatarUrl ?? message.ReferencedMessage.Author.AvatarUrl)" alt="Avatar" loading="lazy">
|
|
|
|
<div class="chatlog__reply-author" style="@(referencedUserColor is not null ? $"color: rgb({referencedUserColor.Value.R}, {referencedUserColor.Value.G}, {referencedUserColor.Value.B})" : null)" title="@message.ReferencedMessage.Author.FullName">@referencedUserNick</div>
|
|
|
|
<div class="chatlog__reply-author" style="@(referencedUserColor is not null ? $"color: rgb({referencedUserColor.Value.R}, {referencedUserColor.Value.G}, {referencedUserColor.Value.B})" : null)" title="@message.ReferencedMessage.Author.FullName">@referencedUserDisplayName</div>
|
|
|
|
<div class="chatlog__reply-content">
|
|
|
|
<div class="chatlog__reply-content">
|
|
|
|
<span class="chatlog__reply-link" onclick="scrollToMessage(event, '@message.ReferencedMessage.Id')">
|
|
|
|
<span class="chatlog__reply-link" onclick="scrollToMessage(event, '@message.ReferencedMessage.Id')">
|
|
|
|
@if (!string.IsNullOrWhiteSpace(message.ReferencedMessage.Content) && !message.ReferencedMessage.IsContentHidden())
|
|
|
|
@if (!string.IsNullOrWhiteSpace(message.ReferencedMessage.Content) && !message.ReferencedMessage.IsContentHidden())
|
|
|
@ -201,12 +201,12 @@
|
|
|
|
{
|
|
|
|
{
|
|
|
|
var interactionUserMember = Context.TryGetMember(message.Interaction.User.Id);
|
|
|
|
var interactionUserMember = Context.TryGetMember(message.Interaction.User.Id);
|
|
|
|
var interactionUserColor = Context.TryGetUserColor(message.Interaction.User.Id);
|
|
|
|
var interactionUserColor = Context.TryGetUserColor(message.Interaction.User.Id);
|
|
|
|
var interactionUserNick = message.Interaction.User.IsBot
|
|
|
|
var interactionUserDisplayName = message.Interaction.User.IsBot
|
|
|
|
? message.Interaction.User.Name
|
|
|
|
? message.Interaction.User.DisplayName
|
|
|
|
: interactionUserMember?.Nick ?? message.Interaction.User.Name;
|
|
|
|
: interactionUserMember?.DisplayName ?? message.Interaction.User.DisplayName;
|
|
|
|
|
|
|
|
|
|
|
|
<img class="chatlog__reply-avatar" src="@await ResolveAssetUrlAsync(interactionUserMember?.AvatarUrl ?? message.Interaction.User.AvatarUrl)" alt="Avatar" loading="lazy">
|
|
|
|
<img class="chatlog__reply-avatar" src="@await ResolveAssetUrlAsync(interactionUserMember?.AvatarUrl ?? message.Interaction.User.AvatarUrl)" alt="Avatar" loading="lazy">
|
|
|
|
<div class="chatlog__reply-author" style="@(interactionUserColor is not null ? $"color: rgb({interactionUserColor.Value.R}, {interactionUserColor.Value.G}, {interactionUserColor.Value.B})" : null)" title="@message.Interaction.User.FullName">@interactionUserNick</div>
|
|
|
|
<div class="chatlog__reply-author" style="@(interactionUserColor is not null ? $"color: rgb({interactionUserColor.Value.R}, {interactionUserColor.Value.G}, {interactionUserColor.Value.B})" : null)" title="@message.Interaction.User.FullName">@interactionUserDisplayName</div>
|
|
|
|
<div class="chatlog__reply-content">
|
|
|
|
<div class="chatlog__reply-content">
|
|
|
|
used /@message.Interaction.Name
|
|
|
|
used /@message.Interaction.Name
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
@ -223,7 +223,7 @@
|
|
|
|
// Header
|
|
|
|
// Header
|
|
|
|
<div class="chatlog__header">
|
|
|
|
<div class="chatlog__header">
|
|
|
|
@* Author name *@
|
|
|
|
@* Author name *@
|
|
|
|
<span class="chatlog__author" style="@(authorColor is not null ? $"color: rgb({authorColor.Value.R}, {authorColor.Value.G}, {authorColor.Value.B})" : null)" title="@message.Author.FullName" data-user-id="@message.Author.Id">@authorNick</span>
|
|
|
|
<span class="chatlog__author" style="@(authorColor is not null ? $"color: rgb({authorColor.Value.R}, {authorColor.Value.G}, {authorColor.Value.B})" : null)" title="@message.Author.FullName" data-user-id="@message.Author.Id">@authorDisplayName</span>
|
|
|
|
|
|
|
|
|
|
|
|
@* Bot tag *@
|
|
|
|
@* Bot tag *@
|
|
|
|
@if (message.Author.IsBot)
|
|
|
|
@if (message.Author.IsBot)
|
|
|
|