diff --git a/DiscordChatExporter.Core/Exporting/MessageGroupTemplate.cshtml b/DiscordChatExporter.Core/Exporting/MessageGroupTemplate.cshtml index 658d22e8..13864713 100644 --- a/DiscordChatExporter.Core/Exporting/MessageGroupTemplate.cshtml +++ b/DiscordChatExporter.Core/Exporting/MessageGroupTemplate.cshtml @@ -741,7 +741,8 @@
@foreach (var button in actionRow.Buttons) { - var styleClass = button.Style switch { + var styleClass = button.Style switch + { ButtonStyle.Primary => "chatlog__component-button--primary", ButtonStyle.Secondary => "chatlog__component-button--secondary", ButtonStyle.Success => "chatlog__component-button--success", @@ -752,16 +753,21 @@ }; var isUrlButton = button.IsUrlButton; + var isDisabled = button.IsDisabled; + var hasEmoji = button.Emoji is not null; + var hasLabel = !string.IsNullOrWhiteSpace(button.Label); + var emojiUrl = hasEmoji ? await ResolveAssetUrlAsync(button.Emoji.ImageUrl) : null; + var cssClass = $"chatlog__component-button {styleClass}"; - if (isUrlButton) + if (isUrlButton && !isDisabled) { - - @if (button.Emoji is not null) + + @if (hasEmoji) { - @button.Emoji.Name + @button.Emoji.Name } - @if (!string.IsNullOrWhiteSpace(button.Label)) + @if (hasLabel) { @button.Label } @@ -769,13 +775,13 @@ } else { -