mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-12 18:27:23 +01:00
feat: add orphaned plugins regardless, inform users in installer
This commit is contained in:
parent
12722c776d
commit
ce8e088044
2 changed files with 29 additions and 7 deletions
|
|
@ -1180,6 +1180,12 @@ namespace Dalamud.Interface.Internal.Windows.PluginInstaller
|
|||
|
||||
ImGui.PopStyleColor();
|
||||
}
|
||||
else if (plugin is { IsOrphaned: true })
|
||||
{
|
||||
ImGui.PushStyleColor(ImGuiCol.Text, ImGuiColors.DalamudRed);
|
||||
ImGui.TextWrapped(Locs.PluginBody_Orphaned);
|
||||
ImGui.PopStyleColor();
|
||||
}
|
||||
else if (plugin is { State: PluginState.LoadError or PluginState.DependencyResolutionFailed }) // Load failed warning
|
||||
{
|
||||
ImGui.PushStyleColor(ImGuiCol.Text, ImGuiColors.DalamudRed);
|
||||
|
|
@ -1517,6 +1523,13 @@ namespace Dalamud.Interface.Internal.Windows.PluginInstaller
|
|||
trouble = true;
|
||||
}
|
||||
|
||||
// Orphaned
|
||||
if (plugin.IsOrphaned)
|
||||
{
|
||||
label += Locs.PluginTitleMod_OrphanedError;
|
||||
trouble = true;
|
||||
}
|
||||
|
||||
ImGui.PushID($"installed{index}{plugin.Manifest.InternalName}");
|
||||
var hasChangelog = !plugin.Manifest.Changelog.IsNullOrEmpty();
|
||||
|
||||
|
|
@ -1691,6 +1704,9 @@ namespace Dalamud.Interface.Internal.Windows.PluginInstaller
|
|||
// Disable everything if the plugin is outdated
|
||||
disabled = disabled || (plugin.IsOutdated && !configuration.LoadAllApiLevels) || plugin.IsBanned;
|
||||
|
||||
// Disable everything if the plugin is orphaned
|
||||
disabled = disabled || plugin.IsOrphaned;
|
||||
|
||||
// Disable everything if the plugin failed to load
|
||||
disabled = disabled || plugin.State == PluginState.LoadError || plugin.State == PluginState.DependencyResolutionFailed;
|
||||
|
||||
|
|
@ -1904,7 +1920,7 @@ namespace Dalamud.Interface.Internal.Windows.PluginInstaller
|
|||
private void DrawDeletePluginButton(LocalPlugin plugin)
|
||||
{
|
||||
var unloaded = plugin.State == PluginState.Unloaded;
|
||||
var showButton = unloaded && (plugin.IsDev || plugin.IsOutdated || plugin.IsBanned);
|
||||
var showButton = unloaded && (plugin.IsDev || plugin.IsOutdated || plugin.IsBanned || plugin.IsOrphaned);
|
||||
|
||||
if (!showButton)
|
||||
return;
|
||||
|
|
@ -2264,6 +2280,8 @@ namespace Dalamud.Interface.Internal.Windows.PluginInstaller
|
|||
public static string PluginTitleMod_OutdatedError => Loc.Localize("InstallerOutdatedError", " (outdated)");
|
||||
|
||||
public static string PluginTitleMod_BannedError => Loc.Localize("InstallerBannedError", " (automatically disabled)");
|
||||
|
||||
public static string PluginTitleMod_OrphanedError => Loc.Localize("InstallerOrphanedError", " (unknown repository)");
|
||||
|
||||
public static string PluginTitleMod_New => Loc.Localize("InstallerNewPlugin ", " New!");
|
||||
|
||||
|
|
@ -2299,6 +2317,8 @@ namespace Dalamud.Interface.Internal.Windows.PluginInstaller
|
|||
|
||||
public static string PluginBody_Outdated => Loc.Localize("InstallerOutdatedPluginBody ", "This plugin is outdated and incompatible at the moment. Please wait for it to be updated by its author.");
|
||||
|
||||
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_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.");
|
||||
|
|
|
|||
|
|
@ -658,11 +658,8 @@ internal partial class PluginManager : IDisposable, IServiceType
|
|||
manifest.Testing = true;
|
||||
}
|
||||
|
||||
if (repoManifest.SourceRepo.IsThirdParty)
|
||||
{
|
||||
// Only document the url if it came from a third party repo.
|
||||
manifest.InstalledFromUrl = repoManifest.SourceRepo.PluginMasterUrl;
|
||||
}
|
||||
// Document the url the plugin was installed from
|
||||
manifest.InstalledFromUrl = repoManifest.SourceRepo.PluginMasterUrl;
|
||||
|
||||
manifest.Save(manifestFile);
|
||||
|
||||
|
|
@ -740,9 +737,14 @@ internal partial class PluginManager : IDisposable, IServiceType
|
|||
}
|
||||
else if (plugin.IsOutdated)
|
||||
{
|
||||
// Out of date plugins get added so they can be updated.
|
||||
// Out of date plugins get added, so they can be updated.
|
||||
Log.Information(ex, $"Plugin was outdated, adding anyways: {dllFile.Name}");
|
||||
}
|
||||
else if (plugin.IsOrphaned)
|
||||
{
|
||||
// Orphaned plugins get added, so that users aren't confused.
|
||||
Log.Information(ex, $"Plugin was orphaned, adding anyways: {dllFile.Name}");
|
||||
}
|
||||
else if (isBoot)
|
||||
{
|
||||
// During boot load, plugins always get added to the list so they can be fiddled with in the UI
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue