mirror of
https://github.com/Equicord/Equicord.git
synced 2025-06-10 23:23:04 -04:00
Merge remote-tracking branch 'upstream/dev' into dev
This commit is contained in:
commit
b0ea6e838c
10 changed files with 35 additions and 45 deletions
|
@ -91,7 +91,7 @@ export default definePlugin({
|
|||
required: true,
|
||||
patches: [
|
||||
{
|
||||
find: ".FULL_SIZE]:26",
|
||||
find: ".MODAL]:26",
|
||||
replacement: {
|
||||
match: /(?=;return 0===(\i)\.length\?)(?<=(\i)\.useMemo.+?)/,
|
||||
replace: ";$1=$2.useMemo(()=>[...$self.getBadges(arguments[0].displayProfile),...$1],[$1])"
|
||||
|
|
|
@ -32,25 +32,17 @@ export default definePlugin({
|
|||
{
|
||||
find: ".lostPermission)",
|
||||
replacement: [
|
||||
{
|
||||
match: /let\{[^}]*lostPermissionTooltipText:\i[^}]*\}=(\i),/,
|
||||
replace: "$&vencordProps=$1,"
|
||||
},
|
||||
{
|
||||
match: /decorators:.{0,100}?(?=user:)/,
|
||||
replace: "$&vencordProps:typeof vencordProps!=='undefined'?vencordProps:void 0,"
|
||||
},
|
||||
{
|
||||
match: /children:\[(?=.{0,300},lostPermissionTooltipText:)/,
|
||||
replace: "children:[(arguments[0]?.vencordProps&&Vencord.Api.MemberListDecorators.__getDecorators(arguments[0].vencordProps)),"
|
||||
replace: "children:[Vencord.Api.MemberListDecorators.__getDecorators(arguments[0],'guild'),"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
find: "PrivateChannel.renderAvatar",
|
||||
replacement: {
|
||||
match: /decorators:(\i\.isSystemDM\(\))\?(.+?):null/,
|
||||
replace: "decorators:[Vencord.Api.MemberListDecorators.__getDecorators(arguments[0]),$1?$2:null]"
|
||||
match: /decorators:(\i\.isSystemDM\(\)\?.+?:null)/,
|
||||
replace: "decorators:[Vencord.Api.MemberListDecorators.__getDecorators(arguments[0],'dm'),$1]"
|
||||
}
|
||||
}
|
||||
]
|
||||
|
|
|
@ -32,14 +32,14 @@ export default definePlugin({
|
|||
}
|
||||
},
|
||||
{
|
||||
find: "#{intl::SERVERS}),gap:\"xs\",children:",
|
||||
find: ".setGuildsTree(",
|
||||
replacement: [
|
||||
{
|
||||
match: /(?<=#{intl::SERVERS}\),gap:"xs",children:)(\i\.map\(.{10,50}?)(}\))/,
|
||||
replace: "Vencord.Api.ServerList.renderAll(Vencord.Api.ServerList.ServerListRenderPosition.In).concat($1)$2"
|
||||
match: /(?<=#{intl::SERVERS}\),gap:"xs",children:)\i\.map\(.{0,50}\.length\)/,
|
||||
replace: "Vencord.Api.ServerList.renderAll(Vencord.Api.ServerList.ServerListRenderPosition.In).concat($&)"
|
||||
},
|
||||
{
|
||||
match: /children:.{0,2000}?\{\}\)\]/,
|
||||
match: /lastTargetNode.{0,50}\{\}\)\]/,
|
||||
replace: "$&.concat(Vencord.Api.ServerList.renderAll(Vencord.Api.ServerList.ServerListRenderPosition.Below))"
|
||||
}
|
||||
]
|
||||
|
|
|
@ -19,7 +19,7 @@ interface UserProfileProps {
|
|||
originalRenderPopout: () => React.ReactNode;
|
||||
}
|
||||
|
||||
const UserProfile = findComponentByCodeLazy(".BITE_SIZE,user:");
|
||||
const UserProfile = findComponentByCodeLazy(".POPOUT,user");
|
||||
|
||||
let openAlternatePopout = false;
|
||||
let accountPanelRef: React.RefObject<Record<PropertyKey, any> | null> = { current: null };
|
||||
|
|
|
@ -29,9 +29,8 @@ export default definePlugin({
|
|||
{
|
||||
find: "#{intl::GUILD_OWNER}),children:",
|
||||
replacement: {
|
||||
// The isOwner prop is used in more tha one component in this module. Make sure we patch the right one
|
||||
match: /,isOwner:(\i),(?=[^}]+guildId)/,
|
||||
replace: ",_isOwner:$1=$self.isGuildOwner(e),"
|
||||
match: /(?<=decorators:.{0,200}?isOwner:)\i/,
|
||||
replace: "$self.isGuildOwner(arguments[0])"
|
||||
}
|
||||
}
|
||||
],
|
||||
|
|
|
@ -24,7 +24,7 @@ export default definePlugin({
|
|||
patches: [
|
||||
// DM User Sidebar
|
||||
{
|
||||
find: ".PANEL}),nicknameIcons",
|
||||
find: ".SIDEBAR}),nicknameIcons",
|
||||
replacement: {
|
||||
match: /#{intl::USER_PROFILE_MEMBER_SINCE}\),.{0,100}userId:(\i\.id)}\)}\)/,
|
||||
replace: "$&,$self.FriendsSinceComponent({userId:$1,isSidebar:true})"
|
||||
|
|
|
@ -67,8 +67,8 @@ export default definePlugin({
|
|||
{
|
||||
find: '="SYSTEM_TAG"',
|
||||
replacement: {
|
||||
match: /\i.gradientClassName]\),style:/,
|
||||
replace: "$&{color:$self.calculateNameColorForMessageContext(arguments[0])},_style:"
|
||||
match: /(?<=\.username.{0,50}?)style:/,
|
||||
replace: "style:{color:$self.calculateNameColorForMessageContext(arguments[0])},_style:"
|
||||
}
|
||||
},
|
||||
{
|
||||
|
|
|
@ -16,6 +16,8 @@
|
|||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import "./style.css";
|
||||
|
||||
import ErrorBoundary from "@components/ErrorBoundary";
|
||||
import { Devs } from "@utils/constants";
|
||||
import { isNonNullish } from "@utils/guards";
|
||||
|
@ -95,6 +97,12 @@ export default definePlugin({
|
|||
{
|
||||
match: /\(0,\i\.jsx\)\(\i,\{items:\i,section:(\i)/,
|
||||
replace: "$1==='MUTUAL_GDMS'?$self.renderMutualGDMs(arguments[0]):$&"
|
||||
},
|
||||
// Discord adds spacing between each item which pushes our tab off screen.
|
||||
// set the gap to zero to ensure ours stays on screen
|
||||
{
|
||||
match: /className:\i\.tabBar/,
|
||||
replace: "$& + ' vc-mutual-gdms-tab-bar'"
|
||||
}
|
||||
]
|
||||
},
|
||||
|
|
4
src/plugins/mutualGroupDMs/style.css
Normal file
4
src/plugins/mutualGroupDMs/style.css
Normal file
|
@ -0,0 +1,4 @@
|
|||
.vc-mutual-gdms-tab-bar {
|
||||
gap: 0;
|
||||
justify-content: space-between;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue