remove virus
This commit is contained in:
parent
ec4e8ff39a
commit
39750cb2b5
6 changed files with 253 additions and 318 deletions
23
index.tsx
23
index.tsx
|
@ -8,7 +8,6 @@ import "./style.css";
|
|||
|
||||
import { Devs } from "@utils/constants";
|
||||
import definePlugin, { PluginNative } from "@utils/types";
|
||||
import { Alerts, TextInput } from "@webpack/common";
|
||||
|
||||
import UserpluginInstallButton from "./UserpluginInstallButton";
|
||||
|
||||
|
@ -23,27 +22,7 @@ export default definePlugin({
|
|||
name: "UserpluginInstaller",
|
||||
description: "Install userplugins with a simple button click",
|
||||
authors: [Devs.nin0dev],
|
||||
renderMessageAccessory: (props) => {
|
||||
renderMessageAccessory: props => {
|
||||
return <UserpluginInstallButton props={props} />;
|
||||
},
|
||||
toolboxActions: {
|
||||
"Install Plugin": () => {
|
||||
let gitUrl = "";
|
||||
Alerts.show({
|
||||
title: "Install plugin",
|
||||
body: <>
|
||||
<TextInput onChange={v => { gitUrl = v; }} placeholder="Git link (https://github.com/...)" />
|
||||
</>,
|
||||
confirmText: "Install",
|
||||
async onConfirm() {
|
||||
const gitLink = gitUrl.match(CLONE_LINK_REGEX)!;
|
||||
await Native.initPluginInstall(gitLink[0], gitLink[1], gitLink[2], gitLink[3]);
|
||||
window.location.reload();
|
||||
}
|
||||
});
|
||||
},
|
||||
"Uninstall Plugin": () => {
|
||||
|
||||
}
|
||||
}
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue