diff options
Diffstat (limited to 'src/components/VencordSettings')
-rw-r--r-- | src/components/VencordSettings/Updater.tsx | 3 | ||||
-rw-r--r-- | src/components/VencordSettings/VencordTab.tsx | 4 |
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}> |