diff --git a/src/equicordplugins/userpluginInstaller.dev/components/SettingsTab.tsx b/src/equicordplugins/userpluginInstaller.dev/components/SettingsTab.tsx index 3bdfc9859..0bc5a1c53 100644 --- a/src/equicordplugins/userpluginInstaller.dev/components/SettingsTab.tsx +++ b/src/equicordplugins/userpluginInstaller.dev/components/SettingsTab.tsx @@ -142,7 +142,7 @@ function UserPluginsTab() { return "Invalid URL, read the notice above"; } }} - value={url} + initialValue={url} />
@@ -251,61 +251,61 @@ function UserPluginsTab() { {Object.keys( pluginsWithUpdates, ).includes(plugin.directory!) && ( - - )} + ); + const oldPWU = + userpluginInstaller.pluginsWithUpdates.value() + .plugins; + oldPWU.splice( + oldPWU.indexOf( + plugin.directory!, + ), + 1, + ); + userpluginInstaller.pluginsWithUpdates.value( + { + finished: true, + plugins: oldPWU, + }, + ); + Alerts.show({ + title: "Done!", + body: `${plugin.name} has been updated. A ${plugin.usesNative ? "restart" : "refresh"} is needed to apply the update.`, + confirmText: + plugin.usesNative + ? "Restart" + : "Refresh", + cancelText: "Later", + onConfirm() { + plugin.usesNative + ? relaunch() + : window.location.reload(); + }, + }); + } catch (e: any) { + if ( + e + .toString() + .includes( + "silentStop", + ) + ) + return; + Alerts.show({ + title: "Update error", + body: e.toString(), + }); + } + }} + > + Update + + )}