mirror of
https://github.com/Equicord/Equicord.git
synced 2025-05-10 17:35:37 +02:00
Merge remote-tracking branch 'upstream/dev' into dev
This commit is contained in:
commit
41a8cdf379
5 changed files with 54 additions and 30 deletions
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
"name": "equicord",
|
"name": "equicord",
|
||||||
"private": "true",
|
"private": "true",
|
||||||
"version": "1.11.9",
|
"version": "1.12.0",
|
||||||
"description": "The other cutest Discord client mod",
|
"description": "The other cutest Discord client mod",
|
||||||
"homepage": "https://github.com/Equicord/Equicord#readme",
|
"homepage": "https://github.com/Equicord/Equicord#readme",
|
||||||
"bugs": {
|
"bugs": {
|
||||||
|
@ -119,4 +119,4 @@
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=18"
|
"node": ">=18"
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -64,7 +64,6 @@ function filterTreeWithTargetNode(children: any, predicate: (node: any) => boole
|
||||||
return filterTreeWithTargetNode(children.props?.children, predicate);
|
return filterTreeWithTargetNode(children.props?.children, predicate);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
let childIsTargetChild = false;
|
let childIsTargetChild = false;
|
||||||
for (let i = 0; i < children.length; i++) {
|
for (let i = 0; i < children.length; i++) {
|
||||||
const shouldKeep = filterTreeWithTargetNode(children[i], predicate);
|
const shouldKeep = filterTreeWithTargetNode(children[i], predicate);
|
||||||
|
|
|
@ -1,19 +1,19 @@
|
||||||
/*
|
/*
|
||||||
* Vencord, a modification for Discord's desktop app
|
* Vencord, a modification for Discord's desktop app
|
||||||
* Copyright (c) 2022 Vendicated and contributors
|
* Copyright (c) 2022 Vendicated and contributors
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
* the Free Software Foundation, either version 3 of the License, or
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
* (at your option) any later version.
|
* (at your option) any later version.
|
||||||
*
|
*
|
||||||
* This program is distributed in the hope that it will be useful,
|
* This program is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { definePluginSettings } from "@api/Settings";
|
import { definePluginSettings } from "@api/Settings";
|
||||||
|
@ -31,6 +31,10 @@ import hideBugReport from "./hideBugReport.css?managed";
|
||||||
const KbdStyles = findByPropsLazy("key", "combo");
|
const KbdStyles = findByPropsLazy("key", "combo");
|
||||||
const BugReporterExperiment = findLazy(m => m?.definition?.id === "2024-09_bug_reporter");
|
const BugReporterExperiment = findLazy(m => m?.definition?.id === "2024-09_bug_reporter");
|
||||||
|
|
||||||
|
const isMacOS = navigator.platform.includes("Mac");
|
||||||
|
const modKey = isMacOS ? "cmd" : "ctrl";
|
||||||
|
const altKey = isMacOS ? "opt" : "alt";
|
||||||
|
|
||||||
const settings = definePluginSettings({
|
const settings = definePluginSettings({
|
||||||
toolbarDevMenu: {
|
toolbarDevMenu: {
|
||||||
type: OptionType.BOOLEAN,
|
type: OptionType.BOOLEAN,
|
||||||
|
@ -43,7 +47,13 @@ const settings = definePluginSettings({
|
||||||
export default definePlugin({
|
export default definePlugin({
|
||||||
name: "Experiments",
|
name: "Experiments",
|
||||||
description: "Enable Access to Experiments & other dev-only features in Discord!",
|
description: "Enable Access to Experiments & other dev-only features in Discord!",
|
||||||
authors: [Devs.Megu, Devs.Ven, Devs.Nickyux, Devs.BanTheNons, Devs.Nuckyz],
|
authors: [
|
||||||
|
Devs.Megu,
|
||||||
|
Devs.Ven,
|
||||||
|
Devs.Nickyux,
|
||||||
|
Devs.BanTheNons,
|
||||||
|
Devs.Nuckyz,
|
||||||
|
],
|
||||||
|
|
||||||
settings,
|
settings,
|
||||||
|
|
||||||
|
@ -69,9 +79,9 @@ export default definePlugin({
|
||||||
replace: "$&$self.WarningCard(),"
|
replace: "$&$self.WarningCard(),"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// change top right chat toolbar button from the help one to the dev one
|
// Change top right chat toolbar button from the help one to the dev one
|
||||||
{
|
{
|
||||||
find: "toolbar:function",
|
find: ".CONTEXTLESS,isActivityPanelMode:",
|
||||||
replacement: {
|
replacement: {
|
||||||
match: /hasBugReporterAccess:(\i)/,
|
match: /hasBugReporterAccess:(\i)/,
|
||||||
replace: "_hasBugReporterAccess:$1=true"
|
replace: "_hasBugReporterAccess:$1=true"
|
||||||
|
@ -79,7 +89,7 @@ export default definePlugin({
|
||||||
predicate: () => settings.store.toolbarDevMenu
|
predicate: () => settings.store.toolbarDevMenu
|
||||||
},
|
},
|
||||||
|
|
||||||
// makes the Favourites Server experiment allow favouriting DMs and threads
|
// Make the Favourites Server experiment allow favouriting DMs and threads
|
||||||
{
|
{
|
||||||
find: "useCanFavoriteChannel",
|
find: "useCanFavoriteChannel",
|
||||||
replacement: {
|
replacement: {
|
||||||
|
@ -87,23 +97,28 @@ export default definePlugin({
|
||||||
replace: "false",
|
replace: "false",
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// enable option to always record clips even if you are not streaming
|
// Enable option to always record clips even if you are not streaming
|
||||||
{
|
{
|
||||||
find: "isDecoupledGameClippingEnabled(){",
|
find: "isDecoupledGameClippingEnabled(){",
|
||||||
replacement: {
|
replacement: {
|
||||||
match: /\i\.isStaff\(\)/,
|
match: /\i\.isStaff\(\)/,
|
||||||
replace: "true"
|
replace: "true"
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
|
// Enable experiment embed on sent experiment links
|
||||||
|
{
|
||||||
|
find: "dev://experiment/",
|
||||||
|
replacement: {
|
||||||
|
match: /\i\.isStaff\(\)/,
|
||||||
|
replace: "true"
|
||||||
|
}
|
||||||
|
},
|
||||||
],
|
],
|
||||||
|
|
||||||
start: () => !BugReporterExperiment.getCurrentConfig().hasBugReporterAccess && enableStyle(hideBugReport),
|
start: () => !BugReporterExperiment.getCurrentConfig().hasBugReporterAccess && enableStyle(hideBugReport),
|
||||||
stop: () => disableStyle(hideBugReport),
|
stop: () => disableStyle(hideBugReport),
|
||||||
|
|
||||||
settingsAboutComponent: () => {
|
settingsAboutComponent: () => {
|
||||||
const isMacOS = navigator.platform.includes("Mac");
|
|
||||||
const modKey = isMacOS ? "cmd" : "ctrl";
|
|
||||||
const altKey = isMacOS ? "opt" : "alt";
|
|
||||||
return (
|
return (
|
||||||
<React.Fragment>
|
<React.Fragment>
|
||||||
<Forms.FormTitle tag="h3">More Information</Forms.FormTitle>
|
<Forms.FormTitle tag="h3">More Information</Forms.FormTitle>
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
|
|
||||||
import { classNameFactory } from "@api/Styles";
|
import { classNameFactory } from "@api/Styles";
|
||||||
import ErrorBoundary from "@components/ErrorBoundary";
|
import ErrorBoundary from "@components/ErrorBoundary";
|
||||||
import { FluxDispatcher, useLayoutEffect, useRef, useState } from "@webpack/common";
|
import { FluxDispatcher, useLayoutEffect, useMemo, useRef, useState } from "@webpack/common";
|
||||||
|
|
||||||
import { ELEMENT_ID } from "../constants";
|
import { ELEMENT_ID } from "../constants";
|
||||||
import { settings } from "../index";
|
import { settings } from "../index";
|
||||||
|
@ -160,6 +160,16 @@ export const Magnifier = ErrorBoundary.wrap<MagnifierProps>(({ instance, size: i
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
const imageSrc = useMemo(() => {
|
||||||
|
try {
|
||||||
|
const imageUrl = new URL(instance.props.src);
|
||||||
|
imageUrl.searchParams.set("animated", "true");
|
||||||
|
return imageUrl.toString();
|
||||||
|
} catch {
|
||||||
|
return instance.props.src;
|
||||||
|
}
|
||||||
|
}, [instance.props.src]);
|
||||||
|
|
||||||
if (!ready) return null;
|
if (!ready) return null;
|
||||||
|
|
||||||
const box = element.current?.getBoundingClientRect();
|
const box = element.current?.getBoundingClientRect();
|
||||||
|
@ -203,7 +213,7 @@ export const Magnifier = ErrorBoundary.wrap<MagnifierProps>(({ instance, size: i
|
||||||
}}
|
}}
|
||||||
width={`${box.width * zoom.current}px`}
|
width={`${box.width * zoom.current}px`}
|
||||||
height={`${box.height * zoom.current}px`}
|
height={`${box.height * zoom.current}px`}
|
||||||
src={instance.props.src + "?animated=true"}
|
src={imageSrc}
|
||||||
alt=""
|
alt=""
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
|
|
|
@ -88,7 +88,7 @@ export default definePlugin({
|
||||||
|
|
||||||
patches: [
|
patches: [
|
||||||
{
|
{
|
||||||
find: ".MUTUAL_FRIENDS?(",
|
find: ".BOT_DATA_ACCESS?(",
|
||||||
replacement: [
|
replacement: [
|
||||||
{
|
{
|
||||||
match: /\i\.useEffect.{0,100}(\i)\[0\]\.section/,
|
match: /\i\.useEffect.{0,100}(\i)\[0\]\.section/,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue