stuff
This commit is contained in:
parent
1bc36346ae
commit
55632e1d58
|
@ -7877,6 +7877,10 @@ module.exports = (_ => {
|
|||
};
|
||||
InternalBDFDB._processUserInfoNode = function (user, wrapper) {
|
||||
if (!user || !wrapper) return;
|
||||
LibraryModules.ImageEditUtils.getPrimaryColorForAvatar(BDFDB.UserUtils.getAvatar(user.id)).then(color => {
|
||||
const rgb = BDFDB.ColorUtils.convert(color, "RGB");
|
||||
if (rgb) wrapper.style.setProperty("--user-banner-color", rgb, "important");
|
||||
});
|
||||
if (InternalData.UserBackgrounds[user.id]) for (let property in InternalData.UserBackgrounds[user.id]) wrapper.style.setProperty(property, InternalData.UserBackgrounds[user.id][property], "important");
|
||||
};
|
||||
InternalBDFDB.processMessageHeader = function (e) {
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
* @name CharCounter
|
||||
* @author DevilBro
|
||||
* @authorId 278543574059057154
|
||||
* @version 1.5.0
|
||||
* @version 1.5.1
|
||||
* @description Adds a Character Counter to most Inputs
|
||||
* @invite Jx3TjNS
|
||||
* @donate https://www.paypal.me/MircoWittrien
|
||||
|
@ -17,12 +17,12 @@ module.exports = (_ => {
|
|||
"info": {
|
||||
"name": "CharCounter",
|
||||
"author": "DevilBro",
|
||||
"version": "1.5.0",
|
||||
"version": "1.5.1",
|
||||
"description": "Adds a Character Counter to most Inputs"
|
||||
},
|
||||
"changeLog": {
|
||||
"fixed": {
|
||||
"Message Input": "Works again for the message textarea"
|
||||
"Change Nick": "Counter gets added again"
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -85,7 +85,7 @@ module.exports = (_ => {
|
|||
after: {
|
||||
ChannelTextAreaContainer: "render",
|
||||
Note: "render",
|
||||
ChangeNickname: "default",
|
||||
ChangeIdentity: "default",
|
||||
CustomStatusModal: "render"
|
||||
}
|
||||
};
|
||||
|
@ -114,7 +114,7 @@ module.exports = (_ => {
|
|||
bottom: -1.0em;
|
||||
}
|
||||
${BDFDB.dotCN._charcounternickcounter} {
|
||||
right: 0 !important;
|
||||
right: 8px !important;
|
||||
top: 0 !important;
|
||||
}
|
||||
${BDFDB.dotCN._charcountercustomstatuscounter} {
|
||||
|
@ -158,12 +158,12 @@ module.exports = (_ => {
|
|||
if (index > -1) this.injectCounter(e.returnvalue, children, e.instance.props.className && e.instance.props.className.indexOf(BDFDB.disCN.usernotepopout) > -1 ? "popoutnote" : "profilenote", "textarea");
|
||||
}
|
||||
|
||||
processChangeNickname (e) {
|
||||
let formItem = BDFDB.ReactUtils.findChild(e.returnvalue, {name: "FormItem"});
|
||||
if (formItem) {
|
||||
let [children, index] = BDFDB.ReactUtils.findParent(formItem, {name: "TextInput"});
|
||||
if (index > -1) this.injectCounter(formItem, children, "nick", BDFDB.dotCN.input);
|
||||
}
|
||||
processChangeIdentity (e) {
|
||||
let [children, index] = BDFDB.ReactUtils.findParent(e.returnvalue, {filter: c => c && c.props && c.props.setNickname});
|
||||
if (index > -1) children.unshift(BDFDB.ReactUtils.createElement("div", {
|
||||
className: BDFDB.DOMUtils.formatClassName(BDFDB.disCN.charcounter, BDFDB.disCN._charcountercounter, BDFDB.disCN._charcounternickcounter),
|
||||
children: `${(children[index].props.nickname || "").length}/${maxLenghts.nick}`
|
||||
}));
|
||||
}
|
||||
|
||||
processCustomStatusModal (e) {
|
||||
|
|
|
@ -85,7 +85,7 @@
|
|||
content: "";
|
||||
position: relative;
|
||||
display: block;
|
||||
background: var(--user-background, var(--background-secondary)) var(--user-popout-position, center)/cover no-repeat;
|
||||
background: var(--user-background, var(--user-banner-color, var(--background-secondary))) var(--user-popout-position, center)/cover no-repeat;
|
||||
top: 0;
|
||||
width: 100%;
|
||||
height: 120px;
|
||||
|
|
Loading…
Reference in New Issue