From c7e48b1c26753c3cbf90de589b7b57ac6d559d1d Mon Sep 17 00:00:00 2001 From: thororen1234 <78185467+thororen1234@users.noreply.github.com> Date: Sat, 20 Jul 2024 01:41:32 -0400 Subject: [PATCH] Fix Volume On SoundBoardLogger --- README.md | 10 +++++----- src/equicordplugins/equicordCSS/index.ts | 2 +- .../components/SoundBoardLog.tsx | 19 +++---------------- .../soundBoardLogger/settings.tsx | 8 +++++++- src/equicordplugins/soundBoardLogger/utils.ts | 2 +- .../unlimitedAccounts/index.ts | 2 +- src/equicordplugins/wigglyText/index.tsx | 2 +- 7 files changed, 19 insertions(+), 26 deletions(-) diff --git a/README.md b/README.md index cde938e4..501ca7fe 100644 --- a/README.md +++ b/README.md @@ -54,7 +54,7 @@ An enhanced version of [Vencord](https://github.com/Vendicated/Vencord) by [Vend - DoubleCounterBypass by nyx - EmojiDumper by Cortex, Samwich, Woosh - Encryptcord by Inbestigator -- EquicordCSS by FoxStorm1 and thororen (and all respective css developers) +- EquicordCSS by thororen (and all respective css developers) - ExportContacts by dat_insanity - FindReply by newwares - FrequentQuickSwitcher by Samwich @@ -98,7 +98,7 @@ An enhanced version of [Vencord](https://github.com/Vendicated/Vencord) by [Vend - OnePingPerDM by ProffDea - PlatformSpoofer by Drag - PurgeMessages by bhop and nyx -- QuestCompleter by HappyEnderman, SerStars, thororen +- QuestCompleter by HappyEnderman, SerStars (maintained by thororen) - QuestionMarkReplacement by nyx - Quoter by Samwich - RepeatMessage by Tolgchu @@ -111,7 +111,7 @@ An enhanced version of [Vencord](https://github.com/Vendicated/Vencord) by [Vend - ServerSearch by camila314 - ShowBadgesInChat by Inbestigator and KrystalSkull - Slap by Korbo -- SoundBoardLogger by Moxxie, fres, echo, thororen +- SoundBoardLogger by Moxxie, fres, echo (maintained by thororen) - TalkInReverse by Tolgchu - TeX by Kyuuhachi - TextToSpeech by Samwich @@ -119,8 +119,8 @@ An enhanced version of [Vencord](https://github.com/Vendicated/Vencord) by [Vend - Title by Kyuuhachi - TosuRPC by AutumnVN - Translate+ by Prince527 (Using Translate by Ven) -- UnlimitedAccounts by Balaclava and thororen -- UserPFP by nexpid and thororen +- UnlimitedAccounts by thororen +- UserPFP by nexpid (maintained by thororen) - UwUifier by echo - VCSupport by thororen - VencordRPC by AutumnVN diff --git a/src/equicordplugins/equicordCSS/index.ts b/src/equicordplugins/equicordCSS/index.ts index d4ca36ae..2ebeb0d5 100644 --- a/src/equicordplugins/equicordCSS/index.ts +++ b/src/equicordplugins/equicordCSS/index.ts @@ -74,7 +74,7 @@ migratePluginSettings("EquicordCSS", "EquicordBuiltIn"); export default definePlugin({ name: "EquicordCSS", description: "CSS for Equicord users. You will need to look at the settings.", - authors: [EquicordDevs.FoxStorm1, EquicordDevs.thororen], + authors: [EquicordDevs.thororen], dependencies: ["ThemeAttributes"], settings, start() { diff --git a/src/equicordplugins/soundBoardLogger/components/SoundBoardLog.tsx b/src/equicordplugins/soundBoardLogger/components/SoundBoardLog.tsx index 67b29a57..9d8a5fd5 100644 --- a/src/equicordplugins/soundBoardLogger/components/SoundBoardLog.tsx +++ b/src/equicordplugins/soundBoardLogger/components/SoundBoardLog.tsx @@ -9,9 +9,10 @@ import { Flex } from "@components/Flex"; import { Margins } from "@utils/margins"; import { classes, copyWithToast } from "@utils/misc"; import { closeModal, ModalCloseButton, ModalContent, ModalFooter, ModalHeader, ModalRoot, ModalSize, openModal } from "@utils/modal"; -import { Button, Clickable, ContextMenuApi, FluxDispatcher, Forms, Menu, Text, Tooltip, useEffect, UserUtils, useState } from "@webpack/common"; +import { Button, Clickable, Forms, Text, Tooltip, useEffect, UserUtils, useState } from "@webpack/common"; import { User } from "discord-types/general"; +import settings from "../settings"; import { clearLoggedSounds, getLoggedSounds } from "../store"; import { addListener, AvatarStyles, cl, downloadAudio, getEmojiUrl, playSound, removeListener, SoundLogEntry, UserSummaryItem } from "../utils"; import { openMoreUsersModal } from "./MoreUsersModal"; @@ -92,17 +93,6 @@ export default function SoundBoardLog({ data, closeModal }) { openUserModal(item, user, sounds); } - function SoundContextMenu({ item }) { - const label = id => `soundboardlogger-${id}`; - return ( - FluxDispatcher.dispatch({ type: "CONTEXT_MENU_CLOSE" })} - > - - ); - } - return ( <> @@ -116,9 +106,6 @@ export default function SoundBoardLog({ data, closeModal }) { return (
- ContextMenuApi.openContextMenu(e, () => ) - } > - + {({ onMouseEnter, onMouseLeave }) => } diff --git a/src/equicordplugins/soundBoardLogger/settings.tsx b/src/equicordplugins/soundBoardLogger/settings.tsx index 0f5638c1..2053f07a 100644 --- a/src/equicordplugins/soundBoardLogger/settings.tsx +++ b/src/equicordplugins/soundBoardLogger/settings.tsx @@ -87,7 +87,13 @@ const settings = definePluginSettings({ description: "show the logs", component: () => - } + }, + soundVolume: { + description: "How loud the toggle sound is (0 to disable)", + type: OptionType.SLIDER, + default: 0.5, + markers: [0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1] + }, }); export default settings; diff --git a/src/equicordplugins/soundBoardLogger/utils.ts b/src/equicordplugins/soundBoardLogger/utils.ts index 7bbfc433..7c192bcb 100644 --- a/src/equicordplugins/soundBoardLogger/utils.ts +++ b/src/equicordplugins/soundBoardLogger/utils.ts @@ -41,7 +41,7 @@ export function getEmojiUrl(emoji) { export const playSound = id => { const audio = new Audio(`https://cdn.discordapp.com/soundboard-sounds/${id}`); - audio.volume = 75 / 100; + audio.volume = settings.store.soundVolume; audio.play(); }; diff --git a/src/equicordplugins/unlimitedAccounts/index.ts b/src/equicordplugins/unlimitedAccounts/index.ts index a82f233b..4f885d74 100644 --- a/src/equicordplugins/unlimitedAccounts/index.ts +++ b/src/equicordplugins/unlimitedAccounts/index.ts @@ -32,7 +32,7 @@ const settings = definePluginSettings({ export default definePlugin({ name: "UnlimitedAccounts", description: "Increases the amount of accounts you can add.", - authors: [EquicordDevs.Balaclava, EquicordDevs.thororen], + authors: [EquicordDevs.thororen], settings, patches: [ { diff --git a/src/equicordplugins/wigglyText/index.tsx b/src/equicordplugins/wigglyText/index.tsx index 319d8674..7ffd6e0e 100644 --- a/src/equicordplugins/wigglyText/index.tsx +++ b/src/equicordplugins/wigglyText/index.tsx @@ -5,8 +5,8 @@ */ import { definePluginSettings } from "@api/Settings"; -import { EquicordDevs } from "@utils/constants"; import { makeRange } from "@components/PluginSettings/components"; +import { EquicordDevs } from "@utils/constants"; import definePlugin, { OptionType } from "@utils/types"; import { ReactNode } from "react";