This commit is contained in:
Mirco Wittrien 2021-05-27 16:39:47 +02:00
parent 3d7a69e0f2
commit 9d4bdc42a3
6 changed files with 38 additions and 69 deletions

View File

@ -3017,11 +3017,11 @@
"userpopoutfooter": ["UserPopoutWrapper", "footer"],
"userpopoutheaderbottagwithnickname": ["UserPopout", "headerBotTagWithNickname"],
"userpopoutheadertagdiscriminatornonickname": ["UserPopout", "headerTagDiscriminatorNoNickname"],
"userpopoutheadername": ["UserPopout", "nickname"],
"userpopoutheadernamebase": ["UserPopout", "headerTagUsernameNoNickname"],
"userpopoutheadernickname": ["UserPopout", "nickname"],
"userpopoutheadernormal": ["UserPopout", "headerNormal"],
"userpopoutheadertag": ["UserPopout", "headerTag"],
"userpopoutheadertagnonickname": ["UserPopout", "headerTagNoNickname"],
"userpopoutheadertagusernamebase": ["UserPopout", "headerTagUsernameBase"],
"userpopoutheadertagusernamenonickname": ["UserPopout", "headerTagUsernameNoNickname"],
"userpopoutheadertagwithnickname": ["UserPopout", "headerTagWithNickname"],
"userpopoutheadertext": ["UserPopout", "headerText"],

View File

