make Open Themes/Settings folder properly open the folder
This commit is contained in:
parent
2a398985cf
commit
78d3330ccf
6 changed files with 18 additions and 10 deletions
|
|
@ -28,7 +28,7 @@ import { CspBlockedUrls, useCspErrors } from "@utils/cspViolations";
|
|||
import { openInviteModal } from "@utils/discord";
|
||||
import { Margins } from "@utils/margins";
|
||||
import { classes } from "@utils/misc";
|
||||
import { relaunch, showItemInFolder } from "@utils/native";
|
||||
import { relaunch } from "@utils/native";
|
||||
import { useAwaiter, useForceUpdater } from "@utils/react";
|
||||
import { getStylusWebStoreUrl } from "@utils/web";
|
||||
import { findLazy } from "@webpack";
|
||||
|
|
@ -251,7 +251,7 @@ function ThemesTab() {
|
|||
) : (
|
||||
<QuickAction
|
||||
text="Open Themes Folder"
|
||||
action={() => showItemInFolder(themeDir!)}
|
||||
action={() => VencordNative.themes.openFolder()}
|
||||
disabled={themeDirPending}
|
||||
Icon={FolderIcon}
|
||||
/>
|
||||
|
|
|
|||
|
|
@ -26,8 +26,7 @@ import { gitRemote } from "@shared/vencordUserAgent";
|
|||
import { DONOR_ROLE_ID, VENCORD_GUILD_ID } from "@utils/constants";
|
||||
import { Margins } from "@utils/margins";
|
||||
import { identity, isPluginDev } from "@utils/misc";
|
||||
import { relaunch, showItemInFolder } from "@utils/native";
|
||||
import { useAwaiter } from "@utils/react";
|
||||
import { relaunch } from "@utils/native";
|
||||
import { Button, Forms, GuildMemberStore, React, Select, Switch, UserStore } from "@webpack/common";
|
||||
|
||||
import BadgeAPI from "../../plugins/_api/badges";
|
||||
|
|
@ -53,9 +52,6 @@ type KeysOfType<Object, Type> = {
|
|||
}[keyof Object];
|
||||
|
||||
function VencordSettings() {
|
||||
const [settingsDir, , settingsDirPending] = useAwaiter(VencordNative.settings.getSettingsDir, {
|
||||
fallbackValue: "Loading..."
|
||||
});
|
||||
const settings = useSettings();
|
||||
|
||||
const donateImage = React.useMemo(() => Math.random() > 0.5 ? DEFAULT_DONATE_IMAGE : SHIGGY_DONATE_IMAGE, []);
|
||||
|
|
@ -171,7 +167,7 @@ function VencordSettings() {
|
|||
<QuickAction
|
||||
Icon={FolderIcon}
|
||||
text="Open Settings Folder"
|
||||
action={() => showItemInFolder(settingsDir)}
|
||||
action={() => VencordNative.settings.openFolder()}
|
||||
/>
|
||||
)}
|
||||
<QuickAction
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue