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>
</Forms.FormText>
- {!IS_WEB && <Flex className={Margins.marginBottom20} style={{ marginTop: 8 }}>
+ <Flex className={Margins.marginBottom20} style={{ marginTop: 8 }}>
<Button <Button
- onClick={() => window.DiscordNative.app.relaunch()} - onClick={() => require("../Monaco").launchMonacoEditor()}
- size={Button.Sizes.SMALL}
- color={Button.Colors.GREEN}
- >
- Reload
- </Button>
- <Button
- onClick={() => window.DiscordNative.fileManager.showItemInFolder(settingsDir)}
+ onClick={() => VencordNative.ipc.send(IpcEvents.OPEN_EXTERNAL, settingsDir)} + onClick={() => VencordNative.ipc.send(IpcEvents.OPEN_EXTERNAL, settingsDir)}
size={Button.Sizes.SMALL} size={Button.Sizes.SMALL}
disabled={settingsDirPending} disabled={settingsDir === "Loading..."}>
>
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 - Open QuickCSS File
- </Button>} + Launch Directory
+ </Flex> </Button>
) : (
<Forms.FormDivider /> <React.Fragment>
<Switch

File diff suppressed because one or more lines are too long