diff --git a/src/plugins/statusPresets/index.tsx b/src/plugins/statusPresets/index.tsx
index 4dfcaaf73..8763c1b92 100644
--- a/src/plugins/statusPresets/index.tsx
+++ b/src/plugins/statusPresets/index.tsx
@@ -16,13 +16,16 @@
* along with this program. If not, see .
*/
+import "./style.css";
+
import { definePluginSettings } from "@api/Settings";
import { getUserSettingLazy } from "@api/UserSettings";
import ErrorBoundary from "@components/ErrorBoundary";
import { Devs } from "@utils/constants";
+import { classes } from "@utils/misc";
import definePlugin, { OptionType, StartAt } from "@utils/types";
import { findByCodeLazy, findByPropsLazy, findComponentByCodeLazy } from "@webpack";
-import { Button, Clickable, Icons, Menu, Toasts, useState } from "@webpack/common";
+import { Button, Clickable, Icons, Menu, Toasts, UserStore, useState } from "@webpack/common";
const settings = definePluginSettings({
StatusPresets: {
@@ -62,7 +65,7 @@ function StatusIcon({ isHovering, status }: { isHovering: boolean; status: Disco
: (status.emojiInfo != null ? :
)};
}
-const RenderStatusMenuItem = ({ status, forceRerender }: { status: DiscordStatus; forceRerender: () => void; }) => {
+const RenderStatusMenuItem = ({ status, forceRerender, disabled }: { status: DiscordStatus; forceRerender: () => void; disabled: boolean; }) => {
const [isHovering, setIsHovering] = useState(false);
const handleMouseOver = () => {
setIsHovering(true);
@@ -72,11 +75,7 @@ const RenderStatusMenuItem = ({ status, forceRerender }: { status: DiscordStatus
setIsHovering(false);
};
- return ;
@@ -102,8 +96,12 @@ const StatusSubMenuComponent = () => {
{Object.entries((settings.store.StatusPresets as { [k: string]: DiscordStatus; })).map(([index, status]) => setStatus(status.text, status.emojiInfo, status.clearAfter, { "location": { "section": "Account Panel", "object": "Avatar" } })}
- render={() => }
+ action={() => (status.emojiInfo?.id != null && UserStore.getCurrentUser().hasPremiumPerks || status.emojiInfo?.id == null) && setStatus(status.text, status.emojiInfo, status.clearAfter, { "location": { "section": "Account Panel", "object": "Avatar" } })}
+ render={() => }
/>)}
;
};
diff --git a/src/plugins/statusPresets/style.css b/src/plugins/statusPresets/style.css
new file mode 100644
index 000000000..41bfb38da
--- /dev/null
+++ b/src/plugins/statusPresets/style.css
@@ -0,0 +1,8 @@
+.vc-sp-disabled {
+ opacity: 0.5;
+}
+
+.vc-sp-item:hover {
+ background-color: var(--menu-item-default-hover-bg) !important;
+ color: var(--white) !important;
+}