Merge pull request #628 from Aireil/feat_ban_reason

This commit is contained in:
goaaats 2021-10-12 18:34:47 +02:00 committed by GitHub
commit 5f88364901
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 27 additions and 2 deletions

View file

@ -1421,7 +1421,7 @@ namespace Dalamud.Interface.Internal.Windows
ImGui.TextWrapped(manifest.Description);
}
if (plugin.IsOutdated)
if (plugin.IsOutdated && !plugin.IsBanned)
{
ImGui.PushStyleColor(ImGuiCol.Text, ImGuiColors.DalamudRed);
ImGui.TextWrapped(Locs.PluginBody_Outdated);
@ -1431,7 +1431,10 @@ namespace Dalamud.Interface.Internal.Windows
if (plugin.IsBanned)
{
ImGui.PushStyleColor(ImGuiCol.Text, ImGuiColors.DalamudRed);
ImGui.TextWrapped(Locs.PluginBody_Banned);
ImGui.TextWrapped(plugin.BanReason.IsNullOrEmpty()
? Locs.PluginBody_Banned
: Locs.PluginBody_BannedReason(plugin.BanReason));
ImGui.PopStyleColor();
}
@ -2435,6 +2438,9 @@ namespace Dalamud.Interface.Internal.Windows
public static string PluginBody_Banned => Loc.Localize("InstallerBannedPluginBody ", "This plugin version is banned due to incompatibilities and not available at the moment. Please wait for it to be updated by its author.");
public static string PluginBody_BannedReason(string message) =>
Loc.Localize("InstallerBannedPluginBodyReason ", "This plugin is banned: {0}").Format(message);
#endregion
#region Plugin buttons