CreationDate/JoinedAtDate now properlly sets the max-width for the date containers

This commit is contained in:
Mirco Wittrien 2019-01-03 22:22:05 +01:00
parent 4a7ff38196
commit cf4afca732
2 changed files with 6 additions and 6 deletions

View File

@ -16,7 +16,7 @@ class CreationDate {
margin-bottom: 4px;
}
${BDFDB.dotCN.userprofile} .creationDate {
max-width: 200px;
margin-right: 20px;
}
${BDFDB.dotCNS.themelight + BDFDB.dotCN.userpopoutheadernormal} .creationDate {
color: #b9bbbe;
@ -51,7 +51,7 @@ class CreationDate {
getDescription () {return "Displays the Creation Date of an Account in the UserPopout and UserModal.";}
getVersion () {return "1.2.2";}
getVersion () {return "1.2.3";}
getAuthor () {return "DevilBro";}
@ -192,7 +192,7 @@ class CreationDate {
let choice = BDFDB.getData("creationDateLang", this, "choices");
let nametag = container.querySelector(BDFDB.dotCN.nametag);
let joinedAtDate = container.querySelector(".joinedAtDate");
container.insertBefore($(`<div class="creationDate DevilBro-textscrollwrapper ${BDFDB.disCN.textrow}"><div class="DevilBro-textscroll">${this.labels.createdat_text + " " + this.getCreationTime(this.languages[choice].id, info.createdAt)}</div></div>`)[0], joinedAtDate ? joinedAtDate.nextSibling : (nametag ? nametag.nextSibling : null));
container.insertBefore($(`<div class="creationDate DevilBro-textscrollwrapper ${BDFDB.disCN.textrow}" style="max-width: ${BDFDB.getParentEle(popout ? BDFDB.dotCN.userpopoutheader : BDFDB.dotCN.userprofileheaderinfo, container).getBoundingClientRect().width - 20}px !important;"><div class="DevilBro-textscroll">${this.labels.createdat_text + " " + this.getCreationTime(this.languages[choice].id, info.createdAt)}</div></div>`)[0], joinedAtDate ? joinedAtDate.nextSibling : (nametag ? nametag.nextSibling : null));
BDFDB.initElements(container.parentElement);
if (popout && popout.style.transform.indexOf("translateY(-1") == -1) {
let arect = document.querySelector(BDFDB.dotCN.appmount).getBoundingClientRect();

View File

@ -18,7 +18,7 @@ class JoinedAtDate {
margin-bottom: 4px;
}
${BDFDB.dotCN.userprofile} .joinedAtDate {
max-width: 200px;
margin-right: 20px;
}
${BDFDB.dotCNS.themelight + BDFDB.dotCN.userpopoutheadernormal} .joinedAtDate {
color: #b9bbbe;
@ -53,7 +53,7 @@ class JoinedAtDate {
getDescription () {return "Displays the Joined At Date of the current Server for a Member in the UserPopout and UserModal.";}
getVersion () {return "1.0.3";}
getVersion () {return "1.0.4";}
getAuthor () {return "DevilBro";}
@ -201,7 +201,7 @@ class JoinedAtDate {
let choice = BDFDB.getData("joinedAtDateLang", this, "choices");
let nametag = container.querySelector(BDFDB.dotCN.nametag);
let creationDate = container.querySelector(".creationDate");
container.insertBefore($(`<div class="joinedAtDate DevilBro-textscrollwrapper ${BDFDB.disCN.textrow}"><div class="DevilBro-textscroll">${this.labels.joinedat_text + " " + this.getJoinedTime(this.languages[choice].id, timestamp)}</div></div>`)[0], creationDate ? creationDate : (nametag ? nametag.nextSibling : null));
container.insertBefore($(`<div class="joinedAtDate DevilBro-textscrollwrapper ${BDFDB.disCN.textrow}" style="max-width: ${BDFDB.getParentEle(popout ? BDFDB.dotCN.userpopoutheader : BDFDB.dotCN.userprofileheaderinfo, container).getBoundingClientRect().width - 20}px !important;"><div class="DevilBro-textscroll">${this.labels.joinedat_text + " " + this.getJoinedTime(this.languages[choice].id, timestamp)}</div></div>`)[0], creationDate ? creationDate : (nametag ? nametag.nextSibling : null));
BDFDB.initElements(container.parentElement);
if (popout && popout.style.transform.indexOf("translateY(-1") == -1) {
let arect = document.querySelector(BDFDB.dotCN.appmount).getBoundingClientRect();