aboutsummaryrefslogtreecommitdiff
path: root/src/components
diff options
context:
space:
mode:
authorV <vendicated@riseup.net>2023-04-04 01:16:29 +0200
committerGitHub <noreply@github.com>2023-04-04 01:16:29 +0200
commit6b26c12bfa1f28d40834478b50d2f7b09c9f54fb (patch)
tree48687349f9bf6803ee8993b3eafa3ea1e4f3dff2 /src/components
parent5bb08bdb6465eebc9dcf80ba2971d894b804abb8 (diff)
downloadVencord-6b26c12bfa1f28d40834478b50d2f7b09c9f54fb.tar.gz
Vencord-6b26c12bfa1f28d40834478b50d2f7b09c9f54fb.tar.bz2
Vencord-6b26c12bfa1f28d40834478b50d2f7b09c9f54fb.zip
Add additional build flavours for Vencord Desktop (#765)
Diffstat (limited to 'src/components')
-rw-r--r--src/components/VencordSettings/Updater.tsx3
-rw-r--r--src/components/VencordSettings/VencordTab.tsx4
2 files changed, 5 insertions, 2 deletions
diff --git a/src/components/VencordSettings/Updater.tsx b/src/components/VencordSettings/Updater.tsx
index 3c3eb91..15a8c87 100644
--- a/src/components/VencordSettings/Updater.tsx
+++ b/src/components/VencordSettings/Updater.tsx
@@ -24,6 +24,7 @@ import { handleComponentFailed } from "@components/handleComponentFailed";
import { Link } from "@components/Link";
import { Margins } from "@utils/margins";
import { classes, useAwaiter } from "@utils/misc";
+import { relaunch } from "@utils/native";
import { changes, checkForUpdates, getRepo, isNewer, rebuild, update, updateError, UpdateLogger } from "@utils/updater";
import { Alerts, Button, Card, Forms, Parser, React, Switch, Toasts } from "@webpack/common";
@@ -133,7 +134,7 @@ function Updatable(props: CommonProps) {
cancelText: "Not now!",
onConfirm() {
if (needFullRestart)
- window.DiscordNative.app.relaunch();
+ relaunch();
else
location.reload();
r();
diff --git a/src/components/VencordSettings/VencordTab.tsx b/src/components/VencordSettings/VencordTab.tsx
index 7113421..8b86968 100644
--- a/src/components/VencordSettings/VencordTab.tsx
+++ b/src/components/VencordSettings/VencordTab.tsx
@@ -26,6 +26,7 @@ import { ErrorCard } from "@components/ErrorCard";
import IpcEvents from "@utils/IpcEvents";
import { Margins } from "@utils/margins";
import { identity, useAwaiter } from "@utils/misc";
+import { relaunch } from "@utils/native";
import { Button, Card, Forms, React, Select, Slider, Switch } from "@webpack/common";
const cl = classNameFactory("vc-settings-");
@@ -100,7 +101,7 @@ function VencordSettings() {
) : (
<React.Fragment>
<Button
- onClick={() => window.DiscordNative.app.relaunch()}
+ onClick={relaunch}
size={Button.Sizes.SMALL}>
Restart Client
</Button>
@@ -111,6 +112,7 @@ function VencordSettings() {
Open QuickCSS File
</Button>
<Button
+ // FIXME: Vencord Desktop support
onClick={() => window.DiscordNative.fileManager.showItemInFolder(settingsDir)}
size={Button.Sizes.SMALL}
disabled={settingsDirPending}>