From 6ee920ff2c9551bb447e5e9fabd3c3ae62149bed Mon Sep 17 00:00:00 2001 From: V Date: Sat, 12 Aug 2023 03:15:21 +0200 Subject: [PATCH] Show error toast when selecting invalid venchord dir --- src/renderer/components/Settings.tsx | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/renderer/components/Settings.tsx b/src/renderer/components/Settings.tsx index c712350..b41fc98 100644 --- a/src/renderer/components/Settings.tsx +++ b/src/renderer/components/Settings.tsx @@ -7,7 +7,7 @@ import "./settings.css"; import { Margins } from "@vencord/types/utils"; -import { Button, Forms, Select, Switch, Text, useState } from "@vencord/types/webpack/common"; +import { Button, Forms, Select, Switch, Text, Toasts, useState } from "@vencord/types/webpack/common"; import { setBadge } from "renderer/appBadge"; import { useSettings } from "renderer/settings"; import { isMac, isWindows } from "renderer/utils"; @@ -169,8 +169,14 @@ export default function SettingsUi() { const choice = await VesktopNative.fileManager.selectVencordDir(); switch (choice) { case "cancelled": + return; case "invalid": - // TODO + Toasts.show({ + message: + "You did not choose a valid Vencord install. Make sure you're selecting the dist dir!", + id: Toasts.genId(), + type: Toasts.Type.FAILURE + }); return; } Settings.vencordDir = choice;