mirror of
https://github.com/Equicord/Equicord.git
synced 2025-01-30 19:23:29 -05:00
parent
d1792ed569
commit
130d2b849e
5 changed files with 21 additions and 18 deletions
|
@ -8,7 +8,8 @@ import { classNameFactory } from "@api/Styles";
|
||||||
import { getIntlMessage } from "@utils/discord";
|
import { getIntlMessage } from "@utils/discord";
|
||||||
import { classes } from "@utils/misc";
|
import { classes } from "@utils/misc";
|
||||||
import { closeModal, openModal } from "@utils/modal";
|
import { closeModal, openModal } from "@utils/modal";
|
||||||
import { Avatar, ChannelStore, ContextMenuApi, FluxDispatcher, GuildStore, Icons, Menu, ReadStateStore, ReadStateUtils, Text, Tooltip, useDrag, useDrop, useEffect, useRef, UserStore } from "@webpack/common";
|
import { findByPropsLazy } from "@webpack";
|
||||||
|
import { Avatar, ChannelStore, ContextMenuApi, FluxDispatcher, GuildStore, Menu, ReadStateStore, ReadStateUtils, Text, Tooltip, useDrag, useDrop, useEffect, useRef, UserStore } from "@webpack/common";
|
||||||
|
|
||||||
import { BasicChannelTabsProps, Bookmark, BookmarkFolder, BookmarkProps, CircleQuestionIcon, isBookmarkFolder, settings, switchChannel, useBookmarks } from "../util";
|
import { BasicChannelTabsProps, Bookmark, BookmarkFolder, BookmarkProps, CircleQuestionIcon, isBookmarkFolder, settings, switchChannel, useBookmarks } from "../util";
|
||||||
import { NotificationDot } from "./ChannelTab";
|
import { NotificationDot } from "./ChannelTab";
|
||||||
|
@ -16,7 +17,7 @@ import { BookmarkContextMenu, EditModal } from "./ContextMenus";
|
||||||
|
|
||||||
const cl = classNameFactory("vc-channeltabs-");
|
const cl = classNameFactory("vc-channeltabs-");
|
||||||
|
|
||||||
const { StarIcon } = Icons;
|
const { StarIcon } = findByPropsLazy("StarIcon");
|
||||||
|
|
||||||
function FolderIcon({ fill }: { fill: string; }) {
|
function FolderIcon({ fill }: { fill: string; }) {
|
||||||
return (
|
return (
|
||||||
|
|
|
@ -8,7 +8,7 @@ import { classNameFactory } from "@api/Styles";
|
||||||
import { getIntlMessage, getUniqueUsername } from "@utils/discord";
|
import { getIntlMessage, getUniqueUsername } from "@utils/discord";
|
||||||
import { classes } from "@utils/misc";
|
import { classes } from "@utils/misc";
|
||||||
import { findByPropsLazy, findComponentByCodeLazy } from "@webpack";
|
import { findByPropsLazy, findComponentByCodeLazy } from "@webpack";
|
||||||
import { Avatar, ChannelStore, ContextMenuApi, Dots, GuildStore, Icons, PresenceStore, ReadStateStore, Text, TypingStore, useDrag, useDrop, useRef, UserStore, useStateFromStores } from "@webpack/common";
|
import { Avatar, ChannelStore, ContextMenuApi, Dots, GuildStore, PresenceStore, ReadStateStore, Text, TypingStore, useDrag, useDrop, useRef, UserStore, useStateFromStores } from "@webpack/common";
|
||||||
import { Channel, Guild, User } from "discord-types/general";
|
import { Channel, Guild, User } from "discord-types/general";
|
||||||
|
|
||||||
import { ChannelTabsProps, CircleQuestionIcon, closeTab, isTabSelected, moveDraggedTabs, moveToTab, openedTabs, settings } from "../util";
|
import { ChannelTabsProps, CircleQuestionIcon, closeTab, isTabSelected, moveDraggedTabs, moveToTab, openedTabs, settings } from "../util";
|
||||||
|
@ -17,7 +17,7 @@ import { TabContextMenu } from "./ContextMenus";
|
||||||
const { getBadgeWidthForValue } = findByPropsLazy("getBadgeWidthForValue");
|
const { getBadgeWidthForValue } = findByPropsLazy("getBadgeWidthForValue");
|
||||||
const dotStyles = findByPropsLazy("numberBadge", "textBadge");
|
const dotStyles = findByPropsLazy("numberBadge", "textBadge");
|
||||||
|
|
||||||
const { FriendsIcon } = Icons;
|
const { FriendsIcon } = findByPropsLazy("FriendsIcon");
|
||||||
const ChannelTypeIcon = findComponentByCodeLazy(".iconContainerWithGuildIcon,");
|
const ChannelTypeIcon = findComponentByCodeLazy(".iconContainerWithGuildIcon,");
|
||||||
|
|
||||||
const cl = classNameFactory("vc-channeltabs-");
|
const cl = classNameFactory("vc-channeltabs-");
|
||||||
|
|
|
@ -6,7 +6,8 @@
|
||||||
|
|
||||||
import { classNameFactory } from "@api/Styles";
|
import { classNameFactory } from "@api/Styles";
|
||||||
import { useForceUpdater } from "@utils/react";
|
import { useForceUpdater } from "@utils/react";
|
||||||
import { Button, ContextMenuApi, Flex, FluxDispatcher, Forms, Icons, useCallback, useEffect, useRef, UserStore, useState } from "@webpack/common";
|
import { findByPropsLazy } from "@webpack";
|
||||||
|
import { Button, ContextMenuApi, Flex, FluxDispatcher, Forms, useCallback, useEffect, useRef, UserStore, useState } from "@webpack/common";
|
||||||
|
|
||||||
import { BasicChannelTabsProps, ChannelTabsProps, createTab, handleChannelSwitch, openedTabs, openStartupTabs, saveTabs, settings, setUpdaterFunction, useGhostTabs } from "../util";
|
import { BasicChannelTabsProps, ChannelTabsProps, createTab, handleChannelSwitch, openedTabs, openStartupTabs, saveTabs, settings, setUpdaterFunction, useGhostTabs } from "../util";
|
||||||
import BookmarkContainer from "./BookmarkContainer";
|
import BookmarkContainer from "./BookmarkContainer";
|
||||||
|
@ -15,7 +16,7 @@ import { BasicContextMenu } from "./ContextMenus";
|
||||||
|
|
||||||
type TabSet = Record<string, ChannelTabsProps[]>;
|
type TabSet = Record<string, ChannelTabsProps[]>;
|
||||||
|
|
||||||
const { PlusSmallIcon } = Icons;
|
const { PlusSmallIcon } = findByPropsLazy("PlusSmallIcon");
|
||||||
const cl = classNameFactory("vc-channeltabs-");
|
const cl = classNameFactory("vc-channeltabs-");
|
||||||
|
|
||||||
export default function ChannelsTabsContainer(props: BasicChannelTabsProps) {
|
export default function ChannelsTabsContainer(props: BasicChannelTabsProps) {
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
import { definePluginSettings } from "@api/Settings";
|
import { definePluginSettings } from "@api/Settings";
|
||||||
import { Logger } from "@utils/Logger";
|
import { Logger } from "@utils/Logger";
|
||||||
import { OptionType } from "@utils/types";
|
import { OptionType } from "@utils/types";
|
||||||
import { Icons } from "@webpack/common";
|
import { findByPropsLazy } from "@webpack";
|
||||||
|
|
||||||
import { ChannelTabsPreview } from "../components/ChannelTabsContainer";
|
import { ChannelTabsPreview } from "../components/ChannelTabsContainer";
|
||||||
|
|
||||||
|
@ -74,4 +74,4 @@ export const settings = definePluginSettings({
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
export const { CircleQuestionIcon } = Icons;
|
export const { CircleQuestionIcon } = findByPropsLazy("CircleQuestionIcon");
|
||||||
|
|
|
@ -328,16 +328,17 @@ export default definePlugin({
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
find: ".guildFilter:null",
|
find: ".guildFilter:null",
|
||||||
replacement: [
|
replacement: {
|
||||||
{
|
match: /function (\i)\(\i\){let{message:\i,gotoMessage/,
|
||||||
match: /function (\i)\(\i\){let{message:\i,gotoMessage/,
|
replace: "$self.renderMsg = $1; $&"
|
||||||
replace: "$self.renderMsg = $1; $&"
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
match: /onClick:\(\)=>(\i\.\i\.deleteRecentMention\((\i)\.id\))/,
|
find: ".guildFilter:null",
|
||||||
replace: "onClick: () => $2._keyword ? $self.deleteKeyword($2.id) : $1"
|
replacement: {
|
||||||
}
|
match: /onClick:\(\)=>(\i\.\i\.deleteRecentMention\((\i)\.id\))/,
|
||||||
]
|
replace: "onClick: () => $2._keyword ? $self.deleteKeyword($2.id) : $1"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue