mirror of
https://github.com/Tyrrrz/DiscordChatExporter.git
synced 2026-03-17 04:12:32 +00:00
@@ -1,4 +1,5 @@
|
||||
using System.Collections.Generic;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
namespace DiscordChatExporter.Core.Models
|
||||
@@ -9,17 +10,23 @@ namespace DiscordChatExporter.Core.Models
|
||||
|
||||
public Channel Channel { get; }
|
||||
|
||||
public DateTime? From { get; }
|
||||
|
||||
public DateTime? To { get; }
|
||||
|
||||
public IReadOnlyList<MessageGroup> MessageGroups { get; }
|
||||
|
||||
public int TotalMessageCount => MessageGroups.Sum(g => g.Messages.Count);
|
||||
|
||||
public Mentionables Mentionables { get; }
|
||||
|
||||
public ChatLog(Guild guild, Channel channel, IReadOnlyList<MessageGroup> messageGroups,
|
||||
Mentionables mentionables)
|
||||
public ChatLog(Guild guild, Channel channel, DateTime? from, DateTime? to,
|
||||
IReadOnlyList<MessageGroup> messageGroups, Mentionables mentionables)
|
||||
{
|
||||
Guild = guild;
|
||||
Channel = channel;
|
||||
From = from;
|
||||
To = to;
|
||||
MessageGroups = messageGroups;
|
||||
Mentionables = mentionables;
|
||||
}
|
||||
|
||||
@@ -17,8 +17,24 @@
|
||||
<div class="info__metadata">
|
||||
<div class="info__guild-name">{{ Guild.Name | HtmlEncode }}</div>
|
||||
<div class="info__channel-name">{{ Channel.Name | HtmlEncode }}</div>
|
||||
<div class="info__channel-topic">{{ Channel.Topic | HtmlEncode }}</div>
|
||||
|
||||
{{ if Channel.Topic }}
|
||||
<div class="info__channel-topic">{{ Channel.Topic | HtmlEncode }}</div>
|
||||
{{ end }}
|
||||
|
||||
<div class="info__channel-message-count">{{ TotalMessageCount | Format "N0" }} messages</div>
|
||||
|
||||
{{ if From || To }}
|
||||
<div class="info__channel-date-range">
|
||||
{{ if From && To }}
|
||||
Between {{ From | FormatDate }} and {{ To | FormatDate }}
|
||||
{{ else if From }}
|
||||
After {{ From | FormatDate }}
|
||||
{{ else if To }}
|
||||
Before {{ To | FormatDate }}
|
||||
{{ end }}
|
||||
</div>
|
||||
{{ end }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -65,8 +65,8 @@ img {
|
||||
}
|
||||
|
||||
.info__guild-icon {
|
||||
max-width: 64px;
|
||||
max-height: 64px;
|
||||
max-width: 88px;
|
||||
max-height: 88px;
|
||||
}
|
||||
|
||||
.info__metadata {
|
||||
@@ -90,6 +90,10 @@ img {
|
||||
margin-top: 2px;
|
||||
}
|
||||
|
||||
.info__channel-date-range {
|
||||
margin-top: 2px;
|
||||
}
|
||||
|
||||
/* === CHATLOG === */
|
||||
|
||||
.chatlog {
|
||||
|
||||
@@ -3,6 +3,7 @@ Guild: {{ Guild.Name }}
|
||||
Channel: {{ Channel.Name }}
|
||||
Topic: {{ Channel.Topic }}
|
||||
Messages: {{ TotalMessageCount | Format "N0" }}
|
||||
Range: {{ if From }}{{ From | FormatDate }} {{ end }}{{ if From || To }}->{{ end }}{{ if To }} {{ To | FormatDate }}{{ end }}
|
||||
==============================================================
|
||||
|
||||
{{~ for group in MessageGroups ~}}
|
||||
|
||||
Reference in New Issue
Block a user