mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-12 18:27:23 +01:00
feat(PluginInstaller): show changelog in collapsible, even for unupdated plugins
This commit is contained in:
parent
0e53619fa4
commit
797bcf7305
1 changed files with 33 additions and 19 deletions
|
|
@ -1409,6 +1409,7 @@ namespace Dalamud.Interface.Internal.Windows
|
|||
}
|
||||
|
||||
ImGui.PushID($"installed{index}{plugin.Manifest.InternalName}");
|
||||
var hasChangelog = !plugin.Manifest.Changelog.IsNullOrEmpty();
|
||||
|
||||
if (this.DrawPluginCollapsingHeader(label, plugin, plugin.Manifest, plugin.Manifest.IsThirdParty, trouble, availablePluginUpdate != default, false, () => this.DrawInstalledPluginContextMenu(plugin), index))
|
||||
{
|
||||
|
|
@ -1503,9 +1504,25 @@ namespace Dalamud.Interface.Internal.Windows
|
|||
ImGuiHelpers.ScaledDummy(5);
|
||||
|
||||
ImGui.Unindent();
|
||||
|
||||
if (hasChangelog)
|
||||
{
|
||||
if (ImGui.TreeNode($"Changelog (v{plugin.Manifest.AssemblyVersion})"))
|
||||
{
|
||||
this.DrawInstalledPluginChangelog(plugin.Manifest);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (thisWasUpdated && !plugin.Manifest.Changelog.IsNullOrEmpty())
|
||||
if (thisWasUpdated && hasChangelog)
|
||||
{
|
||||
this.DrawInstalledPluginChangelog(plugin.Manifest);
|
||||
}
|
||||
|
||||
ImGui.PopID();
|
||||
}
|
||||
|
||||
private void DrawInstalledPluginChangelog(PluginManifest manifest)
|
||||
{
|
||||
ImGuiHelpers.ScaledDummy(5);
|
||||
|
||||
|
|
@ -1518,7 +1535,7 @@ namespace Dalamud.Interface.Internal.Windows
|
|||
{
|
||||
ImGui.Text("Changelog:");
|
||||
ImGuiHelpers.ScaledDummy(2);
|
||||
ImGui.TextWrapped(plugin.Manifest.Changelog);
|
||||
ImGui.TextWrapped(manifest.Changelog);
|
||||
}
|
||||
|
||||
ImGui.EndChild();
|
||||
|
|
@ -1527,9 +1544,6 @@ namespace Dalamud.Interface.Internal.Windows
|
|||
ImGui.PopStyleColor(2);
|
||||
}
|
||||
|
||||
ImGui.PopID();
|
||||
}
|
||||
|
||||
private void DrawInstalledPluginContextMenu(LocalPlugin plugin)
|
||||
{
|
||||
var pluginManager = Service<PluginManager>.Get();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue