diff --git a/src/components/ThemeSettings/components/SettingBooleanComponent.tsx b/src/components/ThemeSettings/components/SettingBooleanComponent.tsx index 6b49ae43a..111aae073 100644 --- a/src/components/ThemeSettings/components/SettingBooleanComponent.tsx +++ b/src/components/ThemeSettings/components/SettingBooleanComponent.tsx @@ -4,7 +4,11 @@ * SPDX-License-Identifier: GPL-3.0-or-later */ -import { Forms, Switch } from "@webpack/common"; +import "./styles.css"; + +import { classNameFactory } from "@api/Styles"; +import { FormSwitch } from "@components/FormSwitch"; +import { Forms } from "@webpack/common"; interface Props { label: string; @@ -12,6 +16,8 @@ interface Props { themeSettings: Record; } +const cl = classNameFactory("vc-settings-boolean-"); + export function SettingBooleanComponent({ label, name, themeSettings }: Props) { function handleChange(value: boolean) { const corrected = value ? "1" : "0"; @@ -21,15 +27,14 @@ export function SettingBooleanComponent({ label, name, themeSettings }: Props) { return ( - - {label} - + /> ); } diff --git a/src/components/ThemeSettings/components/styles.css b/src/components/ThemeSettings/components/styles.css new file mode 100644 index 000000000..422bcd940 --- /dev/null +++ b/src/components/ThemeSettings/components/styles.css @@ -0,0 +1,3 @@ +.vc-settings-boolean-switch { + margin-bottom: 0.5em; +} \ No newline at end of file diff --git a/src/components/settings/OnlineThemeCard.tsx b/src/components/settings/OnlineThemeCard.tsx index fce5d3cc9..19d761a50 100644 --- a/src/components/settings/OnlineThemeCard.tsx +++ b/src/components/settings/OnlineThemeCard.tsx @@ -19,8 +19,8 @@ import "./AddonCard.css"; import { classNameFactory } from "@api/Styles"; +import { Switch } from "@components/settings"; import { AddonBadge } from "@components/settings/PluginBadge"; -import { Switch } from "@components/settings/Switch"; import { Text, useRef } from "@webpack/common"; import type { MouseEventHandler, ReactNode } from "react"; diff --git a/src/components/settings/tabs/vencord/NotificationSettings.tsx b/src/components/settings/tabs/vencord/NotificationSettings.tsx index 65057c6d1..2ebd729fc 100644 --- a/src/components/settings/tabs/vencord/NotificationSettings.tsx +++ b/src/components/settings/tabs/vencord/NotificationSettings.tsx @@ -8,10 +8,11 @@ import { openNotificationLogModal } from "@api/Notifications/notificationLog"; import { useSettings } from "@api/Settings"; import { ErrorCard } from "@components/ErrorCard"; import { Flex } from "@components/Flex"; +import { FormSwitch } from "@components/FormSwitch"; import { Margins } from "@utils/margins"; import { identity } from "@utils/misc"; import { ModalCloseButton, ModalContent, ModalHeader, ModalRoot, ModalSize, openModal } from "@utils/modal"; -import { Button, Forms, Select, Slider, Switch, Text } from "@webpack/common"; +import { Button, Forms, Select, Slider, Text } from "@webpack/common"; export function NotificationSection() { return ( @@ -89,12 +90,11 @@ function NotificationSettings() { /> Missed Notification Count - settings.missed = v} - > - When refocusing discord a notification will popup with how you missed - + /> Notification Timeout Set to 0s to never automatically time out diff --git a/src/equicordplugins/chatButtonsPlus/index.tsx b/src/equicordplugins/chatButtonsPlus/index.tsx index 2366a1450..2ec188ea1 100644 --- a/src/equicordplugins/chatButtonsPlus/index.tsx +++ b/src/equicordplugins/chatButtonsPlus/index.tsx @@ -9,11 +9,12 @@ import "./styles.css"; import { ChatBarButton } from "@api/ChatButtons"; import { DataStore } from "@api/index"; import { definePluginSettings, migratePluginSettings, Settings } from "@api/Settings"; +import { FormSwitch } from "@components/FormSwitch"; import { EquicordDevs } from "@utils/constants"; import { getCurrentChannel, sendMessage } from "@utils/discord"; import { useForceUpdater } from "@utils/react"; import definePlugin, { OptionType } from "@utils/types"; -import { Button, Forms, React, Switch, TextInput } from "@webpack/common"; +import { Button, Forms, React, TextInput } from "@webpack/common"; type ButtonEntry = { id: string; @@ -181,13 +182,12 @@ function ButtonEntries() {
Button {i + 1}
- setEnabled(entry.id, value)} className="chatButtonsPlus-toggle" - > - Enabled - + /> - { setIgnoreCase(i, !values[i].ignoreCase); }} - style={{ marginTop: "0.5em", marginRight: "40px" }} - > - Ignore Case - + /> Whitelist/Blacklist
diff --git a/src/equicordplugins/keywordNotify/style.css b/src/equicordplugins/keywordNotify/style.css index 95fc9da84..68727ee4f 100644 --- a/src/equicordplugins/keywordNotify/style.css +++ b/src/equicordplugins/keywordNotify/style.css @@ -14,3 +14,8 @@ padding: 8px; cursor: pointer; } + +.vc-keywordnotify-switch { + margin-top: 0.5em; + margin-right: 40px; +} \ No newline at end of file diff --git a/src/equicordplugins/moreUserTags/settings.tsx b/src/equicordplugins/moreUserTags/settings.tsx index 83577daeb..81e044a8d 100644 --- a/src/equicordplugins/moreUserTags/settings.tsx +++ b/src/equicordplugins/moreUserTags/settings.tsx @@ -5,9 +5,10 @@ */ import { definePluginSettings } from "@api/Settings"; +import { FormSwitch } from "@components/FormSwitch"; import { Margins } from "@utils/margins"; import { OptionType } from "@utils/types"; -import { Card, Flex, Forms, Switch, TextInput, Tooltip } from "@webpack/common"; +import { Card, Flex, Forms, TextInput, Tooltip } from "@webpack/common"; import { Tag, tags } from "./consts"; import { TagSettings } from "./types"; @@ -68,21 +69,19 @@ function SettingsComponent() { className={Margins.bottom16} /> - tagSettings[t.name].showInChat = v} hideBorder - > - Show in messages - + /> - tagSettings[t.name].showInNotChat = v} hideBorder - > - Show in member list and profiles - + /> ))}
diff --git a/src/equicordplugins/quoter/index.tsx b/src/equicordplugins/quoter/index.tsx index d82b9d04d..929a57bc7 100644 --- a/src/equicordplugins/quoter/index.tsx +++ b/src/equicordplugins/quoter/index.tsx @@ -6,12 +6,13 @@ import { findGroupChildrenByChildId } from "@api/ContextMenu"; import { definePluginSettings } from "@api/Settings"; +import { FormSwitch } from "@components/FormSwitch"; import { Devs } from "@utils/constants"; import { getCurrentChannel } from "@utils/discord"; import { ModalCloseButton, ModalContent, ModalHeader, ModalProps, ModalRoot, ModalSize, openModal } from "@utils/modal"; import definePlugin, { OptionType } from "@utils/types"; import { Message } from "@vencord/discord-types"; -import { Button, Menu, Select, Switch, Text, UploadHandler, useEffect, useState } from "@webpack/common"; +import { Button, Menu, Select, Text, UploadHandler, useEffect, useState } from "@webpack/common"; import { QuoteIcon } from "./components"; import { canvasToBlob, fetchImageAsBlob, FixUpQuote, wrapText } from "./utils"; @@ -219,7 +220,7 @@ function QuoteModal({ message, ...props }: ModalProps & { message: Message; }) {



- Grayscale +