This commit is contained in:
Mirco Wittrien 2022-02-11 14:43:01 +01:00
parent 1ce9a41e15
commit 69afcc3fbe
3 changed files with 40 additions and 42 deletions

View File

@ -1279,6 +1279,7 @@
"ModalMiniContent": {"props": ["modal", "content"], "length": 2}, "ModalMiniContent": {"props": ["modal", "content"], "length": 2},
"ModalSub": {"props": ["modal", "sizeLarge"]}, "ModalSub": {"props": ["modal", "sizeLarge"]},
"NameContainer": {"props": ["nameAndDecorators", "name"]}, "NameContainer": {"props": ["nameAndDecorators", "name"]},
"NameContainerState": {"props": ["interactive", "selected", "muted"]},
"NameTag": {"props": ["bot", "nameTag"]}, "NameTag": {"props": ["bot", "nameTag"]},
"NitroStore": {"props": ["applicationStore", "marketingHeader"]}, "NitroStore": {"props": ["applicationStore", "marketingHeader"]},
"NoteTextarea": {"props": ["textarea"], "length": 1}, "NoteTextarea": {"props": ["textarea"], "length": 1},
@ -2609,14 +2610,14 @@
"modeselectable": ["FormText", "modeSelectable"], "modeselectable": ["FormText", "modeSelectable"],
"namecontainer": ["NameContainer", "container"], "namecontainer": ["NameContainer", "container"],
"namecontaineravatar": ["NameContainer", "avatar"], "namecontaineravatar": ["NameContainer", "avatar"],
"namecontainerchildren": ["NameContainer", "children"],
"namecontainerclickable": ["NameContainer", "clickable"],
"namecontainercontent": ["NameContainer", "content"], "namecontainercontent": ["NameContainer", "content"],
"namecontainerinteractive": ["NameContainerState", "interactive"],
"namecontainerlayout": ["NameContainer", "layout"], "namecontainerlayout": ["NameContainer", "layout"],
"namecontainermuted": ["NameContainerState", "muted"],
"namecontainername": ["NameContainer", "name"], "namecontainername": ["NameContainer", "name"],
"namecontainernamecontainer": ["NotFound", "nameContainerNameContainer"], "namecontainernamecontainer": ["NotFound", "nameContainerNameContainer"],
"namecontainernamewrapper": ["NameContainer", "nameAndDecorators"], "namecontainernamewrapper": ["NameContainer", "nameAndDecorators"],
"namecontainerselected": ["NameContainer", "selected"], "namecontainerselected": ["NameContainerState", "selected"],
"namecontainersubtext": ["NameContainer", "subText"], "namecontainersubtext": ["NameContainer", "subText"],
"nametag": ["NameTag", "nameTag"], "nametag": ["NameTag", "nameTag"],
"nitrostore": ["NitroStore", "applicationStore"], "nitrostore": ["NitroStore", "applicationStore"],

View File

