feat: note if a plugin is no longer being serviced

This commit is contained in:
goaaats 2023-01-07 23:48:20 +01:00
parent 21b8adff4d
commit e3cbc4dc8c
No known key found for this signature in database
GPG key ID: 49E2AA8C6A76498B
2 changed files with 51 additions and 2 deletions

View file

@ -1600,6 +1600,18 @@ internal class PluginInstallerWindow : Window, IDisposable
ImGui.TextWrapped(Locs.PluginBody_Orphaned);
ImGui.PopStyleColor();
}
else if (plugin is { IsDecommissioned: true } && !plugin.Manifest.IsThirdParty)
{
ImGui.PushStyleColor(ImGuiCol.Text, ImGuiColors.DalamudRed);
ImGui.TextWrapped(Locs.PluginBody_NoServiceOfficial);
ImGui.PopStyleColor();
}
else if (plugin is { IsDecommissioned: true } && plugin.Manifest.IsThirdParty)
{
ImGui.PushStyleColor(ImGuiCol.Text, ImGuiColors.DalamudRed);
ImGui.TextWrapped(Locs.PluginBody_NoServiceThird);
ImGui.PopStyleColor();
}
else if (plugin != null && !plugin.CheckPolicy())
{
ImGui.PushStyleColor(ImGuiCol.Text, ImGuiColors.DalamudRed);
@ -1978,6 +1990,13 @@ internal class PluginInstallerWindow : Window, IDisposable
trouble = true;
}
// Out of service
if (plugin.IsDecommissioned)
{
label += Locs.PluginTitleMod_NoService;
trouble = true;
}
// Scheduled for deletion
if (plugin.Manifest.ScheduledForDeletion)
{
@ -2875,6 +2894,8 @@ internal class PluginInstallerWindow : Window, IDisposable
public static string PluginTitleMod_Disabled => Loc.Localize("InstallerDisabled", " (disabled)");
public static string PluginTitleMod_NoService => Loc.Localize("InstallerNoService", " (decommissioned)");
public static string PluginTitleMod_Unloaded => Loc.Localize("InstallerUnloaded", " (unloaded)");
public static string PluginTitleMod_HasUpdate => Loc.Localize("InstallerHasUpdate", " (has update)");
@ -2943,6 +2964,10 @@ internal class PluginInstallerWindow : Window, IDisposable
public static string PluginBody_Orphaned => Loc.Localize("InstallerOrphanedPluginBody ", "This plugin's source repository is no longer available. You may need to reinstall it from its repository, or re-add the repository.");
public static string PluginBody_NoServiceOfficial => Loc.Localize("InstallerNoServiceOfficialPluginBody", "This plugin is no longer being maintained. It will still work, but there will be no further updates and you can't reinstall it.");
public static string PluginBody_NoServiceThird => Loc.Localize("InstallerNoServiceThirdPluginBody", "This plugin is no longer being serviced by its source repo. You may have to look for an updated version in another repo.");
public static string PluginBody_LoadFailed => Loc.Localize("InstallerLoadFailedPluginBody ", "This plugin failed to load. Please contact the author for more information.");
public static string PluginBody_Banned => Loc.Localize("InstallerBannedPluginBody ", "This plugin was automatically disabled due to incompatibilities and is not available at the moment. Please wait for it to be updated by its author.");