From 837d1fc08334f569da8fe332ee72ef8c8560d9ef Mon Sep 17 00:00:00 2001 From: TheKodeToad Date: Tue, 26 Sep 2023 20:47:12 +0100 Subject: [PATCH] web: fix themes tab (#1756) --- src/components/Icons.tsx | 19 +++++++++++++++++++ src/components/VencordSettings/ThemesTab.tsx | 4 ++-- .../reviewDB/components/MessageButton.tsx | 13 +++++++------ src/plugins/textReplace/index.tsx | 8 +++----- 4 files changed, 31 insertions(+), 13 deletions(-) diff --git a/src/components/Icons.tsx b/src/components/Icons.tsx index 26364fc9..93b1323e 100644 --- a/src/components/Icons.tsx +++ b/src/components/Icons.tsx @@ -236,3 +236,22 @@ export function ReplyIcon(props: IconProps) { ); } + +export function DeleteIcon(props: IconProps) { + return ( + + + + + ); +} diff --git a/src/components/VencordSettings/ThemesTab.tsx b/src/components/VencordSettings/ThemesTab.tsx index 37d06c7c..573f3b9f 100644 --- a/src/components/VencordSettings/ThemesTab.tsx +++ b/src/components/VencordSettings/ThemesTab.tsx @@ -20,6 +20,7 @@ import { useSettings } from "@api/Settings"; import { classNameFactory } from "@api/Styles"; import { ErrorCard } from "@components/ErrorCard"; import { Flex } from "@components/Flex"; +import { DeleteIcon } from "@components/Icons"; import { Link } from "@components/Link"; import { IsFirefox } from "@utils/constants"; import { Margins } from "@utils/margins"; @@ -42,7 +43,6 @@ type FileInput = ComponentType<{ }>; const InviteActions = findByPropsLazy("resolveInvite"); -const TrashIcon = findByCodeLazy("M5 6.99902V18.999C5 20.101 5.897 20.999"); const FileInput: FileInput = findByCodeLazy("activateUploadDialogue="); const TextAreaProps = findLazy(m => typeof m.textarea === "string"); @@ -114,7 +114,7 @@ function ThemeCard({ theme, enabled, onChange, onDelete }: ThemeCardProps) { infoButton={ IS_WEB && (
- +
) } diff --git a/src/plugins/reviewDB/components/MessageButton.tsx b/src/plugins/reviewDB/components/MessageButton.tsx index 176f4d62..965fd1c1 100644 --- a/src/plugins/reviewDB/components/MessageButton.tsx +++ b/src/plugins/reviewDB/components/MessageButton.tsx @@ -16,6 +16,7 @@ * along with this program. If not, see . */ +import { DeleteIcon } from "@components/Icons"; import { classes } from "@utils/misc"; import { findByPropsLazy } from "@webpack"; import { Tooltip } from "@webpack/common"; @@ -31,10 +32,7 @@ export function DeleteButton({ onClick }: { onClick(): void; }) { className={classes(iconClasses.button, iconClasses.dangerous)} onClick={onClick} > - - - - + )} @@ -50,8 +48,11 @@ export function ReportButton({ onClick }: { onClick(): void; }) { className={iconClasses.button} onClick={onClick} > - - + + )} diff --git a/src/plugins/textReplace/index.tsx b/src/plugins/textReplace/index.tsx index 45fb6f9b..5d66d226 100644 --- a/src/plugins/textReplace/index.tsx +++ b/src/plugins/textReplace/index.tsx @@ -20,6 +20,7 @@ import { DataStore } from "@api/index"; import { addPreSendListener, removePreSendListener } from "@api/MessageEvents"; import { definePluginSettings } from "@api/Settings"; import { Flex } from "@components/Flex"; +import { DeleteIcon } from "@components/Icons"; import { Devs } from "@utils/constants"; import { Logger } from "@utils/Logger"; import { useForceUpdater } from "@utils/react"; @@ -173,6 +174,7 @@ function TextReplace({ title, rulesArray, rulesKey, update }: TextReplaceProps) onClick={() => onClickRemove(index)} style={{ background: "none", + color: "var(--status-danger)", ...(index === rulesArray.length - 1 ? { visibility: "hidden", @@ -182,11 +184,7 @@ function TextReplace({ title, rulesArray, rulesKey, update }: TextReplaceProps) ) }} > - - Delete Rule - - - + {isRegexRules && renderFindError(rule.find)}