mirror of
https://github.com/Equicord/Equicord.git
synced 2025-06-07 13:43:03 -04:00
Merge remote-tracking branch 'upstream/dev' into dev
This commit is contained in:
commit
bbcc27a55e
7 changed files with 23 additions and 13 deletions
|
@ -21,6 +21,7 @@ import { definePluginSettings } from "@api/Settings";
|
|||
import { makeRange } from "@components/PluginSettings/components";
|
||||
import { debounce } from "@shared/debounce";
|
||||
import { Devs } from "@utils/constants";
|
||||
import { Logger } from "@utils/Logger";
|
||||
import definePlugin, { OptionType } from "@utils/types";
|
||||
import { Menu, ReactDOM } from "@webpack/common";
|
||||
import { JSX } from "react";
|
||||
|
@ -237,6 +238,7 @@ export default definePlugin({
|
|||
},
|
||||
|
||||
renderMagnifier(instance) {
|
||||
try {
|
||||
if (instance.props.id === ELEMENT_ID) {
|
||||
if (!this.currentMagnifierElement) {
|
||||
this.currentMagnifierElement = <Magnifier size={settings.store.size} zoom={settings.store.zoom} instance={instance} />;
|
||||
|
@ -244,6 +246,9 @@ export default definePlugin({
|
|||
this.root.render(this.currentMagnifierElement);
|
||||
}
|
||||
}
|
||||
} catch (error) {
|
||||
new Logger("ImageZoom").error("Failed to render magnifier:", error);
|
||||
}
|
||||
},
|
||||
|
||||
updateMagnifier(instance) {
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
.vc-mutual-gdms-tab-bar {
|
||||
gap: 0;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
|
|
@ -18,7 +18,7 @@ import { Guild, User } from "discord-types/general";
|
|||
import { settings } from ".";
|
||||
|
||||
const IconClasses = findByPropsLazy("icon", "acronym", "childWrapper");
|
||||
const FriendRow = findComponentByCodeLazy(".listName,discriminatorClass");
|
||||
const FriendRow = findComponentByCodeLazy("discriminatorClass:", ".isMobileOnline", "getAvatarURL");
|
||||
|
||||
const cl = classNameFactory("vc-gp-");
|
||||
|
||||
|
|
|
@ -50,8 +50,6 @@
|
|||
border-bottom: 2px solid transparent;
|
||||
color: var(--interactive-normal);
|
||||
cursor: pointer;
|
||||
height: 39px;
|
||||
margin-right: -10px;
|
||||
line-height: 14px;
|
||||
}
|
||||
|
||||
|
|
|
@ -54,9 +54,10 @@ export default definePlugin({
|
|||
authors: [Devs.Rini, Devs.TheKodeToad],
|
||||
patches: [
|
||||
{
|
||||
find: '?"@":""',
|
||||
find: '"BaseUsername"',
|
||||
replacement: {
|
||||
match: /(?<=onContextMenu:\i,children:)\i\+\i/,
|
||||
/* TODO: remove \i+\i once change makes it to stable */
|
||||
match: /(?<=onContextMenu:\i,children:)(?:\i\+\i|\i)/,
|
||||
replace: "$self.renderUsername(arguments[0])"
|
||||
}
|
||||
},
|
||||
|
|
|
@ -131,6 +131,13 @@ export default definePlugin({
|
|||
]
|
||||
},
|
||||
|
||||
{
|
||||
find: "Copy image not supported",
|
||||
replacement: {
|
||||
match: /(?<=(?:canSaveImage|canCopyImage)\(\i?\)\{.{0,50})!\i\.isPlatformEmbedded/g,
|
||||
replace: "false"
|
||||
}
|
||||
},
|
||||
// Add back Copy & Save Image
|
||||
{
|
||||
find: 'id:"copy-image"',
|
||||
|
@ -141,7 +148,7 @@ export default definePlugin({
|
|||
replace: "false"
|
||||
},
|
||||
{
|
||||
match: /return\s*?\[\i\.\i\.canCopyImage\(\)/,
|
||||
match: /return\s*?\[.{0,50}?(?=\?.{0,100}?id:"copy-image")/,
|
||||
replace: "return [true"
|
||||
},
|
||||
{
|
||||
|
|
|
@ -27,7 +27,7 @@ export let useRef: typeof React.useRef;
|
|||
export let useReducer: typeof React.useReducer;
|
||||
export let useCallback: typeof React.useCallback;
|
||||
|
||||
export const ReactDOM: typeof import("react-dom") & typeof import("react-dom/client") = findByPropsLazy("createPortal", "render");
|
||||
export const ReactDOM: typeof import("react-dom") & typeof import("react-dom/client") = findByPropsLazy("createPortal");
|
||||
|
||||
waitFor("useState", m => {
|
||||
React = m;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue