mirror of
https://github.com/Equicord/Equicord.git
synced 2025-02-24 09:09:12 -05:00
Fixes For Canary
This commit is contained in:
parent
d7d9e7dca1
commit
d77fd04a64
3 changed files with 11 additions and 8 deletions
|
@ -44,8 +44,8 @@ export default definePlugin({
|
||||||
replace: ",($1||((!$1)&&arguments[0].invite.expires_at)) && $2$self.RenderTip($1, $3, arguments[0].invite.expires_at)"
|
replace: ",($1||((!$1)&&arguments[0].invite.expires_at)) && $2$self.RenderTip($1, $3, arguments[0].invite.expires_at)"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
match: /(\.jsx\)\(\i.\i.Info,{.+onClick):(\i\?\i:null),/,
|
match: /(\.jsx\)\(\i.\i.Info,{.+onClick:\i\?.{0,5}:null)/,
|
||||||
replace: "$1:$2 || $self.Lurkable(arguments[0].invite.guild.id, arguments[0].invite.guild.features),"
|
replace: "$& || $self.Lurkable(arguments[0].invite.guild.id, arguments[0].invite.guild.features)"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
match: /(\.jsx\)\(\i\.\i\.Header,\{)text:(\i)/,
|
match: /(\.jsx\)\(\i\.\i\.Header,\{)text:(\i)/,
|
||||||
|
@ -61,6 +61,7 @@ export default definePlugin({
|
||||||
return <div className="vc-bi-header-inner">
|
return <div className="vc-bi-header-inner">
|
||||||
{(inviter && (currentUserId !== inviter.id)) ? <>
|
{(inviter && (currentUserId !== inviter.id)) ? <>
|
||||||
<img
|
<img
|
||||||
|
alt=""
|
||||||
className={classes(AvatarStyles.avatar, AvatarStyles.clickable) + " vc-bi-inviter-avatar"}
|
className={classes(AvatarStyles.avatar, AvatarStyles.clickable) + " vc-bi-inviter-avatar"}
|
||||||
onClick={() => openUserProfile(inviter.id)}
|
onClick={() => openUserProfile(inviter.id)}
|
||||||
src={inviter.avatar ? `https://cdn.discordapp.com/avatars/${inviter.id}/${inviter.avatar}.webp?size=80` : "/assets/1f0bfc0865d324c2587920a7d80c609b.png?size=128"}
|
src={inviter.avatar ? `https://cdn.discordapp.com/avatars/${inviter.id}/${inviter.avatar}.webp?size=80` : "/assets/1f0bfc0865d324c2587920a7d80c609b.png?size=128"}
|
||||||
|
|
|
@ -8,7 +8,7 @@ import "./styles.css";
|
||||||
|
|
||||||
import { NavContextMenuPatchCallback } from "@api/ContextMenu";
|
import { NavContextMenuPatchCallback } from "@api/ContextMenu";
|
||||||
import { get } from "@api/DataStore";
|
import { get } from "@api/DataStore";
|
||||||
import { definePluginSettings, Settings } from "@api/Settings";
|
import { definePluginSettings, migratePluginSettings, Settings } from "@api/Settings";
|
||||||
import { EquicordDevs } from "@utils/constants";
|
import { EquicordDevs } from "@utils/constants";
|
||||||
import { openModal } from "@utils/modal";
|
import { openModal } from "@utils/modal";
|
||||||
import definePlugin, { OptionType } from "@utils/types";
|
import definePlugin, { OptionType } from "@utils/types";
|
||||||
|
@ -57,7 +57,7 @@ export function getCustomColorString(userId: string, withHash?: boolean): string
|
||||||
}
|
}
|
||||||
|
|
||||||
const settings = definePluginSettings({
|
const settings = definePluginSettings({
|
||||||
DmList: {
|
dmList: {
|
||||||
type: OptionType.BOOLEAN,
|
type: OptionType.BOOLEAN,
|
||||||
description: "Users with custom colors defined will have their name in the dm list colored",
|
description: "Users with custom colors defined will have their name in the dm list colored",
|
||||||
default: true,
|
default: true,
|
||||||
|
@ -69,8 +69,10 @@ const settings = definePluginSettings({
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
migratePluginSettings("CustomUserColors", "customUserColors");
|
||||||
export default definePlugin({
|
export default definePlugin({
|
||||||
name: "customUserColors",
|
name: "CustomUserColors",
|
||||||
description: "Lets you add a custom color to any user, anywhere! Highly recommend to use with typingTweaks and roleColorEverywhere",
|
description: "Lets you add a custom color to any user, anywhere! Highly recommend to use with typingTweaks and roleColorEverywhere",
|
||||||
authors: [EquicordDevs.mochienya],
|
authors: [EquicordDevs.mochienya],
|
||||||
contextMenus: { "user-context": userContextMenuPatch },
|
contextMenus: { "user-context": userContextMenuPatch },
|
||||||
|
@ -83,12 +85,12 @@ export default definePlugin({
|
||||||
// this also affects name headers in chats outside of servers
|
// this also affects name headers in chats outside of servers
|
||||||
find: /type:\i\.\i\.Types\.REMIX/,
|
find: /type:\i\.\i\.Types\.REMIX/,
|
||||||
replacement: {
|
replacement: {
|
||||||
match: /style:"username".*?void 0/,
|
match: /style:"username".{0,50}void 0/,
|
||||||
replace: "style:{color:$self.colorIfServer(arguments[0])}"
|
replace: "style:{color:$self.colorIfServer(arguments[0])}"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
predicate: () => settings.store.DmList,
|
predicate: () => settings.store.dmList,
|
||||||
find: /muted:\i=!1,highlighted:\i=!1/,
|
find: /muted:\i=!1,highlighted:\i=!1/,
|
||||||
replacement: {
|
replacement: {
|
||||||
match: /(nameAndDecorators,)/,
|
match: /(nameAndDecorators,)/,
|
||||||
|
|
|
@ -51,7 +51,7 @@ function Watching({ userIds, guildId }: WatchingProps): JSX.Element {
|
||||||
<Flex flexDirection="column" style={{ gap: 6 }} >
|
<Flex flexDirection="column" style={{ gap: 6 }} >
|
||||||
{users.map(user => (
|
{users.map(user => (
|
||||||
<Flex key={user.id} flexDirection="row" style={{ gap: 6, alignContent: "center" }} className={cl("user")} >
|
<Flex key={user.id} flexDirection="row" style={{ gap: 6, alignContent: "center" }} className={cl("user")} >
|
||||||
<img src={user.getAvatarURL(guildId)} style={{ borderRadius: 8, width: 16, height: 16 }} />
|
<img src={user.getAvatarURL(guildId)} style={{ borderRadius: 8, width: 16, height: 16 }} alt="" />
|
||||||
{getUsername(user)}
|
{getUsername(user)}
|
||||||
</Flex>
|
</Flex>
|
||||||
))}
|
))}
|
||||||
|
|
Loading…
Add table
Reference in a new issue