From 7fb04403c6b555b0a5a50e5fcd65a57b055ac831 Mon Sep 17 00:00:00 2001 From: thororen <78185467+thororen1234@users.noreply.github.com> Date: Thu, 27 Aug 2026 10:39:17 -0400 Subject: [PATCH] Drop Soggy & Fix Broken Icons --- src/components/Icons.tsx | 55 ++++++ .../betterForwards/components.tsx | 4 +- src/equicordplugins/soggy/index.tsx | 167 ------------------ src/equicordplugins/streaks/index.tsx | 6 +- 4 files changed, 59 insertions(+), 173 deletions(-) delete mode 100644 src/equicordplugins/soggy/index.tsx diff --git a/src/components/Icons.tsx b/src/components/Icons.tsx index 3352ff1de..519d8ae53 100644 --- a/src/components/Icons.tsx +++ b/src/components/Icons.tsx @@ -28,6 +28,15 @@ interface BaseIconProps extends IconProps { type IconProps = JSX.IntrinsicElements["svg"]; +export const DiscordIconSizes = { + xxs: 12, + xs: 16, + sm: 18, + md: 24, + lg: 32, + refresh_sm: 20 +} as const; + function Icon({ height = 24, width = 24, className, children, viewBox, ...svgProps }: PropsWithChildren) { return ( ); } + +export function AtIcon(props: IconProps) { + return ( + + + + ); +} + +export function TextIcon(props: IconProps) { + return ( + + + + ); +} + +export function FireIcon(props: IconProps) { + return ( + + + + ); +} diff --git a/src/equicordplugins/betterForwards/components.tsx b/src/equicordplugins/betterForwards/components.tsx index 95e6b969f..753084d00 100644 --- a/src/equicordplugins/betterForwards/components.tsx +++ b/src/equicordplugins/betterForwards/components.tsx @@ -6,7 +6,7 @@ import { BaseText } from "@components/BaseText"; import { Flex, FlexProps } from "@components/Flex"; -import { RightArrow } from "@components/Icons"; +import { AtIcon, RightArrow, TextIcon } from "@components/Icons"; import { iconsModule } from "@equicordplugins/_core/concatenatedModules"; import { getGuildAcronym, getIntlMessage } from "@utils/discord"; import { getUserAvatarUrl } from "@utils/misc"; @@ -114,7 +114,7 @@ export function ChannelName({ guildId, channelId, messageId }: { guildId?: strin ); } - const Icon = (channel && getChannelIcon(channel)) ?? (guildId ? iconsModule.TextIcon : iconsModule.AtIcon); + const Icon = (channel && getChannelIcon(channel)) ?? (guildId ? TextIcon : AtIcon); return ; }, [channel, guildId, name]); diff --git a/src/equicordplugins/soggy/index.tsx b/src/equicordplugins/soggy/index.tsx deleted file mode 100644 index c47670d55..000000000 --- a/src/equicordplugins/soggy/index.tsx +++ /dev/null @@ -1,167 +0,0 @@ -/* - * Vencord, a Discord client mod - * Copyright (c) 2025 Vendicated and contributors - * SPDX-License-Identifier: GPL-3.0-or-later - */ - -import { AudioPlayerInterface, createAudioPlayer } from "@api/AudioPlayer"; -import { HeaderBarButton } from "@api/HeaderBar"; -import { definePluginSettings } from "@api/Settings"; -import { EquicordDevs } from "@utils/constants"; -import definePlugin, { OptionType } from "@utils/types"; -import { RenderModalProps } from "@vencord/discord-types"; -import { Modal,openModal, React } from "@webpack/common"; -let boopSound: AudioPlayerInterface; -let song: AudioPlayerInterface; - -function assignSong(url: string, volume: number) { - song?.delete(); - song = createAudioPlayer(url, { volume, preload: true, persistent: true }); - song.load(); -} - -function assignBoop(url: string, volume: number) { - boopSound?.delete(); - boopSound = createAudioPlayer(url, { volume, preload: true, persistent: true }); - boopSound.load(); -} - -function SoggyModal(props: RenderModalProps) { - if (settings.store.songVolume !== 0) { - React.useEffect(() => { - song?.loop(); - - return () => { - song?.stop(); - }; - }, []); - } - - const boop = (e: React.MouseEvent) => { - const { offsetX, offsetY } = e.nativeEvent; - - const region = { x: 155, y: 220, width: 70, height: 70 }; - - if ( - settings.store.boopVolume !== 0 && - offsetX >= region.x && - offsetX <= region.x + region.width && - offsetY >= region.y && - offsetY <= region.y + region.height - ) { - boopSound?.play(); - } - }; - - return ( - - - - ); -} - -function buildSoggyModal(): any { - openModal(props => ); -} - -function SoggyButton() { - return ( - ( - - )} - onClick={() => buildSoggyModal()} - selected={false} - /> - ); -} - -const settings = definePluginSettings({ - songVolume: { - description: "Volume of the song. 0 to disable", - type: OptionType.SLIDER, - default: 0.25, - markers: [0, 0.25, 0.5, 0.75, 1], - stickToMarkers: false, - - }, - boopVolume: { - description: "Volume of the boop sound", - type: OptionType.SLIDER, - default: 0.2, - markers: [0, 0.25, 0.5, 0.75, 1], - stickToMarkers: false, - }, - tooltipText: { - description: "The text shown when hovering over the button", - type: OptionType.STRING, - default: "the soggy", - }, - imageLink: { - description: "URL for the image (button and modal)", - type: OptionType.STRING, - default: "https://equicord.org/assets/plugins/soggy/cat.png", - }, - songLink: { - description: "URL for the song to play", - type: OptionType.STRING, - default: "https://github.com/Equicord/Equibored/raw/main/sounds/soggy/song.mp3?raw=true", - onChange(newValue) { - assignSong(newValue, settings.store.songVolume * 100); - }, - }, - boopLink: { - description: "URL for the boop sound", - type: OptionType.STRING, - default: "https://github.com/Equicord/Equibored/raw/main/sounds/soggy/honk.wav?raw=true", - onChange(newValue) { - assignBoop(newValue, settings.store.boopVolume * 100); - } - } -}); - -export default definePlugin({ - name: "Soggy", - description: "Adds a soggy button to the toolbox", - tags: ["Fun"], - authors: [EquicordDevs.sliwka], - settings, - dependencies: ["AudioPlayerAPI", "HeaderBarAPI"], - - headerBarButton: { - icon: () => ( - - ), - render: SoggyButton - }, - - start() { - assignBoop(settings.store.boopLink, settings.store.boopVolume * 100); - assignSong(settings.store.songLink, settings.store.songVolume * 100); - }, - - stop() { - boopSound?.delete(); - song?.delete(); - }, -}); diff --git a/src/equicordplugins/streaks/index.tsx b/src/equicordplugins/streaks/index.tsx index be95fc176..6c8a5b800 100644 --- a/src/equicordplugins/streaks/index.tsx +++ b/src/equicordplugins/streaks/index.tsx @@ -7,7 +7,7 @@ import "./style.css"; import { DecoratorProps } from "@api/MemberListDecorators"; -import { iconsModule } from "@equicordplugins/_core/concatenatedModules"; +import { FireIcon } from "@components/Icons"; import { Devs, EquicordDevs } from "@utils/constants"; import { classNameFactory } from "@utils/css"; import definePlugin from "@utils/types"; @@ -47,15 +47,13 @@ const StreakBadge = ({ userId }: { userId: string; }) => { const today = moment().format("YYYY-MM-DD"); const active = streak.last_streak_date === today; - - const FireIcon = iconsModule?.FireIcon; const color = active ? colorFor(streak.count) : "#9ca3af"; return ( {tooltipProps => ( - {FireIcon && } + {} {streak.count} )}