feat: add ban reason in the installer

This commit is contained in:
Aireil 2021-10-08 23:38:00 +02:00
parent daaf3c9328
commit f8966318c8
3 changed files with 27 additions and 2 deletions

View file

@ -1430,7 +1430,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);
@ -1440,7 +1440,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();
}
@ -2436,6 +2439,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