- {plugins
- .toSorted((a, b) =>
- a.name.localeCompare(b.name, "en", {
- sensitivity: "base",
- }),
- )
- .toSorted((a, b) => {
- const updatePendingNames =
- Object.keys(pluginsWithUpdates);
- const [aa, bb] = [
- updatePendingNames.includes(a.directory!)
- ? 1000
- : 0,
- updatePendingNames.includes(b.directory!)
- ? 1000
- : 0,
- ];
- return bb - aa;
- })
- .map(plugin => {
-
- const pl = Vencord.Plugins.plugins[
- plugin.name
- ];
- return
{
- await Native.rmPlugin(
- plugin.directory!,
- );
- Alerts.show({
- title: "Done!",
- body: `${plugin.name} has been uninstalled. A ${plugin.usesNative ? "restart" : "refresh"} is needed to fully remove the plugin.`,
- confirmText:
- plugin.usesNative
- ? "Restart"
- : "Refresh",
- cancelText: "Later",
- onConfirm() {
- plugin.usesNative
- ? relaunch()
- : window.location.reload();
- },
- });
- }}
- className={cl("delete-button")}
- >
-
- }
- setEnabled={t => {
- Vencord.Settings.plugins[pl.name].enabled = t;
- if (pluginRequiresRestart(pl)) {
- Toasts.show({
- id: Toasts.genId(),
- message: "Restart to apply changes!",
- type: Toasts.Type.MESSAGE
- });
- } else {
- (t ? startPlugin : stopPlugin)(pl);
- }
- }}
- footer={(
-
- {Object.keys(
- pluginsWithUpdates,
- ).includes(plugin.directory!) && (
-
- )}
-
- {plugin.supportChannelID && }
-
- )}
- />;
- })}
-