stuff
This commit is contained in:
parent
ec0a57057e
commit
69e867dff1
|
@ -452,6 +452,7 @@
|
|||
"LazyImage": {"protos": ["loadImage", "getRatio", "getSrc"]},
|
||||
"LazyImageZoomable": {"strings": ["renderLinkComponent", "onCloseImage"]},
|
||||
"ListItemTooltip": {"strings": [".listItemWrapper", "tooltipClassName", "disableWrapper"]},
|
||||
"MemberListItem": {"strings": ["ownerTooltipText", "onClickPremiumGuildIcon:", "Messages.GUILD_OWNER"]},
|
||||
"Mention": {"strings": [".iconType", ".color,", "),backgroundColor:"]},
|
||||
"Menu": {"strings": ["\"empty\"", "getItemProps", "isUsingKeyboardNavigation"]},
|
||||
"Message": {"strings": ["childrenMessageContent", "childrenRepliedMessage", "zalgo", ".buttonContainer"]},
|
||||
|
@ -548,7 +549,7 @@
|
|||
"UserMemberSince": {"strings": [".memberSinceContainer", ".USER_PROFILE_DISCORD_MEMBER_SINCE"]},
|
||||
"UserMemberSinceSection": {"strings": ["userId:", "headingClassName", ".title", "guildMember:"]},
|
||||
"UserMention": {"strings": [".inlinePreview", "\"@\"", "renderPopout:"]},
|
||||
"UsernameSection": {"strings": [".shouldCopyOnClick", ".userTagDiscriminatorNoNickname"]},
|
||||
"UsernameSection": {"strings": ["shouldCopyOnClick:", ".userTagDiscriminatorNoNickname"]},
|
||||
"UserPopout": {"strings": ["{user:", "userId:", "\"Unexpected missing user\")", "getUser"]},
|
||||
"UserPopoutAvatar": {"strings": [".avatarDecorationHint", ".VIEW_PROFILE"], "noSearch": true},
|
||||
"UserPopoutBody": {"strings": [".customStatusActivity", ".canDM", ".hidePersonalInformation", ".showCopiableUsername"]},
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
* @name StaffTag
|
||||
* @author DevilBro
|
||||
* @authorId 278543574059057154
|
||||
* @version 1.5.9
|
||||
* @version 1.6.0
|
||||
* @description Adds a Crown/Tag to Server Owners (or Admins/Management)
|
||||
* @invite Jx3TjNS
|
||||
* @donate https://www.paypal.me/MircoWittrien
|
||||
|
@ -91,11 +91,11 @@ module.exports = (_ => {
|
|||
|
||||
this.modulePatches = {
|
||||
before: [
|
||||
"MessageHeader"
|
||||
"MessageHeader",
|
||||
"NameContainer"
|
||||
],
|
||||
after: [
|
||||
"MemberListItem",
|
||||
"NameTag",
|
||||
"UserProfileUsername",
|
||||
"UsernameSection",
|
||||
"VoiceUser"
|
||||
]
|
||||
|
@ -260,10 +260,11 @@ module.exports = (_ => {
|
|||
BDFDB.MessageUtils.rerenderAll();
|
||||
}
|
||||
|
||||
processMemberListItem (e) {
|
||||
processNameContainer (e) {
|
||||
if (!e.instance.props.user) return;
|
||||
let userType = this.getUserType(e.instance.props.user, e.instance.props.channel && e.instance.props.channel.id);
|
||||
if (userType && this.settings.tagPlaces.memberList) {
|
||||
this.injectStaffTag(BDFDB.ObjectUtils.get(e.returnvalue, "props.decorators.props.children"), e.instance.props.user, userType, 1, {
|
||||
this.injectStaffTag(BDFDB.ObjectUtils.get(e.instance, "props.decorators.props.children"), e.instance.props.user, userType, 1, {
|
||||
channelId: e.instance.props.channel && e.instance.props.channel.id,
|
||||
tagClass: BDFDB.disCN.bottagmember
|
||||
});
|
||||
|
@ -286,52 +287,63 @@ module.exports = (_ => {
|
|||
processVoiceUser (e) {
|
||||
if (e.instance.props.user && this.settings.tagPlaces.voiceList) {
|
||||
let userType = this.getUserType(e.instance.props.user, e.instance.props.channel && e.instance.props.channel.id);
|
||||
if (userType) {
|
||||
let content = BDFDB.ReactUtils.findChild(e.returnvalue, {props: [["className", BDFDB.disCN.voicecontent]]});
|
||||
if (content) this.injectStaffTag(content.props.children, e.instance.props.user, userType, 3, {
|
||||
channelId: e.instance.props.channel && e.instance.props.channel.id,
|
||||
});
|
||||
}
|
||||
if (!userType) return;
|
||||
let content = BDFDB.ReactUtils.findChild(e.returnvalue, {props: [["className", BDFDB.disCN.voicecontent]]});
|
||||
if (content) this.injectStaffTag(content.props.children, e.instance.props.user, userType, 3, {
|
||||
channelId: e.instance.props.channel && e.instance.props.channel.id,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
processNameTag (e) {
|
||||
if (e.instance.props.user && e.instance.props.className) {
|
||||
let userType = this.getUserType(e.instance.props.user);
|
||||
if (userType) {
|
||||
let inject = false, tagClass = "";
|
||||
if (e.instance.props.className.indexOf(BDFDB.disCN.userpopoutheadertagnonickname) > -1) {
|
||||
inject = this.settings.tagPlaces.userPopout;
|
||||
tagClass = BDFDB.disCNS.userpopoutheaderbottag + BDFDB.disCN.bottagnametag;
|
||||
}
|
||||
else if (e.instance.props.className.indexOf(BDFDB.disCN.userprofilenametag) > -1) {
|
||||
inject = this.settings.tagPlaces.userProfile;
|
||||
tagClass = BDFDB.disCN.bottagnametag;
|
||||
}
|
||||
if (inject) this.injectStaffTag(e.returnvalue.props.children, e.instance.props.user, userType, 2, {
|
||||
tagClass: tagClass,
|
||||
useRem: e.instance.props.useRemSizes,
|
||||
inverted: e.instance.props.invertBotTagColor
|
||||
});
|
||||
}
|
||||
if (!e.instance.props.user || !e.instance.props.className) return;
|
||||
let userType = this.getUserType(e.instance.props.user);
|
||||
if (!userType) return;
|
||||
let inject = false, tagClass = "";
|
||||
if (e.instance.props.className.indexOf(BDFDB.disCN.userpopoutheadertagwithnickname) > -1) {
|
||||
inject = this.settings.tagPlaces.userPopout;
|
||||
tagClass = BDFDB.disCNS.userpopoutheaderbottag + BDFDB.disCN.bottagnametag;
|
||||
}
|
||||
else if (e.instance.props.className.indexOf(BDFDB.disCN.userprofilenametag) > -1) {
|
||||
inject = this.settings.tagPlaces.userProfile;
|
||||
tagClass = BDFDB.disCN.bottagnametag;
|
||||
}
|
||||
if (inject) this.injectStaffTag(e.returnvalue.props.children, e.instance.props.user, userType, 2, {
|
||||
tagClass: tagClass,
|
||||
useRem: e.instance.props.useRemSizes,
|
||||
inverted: e.instance.props.invertBotTagColor
|
||||
});
|
||||
}
|
||||
|
||||
processUsernameSection (e) {
|
||||
if (e.instance.props.user && this.settings.tagPlaces.userPopout) {
|
||||
let userType = this.getUserType(e.instance.props.user, e.instance.props.channel && e.instance.props.channel.id);
|
||||
if (userType) {
|
||||
let [children, index] = BDFDB.ReactUtils.findParent(e.returnvalue, {props: [["className", BDFDB.disCN.userpopoutheadernickname]]});
|
||||
if (index > -1) {
|
||||
if (!BDFDB.ArrayUtils.is(children[index].props.children)) children[index].props.children = [children[index].props.children].flat(10);
|
||||
this.injectStaffTag(children[index].props.children, e.instance.props.user, userType, 2, {
|
||||
tagClass: BDFDB.disCNS.userpopoutheaderbottag + BDFDB.disCN.bottagnametag,
|
||||
inverted: typeof e.instance.getMode == "function" && e.instance.getMode() !== "Normal"
|
||||
});
|
||||
}
|
||||
if (!userType) return;
|
||||
let [children, index] = BDFDB.ReactUtils.findParent(e.returnvalue, {props: [["className", BDFDB.disCN.userpopoutheadernickname]]});
|
||||
if (index > -1) {
|
||||
if (!BDFDB.ArrayUtils.is(children[index].props.children)) children[index].props.children = [children[index].props.children].flat(10);
|
||||
this.injectStaffTag(children[index].props.children, e.instance.props.user, userType, 2, {
|
||||
tagClass: BDFDB.disCNS.userpopoutheaderbottag + BDFDB.disCN.bottagnametag,
|
||||
inverted: typeof e.instance.getMode == "function" && e.instance.getMode() !== "Normal"
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
processUserProfileUsername (e) {
|
||||
if (e.instance.props.user && this.settings.tagPlaces.userProfile) {
|
||||
let userType = this.getUserType(e.instance.props.user, e.instance.props.channel && e.instance.props.channel.id);
|
||||
if (!userType) return;
|
||||
let username = BDFDB.ReactUtils.findChild(e.returnvalue, {props: ["children", "style", "variant"]});
|
||||
if (!username) return;
|
||||
username.props.children = [username.props.children];
|
||||
this.injectStaffTag(username.props.children, e.instance.props.user, userType, 2, {
|
||||
tagClass: BDFDB.disCN.bottagnametag,
|
||||
useRem: e.instance.props.useRemSizes,
|
||||
inverted: e.instance.props.invertBotTagColor
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
injectStaffTag (children, user, userType, insertIndex, config = {}) {
|
||||
if (!BDFDB.ArrayUtils.is(children) || !user) return;
|
||||
|
|
|
@ -5505,7 +5505,7 @@ button.button__4f306.enabled__470f0:hover svg {
|
|||
}
|
||||
#app-mount .lookLink__93965.colorPrimary__6ed40:hover .contents_fb6220,
|
||||
#app-mount .lookLink__93965.hoverPrimary__3e6c3.hasHover__3ab8c:hover .contents_fb6220 {
|
||||
background-image: linear-gradient(0deg, transparent, transparent 1px, rgb(var(--textdarkest)) 0, rgb(var(--textdarkest)) 2px, transparent 0);
|
||||
--button--underline-color: rgb(var(--textdarkest));
|
||||
color: rgb(var(--textdarkest));
|
||||
}
|
||||
|
||||
|
@ -5569,7 +5569,7 @@ button.button__4f306.enabled__470f0:hover svg {
|
|||
}
|
||||
#app-mount .lookLink__93965.colorTransparent__4c280:hover .contents_fb6220,
|
||||
#app-mount .lookLink__93965.hoverTransparent_a4eefd.hasHover__3ab8c:hover .contents_fb6220 {
|
||||
background-image: linear-gradient(0deg, transparent,transparent 1px,rgb(var(--textbrighter)) 0,rgb(var(--textbrighter)) 2px,transparent 0);
|
||||
--button--underline-color: rgb(var(--textbright));
|
||||
color: rgb(var(--textbright));
|
||||
}
|
||||
|
||||
|
|
|
@ -799,6 +799,9 @@
|
|||
.background_b61fcc .lookLink__93965.colorLink_b651e5 {
|
||||
color: rgb(var(--accentcolor));
|
||||
}
|
||||
.background_b61fcc .lookLink__93965.colorLink_b651e5:hover .contents_fb6220 {
|
||||
--button--underline-color: rgb(var(--accentcolor));
|
||||
}
|
||||
.contentCircle_bc797d { /* accountsettings avatar upload */
|
||||
background-color: rgb(var(--accentcolor));
|
||||
}
|
||||
|
@ -1707,6 +1710,9 @@ a.metadataDownload__6b32d {
|
|||
.reset__51b37.lookLink__93965.colorLink_b651e5 {
|
||||
color: rgb(var(--accentcolor));
|
||||
}
|
||||
.reset__51b37.lookLink__93965.colorLink_b651e5:hover .contents_fb6220 {
|
||||
--button--underline-color: rgb(var(--accentcolor));
|
||||
}
|
||||
|
||||
|
||||
/* ~~~~ 11. POPOUTS ~~~~ */
|
||||
|
@ -1962,8 +1968,7 @@ a.metadataDownload__6b32d {
|
|||
}
|
||||
#app-mount .lookLink__93965.hoverBrand__98583.hasHover__3ab8c:hover .contents_fb6220,
|
||||
#app-mount .lookLink__93965.hoverBrandNew_be3663.hasHover__3ab8c:hover .contents_fb6220 {
|
||||
background-image: linear-gradient(0deg, transparent, transparent 1px, rgb(var(--accentcolor)) 0, rgb(var(--accentcolor)) 2px, transparent 0);
|
||||
color: rgb(var(--accentcolor));
|
||||
--button--underline-color: rgb(var(--accentcolor));
|
||||
}
|
||||
#app-mount .lookLink__93965.colorLink_b651e5 svg [fill*="hsl"] {
|
||||
fill: currentColor !important;
|
||||
|
|
|
@ -511,7 +511,7 @@ html .iconBadge__2abac {
|
|||
}
|
||||
#app-mount .lookLink__93965.colorPrimary__6ed40:hover .contents_fb6220,
|
||||
#app-mount .lookLink__93965.hoverPrimary__3e6c3.hasHover__3ab8c:hover .contents_fb6220 {
|
||||
background-image: linear-gradient(0deg, transparent, transparent 1px, rgb(var(--textbrightest)) 0, rgb(var(--textbrightest)) 2px, transparent 0);
|
||||
--button--underline-color: var(--header-primary);
|
||||
color: var(--header-primary);
|
||||
}
|
||||
|
||||
|
@ -577,7 +577,7 @@ html .iconBadge__2abac {
|
|||
}
|
||||
#app-mount .lookLink__93965.colorTransparent__4c280:hover .contents_fb6220,
|
||||
#app-mount .lookLink__93965.hoverTransparent_a4eefd.hasHover__3ab8c:hover .contents_fb6220 {
|
||||
background-image: linear-gradient(0deg, transparent,transparent 1px,rgb(var(--textbrighter)) 0,rgb(var(--textbrighter)) 2px,transparent 0);
|
||||
--button--underline-color: var(--text-normal);
|
||||
color: var(--text-normal);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue