the rest of the first fixes
This commit is contained in:
parent
711f09f9fe
commit
4c668ec827
9 changed files with 31 additions and 22 deletions
|
|
@ -15,7 +15,7 @@ import { Logger } from "@utils/Logger";
|
|||
import type { Plugin } from "@utils/types";
|
||||
import { changes, checkForUpdates } from "@utils/updater";
|
||||
import { Guild } from "@vencord/discord-types";
|
||||
import { findByPropsLazy, findExportedComponentLazy, findStoreLazy } from "@webpack";
|
||||
import { findByPropsLazy, findComponentByCodeLazy, findStoreLazy } from "@webpack";
|
||||
import { Alerts, ChannelActionCreators, ChannelRouter, ChannelStore, ComponentDispatch, FluxDispatcher, GuildStore, IconUtils, MediaEngineStore, MessageStore, NavigationRouter, React, ReadStateStore, ReadStateUtils, SelectedChannelStore, SelectedGuildStore, SettingsRouter, StreamerModeStore, Toasts, useEffect, UserStore, VoiceActions } from "@webpack/common";
|
||||
import type { FC, ReactElement, ReactNode } from "react";
|
||||
|
||||
|
|
@ -800,7 +800,7 @@ const runtimeCleanupCallbacks: Array<() => void> = [];
|
|||
const NotificationSettingsActionCreators = findByPropsLazy("updateGuildNotificationSettings", "updateChannelOverrideSettings");
|
||||
const GuildSettingsActions = findByPropsLazy("open", "selectRole", "updateGuild");
|
||||
const GuildMembershipActions = findByPropsLazy("leaveGuild");
|
||||
const HeadphonesIcon = findExportedComponentLazy("HeadphonesIcon");
|
||||
const HeadphonesIcon = findComponentByCodeLazy("4.1-2.13h1.86A9");
|
||||
const UserGuildSettingsStore = findStoreLazy("UserGuildSettingsStore");
|
||||
const NotificationsInboxStore = findStoreLazy("NotificationsInboxStore") as NotificationsInboxStoreLike;
|
||||
const RecentMentionsStore = findStoreLazy("RecentMentionsStore") as RecentMentionsStoreLike;
|
||||
|
|
|
|||
|
|
@ -4,12 +4,11 @@
|
|||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*/
|
||||
|
||||
import { findExportedComponentLazy } from "@webpack";
|
||||
import { TimerIcon } from "@plugins/callTimer/TimerIcon";
|
||||
|
||||
import { cancelScheduledStatusReset, setStatusDndForDuration } from "../../../registry";
|
||||
import type { PalettePageSpec, PaletteSuggestion } from "../types";
|
||||
|
||||
const TimerIcon = findExportedComponentLazy("TimerIcon");
|
||||
const DURATION_CHOICES = [
|
||||
{ id: "15", label: "15 minutes", icon: TimerIcon },
|
||||
{ id: "30", label: "30 minutes", icon: TimerIcon },
|
||||
|
|
|
|||
|
|
@ -9,12 +9,13 @@ import { HeaderBarButton } from "@api/HeaderBar";
|
|||
import { addMessagePreSendListener, removeMessagePreSendListener } from "@api/MessageEvents";
|
||||
import { isPluginEnabled } from "@api/PluginManager";
|
||||
import { definePluginSettings, migratePluginToSettings, Settings } from "@api/Settings";
|
||||
import { WarningIcon } from "@components/Icons";
|
||||
import customRPC from "@plugins/customRPC";
|
||||
import { Devs, EquicordDevs, GUILD_ID, SUPPORT_CHANNEL_ID, SUPPORT_CHANNEL_IDS, VC_SUPPORT_CHANNEL_IDS } from "@utils/constants";
|
||||
import { isAnyPluginDev } from "@utils/misc";
|
||||
import definePlugin, { OptionType } from "@utils/types";
|
||||
import { StandingState } from "@vencord/discord-types/enums";
|
||||
import { findByCodeLazy, findExportedComponentLazy, findStoreLazy } from "@webpack";
|
||||
import { findByCodeLazy, findComponentByCodeLazy, findStoreLazy } from "@webpack";
|
||||
import { Alerts, ApplicationCommandIndexStore, NavigationRouter, React, SettingsRouter, UserStore, useStateFromStores } from "@webpack/common";
|
||||
import { ComponentType } from "react";
|
||||
|
||||
|
|
@ -29,8 +30,7 @@ let clicked = false;
|
|||
|
||||
const SafetyHubStore = findStoreLazy("SafetyHubStore");
|
||||
const fetchSafetyHub: () => Promise<void> = findByCodeLazy("SAFETY_HUB_FETCH_START");
|
||||
const WarningIcon = findExportedComponentLazy("WarningIcon");
|
||||
const ShieldIcon = findExportedComponentLazy("ShieldIcon");
|
||||
const ShieldIcon = findComponentByCodeLazy("0 0 1-1.29-.88c-.36-.33-.7-.73-.88-1.13-.33-.");
|
||||
|
||||
const StandingConfig: Record<number, { label: string; hoverColor: string; Icon: ComponentType<any>; }> = {
|
||||
[StandingState.ALL_GOOD]: { label: "All good!", hoverColor: "var(--status-positive)", Icon: ShieldIcon },
|
||||
|
|
|
|||
|
|
@ -9,10 +9,10 @@ import { definePluginSettings } from "@api/Settings";
|
|||
import { EquicordDevs } from "@utils/constants";
|
||||
import definePlugin, { IconComponent, OptionType } from "@utils/types";
|
||||
import { Message } from "@vencord/discord-types";
|
||||
import { findExportedComponentLazy } from "@webpack";
|
||||
import { findComponentByCodeLazy } from "@webpack";
|
||||
import { ChannelStore, FluxDispatcher, Menu } from "@webpack/common";
|
||||
|
||||
const EyeIconLazy = findExportedComponentLazy("EyeIcon");
|
||||
const EyeIconLazy = findComponentByCodeLazy("0-.78-.41l-9.53 6.35c-.42.28-.96.28-1.38");
|
||||
const EyeIcon: IconComponent = props => <EyeIconLazy {...props} />;
|
||||
|
||||
const hideMessage = (messageId: string, channelId: string) => {
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ import { classNameFactory } from "@utils/css";
|
|||
import { openModal } from "@utils/modal";
|
||||
import definePlugin from "@utils/types";
|
||||
import { Message } from "@vencord/discord-types";
|
||||
import { findByCodeLazy, findCssClassesLazy, findExportedComponentLazy } from "@webpack";
|
||||
import { findByCodeLazy, findComponentByCodeLazy, findCssClassesLazy } from "@webpack";
|
||||
import { ChannelStore, Menu } from "@webpack/common";
|
||||
|
||||
import { NoteModal } from "./components/modals/Notebook";
|
||||
|
|
@ -35,7 +35,7 @@ import { noteHandler, noteHandlerCache } from "./NoteHandler";
|
|||
import { DataStoreToCache, HolyNoteStore } from "./utils";
|
||||
|
||||
export const cl = classNameFactory("vc-notebook-");
|
||||
export const CircleQuestionIcon = findExportedComponentLazy("CircleQuestionIcon");
|
||||
export const CircleQuestionIcon = findComponentByCodeLazy("10.58l-3.3-3.3a1");
|
||||
export const MessageRecord = findByCodeLazy("isEdited(){");
|
||||
export const messageClasses = findCssClassesLazy("message", "groupStart", "cozyMessage");
|
||||
export const resultsClasses = findCssClassesLazy("emptyResultsWrap", "emptyResultsContent", "errorImage", "emptyResultsText", "noResultsImage", "alt");
|
||||
|
|
|
|||
|
|
@ -23,6 +23,15 @@ export default definePlugin({
|
|||
authors: [EquicordDevs.iamme],
|
||||
dependencies: ["Settings"],
|
||||
startAt: StartAt.WebpackReady,
|
||||
patches: [
|
||||
{
|
||||
find: "AngleBracketsIcon",
|
||||
replacement: {
|
||||
match: /SectionDivider:\(\)=>\i,(?=.*?(\i),\{AIcon)/,
|
||||
replace: "$&icons:()=>$1,"
|
||||
}
|
||||
}
|
||||
],
|
||||
toolboxActions: {
|
||||
"Open Icons Tab"() {
|
||||
SettingsRouter.openUserSettings("equicord_icon_viewer_panel");
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@ import "./style.css";
|
|||
import { DecoratorProps } from "@api/MemberListDecorators";
|
||||
import { isPluginEnabled } from "@api/PluginManager";
|
||||
import { definePluginSettings } from "@api/Settings";
|
||||
import { ImageIcon, Microphone } from "@components/Icons";
|
||||
import betterActivities from "@equicordplugins/betterActivities";
|
||||
import showMeYourName from "@plugins/showMeYourName";
|
||||
import { Devs, EquicordDevs } from "@utils/constants";
|
||||
|
|
@ -17,7 +18,7 @@ import { classes } from "@utils/misc";
|
|||
import definePlugin, { OptionType } from "@utils/types";
|
||||
import { Activity, ApplicationStream, Channel, Message, OnlineStatus, User } from "@vencord/discord-types";
|
||||
import { MessageFlags } from "@vencord/discord-types/enums";
|
||||
import { findByCodeLazy, findByPropsLazy, findComponentByCodeLazy, findCssClassesLazy, findExportedComponentLazy } from "@webpack";
|
||||
import { findByCodeLazy, findByPropsLazy, findComponentByCodeLazy, findCssClassesLazy } from "@webpack";
|
||||
import { ChannelStore, ExperimentStore, MessageStore, Parser, RelationshipStore, SnowflakeUtils, UserGuildSettingsStore, UserStore, useStateFromStores } from "@webpack/common";
|
||||
|
||||
const cl = classNameFactory("vc-message-peek-");
|
||||
|
|
@ -43,12 +44,12 @@ type AttachmentType = "image" | "gif" | "video" | "file";
|
|||
type IconType = AttachmentType | "voice" | "sticker";
|
||||
|
||||
const Icons: Record<IconType, React.ComponentType<{ size: string; className: string; }>> = {
|
||||
image: findExportedComponentLazy("ImageIcon"),
|
||||
file: findExportedComponentLazy("AttachmentIcon"),
|
||||
voice: findExportedComponentLazy("MicrophoneIcon"),
|
||||
sticker: findExportedComponentLazy("StickerIcon"),
|
||||
gif: findExportedComponentLazy("GifIcon"),
|
||||
video: findExportedComponentLazy("VideoIcon"),
|
||||
image: ImageIcon,
|
||||
file: findComponentByCodeLazy("9.86 0l.54.55a6.99 6.99"),
|
||||
voice: Microphone,
|
||||
sticker: findComponentByCodeLazy("1-.5.5H6a4 4 0 0 1-4-4V6a4 4 0 0 1 4-4Zm.5 8a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3ZM19"),
|
||||
gif: findComponentByCodeLazy("3.18 0 0 1-1.12-1.35A4.88 4.8"),
|
||||
video: findComponentByCodeLazy(" 3-3v-2.12a1"),
|
||||
};
|
||||
|
||||
const ATTACHMENT_LABELS: Record<AttachmentType, string> = {
|
||||
|
|
|
|||
|
|
@ -8,13 +8,13 @@ import { findGroupChildrenByChildId, NavContextMenuPatchCallback } from "@api/Co
|
|||
import { EquicordDevs } from "@utils/constants";
|
||||
import definePlugin, { IconComponent } from "@utils/types";
|
||||
import { Message } from "@vencord/discord-types";
|
||||
import { findExportedComponentLazy } from "@webpack";
|
||||
import { findComponentByCodeLazy } from "@webpack";
|
||||
import { ChannelStore, Menu } from "@webpack/common";
|
||||
|
||||
import { settings } from "./settings";
|
||||
import { getPayload, getResponse, handleResponse } from "./utils";
|
||||
|
||||
const RobotIconLazy = findExportedComponentLazy("RobotIcon");
|
||||
const RobotIconLazy = findComponentByCodeLazy("14.93-4H15a1 ");
|
||||
const RobotIcon: IconComponent = props => <RobotIconLazy {...props} />;
|
||||
|
||||
const messageCtxPatch: NavContextMenuPatchCallback = (children, { message }: { message: Message; }) => {
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@ import { DataStore } from "@api/index";
|
|||
import { definePluginSettings } from "@api/Settings";
|
||||
import { BaseText } from "@components/BaseText";
|
||||
import { Button } from "@components/Button";
|
||||
import { PencilIcon } from "@components/Icons";
|
||||
import { Paragraph } from "@components/Paragraph";
|
||||
import { Devs, EquicordDevs } from "@utils/constants";
|
||||
import { classNameFactory } from "@utils/css";
|
||||
|
|
@ -18,7 +19,7 @@ import { Logger } from "@utils/Logger";
|
|||
import { openModal } from "@utils/modal";
|
||||
import definePlugin, { OptionType } from "@utils/types";
|
||||
import { Emoji, Message } from "@vencord/discord-types";
|
||||
import { findByPropsLazy, findExportedComponentLazy } from "@webpack";
|
||||
import { findByPropsLazy } from "@webpack";
|
||||
import { EmojiStore, Menu, TextInput, Toasts, useEffect, useState } from "@webpack/common";
|
||||
|
||||
import { ClearAliasesConfirmModal } from "./components/modals/ClearAliasesConfirmModal";
|
||||
|
|
@ -99,7 +100,6 @@ interface MessageContextMenuArgs {
|
|||
const DATA_KEY = "emoji-aliases";
|
||||
const logger = new Logger("EmojiAlias");
|
||||
const EmojiQueryService = findByPropsLazy("queryEmojiResults");
|
||||
const PencilIcon = findExportedComponentLazy("PencilIcon");
|
||||
const cl = classNameFactory("vc-emoji-alias-");
|
||||
|
||||
let aliasMap: AliasMap = {};
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue