From ab7547e698f8d444e8b5e41bfe7a7d704b77d781 Mon Sep 17 00:00:00 2001 From: thororen1234 <78185467+thororen1234@users.noreply.github.com> Date: Sun, 7 Jul 2024 00:34:27 -0400 Subject: [PATCH] Updates --- src/components/ThemeSettings/ThemesTab.tsx | 9 ++++++--- tsconfig.json | 3 +++ 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/src/components/ThemeSettings/ThemesTab.tsx b/src/components/ThemeSettings/ThemesTab.tsx index f558aaf6..c26d174d 100644 --- a/src/components/ThemeSettings/ThemesTab.tsx +++ b/src/components/ThemeSettings/ThemesTab.tsx @@ -27,6 +27,7 @@ import { openPluginModal } from "@components/PluginSettings/PluginModal"; import { AddonCard } from "@components/VencordSettings/AddonCard"; import { QuickAction, QuickActionCard } from "@components/VencordSettings/quickActions"; import { SettingsTab, wrapTab } from "@components/VencordSettings/shared"; +import { isPluginEnabled } from "@plugins"; import { openInviteModal } from "@utils/discord"; import { openModal } from "@utils/modal"; import { showItemInFolder } from "@utils/native"; @@ -39,6 +40,8 @@ import { Button, Card, Forms, React, showToast, TabBar, TextInput, Tooltip, useE import type { ComponentType, Ref, SyntheticEvent } from "react"; import type { UserstyleHeader } from "usercss-meta"; +import Plugins from "~plugins"; + import { UserCSSSettingsModal } from "./UserCSSModal"; type FileInput = ComponentType<{ @@ -96,7 +99,7 @@ interface UserCSSCardProps { function UserCSSThemeCard({ theme, enabled, onChange, onDelete, onSettingsReset }: UserCSSCardProps) { const missingPlugins = useMemo(() => - theme.requiredPlugins?.filter(p => !Vencord.Plugins.isPluginEnabled(p)), [theme]); + theme.requiredPlugins?.filter(p => !isPluginEnabled(p)), [theme]); return ( - {Vencord.Settings.plugins.ClientTheme.enabled && ( + {Settings.plugins.ClientTheme.enabled && ( openPluginModal(Vencord.Plugins.plugins.ClientTheme)} + action={() => openPluginModal(Plugins.ClientTheme)} Icon={PencilIcon} /> )} diff --git a/tsconfig.json b/tsconfig.json index 9f7f0e82..21c27fd6 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -43,6 +43,9 @@ ], "@webpack": [ "./webpack/webpack" + ], + "@plugins": [ + "./plugins" ] }, "plugins": [