mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-20 07:34:17 +01:00
Installer: if main-repo cross update is available, adjust warning message
This commit is contained in:
parent
defa49865c
commit
dd47147538
1 changed files with 24 additions and 11 deletions
|
|
@ -223,10 +223,11 @@ internal class PluginInstallerWindow : Window, IDisposable
|
||||||
IsThirdParty = 1 << 0,
|
IsThirdParty = 1 << 0,
|
||||||
HasTrouble = 1 << 1,
|
HasTrouble = 1 << 1,
|
||||||
UpdateAvailable = 1 << 2,
|
UpdateAvailable = 1 << 2,
|
||||||
IsNew = 1 << 3,
|
MainRepoCrossUpdate = 1 << 3,
|
||||||
IsInstallableOutdated = 1 << 4,
|
IsNew = 1 << 4,
|
||||||
IsOrphan = 1 << 5,
|
IsInstallableOutdated = 1 << 5,
|
||||||
IsTesting = 1 << 6,
|
IsOrphan = 1 << 6,
|
||||||
|
IsTesting = 1 << 7,
|
||||||
}
|
}
|
||||||
|
|
||||||
private enum InstalledPluginListFilter
|
private enum InstalledPluginListFilter
|
||||||
|
|
@ -2217,7 +2218,12 @@ internal class PluginInstallerWindow : Window, IDisposable
|
||||||
else if (plugin is { IsDecommissioned: true, IsThirdParty: true })
|
else if (plugin is { IsDecommissioned: true, IsThirdParty: true })
|
||||||
{
|
{
|
||||||
ImGui.PushStyleColor(ImGuiCol.Text, ImGuiColors.DalamudRed);
|
ImGui.PushStyleColor(ImGuiCol.Text, ImGuiColors.DalamudRed);
|
||||||
ImGui.TextWrapped(Locs.PluginBody_NoServiceThird);
|
|
||||||
|
ImGui.TextWrapped(
|
||||||
|
flags.HasFlag(PluginHeaderFlags.MainRepoCrossUpdate)
|
||||||
|
? Locs.PluginBody_NoServiceThirdCrossUpdate
|
||||||
|
: Locs.PluginBody_NoServiceThird);
|
||||||
|
|
||||||
ImGui.PopStyleColor();
|
ImGui.PopStyleColor();
|
||||||
}
|
}
|
||||||
else if (plugin != null && !plugin.CheckPolicy())
|
else if (plugin != null && !plugin.CheckPolicy())
|
||||||
|
|
@ -2602,7 +2608,10 @@ internal class PluginInstallerWindow : Window, IDisposable
|
||||||
availablePluginUpdate = null;
|
availablePluginUpdate = null;
|
||||||
|
|
||||||
// Update available
|
// Update available
|
||||||
if (availablePluginUpdate != default)
|
var isMainRepoCrossUpdate = availablePluginUpdate != null &&
|
||||||
|
availablePluginUpdate.UpdateManifest.RepoUrl != plugin.Manifest.RepoUrl &&
|
||||||
|
availablePluginUpdate.UpdateManifest.RepoUrl == PluginRepository.MainRepoUrl;
|
||||||
|
if (availablePluginUpdate != null)
|
||||||
{
|
{
|
||||||
label += Locs.PluginTitleMod_HasUpdate;
|
label += Locs.PluginTitleMod_HasUpdate;
|
||||||
}
|
}
|
||||||
|
|
@ -2612,7 +2621,7 @@ internal class PluginInstallerWindow : Window, IDisposable
|
||||||
if (this.updatedPlugins != null && !plugin.IsDev)
|
if (this.updatedPlugins != null && !plugin.IsDev)
|
||||||
{
|
{
|
||||||
var update = this.updatedPlugins.FirstOrDefault(update => update.InternalName == plugin.Manifest.InternalName);
|
var update = this.updatedPlugins.FirstOrDefault(update => update.InternalName == plugin.Manifest.InternalName);
|
||||||
if (update != default)
|
if (update != null)
|
||||||
{
|
{
|
||||||
if (update.Status == PluginUpdateStatus.StatusKind.Success)
|
if (update.Status == PluginUpdateStatus.StatusKind.Success)
|
||||||
{
|
{
|
||||||
|
|
@ -2640,8 +2649,8 @@ internal class PluginInstallerWindow : Window, IDisposable
|
||||||
trouble = true;
|
trouble = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Orphaned
|
// Orphaned, if we don't have a cross-repo update
|
||||||
if (plugin.IsOrphaned)
|
if (plugin.IsOrphaned && !isMainRepoCrossUpdate)
|
||||||
{
|
{
|
||||||
label += Locs.PluginTitleMod_OrphanedError;
|
label += Locs.PluginTitleMod_OrphanedError;
|
||||||
trouble = true;
|
trouble = true;
|
||||||
|
|
@ -2670,7 +2679,7 @@ internal class PluginInstallerWindow : Window, IDisposable
|
||||||
string? availableChangelog = null;
|
string? availableChangelog = null;
|
||||||
var didDrawAvailableChangelogInsideCollapsible = false;
|
var didDrawAvailableChangelogInsideCollapsible = false;
|
||||||
|
|
||||||
if (availablePluginUpdate != default)
|
if (availablePluginUpdate != null)
|
||||||
{
|
{
|
||||||
availablePluginUpdateVersion =
|
availablePluginUpdateVersion =
|
||||||
availablePluginUpdate.UseTesting ?
|
availablePluginUpdate.UseTesting ?
|
||||||
|
|
@ -2688,8 +2697,10 @@ internal class PluginInstallerWindow : Window, IDisposable
|
||||||
flags |= PluginHeaderFlags.IsThirdParty;
|
flags |= PluginHeaderFlags.IsThirdParty;
|
||||||
if (trouble)
|
if (trouble)
|
||||||
flags |= PluginHeaderFlags.HasTrouble;
|
flags |= PluginHeaderFlags.HasTrouble;
|
||||||
if (availablePluginUpdate != default)
|
if (availablePluginUpdate != null)
|
||||||
flags |= PluginHeaderFlags.UpdateAvailable;
|
flags |= PluginHeaderFlags.UpdateAvailable;
|
||||||
|
if (isMainRepoCrossUpdate)
|
||||||
|
flags |= PluginHeaderFlags.MainRepoCrossUpdate;
|
||||||
if (plugin.IsOrphaned)
|
if (plugin.IsOrphaned)
|
||||||
flags |= PluginHeaderFlags.IsOrphan;
|
flags |= PluginHeaderFlags.IsOrphan;
|
||||||
if (plugin.IsTesting)
|
if (plugin.IsTesting)
|
||||||
|
|
@ -4056,6 +4067,8 @@ internal class PluginInstallerWindow : Window, IDisposable
|
||||||
|
|
||||||
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_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_NoServiceThirdCrossUpdate => Loc.Localize("InstallerNoServiceThirdCrossUpdatePluginBody", "This plugin is no longer being serviced by its source repo. An update is available and will update it to a version from the official repository.");
|
||||||
|
|
||||||
public static string PluginBody_LoadFailed => Loc.Localize("InstallerLoadFailedPluginBody ", "This plugin failed to load. Please contact the author for more information.");
|
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.");
|
public static string PluginBody_Banned => Loc.Localize("InstallerBannedPluginBody ", "This plugin was automatically disabled due to incompatibilities and is not available.");
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue