mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-15 05:04:15 +01:00
feat: list which plugins failed to update in error message
This commit is contained in:
parent
015562d422
commit
07a0b3903f
2 changed files with 17 additions and 5 deletions
|
|
@ -186,6 +186,9 @@ namespace Dalamud.Plugin
|
|||
|
||||
if (this.installStatus == PluginInstallStatus.Success) {
|
||||
this.updateComplete = true;
|
||||
}
|
||||
|
||||
if (t.Result.UpdatedPlugins != null) {
|
||||
this.updatePluginCount = t.Result.UpdatedPlugins.Length;
|
||||
this.updatedInternalName = t.Result.UpdatedPlugins;
|
||||
}
|
||||
|
|
@ -207,9 +210,18 @@ namespace Dalamud.Plugin
|
|||
|
||||
ImGui.Spacing();
|
||||
|
||||
if (ImGui.BeginPopupModal(Loc.Localize("InstallerError","Installer failed"), ref this.errorModalDrawing, ImGuiWindowFlags.AlwaysAutoResize))
|
||||
{
|
||||
ImGui.Text(Loc.Localize("InstallerErrorHint", "The plugin installer ran into an issue or the plugin is incompatible.\nPlease restart the game and report this error on our discord."));
|
||||
if (ImGui.BeginPopupModal(Loc.Localize("InstallerError","Installer failed"), ref this.errorModalDrawing, ImGuiWindowFlags.AlwaysAutoResize)) {
|
||||
var message = Loc.Localize("InstallerErrorHint",
|
||||
"The plugin installer ran into an issue or the plugin is incompatible.\nPlease restart the game and report this error on our discord.");
|
||||
|
||||
if (this.updatedInternalName != null) {
|
||||
var extraInfoMessage = Loc.Localize("InstallerErrorPluginInfo", "\n\nThe following plugins caused these issues:\n\n{0}\nYou may try removing these plugins manually and reinstalling them.");
|
||||
var insert = this.updatedInternalName.Where(x => x.WasUpdated == false).Aggregate(string.Empty, (current, pluginUpdateStatus) => current + $"* {pluginUpdateStatus.InternalName}\n");
|
||||
extraInfoMessage = string.Format(extraInfoMessage, insert);
|
||||
message += extraInfoMessage;
|
||||
}
|
||||
|
||||
ImGui.Text(message);
|
||||
|
||||
ImGui.Spacing();
|
||||
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ namespace Dalamud.Plugin
|
|||
{
|
||||
internal class PluginRepository
|
||||
{
|
||||
private const string PluginRepoBaseUrl = "https://raw.githubusercontent.com/goatcorp/DalamudPlugins/";
|
||||
private string PluginRepoBaseUrl => "https://raw.githubusercontent.com/goatcorp/DalamudPlugins/" + (this.dalamud.Configuration.DoPluginTest ? "testing/" : "master/");
|
||||
|
||||
private readonly Dalamud dalamud;
|
||||
private string pluginDirectory;
|
||||
|
|
@ -47,7 +47,7 @@ namespace Dalamud.Plugin
|
|||
{
|
||||
using var client = new WebClient();
|
||||
|
||||
var data = client.DownloadString(PluginRepoBaseUrl + (this.dalamud.Configuration.DoPluginTest ? "testing/" : "master/") + "pluginmaster.json");
|
||||
var data = client.DownloadString(PluginRepoBaseUrl + "pluginmaster.json");
|
||||
|
||||
this.PluginMaster = JsonConvert.DeserializeObject<ReadOnlyCollection<PluginDefinition>>(data);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue