feat: show available update changelog in installer (#986)

This commit is contained in:
Aireil 2022-08-31 22:08:47 +02:00 committed by GitHub
parent a4cac03239
commit 5dbed370f8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1964,9 +1964,20 @@ namespace Dalamud.Interface.Internal.Windows.PluginInstaller
if (hasChangelog)
{
if (ImGui.TreeNode($"Changelog (v{plugin.Manifest.EffectiveVersion})"))
if (ImGui.TreeNode(Locs.PluginBody_CurrentChangeLog(plugin.Manifest.EffectiveVersion)))
{
this.DrawInstalledPluginChangelog(plugin.Manifest);
ImGui.TreePop();
}
}
if (availablePluginUpdate != default && !availablePluginUpdate.UpdateManifest.Changelog.IsNullOrWhitespace())
{
var availablePluginUpdateVersion = availablePluginUpdate.UseTesting ? availablePluginUpdate.UpdateManifest.TestingAssemblyVersion : availablePluginUpdate.UpdateManifest.AssemblyVersion;
if (ImGui.TreeNode(Locs.PluginBody_UpdateChangeLog(availablePluginUpdateVersion)))
{
this.DrawInstalledPluginChangelog(availablePluginUpdate.UpdateManifest);
ImGui.TreePop();
}
}
}
@ -2738,6 +2749,10 @@ namespace Dalamud.Interface.Internal.Windows.PluginInstaller
public static string PluginBody_AuthorWithDownloadCountUnavailable(string author) => Loc.Localize("InstallerAuthorWithDownloadCountUnavailable", " by {0}").Format(author);
public static string PluginBody_CurrentChangeLog(Version version) => Loc.Localize("InstallerCurrentChangeLog", "Changelog (v{0})").Format(version);
public static string PluginBody_UpdateChangeLog(Version version) => Loc.Localize("InstallerUpdateChangeLog", "Available update changelog (v{0})").Format(version);
public static string PluginBody_DevPluginPath(string path) => Loc.Localize("InstallerDevPluginPath", "From {0}").Format(path);
public static string PluginBody_Plugin3rdPartyRepo(string url) => Loc.Localize("InstallerPlugin3rdPartyRepo", "From custom plugin repository {0}").Format(url);