From 53cdd8ae68197626fcfa09933bd89c00e8783fa7 Mon Sep 17 00:00:00 2001 From: sadan <117494111+sadan4@users.noreply.github.com> Date: Thu, 22 Jan 2026 19:12:36 -0500 Subject: [PATCH] remove ButtonWrapperClasses --- packages/discord-types/src/classes.d.ts | 16 --------------- src/api/ChatButton.css | 26 +++++++++++++++++++++++++ src/api/ChatButtons.tsx | 11 +++++++---- src/webpack/common/classes.ts | 22 --------------------- src/webpack/common/index.ts | 1 - 5 files changed, 33 insertions(+), 43 deletions(-) delete mode 100644 packages/discord-types/src/classes.d.ts delete mode 100644 src/webpack/common/classes.ts diff --git a/packages/discord-types/src/classes.d.ts b/packages/discord-types/src/classes.d.ts deleted file mode 100644 index a7260048d..000000000 --- a/packages/discord-types/src/classes.d.ts +++ /dev/null @@ -1,16 +0,0 @@ -export interface ButtonWrapperClasses { - hoverScale: string; - buttonWrapper: string; - button: string; - iconMask: string; - buttonContent: string; - icon: string; - pulseIcon: string; - pulseButton: string; - notificationDot: string; - sparkleContainer: string; - sparkleStar: string; - sparklePlus: string; - sparkle: string; - active: string; -} diff --git a/src/api/ChatButton.css b/src/api/ChatButton.css index 30869a846..d6f0c712c 100644 --- a/src/api/ChatButton.css +++ b/src/api/ChatButton.css @@ -2,3 +2,29 @@ display: flex; align-items: center; } + +/* FIXME: bad name +_7f7a2c5f23327d73 */ +.vc-chatbar-discord-button { + opacity: .7; + align-items: center; + align-self: center; + border-radius: 8px; + cursor: pointer; + display: flex; + justify-content: center; + padding: 10px; + + &:hover { + background: hsl(0deg 0% 100% / 10%); + opacity: 1 + } +} + +/* _3f4f204c3133fb93 */ +.vc-chatbar-button-wrapper { + align-self: center; + display: flex; + flex-direction: row; + gap: 8px; +} \ No newline at end of file diff --git a/src/api/ChatButtons.tsx b/src/api/ChatButtons.tsx index c2a1a1982..ce1292318 100644 --- a/src/api/ChatButtons.tsx +++ b/src/api/ChatButtons.tsx @@ -7,17 +7,20 @@ import "./ChatButton.css"; import ErrorBoundary from "@components/ErrorBoundary"; +import { classNameFactory } from "@utils/css"; import { Logger } from "@utils/Logger"; import { classes } from "@utils/misc"; import { IconComponent } from "@utils/types"; import { Channel } from "@vencord/discord-types"; import { waitFor } from "@webpack"; -import { ButtonWrapperClasses, Clickable, Menu, Tooltip } from "@webpack/common"; +import { Clickable, Menu, Tooltip } from "@webpack/common"; import { HTMLProps, JSX, MouseEventHandler, ReactNode } from "react"; import { addContextMenuPatch, findGroupChildrenByChildId } from "./ContextMenu"; import { useSettings } from "./Settings"; +const cl = classNameFactory("vc-chatbar-"); + let ChannelTextAreaClasses: Record<"button" | "buttonContainer", string>; waitFor(["buttonContainer", "channelTextArea"], m => ChannelTextAreaClasses = m); @@ -140,18 +143,18 @@ export const ChatBarButton = ErrorBoundary.wrap((props: ChatBarButtonProps) => { return ( {({ onMouseEnter, onMouseLeave }) => ( -
+
-
+
{props.children}
diff --git a/src/webpack/common/classes.ts b/src/webpack/common/classes.ts deleted file mode 100644 index daaf023c7..000000000 --- a/src/webpack/common/classes.ts +++ /dev/null @@ -1,22 +0,0 @@ -/* - * Vencord, a modification for Discord's desktop app - * Copyright (c) 2023 Vendicated and contributors - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . -*/ - -import * as t from "@vencord/discord-types"; -import { findByPropsLazy } from "@webpack"; - -export const ButtonWrapperClasses: t.ButtonWrapperClasses = findByPropsLazy("buttonWrapper", "buttonContent"); diff --git a/src/webpack/common/index.ts b/src/webpack/common/index.ts index 80223b9ad..f75507e9e 100644 --- a/src/webpack/common/index.ts +++ b/src/webpack/common/index.ts @@ -16,7 +16,6 @@ * along with this program. If not, see . */ -export * from "./classes"; export * from "./components"; export * from "./menu"; export * from "./react";