diff --git a/DiscordChatExporter.Core/Models/Reaction.cs b/DiscordChatExporter.Core/Models/Reaction.cs
index a1a65959..ed70d4e0 100644
--- a/DiscordChatExporter.Core/Models/Reaction.cs
+++ b/DiscordChatExporter.Core/Models/Reaction.cs
@@ -1,26 +1,20 @@
-using System;
-
-namespace DiscordChatExporter.Core.Models
+namespace DiscordChatExporter.Core.Models
{
+ // https://discordapp.com/developers/docs/resources/channel#reaction-object
+
public class Reaction
{
public int Count { get; }
- public bool Me { get; }
+ public string EmojiId { get; }
- public string Id { get; }
+ public string EmojiName { get; }
- public string Name { get; }
-
- public string Emoji { get; }
-
- public Reaction(int count, bool me, string id, string name)
+ public Reaction(int count, string emojiId, string emojiName)
{
Count = count;
- Me = me;
- Id = id;
- Name = name;
- Emoji = (id == "" ? name : $"<:{name}:{id}>");
+ EmojiId = emojiId;
+ EmojiName = emojiName;
}
}
}
\ No newline at end of file
diff --git a/DiscordChatExporter.Core/Resources/ExportTemplates/Html/Core.html b/DiscordChatExporter.Core/Resources/ExportTemplates/Html/Core.html
index a5ec55e7..01c655db 100644
--- a/DiscordChatExporter.Core/Resources/ExportTemplates/Html/Core.html
+++ b/DiscordChatExporter.Core/Resources/ExportTemplates/Html/Core.html
@@ -184,10 +184,16 @@
{{~ # Reactions }}
- {{ for reaction in message.Reactions}}
+ {{ for reaction in message.Reactions }}
-
{{ reaction.Emoji | FormatContent }}
-
{{ reaction.Count }}
+
+ {{ if reaction.EmojiId }}
+
+ {{ else }}
+ {{ reaction.EmojiName }}
+ {{ end }}
+
+
{{ reaction.Count }}
{{ end }}
diff --git a/DiscordChatExporter.Core/Resources/ExportTemplates/Html/DarkTheme.css b/DiscordChatExporter.Core/Resources/ExportTemplates/Html/DarkTheme.css
index 1f79b81d..6f183703 100644
--- a/DiscordChatExporter.Core/Resources/ExportTemplates/Html/DarkTheme.css
+++ b/DiscordChatExporter.Core/Resources/ExportTemplates/Html/DarkTheme.css
@@ -90,5 +90,9 @@ a {
}
.chatlog__reaction {
- background-color: rgba(255, 255, 255, 0.0392157);
+ background-color: #ffffff0a;
+}
+
+.chatlog__reaction-count {
+ color: #ffffff4d;
}
\ No newline at end of file
diff --git a/DiscordChatExporter.Core/Resources/ExportTemplates/Html/LightTheme.css b/DiscordChatExporter.Core/Resources/ExportTemplates/Html/LightTheme.css
index a113de01..11aaa885 100644
--- a/DiscordChatExporter.Core/Resources/ExportTemplates/Html/LightTheme.css
+++ b/DiscordChatExporter.Core/Resources/ExportTemplates/Html/LightTheme.css
@@ -51,5 +51,9 @@ a {
}
.chatlog__reaction {
- background-color: rgba(79, 84, 92, 0.0588235);
+ background-color: #4f545c0f;
+}
+
+.chatlog__reaction-count {
+ color: #99aab5;
}
\ No newline at end of file
diff --git a/DiscordChatExporter.Core/Resources/ExportTemplates/Html/Shared.css b/DiscordChatExporter.Core/Resources/ExportTemplates/Html/Shared.css
index 4346a036..5acf6d75 100644
--- a/DiscordChatExporter.Core/Resources/ExportTemplates/Html/Shared.css
+++ b/DiscordChatExporter.Core/Resources/ExportTemplates/Html/Shared.css
@@ -38,10 +38,15 @@ img {
margin-right: 1px;
width: 24px;
height: 24px;
- vertical-align: -.4em;
+ vertical-align: middle;
}
-.emoji-jumboable {
+.emoji--small {
+ width: 16px;
+ height: 16px;
+}
+
+.emoji--large {
width: 32px;
height: 32px;
}
@@ -286,23 +291,21 @@ img {
}
.chatlog__reactions {
- display: flex;
+ display: flex;
}
.chatlog__reaction {
- margin: 2px;
+ margin: 6px 2px 2px 2px;
+ padding: 2px 6px 2px 2px;
border-radius: 3px;
- display: block;
- padding-right: 6px;
}
.chatlog__reaction-emoji {
- display: inline;
margin-left: 3px;
- padding-right: 3px;
- font-size: large;
+ vertical-align: middle;
}
.chatlog__reaction-count {
- display: inline;
+ font-size: .875em;
+ vertical-align: middle;
}
\ No newline at end of file
diff --git a/DiscordChatExporter.Core/Services/DataService.Parsers.cs b/DiscordChatExporter.Core/Services/DataService.Parsers.cs
index 120c0417..11ec971e 100644
--- a/DiscordChatExporter.Core/Services/DataService.Parsers.cs
+++ b/DiscordChatExporter.Core/Services/DataService.Parsers.cs
@@ -141,11 +141,10 @@ namespace DiscordChatExporter.Core.Services
private Reaction ParseReaction(JToken json)
{
var count = json["count"].Value();
- var me = json["me"].Value();
- var id = json["emoji"]["id"]?.ToString();
- var name = json["emoji"]["name"].ToString();
+ var emojiId = json["emoji"]["id"]?.Value();
+ var emojiName = json["emoji"]["name"].Value();
- return new Reaction(count, me, id, name);
+ return new Reaction(count, emojiId, emojiName);
}
private Message ParseMessage(JToken json)