@ -461,20 +461,11 @@ img:not([src]), img[src=""], img[src="null"] {
text-overflow: ellipsis;
}
[REPLACE_CLASS_userpopoutheadernamewrapper_old],
[REPLACE_CLASS_userpopoutheadername],
[REPLACE_CLASS_userpopoutheadertagnonickname] {
display: flex;
align-items: center;
line-height: unset;
overflow: hidden;
}
[REPLACE_CLASS_userpopoutheadernamebase] {
overflow: hidden;
}
[REPLACE_CLASS_userpopoutheadertagdiscriminatornonickname] {
position: relative;
top: 1px;
[REPLACE_CLASS_userpopoutheadernickname] [REPLACE_CLASS_bottag],
[REPLACE_CLASS_userpopoutheadertagnonickname] [REPLACE_CLASS_bottag] {
position: relative;
top: 4px;
}
[REPLACE_CLASS_userinfodate] {
user-select: text;
@ -484,7 +475,7 @@ img:not([src]), img[src=""], img[src="null"] {
margin-top: 0;
}
[REPLACE_CLASS_userinfodate] + *:not([REPLACE_CLASS_userinfodate]) {
margin-top: 4px;
margin-top: 6px;
}
[REPLACE_CLASS_userpopout] [REPLACE_CLASS_userinfodate] {
color: var(--header-secondary);

View File

@ -2,7 +2,7 @@
* @name EditUsers
* @author DevilBro
* @authorId 278543574059057154
* @version 4.2.2
* @version 4.2.3
* @description Allows you to locally edit Users
* @invite Jx3TjNS
* @donate https://www.paypal.me/MircoWittrien
@ -17,12 +17,12 @@ module.exports = (_ => {
"info": {
"name": "EditUsers",
"author": "DevilBro",
"version": "4.2.2",
"version": "4.2.3",
"description": "Allows you to locally edit Users"
},
"changeLog": {
"fixed": {
"Mentions": ""
"improved": {
"New User Popout": "Fixed for the new User Popout, which will be released soon-ish"
}
}
};
@ -106,7 +106,6 @@ module.exports = (_ => {
HeaderBarContainer: "render",
ChannelEditorContainer: "render",
AutocompleteUserResult: "render",
UserPopout: "render",
UserPopoutHeader: "default",
UserProfile: "render",
UserInfo: "default",
@ -140,7 +139,6 @@ module.exports = (_ => {
AutocompleteUserResult: "render",
DiscordTag: "default",
NameTag: "default",
UserPopout: "render",
UserPopoutHeader: "default",
NowPlayingHeader: "Header",
VoiceUser: "render",
@ -443,7 +441,6 @@ module.exports = (_ => {
let changeBackground = false;
let tagClass = "";
switch (e.instance.props.className) {
case BDFDB.disCN.userpopoutheadertagnonickname_old:
case BDFDB.disCN.userpopoutheadertagnonickname:
change = this.settings.places.userPopout;
guildId = BDFDB.LibraryModules.LastGuildStore.getGuildId();
@ -483,15 +480,7 @@ module.exports = (_ => {
}
}
processUserPopout (e) {
this.handleUserPopout(e);
}
processUserPopoutHeader (e) {
this.handleUserPopout(e);
}
handleUserPopout (e) {
if (e.instance.props.user && this.settings.places.userPopout) {
let data = changedUsers[e.instance.props.user.id];
if (!e.returnvalue) {
@ -506,10 +495,11 @@ module.exports = (_ => {
}
else {
if (data && (data.color1 || data.color2 || data.tag)) {
let [children, index] = BDFDB.ReactUtils.findParent(e.returnvalue, {props: [["className", [BDFDB.disCN.userpopoutheadername_old, BDFDB.disCN.userpopoutheadername]]]});
let [children, index] = BDFDB.ReactUtils.findParent(e.returnvalue, {props: [["className", BDFDB.disCN.userpopoutheadernickname]]});
if (index > -1) {
this.changeUserColor(children[index], e.instance.props.user.id, {changeBackground: true});
this.injectBadge(children, e.instance.props.user.id, BDFDB.LibraryModules.LastGuildStore.getGuildId(), 2, {
if (!BDFDB.ArrayUtils.is(children[index].props.children)) children[index].props.children = [children[index].props.children].flat(10);
this.injectBadge(children[index].props.children, e.instance.props.user.id, BDFDB.LibraryModules.LastGuildStore.getGuildId(), 2, {
tagClass: BDFDB.disCN.bottagnametag,
inverted: typeof e.instance.getMode == "function" && e.instance.getMode() !== "Normal"
});

View File

@ -2,7 +2,7 @@
* @name JoinedAtDate
* @author DevilBro
* @authorId 278543574059057154
* @version 1.2.7
* @version 1.2.8
* @description Displays the Joined At Date of a Member in the UserPopout and UserModal
* @invite Jx3TjNS
* @donate https://www.paypal.me/MircoWittrien
@ -17,7 +17,7 @@ module.exports = (_ => {
"info": {
"name": "JoinedAtDate",
"author": "DevilBro",
"version": "1.2.7",
"version": "1.2.8",
"description": "Displays the Joined At Date of a Member in the UserPopout and UserModal"
},
"changeLog": {
@ -66,6 +66,7 @@ module.exports = (_ => {
}
} : (([Plugin, BDFDB]) => {
var loadedUsers, requestedUsers;
var currentPopout;
return class JoinedAtDate extends Plugin {
onLoad () {
@ -160,16 +161,13 @@ module.exports = (_ => {
}
processUserPopout (e) {
if (e.instance.props.user && this.settings.places.userPopout) {
let [children, index] = BDFDB.ReactUtils.findParent(e.returnvalue, {name: "CustomStatus"});
if (index > -1) this.injectDate(e.instance, children, 2, e.instance.props.user, e.instance.props.guildId);
}
currentPopout = e.instance;
}
processUserPopoutHeader (e) {
if (e.instance.props.user && this.settings.places.userPopout) {
let [children, index] = BDFDB.ReactUtils.findParent(e.returnvalue, {name: "CustomStatus"});
if (index > -1) this.injectDate(e.instance, children, 2, e.instance.props.user, e.instance.props.guildId);
if (index > -1) this.injectDate(currentPopout, children, 2, e.instance.props.user, e.instance.props.guildId);
}
}

View File

@ -2,7 +2,7 @@
* @name LastMessageDate
* @author DevilBro
* @authorId 278543574059057154
* @version 1.2.2
* @version 1.2.3
* @description Displays the Last Message Date of a Member for the current Server/DM in the UserPopout and UserModal
* @invite Jx3TjNS
* @donate https://www.paypal.me/MircoWittrien
@ -17,7 +17,7 @@ module.exports = (_ => {
"info": {
"name": "LastMessageDate",
"author": "DevilBro",
"version": "1.2.2",
"version": "1.2.3",
"description": "Displays the Last Message Date of a Member for the current Server/DM in the UserPopout and UserModal"
},
"changeLog": {
@ -66,7 +66,7 @@ module.exports = (_ => {
}
} : (([Plugin, BDFDB]) => {
var loadedUsers, requestedUsers, languages;
var settings = {}, choices = {}, formats = {}, amounts = {};
var currentPopout;
return class LastMessageDate extends Plugin {
onLoad () {
@ -171,16 +171,13 @@ module.exports = (_ => {
}
processUserPopout (e) {
if (e.instance.props.user && this.settings.places.userPopout) {
let [children, index] = BDFDB.ReactUtils.findParent(e.returnvalue, {name: "CustomStatus"});
if (index > -1) this.injectDate(e.instance, children, 2, e.instance.props.user, e.instance.props.guildId);
}
currentPopout = e.instance;
}
processUserPopoutHeader (e) {
if (e.instance.props.user && this.settings.places.userPopout) {
let [children, index] = BDFDB.ReactUtils.findParent(e.returnvalue, {name: "CustomStatus"});
if (index > -1) this.injectDate(e.instance, children, 2, e.instance.props.user, e.instance.props.guildId);
if (index > -1) this.injectDate(currentPopout, children, 2, e.instance.props.user, e.instance.props.guildId);
}
}

View File

@ -2,7 +2,7 @@
* @name StaffTag
* @author DevilBro
* @authorId 278543574059057154
* @version 1.4.0
* @version 1.4.2
* @description Adds a Crown/Tag to Server Owners (or Admins/Management)
* @invite Jx3TjNS
* @donate https://www.paypal.me/MircoWittrien
@ -17,12 +17,12 @@ module.exports = (_ => {
"info": {
"name": "StaffTag",
"author": "DevilBro",
"version": "1.4.0",
"version": "1.4.2",
"description": "Adds a Crown/Tag to Server Owners (or Admins/Management)"
},
"changeLog": {
"progress": {
"New Plugin Name": "Changed Plugin Name for more clarity"
"improved": {
"New User Popout": "Fixed for the new User Popout, which will be released soon-ish"
}
}
};
@ -80,7 +80,6 @@ module.exports = (_ => {
MessageUsername: "default",
VoiceUser: "render",
NameTag: "default",
UserPopout: "render",
UserPopoutHeader: "default"
}
};
@ -267,7 +266,6 @@ module.exports = (_ => {
if (userType) {
let inject = false, tagClass = "";
switch (e.instance.props.className) {
case BDFDB.disCN.userpopoutheadertagnonickname_old:
case BDFDB.disCN.userpopoutheadertagnonickname:
inject = this.settings.tagPlaces.userPopout;
tagClass = BDFDB.disCN.bottagnametag;
@ -285,24 +283,19 @@ module.exports = (_ => {
}
}
}
processUserPopout (e) {
this.handleUserPopout(e);
}
processUserPopoutHeader (e) {
this.handleUserPopout(e);
}
handleUserPopout (e) {
processUserPopoutHeader (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.userpopoutheadername_old, BDFDB.disCN.userpopoutheadername]]]});
if (index > -1) this.injectStaffTag(children, e.instance.props.user, userType, 2, {
tagClass: BDFDB.disCNS.userpopoutheaderbottagwithnickname_old + BDFDB.disCNS.userpopoutheaderbottagwithnickname + BDFDB.disCN.bottagnametag,
inverted: typeof e.instance.getMode == "function" && e.instance.getMode() !== "Normal"
});
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.disCN.bottagnametag,
inverted: typeof e.instance.getMode == "function" && e.instance.getMode() !== "Normal"
});
}
}
}
}