mirror of
https://github.com/Tyrrrz/DiscordChatExporter.git
synced 2026-04-04 20:59:05 +00:00
@@ -104,10 +104,10 @@
|
||||
<div class="chatlog__message-aside">
|
||||
@if (isFirst)
|
||||
{
|
||||
// Reference symbol
|
||||
if (message.Reference is not null)
|
||||
// Reply symbol
|
||||
if (message.Kind == MessageKind.Reply)
|
||||
{
|
||||
<div class="chatlog__reference-symbol"></div>
|
||||
<div class="chatlog__reply-symbol"></div>
|
||||
}
|
||||
|
||||
// Avatar
|
||||
@@ -122,16 +122,16 @@
|
||||
<div class="chatlog__message-primary">
|
||||
@if (isFirst)
|
||||
{
|
||||
// Reference
|
||||
if (message.Reference is not null)
|
||||
// Reply
|
||||
if (message.Kind == MessageKind.Reply && message.Reference is not null)
|
||||
{
|
||||
<div class="chatlog__reference">
|
||||
<div class="chatlog__reply">
|
||||
@if (message.ReferencedMessage is not null)
|
||||
{
|
||||
<img class="chatlog__reference-avatar" src="@await ResolveAssetUrlAsync(message.ReferencedMessage.Author.AvatarUrl)" alt="Avatar" loading="lazy">
|
||||
<div class="chatlog__reference-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__reference-content">
|
||||
<span class="chatlog__reference-link" onclick="scrollToMessage(event, '@message.ReferencedMessage.Id')">
|
||||
<img class="chatlog__reply-avatar" src="@await ResolveAssetUrlAsync(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-content">
|
||||
<span class="chatlog__reply-link" onclick="scrollToMessage(event, '@message.ReferencedMessage.Id')">
|
||||
@if (!string.IsNullOrWhiteSpace(message.ReferencedMessage.Content) && !message.ReferencedMessage.IsContentHidden())
|
||||
{
|
||||
<!--wmm:ignore-->@Html.Raw(await FormatEmbedMarkdownAsync(message.ReferencedMessage.Content))<!--/wmm:ignore-->
|
||||
@@ -149,13 +149,13 @@
|
||||
|
||||
@if (message.ReferencedMessage.EditedTimestamp is not null)
|
||||
{
|
||||
<span class="chatlog__reference-edited-timestamp" title="@FormatDate(message.ReferencedMessage.EditedTimestamp.Value)">(edited)</span>
|
||||
<span class="chatlog__reply-edited-timestamp" title="@FormatDate(message.ReferencedMessage.EditedTimestamp.Value)">(edited)</span>
|
||||
}
|
||||
</div>
|
||||
}
|
||||
else
|
||||
{
|
||||
<div class="chatlog__reference-unknown">
|
||||
<div class="chatlog__reply-unknown">
|
||||
Original message was deleted or could not be loaded.
|
||||
</div>
|
||||
}
|
||||
@@ -170,7 +170,15 @@
|
||||
@{/* Bot label */}
|
||||
@if (message.Author.IsBot)
|
||||
{
|
||||
<span class="chatlog__bot-label">BOT</span>
|
||||
// For cross-posts, the BOT tag is replaced with the SERVER tag
|
||||
if (message.Kind != MessageKind.Reply && message.Reference is not null && message.Reference.GuildId != ExportContext.Request.Guild.Id)
|
||||
{
|
||||
<span class="chatlog__author-tag">SERVER</span>
|
||||
}
|
||||
else
|
||||
{
|
||||
<span class="chatlog__author-tag">BOT</span>
|
||||
}
|
||||
}
|
||||
|
||||
@{/* Timestamp */}
|
||||
|
||||
@@ -173,7 +173,7 @@
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.chatlog__reference-symbol {
|
||||
.chatlog__reply-symbol {
|
||||
height: 10px;
|
||||
margin: 6px 4px 4px 36px;
|
||||
border-left: 2px solid @Themed("#4f545c", "#c7ccd1");
|
||||
@@ -201,7 +201,7 @@
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.chatlog__reference {
|
||||
.chatlog__reply {
|
||||
display: flex;
|
||||
margin-bottom: 0.15rem;
|
||||
align-items: center;
|
||||
@@ -212,49 +212,49 @@
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.chatlog__reference-avatar {
|
||||
.chatlog__reply-avatar {
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
margin-right: 0.25rem;
|
||||
border-radius: 50%;
|
||||
}
|
||||
|
||||
.chatlog__reference-author {
|
||||
.chatlog__reply-author {
|
||||
margin-right: 0.3rem;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.chatlog__reference-content {
|
||||
.chatlog__reply-content {
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.chatlog__reference-link {
|
||||
.chatlog__reply-link {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.chatlog__reference-link * {
|
||||
.chatlog__reply-link * {
|
||||
display: inline;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.chatlog__reference-link .chatlog__markdown-quote {
|
||||
.chatlog__reply-link .chatlog__markdown-quote {
|
||||
display: inline;
|
||||
}
|
||||
|
||||
.chatlog__reference-link .chatlog__markdown-pre {
|
||||
.chatlog__reply-link .chatlog__markdown-pre {
|
||||
display: inline;
|
||||
}
|
||||
|
||||
.chatlog__reference-link:hover {
|
||||
.chatlog__reply-link:hover {
|
||||
color: @Themed("#ffffff", "#2f3136");
|
||||
}
|
||||
|
||||
.chatlog__reference-link:hover *:not(.chatlog__markdown-spoiler) {
|
||||
.chatlog__reply-link:hover *:not(.chatlog__markdown-spoiler) {
|
||||
color: inherit;
|
||||
}
|
||||
|
||||
.chatlog__reference-edited-timestamp {
|
||||
.chatlog__reply-edited-timestamp {
|
||||
margin-left: 0.25rem;
|
||||
color: @Themed("#a3a6aa", "#5e6772");
|
||||
font-size: 0.75rem;
|
||||
@@ -304,7 +304,7 @@
|
||||
color: @Themed("#ffffff", "#2f3136");
|
||||
}
|
||||
|
||||
.chatlog__bot-label {
|
||||
.chatlog__author-tag {
|
||||
position: relative;
|
||||
top: -0.1rem;
|
||||
margin-left: 0.3rem;
|
||||
|
||||
Reference in New Issue
Block a user