@ -2,7 +2,7 @@
* @name EditUsers * @name EditUsers
* @author DevilBro * @author DevilBro
* @authorId 278543574059057154 * @authorId 278543574059057154
* @version 4.4.5 * @version 4.4.6
* @description Allows you to locally edit Users * @description Allows you to locally edit Users
* @invite Jx3TjNS * @invite Jx3TjNS
* @donate https://www.paypal.me/MircoWittrien * @donate https://www.paypal.me/MircoWittrien
@ -17,7 +17,7 @@ module.exports = (_ => {
"info": { "info": {
"name": "EditUsers", "name": "EditUsers",
"author": "DevilBro", "author": "DevilBro",
"version": "4.4.5", "version": "4.4.6",
"description": "Allows you to locally edit Users" "description": "Allows you to locally edit Users"
} }
}; };
@ -433,7 +433,7 @@ module.exports = (_ => {
let userName = BDFDB.ReactUtils.findChild(children, {name: "AutocompleteRowHeading"}); let userName = BDFDB.ReactUtils.findChild(children, {name: "AutocompleteRowHeading"});
if (userName) this.changeUserColor(userName, e.instance.props.user.id); if (userName) this.changeUserColor(userName, e.instance.props.user.id);
return children; return children;
}, "", this); }, "Error in Children Render of AutocompleteUserResult!", this);
} }
} }
} }
@ -653,7 +653,7 @@ module.exports = (_ => {
let userName = BDFDB.ReactUtils.findChild(renderedChildren, {name: "PanelTitle"}); let userName = BDFDB.ReactUtils.findChild(renderedChildren, {name: "PanelTitle"});
if (userName) this.changeUserColor(userName, e.instance.props.currentUser.id); if (userName) this.changeUserColor(userName, e.instance.props.currentUser.id);
return renderedChildren; return renderedChildren;
}, "", this); }, "Error in Tooltip Children Render of Account!", this);
} }
} }
} }
@ -748,7 +748,7 @@ module.exports = (_ => {
let renderedChildren = renderChildren(...args); let renderedChildren = renderChildren(...args);
this.changeUserColor(renderedChildren, author.id, {guildId: (BDFDB.LibraryModules.ChannelStore.getChannel(e.instance.props.message.channel_id) || {}).guild_id}); this.changeUserColor(renderedChildren, author.id, {guildId: (BDFDB.LibraryModules.ChannelStore.getChannel(e.instance.props.message.channel_id) || {}).guild_id});
return renderedChildren; return renderedChildren;
}, "", this); }, "Error in Children Render of MessageUsername!", this);
} }
else this.changeUserColor(messageUsername, author.id, {guildId: (BDFDB.LibraryModules.ChannelStore.getChannel(e.instance.props.message.channel_id) || {}).guild_id}); else this.changeUserColor(messageUsername, author.id, {guildId: (BDFDB.LibraryModules.ChannelStore.getChannel(e.instance.props.message.channel_id) || {}).guild_id});
} }
@ -859,7 +859,7 @@ module.exports = (_ => {
let children = renderChildren(...args); let children = renderChildren(...args);
this.changeMention(BDFDB.ReactUtils.findChild(children, {name: "Mention"}), changedUsers[e.instance.props.userId]); this.changeMention(BDFDB.ReactUtils.findChild(children, {name: "Mention"}), changedUsers[e.instance.props.userId]);
return children; return children;
}, "", this); }, "Error in Children Render of UserMention!", this);
} }
else this.changeMention(BDFDB.ReactUtils.findChild(e.returnvalue, {name: "Mention"}), changedUsers[e.instance.props.userId]); else this.changeMention(BDFDB.ReactUtils.findChild(e.returnvalue, {name: "Mention"}), changedUsers[e.instance.props.userId]);
} }
@ -880,7 +880,7 @@ module.exports = (_ => {
let children = renderChildren(...args); let children = renderChildren(...args);
this.changeMention(children, data); this.changeMention(children, data);
return children; return children;
}, "", this); }, "Error in Children Render of RichUserMention!", this);
} }
else this.changeMention(e.returnvalue, data); else this.changeMention(e.returnvalue, data);
} }
@ -959,7 +959,7 @@ module.exports = (_ => {
if (changedUsers[e2.methodArguments[0].user.id].name) userName.props.children = changedUsers[e2.methodArguments[0].user.id].name; if (changedUsers[e2.methodArguments[0].user.id].name) userName.props.children = changedUsers[e2.methodArguments[0].user.id].name;
this.changeUserColor(userName, e2.methodArguments[0].user.id); this.changeUserColor(userName, e2.methodArguments[0].user.id);
} }
let avatar = BDFDB.ReactUtils.findChild(e2.returnValue, {props: [["className", BDFDB.disCN.selectfilterpopoutavatar]]}); let avatar = BDFDB.ReactUtils.findChild(e2.returnValue, {props: [["className", BDFDB.disCN.auditlogpopoutavatar]]});
if (avatar) avatar.props.src = this.getUserAvatar(e2.methodArguments[0].user.id); if (avatar) avatar.props.src = this.getUserAvatar(e2.methodArguments[0].user.id);
}}}, {force: true, noCache: true}); }}}, {force: true, noCache: true});
} }
@ -1056,7 +1056,7 @@ module.exports = (_ => {
let renderedChildren = childrenRender(...args); let renderedChildren = childrenRender(...args);
if (renderedChildren && renderedChildren.props) renderedChildren.props.icon = this.getUserAvatar(recipientId); if (renderedChildren && renderedChildren.props) renderedChildren.props.icon = this.getUserAvatar(recipientId);
return renderedChildren; return renderedChildren;
}, "", this); }, "Error in Avatar Render of DirectMessage!", this);
} }
} }
} }
@ -1078,7 +1078,7 @@ module.exports = (_ => {
let children = childrenRender(...args); let children = childrenRender(...args);
this._processPrivateChannel(e.instance, children); this._processPrivateChannel(e.instance, children);
return children; return children;
}, "", this); }, "Error in Children Render of PrivateChannel!", this);
} }
else this._processPrivateChannel(e.instance, e.returnvalue); else this._processPrivateChannel(e.instance, e.returnvalue);
} }
@ -1086,11 +1086,12 @@ module.exports = (_ => {
} }
_processPrivateChannel (instance, returnvalue) { _processPrivateChannel (instance, returnvalue) {
returnvalue.props.name = BDFDB.ReactUtils.createElement("span", {children: this.getUserData(instance.props.user.id).username}); const wrapper = returnvalue.props.avatar ? returnvalue : BDFDB.ReactUtils.findChild(returnvalue, {props: ["avatar"]});
this.changeUserColor(returnvalue.props.name, instance.props.user.id, {modify: BDFDB.ObjectUtils.extract(Object.assign({}, instance.props, instance.state), "hovered", "selected", "hasUnreadMessages", "muted")}); wrapper.props.name = BDFDB.ReactUtils.createElement("span", {children: this.getUserData(instance.props.user.id).username});
returnvalue.props.avatar.props.src = this.getUserAvatar(instance.props.user.id); this.changeUserColor(wrapper.props.name, instance.props.user.id, {modify: BDFDB.ObjectUtils.extract(Object.assign({}, instance.props, instance.state), "hovered", "selected", "hasUnreadMessages", "muted")});
returnvalue.props.decorators = [returnvalue.props.decorators].flat(10); if (wrapper.props.avatar) wrapper.props.avatar.props.src = this.getUserAvatar(instance.props.user.id);
this.injectBadge(returnvalue.props.decorators, instance.props.user.id, null, 1); wrapper.props.decorators = [wrapper.props.decorators].flat(10);
this.injectBadge(wrapper.props.decorators, instance.props.user.id, null, 1);
} }
processQuickSwitchUserResult (e) { processQuickSwitchUserResult (e) {
@ -1158,7 +1159,7 @@ module.exports = (_ => {
this.changeUserColor(userName, recipientId); this.changeUserColor(userName, recipientId);
} }
return renderedChildren; return renderedChildren;
}, "", this); }, "Error in Children Render of RTCConnection!", this);
} }
} }

View File

@ -2,7 +2,7 @@
* @name PinDMs * @name PinDMs
* @author DevilBro * @author DevilBro
* @authorId 278543574059057154 * @authorId 278543574059057154
* @version 1.8.6 * @version 1.8.7
* @description Allows you to pin DMs, making them appear at the top of your DMs/ServerList * @description Allows you to pin DMs, making them appear at the top of your DMs/ServerList
* @invite Jx3TjNS * @invite Jx3TjNS
* @donate https://www.paypal.me/MircoWittrien * @donate https://www.paypal.me/MircoWittrien
@ -17,7 +17,7 @@ module.exports = (_ => {
"info": { "info": {
"name": "PinDMs", "name": "PinDMs",
"author": "DevilBro", "author": "DevilBro",
"version": "1.8.6", "version": "1.8.7",
"description": "Allows you to pin DMs, making them appear at the top of your DMs/ServerList" "description": "Allows you to pin DMs, making them appear at the top of your DMs/ServerList"
} }
}; };
@ -94,9 +94,6 @@ module.exports = (_ => {
}; };
this.css = ` this.css = `
${BDFDB.dotCNS.dmchannel + BDFDB.dotCN.namecontainerchildren} {
display: flex;
}
${BDFDB.dotCN.dmchannel}:hover ${BDFDB.dotCN._pindmsunpinbutton} { ${BDFDB.dotCN.dmchannel}:hover ${BDFDB.dotCN._pindmsunpinbutton} {
display: block; display: block;
} }
@ -606,7 +603,7 @@ module.exports = (_ => {
let children = childrenRender(...args); let children = childrenRender(...args);
this.injectCategories(instance, children, categories); this.injectCategories(instance, children, categories);
return children; return children;
}, "", this); }, "Error in Children Render of PrivateChannelList!", this);
} }
else if (BDFDB.ArrayUtils.is(returnvalue)) { else if (BDFDB.ArrayUtils.is(returnvalue)) {
for (let child of returnvalue) this.injectCategories(instance, child, categories); for (let child of returnvalue) this.injectCategories(instance, child, categories);
@ -685,7 +682,7 @@ module.exports = (_ => {
let children = childrenRender(...args); let children = childrenRender(...args);
this._processPrivateChannel(e.instance, children, category); this._processPrivateChannel(e.instance, children, category);
return children; return children;
}, "", this); }, "Error in Children Render of PrivateChannel!", this);
} }
else this._processPrivateChannel(e.instance, e.returnvalue, category); else this._processPrivateChannel(e.instance, e.returnvalue, category);
} }
@ -694,23 +691,22 @@ module.exports = (_ => {
} }
_processPrivateChannel (instance, returnvalue, category) { _processPrivateChannel (instance, returnvalue, category) {
returnvalue.props.children = [ const interactive = BDFDB.ReactUtils.findChild(e.returnvalue, {props: [["className", BDFDB.disCN.namecontainerinteractive]]});
BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.TooltipContainer, { if (!interactive) return;
text: BDFDB.LanguageUtils.LanguageStrings.UNPIN, interactive.props.children.splice(interactive.props.children.length == 1 ? 1 : -1, 0, BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.TooltipContainer, {
children: BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.Clickable, { text: BDFDB.LanguageUtils.LanguageStrings.UNPIN,
className: BDFDB.disCN._pindmsunpinbutton, children: BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.Clickable, {
onClick: event => { className: BDFDB.disCN._pindmsunpinbutton,
BDFDB.ListenerUtils.stopEvent(event); onClick: event => {
this.removeFromCategory(instance.props.channel.id, category, "channelList"); BDFDB.ListenerUtils.stopEvent(event);
}, this.removeFromCategory(instance.props.channel.id, category, "channelList");
children: BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.SvgIcon, { },
className: BDFDB.disCN._pindmsunpinicon, children: BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.SvgIcon, {
name: BDFDB.LibraryComponents.SvgIcon.Names.PIN className: BDFDB.disCN._pindmsunpinicon,
}) name: BDFDB.LibraryComponents.SvgIcon.Names.PIN
}) })
}), })
returnvalue.props.children }));
].flat(10).filter(n => n);
} }
processDirectMessage (e) { processDirectMessage (e) {