Merge branch 'pr-3925' into dev
This commit is contained in:
commit
16da32453e
8 changed files with 19 additions and 23 deletions
|
|
@ -44,7 +44,8 @@ export default definePlugin({
|
|||
|
||||
patches: [
|
||||
{
|
||||
find: ".dotBorderBase",
|
||||
// class used in this module is dotBorderBase
|
||||
find: "0H16C18.2091",
|
||||
replacement: {
|
||||
match: /,viewBox:"0 0 20 20"/,
|
||||
replace: "$&,onClick:()=>$self.copyToClipBoard(arguments[0].color),style:{cursor:'pointer'}",
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ import { openChangeDecorationModal } from "@plugins/decor/ui/modals/ChangeDecora
|
|||
import { findComponentByCodeLazy } from "@webpack";
|
||||
import { useEffect } from "@webpack/common";
|
||||
|
||||
const CustomizationSection = findComponentByCodeLazy(".customizationSectionBackground");
|
||||
const CustomizationSection = findComponentByCodeLazy(".DESCRIPTION", "hasBackground:");
|
||||
|
||||
export interface DecorSectionProps {
|
||||
hideTitle?: boolean;
|
||||
|
|
|
|||
|
|
@ -11,4 +11,4 @@ export const cl = classNameFactory("vc-decor-");
|
|||
export const DecorationModalClasses = findCssClassesLazy("modalPreview", "modalCloseButton", "spinner", "modal");
|
||||
|
||||
export const requireAvatarDecorationModal = extractAndLoadChunksLazy(["initialSelectedDecoration:", /initialSelectedDecoration:\i,.{0,300}\i\.e\(/]);
|
||||
export const requireCreateStickerModal = extractAndLoadChunksLazy(["stickerInspected]:"]);
|
||||
export const requireCreateStickerModal = extractAndLoadChunksLazy([".CREATE_STICKER_MODAL,", "isDisplayingIndividualStickers"]);
|
||||
|
|
|
|||
|
|
@ -189,11 +189,11 @@ export default definePlugin({
|
|||
makeBypassPatches(),
|
||||
// Patch the emoji picker in voice calls to not be bypassed by fake nitro
|
||||
{
|
||||
find: "emojiItemDisabled]",
|
||||
find: '.getByName("fork_and_knife")',
|
||||
predicate: () => settings.store.enableEmojiBypass,
|
||||
replacement: {
|
||||
match: /CHAT/,
|
||||
replace: "STATUS"
|
||||
match: ".CHAT",
|
||||
replace: ".STATUS"
|
||||
}
|
||||
},
|
||||
{
|
||||
|
|
|
|||
|
|
@ -10,7 +10,6 @@ import { Devs } from "@utils/constants";
|
|||
import { isNonNullish } from "@utils/guards";
|
||||
import definePlugin, { OptionType } from "@utils/types";
|
||||
import { Message } from "@vencord/discord-types";
|
||||
import { findComponentByCodeLazy } from "@webpack";
|
||||
import { AuthenticationStore, SnowflakeUtils, Tooltip } from "@webpack/common";
|
||||
|
||||
type FillValue = ("status-danger" | "status-warning" | "status-positive" | "text-muted");
|
||||
|
|
@ -26,7 +25,6 @@ interface Diff {
|
|||
}
|
||||
|
||||
const DISCORD_KT_DELAY = 1471228928;
|
||||
const HiddenVisually = findComponentByCodeLazy(".hiddenVisually]:");
|
||||
|
||||
export default definePlugin({
|
||||
name: "MessageLatency",
|
||||
|
|
@ -162,13 +160,7 @@ export default definePlugin({
|
|||
text={text}
|
||||
position="top"
|
||||
>
|
||||
{
|
||||
props => <>
|
||||
{<this.Icon delta={d.delta} fill={d.fill} props={props} />}
|
||||
{/* Time Out indicator uses this, I think this is for a11y */}
|
||||
<HiddenVisually>Delayed Message</HiddenVisually>
|
||||
</>
|
||||
}
|
||||
{props => <this.Icon delta={d.delta} fill={d.fill} props={props} />}
|
||||
</Tooltip>;
|
||||
}, { noop: true });
|
||||
},
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ import { classes } from "@utils/misc";
|
|||
import { Queue } from "@utils/Queue";
|
||||
import definePlugin, { OptionType } from "@utils/types";
|
||||
import { Channel, Message } from "@vencord/discord-types";
|
||||
import { findComponentByCodeLazy, findCssClassesLazy } from "@webpack";
|
||||
import { findComponentByCodeLazy, findComponentLazy, findCssClassesLazy } from "@webpack";
|
||||
import {
|
||||
Button,
|
||||
ChannelStore,
|
||||
|
|
@ -47,8 +47,8 @@ const messageCache = new Map<string, {
|
|||
fetched: boolean;
|
||||
}>();
|
||||
|
||||
const Embed = findComponentByCodeLazy(".inlineMediaEmbed");
|
||||
const AutoModEmbed = findComponentByCodeLazy(".withFooter]:", "childrenMessageContent:");
|
||||
const Embed = findComponentLazy(m => m.prototype?.renderSuppressButton);
|
||||
const AutoModEmbed = findComponentByCodeLazy("withFooter", "childrenMessageContent:");
|
||||
const ChannelMessage = findComponentByCodeLazy("childrenExecutedCommand:", ".hideAccessories");
|
||||
|
||||
const SearchResultClasses = findCssClassesLazy("message", "searchResult");
|
||||
|
|
|
|||
|
|
@ -28,12 +28,17 @@ export default definePlugin({
|
|||
|
||||
patches: [
|
||||
{
|
||||
find: ".folderPreviewGuildIconError",
|
||||
find: "#{intl::GUILD_FOLDER_TOOLTIP_A11Y_LABEL}",
|
||||
replacement: [
|
||||
{
|
||||
// Discord always renders both plain and guild icons folders and uses a css transtion to switch between them
|
||||
match: /(?<=.folderButtonContent]:(!\i))/,
|
||||
replace: ',"vc-plainFolderIcon-plain":$1'
|
||||
// let {hovered: h, sorting: s} = props;
|
||||
// hasFolderButtonContent = h && s;
|
||||
// ...
|
||||
// className: cn({[_1]: hasFolderButtonContent, [_2]: !hasFolderButtonContent}),
|
||||
// children: [!hasFolderButtonContent && ...]
|
||||
match: /className:\i\(\)\(\{\[\i\.\i\]:(\i),\[\i\.\i\]:!\1(?=.{0,30}children:\[!\i&&)/,
|
||||
replace: (m, hasFolderButtonContent) => `${m},"vc-plainFolderIcon-plain":${hasFolderButtonContent}`
|
||||
}
|
||||
|
||||
]
|
||||
|
|
|
|||
|
|
@ -50,8 +50,6 @@ export const Button = ButtonCompat;
|
|||
/** @deprecated Use FormSwitch from Vencord */
|
||||
export const Switch = FormSwitchCompat as never;
|
||||
|
||||
/** @deprecated Use Card from Vencord */
|
||||
export const Card = waitForComponent<never>("Card", filters.componentByCode(".editable),", ".outline:"));
|
||||
export const Checkbox = waitForComponent<t.Checkbox>("Checkbox", filters.componentByCode('"data-toggleable-component":"checkbox'));
|
||||
|
||||
export const Tooltip = waitForComponent<t.Tooltip>("Tooltip", m => m.prototype?.shouldShowTooltip && m.prototype.render, TooltipFallback);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue