Fix broken Value

This commit is contained in:
thororen1234 2026-04-16 12:58:48 -04:00
parent 1d4fcf2bb5
commit 735dc9e5f2
No known key found for this signature in database

View file

@ -142,7 +142,7 @@ function UserPluginsTab() {
return "Invalid URL, read the notice above";
}
}}
value={url}
initialValue={url}
/>
</div>
<div className={cl("button-container")}>
@ -251,61 +251,61 @@ function UserPluginsTab() {
{Object.keys(
pluginsWithUpdates,
).includes(plugin.directory!) && (
<Button
size="small"
onClick={async () => {
try {
await Native.updatePlugin(
plugin.directory!,
);
const oldPWU =
userpluginInstaller.pluginsWithUpdates.value()
.plugins;
oldPWU.splice(
oldPWU.indexOf(
<Button
size="small"
onClick={async () => {
try {
await Native.updatePlugin(
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
</Button>
)}
);
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
</Button>
)}
<Button
variant="secondary"
size="small"