update vencord

This commit is contained in:
Malte Jürgens 2023-02-18 15:46:56 +01:00
parent 906deee580
commit 700d576ff8
No known key found for this signature in database
GPG Key ID: D29FBD5F93C0CFC3
2 changed files with 415 additions and 69 deletions

View File

@ -1,46 +1,15 @@
diff --git a/src/components/Settings.tsx b/src/components/Settings.tsx --- a/src/components/VencordSettings/VencordTab.tsx
index 8ffe111..8f037bd 100644 +++ b/src/components/VencordSettings/VencordTab.tsx
--- a/src/components/Settings.tsx @@ -87,10 +87,10 @@ function VencordSettings() {
+++ b/src/components/Settings.tsx <Card className={cl("quick-actions-card")}>
@@ -61,37 +61,22 @@ export default ErrorBoundary.wrap(function Settings() { {IS_WEB ? (
Settings Directory: <code style={{ userSelect: "text", cursor: "text" }}>{settingsDir}</code> <Button
</Forms.FormText> - onClick={() => require("../Monaco").launchMonacoEditor()}
+ onClick={() => VencordNative.ipc.send(IpcEvents.OPEN_EXTERNAL, settingsDir)}
- {!IS_WEB && <Flex className={Margins.marginBottom20} style={{ marginTop: 8 }}> size={Button.Sizes.SMALL}
+ <Flex className={Margins.marginBottom20} style={{ marginTop: 8 }}> disabled={settingsDir === "Loading..."}>
<Button - Open QuickCSS File
- onClick={() => window.DiscordNative.app.relaunch()} + Launch Directory
- size={Button.Sizes.SMALL} </Button>
- color={Button.Colors.GREEN} ) : (
- > <React.Fragment>
- Reload
- </Button>
- <Button
- onClick={() => window.DiscordNative.fileManager.showItemInFolder(settingsDir)}
+ onClick={() => VencordNative.ipc.send(IpcEvents.OPEN_EXTERNAL, settingsDir)}
size={Button.Sizes.SMALL}
disabled={settingsDirPending}
>
Launch Directory
</Button>
<Button
- onClick={() => VencordNative.ipc.invoke(IpcEvents.OPEN_MONACO_EDITOR)}
+ onClick={() => VencordNative.ipc.send(IpcEvents.OPEN_EXTERNAL, settingsDir + "/quickCss.css")}
size={Button.Sizes.SMALL}
disabled={settingsDir === "Loading..."}
>
Open QuickCSS File
</Button>
- </Flex>}
-
- {IS_WEB && <Button
- onClick={launchMonacoEditor}
- size={Button.Sizes.SMALL}
- disabled={settingsDir === "Loading..."}
- >
- Open QuickCSS File
- </Button>}
+ </Flex>
<Forms.FormDivider />
<Switch

File diff suppressed because one or more lines are too long