diff --git a/Dalamud/Interface/Internal/Windows/PluginInstallerWindow.cs b/Dalamud/Interface/Internal/Windows/PluginInstallerWindow.cs index 61209d921..58e5ad709 100644 --- a/Dalamud/Interface/Internal/Windows/PluginInstallerWindow.cs +++ b/Dalamud/Interface/Internal/Windows/PluginInstallerWindow.cs @@ -45,6 +45,9 @@ namespace Dalamud.Interface.Internal.Windows private static readonly ModuleLog Log = new("PLUGINW"); + private readonly Vector4 changelogBgColor = new(0.114f, 0.584f, 0.192f, 0.678f); + private readonly Vector4 changelogTextColor = new(0.812f, 1.000f, 0.816f, 1.000f); + private readonly TextureWrap defaultIcon; private readonly TextureWrap troubleIcon; private readonly TextureWrap updateIcon; @@ -1226,6 +1229,7 @@ namespace Dalamud.Interface.Internal.Windows } // Freshly updated + var thisWasUpdated = false; if (this.updatedPlugins != null && !plugin.IsDev) { var update = this.updatedPlugins.FirstOrDefault(update => update.InternalName == plugin.Manifest.InternalName); @@ -1233,6 +1237,7 @@ namespace Dalamud.Interface.Internal.Windows { if (update.WasUpdated) { + thisWasUpdated = true; label += Locs.PluginTitleMod_Updated; } else @@ -1362,6 +1367,28 @@ namespace Dalamud.Interface.Internal.Windows ImGui.Unindent(); } + if (thisWasUpdated && !plugin.Manifest.Changelog.IsNullOrEmpty()) + { + ImGuiHelpers.ScaledDummy(5); + + ImGui.PushStyleColor(ImGuiCol.ChildBg, this.changelogBgColor); + ImGui.PushStyleColor(ImGuiCol.Text, this.changelogTextColor); + + ImGui.PushStyleVar(ImGuiStyleVar.WindowPadding, new Vector2(7, 5)); + + if (ImGui.BeginChild("##changelog", new Vector2(-1, 100), true, ImGuiWindowFlags.NoNavFocus | ImGuiWindowFlags.NoNavInputs | ImGuiWindowFlags.AlwaysAutoResize)) + { + ImGui.Text("Changelog:"); + ImGuiHelpers.ScaledDummy(2); + ImGui.TextWrapped(plugin.Manifest.Changelog); + } + + ImGui.EndChild(); + + ImGui.PopStyleVar(); + ImGui.PopStyleColor(2); + } + ImGui.PopID(); } diff --git a/Dalamud/Plugin/Internal/Types/PluginManifest.cs b/Dalamud/Plugin/Internal/Types/PluginManifest.cs index 420055d64..0076ddfc7 100644 --- a/Dalamud/Plugin/Internal/Types/PluginManifest.cs +++ b/Dalamud/Plugin/Internal/Types/PluginManifest.cs @@ -35,6 +35,12 @@ namespace Dalamud.Plugin.Internal.Types [JsonProperty] public string? Description { get; init; } + /// + /// Gets a changelog. + /// + [JsonProperty] + public string? Changelog { get; init; } + /// /// Gets a list of tags defined on the plugin. /// diff --git a/Dalamud/Support/BugBait.cs b/Dalamud/Support/BugBait.cs index 2a6abefe4..31f720669 100644 --- a/Dalamud/Support/BugBait.cs +++ b/Dalamud/Support/BugBait.cs @@ -21,6 +21,7 @@ namespace Dalamud.Support /// The plugin to send feedback about. /// The content of the feedback. /// The reporter name. + /// Whether or not the most recent exception to occur should be included in the report. /// A representing the asynchronous operation. public static async Task SendFeedback(PluginManifest plugin, string content, string reporter, bool includeException) {