From 843657c5cc81b12f08eeaa4081fa752987e0c337 Mon Sep 17 00:00:00 2001 From: thororen <78185467+thororen1234@users.noreply.github.com> Date: Sat, 5 Sep 2026 19:19:26 -0400 Subject: [PATCH 1/6] WhoReacted: add setting to toggle Avatar clicking (#4580) --- src/plugins/whoReacted/index.tsx | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/src/plugins/whoReacted/index.tsx b/src/plugins/whoReacted/index.tsx index 6e4bffd1e..38bd4212a 100644 --- a/src/plugins/whoReacted/index.tsx +++ b/src/plugins/whoReacted/index.tsx @@ -17,13 +17,14 @@ */ import { isPluginEnabled } from "@api/PluginManager"; +import { definePluginSettings } from "@api/Settings"; import ErrorBoundary from "@components/ErrorBoundary"; import NoBlockedMessagesPlugin from "@plugins/noBlockedMessages"; import { Devs } from "@utils/constants"; import { sleep } from "@utils/misc"; import { Queue } from "@utils/Queue"; import { useForceUpdater } from "@utils/react"; -import definePlugin from "@utils/types"; +import definePlugin, { OptionType } from "@utils/types"; import { CustomEmoji, Message, ReactionEmoji, User } from "@vencord/discord-types"; import { ChannelStore, Constants, FluxDispatcher, React, RestAPI, useEffect, useLayoutEffect, UserStore, UserSummaryItem } from "@webpack/common"; @@ -99,7 +100,11 @@ function ReactionUsers({ message, users }: { message: Message, users: User[]; })
-
+
Date: Sun, 6 Sep 2026 02:08:09 +0200 Subject: [PATCH 2/6] new plugin AddAttachments: add new files to existing messages (#3202) --- src/components/Icons.tsx | 14 +++ src/plugins/addAttachments/README.md | 7 ++ src/plugins/addAttachments/index.tsx | 162 +++++++++++++++++++++++++++ 3 files changed, 183 insertions(+) create mode 100644 src/plugins/addAttachments/README.md create mode 100644 src/plugins/addAttachments/index.tsx diff --git a/src/components/Icons.tsx b/src/components/Icons.tsx index 008a7a893..d329e043d 100644 --- a/src/components/Icons.tsx +++ b/src/components/Icons.tsx @@ -640,6 +640,20 @@ export function RightArrow(props: IconProps) { ); } +export function UploadIcon(props: IconProps) { + return ( + + + + ); +} + export function TopRightArrow(props: IconProps) { return ( { + try { + if (!input.files) return; + await addAttachments(channelId, messageId, existingAttachmentCount, input.files); + } finally { + input.remove(); + } + }); +} + +async function addAttachments(channelId: string, messageId: string, existingAttachmentCount: number, files: FileList) { + if (!files) return; + + if (files.length + existingAttachmentCount > 10) { + const remaining = 10 - existingAttachmentCount; + if (remaining <= 0) { + showToast("You cannot add more attachments to this message.", Toasts.Type.FAILURE); + return; + } + + showToast(`You can only add ${pluralise(remaining, "more attachment")} to this message.`, Toasts.Type.FAILURE); + return; + } + + showToast("Uploading, this can take a while...", Toasts.Type.CLOCK); + + const { body: { attachments } } = await RestAPI.post({ + url: `/channels/${channelId}/attachments`, + body: { + files: Array.from(files, file => ({ + filename: file.name, + file_size: file.size, + id: uniqueId(), + is_clip: false + })) + } + }) as { body: { attachments: { id: string, upload_url: string, upload_filename: string; }[]; }; }; + + const newAttachments = await Promise.all( + attachments.map((file, i) => + fetch(file.upload_url, { + method: "PUT", + body: files[i] + }).then(() => ({ + id: file.id, + uploaded_filename: file.upload_filename, + filename: files[i].name + })) + ) + ); + + + const msg = MessageStore.getMessage(channelId, messageId); + + await RestAPI.patch({ + url: `/channels/${channelId}/messages/${messageId}`, + body: { + attachments: [ + ...msg.attachments, + ...newAttachments + ] + } + }); + + showToast(`${files.length === 1 ? "Attachment" : "Attachments"} added successfully!`, Toasts.Type.SUCCESS); +} + +function canAddAttachments(msg: Message) { + return ( + [MessageType.DEFAULT, MessageType.REPLY].includes(msg.type) && + !msg.hasFlag(MessageFlags.IS_VOICE_MESSAGE) && + AuthenticationStore.getId() === msg.author.id && + msg.attachments.length < 10 + ); +} + +function handlePaste(e: ClipboardEvent) { + if (!e.clipboardData?.files.length) return; + + const msg = EditMessageStore.getEditingMessage(SelectedChannelStore.getChannelId()); + if (!msg) return; + + e.preventDefault(); + e.stopImmediatePropagation(); + + addAttachments(msg.channel_id, msg.id, msg.attachments.length, e.clipboardData.files); +} + +export default definePlugin({ + name: "AddAttachments", + description: "Allows you to add new attachments while editing messages", + authors: [Devs.Lumap], + + start() { + document.addEventListener("paste", handlePaste, { capture: true }); + }, + stop() { + document.removeEventListener("paste", handlePaste, { capture: true }); + }, + + messagePopoverButton: { + icon: UploadIcon, + render(msg) { + if (!canAddAttachments(msg)) return null; + + const channel = ChannelStore.getChannel(msg.channel_id); + if (!channel.isPrivate() && !PermissionStore.can(PermissionsBits.SEND_MESSAGES, channel)) return null; + + return { + label: "Add Attachments", + icon: UploadIcon, + message: msg, + channel: ChannelStore.getChannel(msg.channel_id), + onClick: () => chooseAttachments(msg.channel_id, msg.id, msg.attachments.length) + }; + }, + }, + + chatBarButton: { + icon: UploadIcon, + render({ channel, type }) { + if (type.analyticsName !== "edit") return null; + + const msg = EditMessageStore.getEditingMessage(channel.id); + if (!msg || !canAddAttachments(msg)) return null; + + return ( + chooseAttachments(msg.channel_id, msg.id, msg.attachments.length)} + > + + + ); + } + } +}); From af114dab7c3bcac9cd31026f901b6552a9c7dae2 Mon Sep 17 00:00:00 2001 From: thororen <78185467+thororen1234@users.noreply.github.com> Date: Sat, 5 Sep 2026 20:33:34 -0400 Subject: [PATCH 3/6] Experiments: support playground & remove bug report button (#4577) Co-authored-by: Vendicated --- src/plugins/experiments/hideBugReport.css | 3 - src/plugins/experiments/index.tsx | 104 +++++++++------------- 2 files changed, 44 insertions(+), 63 deletions(-) delete mode 100644 src/plugins/experiments/hideBugReport.css diff --git a/src/plugins/experiments/hideBugReport.css b/src/plugins/experiments/hideBugReport.css deleted file mode 100644 index ff78555d7..000000000 --- a/src/plugins/experiments/hideBugReport.css +++ /dev/null @@ -1,3 +0,0 @@ -#staff-help-popout-staff-help-bug-reporter { - display: none; -} diff --git a/src/plugins/experiments/index.tsx b/src/plugins/experiments/index.tsx index 835056d3d..760ad2160 100644 --- a/src/plugins/experiments/index.tsx +++ b/src/plugins/experiments/index.tsx @@ -16,33 +16,22 @@ * along with this program. If not, see . */ -import { definePluginSettings } from "@api/Settings"; -import { disableStyle, enableStyle } from "@api/Styles"; +import { BaseText } from "@components/BaseText"; import ErrorBoundary from "@components/ErrorBoundary"; import { ErrorCard } from "@components/ErrorCard"; +import { Flex } from "@components/Flex"; import { Paragraph } from "@components/Paragraph"; import { Devs, IS_MAC } from "@utils/constants"; import { Margins } from "@utils/margins"; -import definePlugin, { OptionType } from "@utils/types"; +import definePlugin from "@utils/types"; import { findByPropsLazy } from "@webpack"; -import { ExperimentStore, Forms, React } from "@webpack/common"; +import { React } from "@webpack/common"; -import hideBugReport from "./hideBugReport.css?managed"; const KbdStyles = findByPropsLazy("key", "combo"); - const modKey = IS_MAC ? "cmd" : "ctrl"; const altKey = IS_MAC ? "opt" : "alt"; -const settings = definePluginSettings({ - toolbarDevMenu: { - type: OptionType.BOOLEAN, - description: "Change the Help (?) toolbar button (top right in chat) to Discord's developer menu", - default: false, - restartNeeded: true - } -}); - export default definePlugin({ name: "Experiments", description: "Enable Access to Experiments & other dev-only features in Discord!", @@ -55,8 +44,6 @@ export default definePlugin({ Devs.Nuckyz, ], - settings, - patches: [ { find: "Object.defineProperties(this,{isDeveloper", @@ -87,23 +74,6 @@ export default definePlugin({ } ] }, - // Change top right toolbar button from the help one to the dev one - { - find: '?"BACK_FORWARD_NAVIGATION":', - replacement: { - match: /hasBugReporterAccess:(\i)/, - replace: "_hasBugReporterAccess:$1=true" - }, - predicate: () => settings.store.toolbarDevMenu - }, - // Disable opening the bug report menu when clicking the top right toolbar dev button - { - find: 'navId:"staff-help-popout"', - replacement: { - match: /(isShown.+?)onClick:\i/, - replace: (_, rest) => `${rest}onClick:()=>{}` - } - }, // Enable experiment embed on sent experiment links { find: "Clear Treatment ", @@ -127,45 +97,59 @@ export default definePlugin({ replace: "$&if($1==null)return;" } }, - + // Enable playground embed on sent playground links + // dev://playground/mana, dev://playground/payments, dev://playground/virtual-currency, + // dev://playground/nitro, dev://playground/mfa, dev://playground/cms, dev://playground/void + { + find: '"Open Playground', + replacement: { + match: "isStaff()||", + replace: "$& true||" + } + }, + { + // Expands the experiment uri regex to allow negative numbers, e.g. dev://experiment/2026-02-mana-playground-access/-1 + // -1 is "Not Eligible" + find: '"^dev://experiment/', + replacement: { + match: /(?<=dev:\/\/experiment.{0,20}?)\[0-9\]\+/, + replace: "[0-9-]+" + } + } ], - start: () => ExperimentStore.getUserExperimentBucket("2026-01-bug-reporter") > 0 && enableStyle(hideBugReport), - stop: () => disableStyle(hideBugReport), - settingsAboutComponent: () => { return ( - - More Information - - You can open Discord's DevTools via {" "} -
- {modKey}{" "} - {altKey}{" "} - O{" "} -
-
-
+ + Tip: You can open Discord's DevTools via {" "} +
+ {modKey}{" "} + {altKey}{" "} + O{" "} +
+
); }, WarningCard: ErrorBoundary.wrap(() => ( - Hold on!! + + Hold on!! - - Experiments are unreleased Discord features. They might not work, or even break your client or get your account disabled. - + + Experiments are unreleased Discord features. They might not work, or even break your client or get your account disabled. + - - Only use experiments if you know what you're doing. Vencord is not responsible for any damage caused by enabling experiments. + + Only use experiments if you know what you're doing. Vencord is not responsible for any damage caused by enabling experiments. - If you don't know what an experiment does, ignore it. Do not ask us what experiments do either, we probably don't know. - + If you don't know what an experiment does, ignore it. Do not ask us what experiments do either, we probably don't know. + - - No, you cannot use server-side features like checking the "Send to Client" box. - + + You cannot use server-side features like checking the "Send to Client" box. + + ), { noop: true }) }); From 7764f2512aac7af8ec008c49eb4d9b815c4f05f1 Mon Sep 17 00:00:00 2001 From: Vendicated Date: Sun, 6 Sep 2026 02:50:21 +0200 Subject: [PATCH 4/6] Remove flags that disable renderer backgrounding We added these in the past to work around issues where Vesktop would go blank while backgrounded. The issue is likely fixed now, at least I cannot reproduce. The best way to test it out is to just remove them and see if anyone complains :P Also adds back the bandai fix for the obscure app-region bug which was removed in an earlier commit. Turns out this is still a bug.' ' --- src/Vencord.ts | 1 + src/fixWeirdAppRegionBug.css | 4 ++++ src/main/patcher.ts | 23 ----------------------- 3 files changed, 5 insertions(+), 23 deletions(-) create mode 100644 src/fixWeirdAppRegionBug.css diff --git a/src/Vencord.ts b/src/Vencord.ts index 21d81f75f..17790136d 100644 --- a/src/Vencord.ts +++ b/src/Vencord.ts @@ -18,6 +18,7 @@ // DO NOT REMOVE UNLESS YOU WISH TO FACE THE WRATH OF THE CIRCULAR DEPENDENCY DEMON!!!!!!! import "~plugins"; +import "./fixWeirdAppRegionBug.css"; export * as Api from "./api"; export * as Plugins from "./api/PluginManager"; diff --git a/src/fixWeirdAppRegionBug.css b/src/fixWeirdAppRegionBug.css new file mode 100644 index 000000000..d850e0468 --- /dev/null +++ b/src/fixWeirdAppRegionBug.css @@ -0,0 +1,4 @@ +/* Works around a very strange issue where *something* (electron?) will inject body { app-region: drag } when using online themes */ +body { + app-region: unset; +} \ No newline at end of file diff --git a/src/main/patcher.ts b/src/main/patcher.ts index dcaec468d..42083f655 100644 --- a/src/main/patcher.ts +++ b/src/main/patcher.ts @@ -79,8 +79,6 @@ if (!IS_VANILLA) { const original = options.webPreferences.preload; options.webPreferences.preload = join(__dirname, "preload.js"); options.webPreferences.sandbox = false; - // work around discord unloading when in background - options.webPreferences.backgroundThrottling = false; if (frameless) { options.frame = false; @@ -136,27 +134,6 @@ if (!IS_VANILLA) { }); process.env.DATA_DIR = join(app.getPath("userData"), "..", "Vencord"); - - // Monkey patch commandLine to: - // - disable UseEcoQoSForBackgroundProcess: Work around Discord unloading when in background - const originalAppend = app.commandLine.appendSwitch; - app.commandLine.appendSwitch = function (...args) { - if (args[0] === "disable-features") { - const disabledFeatures = new Set((args[1] ?? "").split(",")); - disabledFeatures.add("UseEcoQoSForBackgroundProcess"); - args[1] += [...disabledFeatures].join(","); - } - return originalAppend.apply(this, args); - }; - - // disable renderer backgrounding to prevent the app from unloading when in the background - // https://github.com/electron/electron/issues/2822 - // https://github.com/GoogleChrome/chrome-launcher/blob/5a27dd574d47a75fec0fb50f7b774ebf8a9791ba/docs/chrome-flags-for-tools.md#task-throttling - // Work around discord unloading when in background - // Discord also recently started adding these flags but only on windows for some reason dunno why, it happens on Linux too - app.commandLine.appendSwitch("disable-renderer-backgrounding"); - app.commandLine.appendSwitch("disable-background-timer-throttling"); - app.commandLine.appendSwitch("disable-backgrounding-occluded-windows"); } else { console.log("[Vencord] Running in vanilla mode. Not loading Vencord"); } From 0fda4dd82d7c45d3385f3396cc2b0d035faf05f6 Mon Sep 17 00:00:00 2001 From: thororen <78185467+thororen1234@users.noreply.github.com> Date: Mon, 7 Sep 2026 13:11:29 -0400 Subject: [PATCH 5/6] TextReplace: allow namin g & reordering rules (#4578) --- src/plugins/textReplace/index.tsx | 216 ++++++++++++++++++++++------- src/plugins/textReplace/styles.css | 15 ++ 2 files changed, 183 insertions(+), 48 deletions(-) diff --git a/src/plugins/textReplace/index.tsx b/src/plugins/textReplace/index.tsx index 4ffea1fb1..f03f1890c 100644 --- a/src/plugins/textReplace/index.tsx +++ b/src/plugins/textReplace/index.tsx @@ -34,7 +34,13 @@ import { React, TextInput, useState } from "@webpack/common"; const cl = classNameFactory("vc-textReplace-"); -type Rule = Record<"find" | "replace" | "onlyIfIncludes" | "id", string>; +interface Rule { + name?: string; + find: string; + replace: string; + onlyIfIncludes: string; + id: string; +} interface TextReplaceProps { title: string; @@ -43,12 +49,19 @@ interface TextReplaceProps { isRegex?: boolean; } +interface RuleWithIndex { + rule: Rule; + index: number; +} + const makeEmptyRule: () => Rule = () => ({ + name: "", find: "", replace: "", onlyIfIncludes: "", id: crypto.randomUUID() }); + const makeEmptyRuleArray = () => [makeEmptyRule()]; const settings = definePluginSettings({ @@ -78,10 +91,12 @@ const settings = definePluginSettings({ stringRules: { type: OptionType.CUSTOM, default: makeEmptyRuleArray(), + description: "Rules for replacing text using string matching." }, regexRules: { type: OptionType.CUSTOM, default: makeEmptyRuleArray(), + description: "Rules for replacing text using regular expressions." } }); @@ -146,7 +161,26 @@ function TextRow({ label, description, value, onChange }: { label: string; descr const isEmptyRule = (rule: Rule) => !rule.find; +function matchesRuleSearch(rule: Rule, query: string) { + if (!query) return true; + + const normalizedQuery = query.trim().toLowerCase(); + return [rule.name ?? "", rule.find, rule.replace, rule.onlyIfIncludes] + .some(value => value.toLowerCase().includes(normalizedQuery)); +} + +function normalizeRule(rule: Rule) { + rule.name ??= ""; + rule.id ??= crypto.randomUUID(); +} + +type DropIndicator = { index: number; position: "before" | "after"; }; + function TextReplace({ title, description, rulesArray, isRegex = false }: TextReplaceProps) { + const [searchQuery, setSearchQuery] = useState(""); + const [draggedIndex, setDraggedIndex] = useState(null); + const [dropIndicator, setDropIndicator] = useState(null); + function onClickRemove(index: number) { rulesArray.splice(index, 1); } @@ -155,64 +189,149 @@ function TextReplace({ title, description, rulesArray, isRegex = false }: TextRe rulesArray[index][key] = e; // If a rule is empty after editing and is not the last rule, remove it - if (rulesArray[index].find === "" && rulesArray[index].replace === "" && rulesArray[index].onlyIfIncludes === "" && index !== rulesArray.length - 1) { + if (rulesArray[index].name === "" && rulesArray[index].find === "" && rulesArray[index].replace === "" && rulesArray[index].onlyIfIncludes === "" && index !== rulesArray.length - 1) { rulesArray.splice(index, 1); } } + const filteredRules = rulesArray.reduce((acc: RuleWithIndex[], rule, index) => { + if (matchesRuleSearch(rule, searchQuery)) { + acc.push({ rule, index }); + } + + return acc; + }, []); + + const handleDragOver = (index: number) => (e: React.DragEvent) => { + e.preventDefault(); + if (draggedIndex === null || searchQuery) return; + + const rect = e.currentTarget.getBoundingClientRect(); + const position = e.clientY - rect.top < rect.height / 2 ? "before" : "after"; + setDropIndicator(prev => + prev?.index === index && prev.position === position ? prev : { index, position } + ); + }; + + const handleDrop = (e: React.DragEvent) => { + e.preventDefault(); + if (draggedIndex === null || !dropIndicator || searchQuery) { + setDraggedIndex(null); + setDropIndicator(null); + return; + } + + let targetIndex = dropIndicator.index + (dropIndicator.position === "after" ? 1 : 0); + if (targetIndex > draggedIndex) targetIndex -= 1; + + if (targetIndex !== draggedIndex) { + const draggedRule = rulesArray.splice(draggedIndex, 1)[0]; + rulesArray.splice(targetIndex, 0, draggedRule); + } + + setDraggedIndex(null); + setDropIndicator(null); + }; + return ( <>
{title} {description} +
+ +
- - {rulesArray.map((rule, index) => - + {!filteredRules.length && searchQuery && ( + No rules match your search criteria. + )} + {filteredRules.map(({ rule, index }) => +
( - <> -
- onChange(e, index, "find")} - /> - onChange(e, index, "replace")} - /> - onChange(e, index, "onlyIfIncludes")} - /> -
- {isRegex && renderFindError(rule.find)} - - - )} + onDragOver={handleDragOver(index)} + onDrop={handleDrop} + style={{ opacity: draggedIndex === index ? 0.5 : 1, position: "relative" }} > - - {isEmptyRule(rule) - ? `Empty Rule ${index + 1}` - : `Rule ${index + 1} - ${rule.find}` - } - - + {dropIndicator?.index === index && dropIndicator.position === "before" && ( +
+ )} + {dropIndicator?.index === index && dropIndicator.position === "after" && ( +
+ )} + ( + <> +
+ onChange(e, index, "name")} + /> + onChange(e, index, "find")} + /> + onChange(e, index, "replace")} + /> + onChange(e, index, "onlyIfIncludes")} + /> +
+ {isRegex && renderFindError(rule.find)} + + + )} + > +
{ + setDraggedIndex(index); + e.dataTransfer.setData("text/plain", index.toString()); + }} + onDragEnd={() => { + setDraggedIndex(null); + setDropIndicator(null); + }} + style={{ cursor: searchQuery ? "default" : "grab", flex: 1 }} + > + + {rule.name + ? rule.name + : isEmptyRule(rule) + ? `Empty Rule ${index + 1}` + : `Rule ${index + 1} - ${rule.find}` + } + +
+
+
)} +
)} ); } -const ToggleIconOn = (activity: IgnoredActivity, fill: string) => ToggleIcon(activity, "Disable activity", "M480-320q75 0 127.5-52.5T660-500q0-75-52.5-127.5T480-680q-75 0-127.5 52.5T300-500q0 75 52.5 127.5T480-320Zm0-72q-45 0-76.5-31.5T372-500q0-45 31.5-76.5T480-608q45 0 76.5 31.5T588-500q0 45-31.5 76.5T480-392Zm0 192q-146 0-266-81.5T40-500q54-137 174-218.5T480-800q146 0 266 81.5T920-500q-54 137-174 218.5T480-200Zm0-300Zm0 220q113 0 207.5-59.5T832-500q-50-101-144.5-160.5T480-720q-113 0-207.5 59.5T128-500q50 101 144.5 160.5T480-280Z", fill); -const ToggleIconOff = (activity: IgnoredActivity, fill: string) => ToggleIcon(activity, "Enable activity", "m644-428-58-58q9-47-27-88t-93-32l-58-58q17-8 34.5-12t37.5-4q75 0 127.5 52.5T660-500q0 20-4 37.5T644-428Zm128 126-58-56q38-29 67.5-63.5T832-500q-50-101-143.5-160.5T480-720q-29 0-57 4t-55 12l-62-62q41-17 84-25.5t90-8.5q151 0 269 83.5T920-500q-23 59-60.5 109.5T772-302Zm20 246L624-222q-35 11-70.5 16.5T480-200q-151 0-269-83.5T40-500q21-53 53-98.5t73-81.5L56-792l56-56 736 736-56 56ZM222-624q-29 26-53 57t-41 67q50 101 143.5 160.5T480-280q20 0 39-2.5t39-5.5l-36-38q-11 3-21 4.5t-21 1.5q-75 0-127.5-52.5T300-500q0-11 1.5-21t4.5-21l-84-82Zm319 93Zm-151 75Z", fill); +const ToggleIconOn = (activity: IgnoredActivity, fill: string) => ToggleIcon(activity, "Disable Activity", "M480-320q75 0 127.5-52.5T660-500q0-75-52.5-127.5T480-680q-75 0-127.5 52.5T300-500q0 75 52.5 127.5T480-320Zm0-72q-45 0-76.5-31.5T372-500q0-45 31.5-76.5T480-608q45 0 76.5 31.5T588-500q0 45-31.5 76.5T480-392Zm0 192q-146 0-266-81.5T40-500q54-137 174-218.5T480-800q146 0 266 81.5T920-500q-54 137-174 218.5T480-200Zm0-300Zm0 220q113 0 207.5-59.5T832-500q-50-101-144.5-160.5T480-720q-113 0-207.5 59.5T128-500q50 101 144.5 160.5T480-280Z", fill); +const ToggleIconOff = (activity: IgnoredActivity, fill: string) => ToggleIcon(activity, "Enable Activity", "m644-428-58-58q9-47-27-88t-93-32l-58-58q17-8 34.5-12t37.5-4q75 0 127.5 52.5T660-500q0 20-4 37.5T644-428Zm128 126-58-56q38-29 67.5-63.5T832-500q-50-101-143.5-160.5T480-720q-29 0-57 4t-55 12l-62-62q41-17 84-25.5t90-8.5q151 0 269 83.5T920-500q-23 59-60.5 109.5T772-302Zm20 246L624-222q-35 11-70.5 16.5T480-200q-151 0-269-83.5T40-500q21-53 53-98.5t73-81.5L56-792l56-56 736 736-56 56ZM222-624q-29 26-53 57t-41 67q50 101 143.5 160.5T480-280q20 0 39-2.5t39-5.5l-36-38q-11 3-21 4.5t-21 1.5q-75 0-127.5-52.5T300-500q0-11 1.5-21t4.5-21l-84-82Zm319 93Zm-151 75Z", fill); -function ToggleActivityComponent(activity: IgnoredActivity, isPlaying = false) { +function ToggleActivityComponent(activity: IgnoredActivity) { const s = settings.use(["ignoredActivities"]); const { ignoredActivities } = s; if (ignoredActivities.some(act => act.id === activity.id)) return ToggleIconOff(activity, "var(--status-danger)"); - return ToggleIconOn(activity, isPlaying ? "var(--green-300)" : "var(--interactive-icon-default)"); + return ToggleIconOn(activity, "var(--interactive-icon-default)"); } -function handleActivityToggle(e: React.MouseEvent, activity: IgnoredActivity) { +function handleActivityToggle(e: React.MouseEvent, activity: IgnoredActivity) { e.stopPropagation(); const ignoredActivityIndex = settings.store.ignoredActivities.findIndex(act => act.id === activity.id); @@ -74,13 +79,13 @@ function handleActivityToggle(e: React.MouseEvent } function recalculateActivities() { - ShowCurrentGame.updateSetting(old => old); + ShowCurrentGame.updateSetting(current => current); } function ImportCustomRPCComponent() { return ( - Import the application id of the CustomRPC plugin to the filter list + Import the application id of the CustomRPC plugin to the filter list