This commit is contained in:
Mirco Wittrien 2021-05-20 20:59:35 +02:00
parent e35095eaff
commit a28acf728d
4 changed files with 58 additions and 49 deletions

View File

@ -7747,7 +7747,6 @@ module.exports = (_ => {
delete avatar.props.className;
let newProps = {
className: className,
style: {borderRadius: 0, overflow: "visible"},
children: [avatar]
};
newProps[InternalData.userIdAttribute] = user.id;
@ -7763,8 +7762,9 @@ module.exports = (_ => {
}
};
InternalBDFDB._processAvatarMount = function (user, avatar, wrapper) {
if (Node.prototype.isPrototypeOf(avatar) && BDFDB.ObjectUtils.is(user) && (avatar.className || "").indexOf(BDFDB.disCN.bdfdbbadgeavatar) == -1) {
if (wrapper) wrapper.setAttribute(InternalData.userIdAttribute, user.id);
if (!user) return;
if (wrapper) wrapper.setAttribute(InternalData.userIdAttribute, user.id);
if (Node.prototype.isPrototypeOf(avatar) && (avatar.className || "").indexOf(BDFDB.disCN.bdfdbbadgeavatar) == -1) {
avatar.setAttribute(InternalData.userIdAttribute, user.id);
let role = "", addBadge = InternalBDFDB.settings.general.showSupportBadges;
if (BDFDB_Patrons[user.id] && BDFDB_Patrons[user.id].active) {
@ -7780,15 +7780,16 @@ module.exports = (_ => {
let badge = document.createElement("div");
badge.className = BDFDB.disCN.bdfdbbadge;
badge.addEventListener("mouseenter", _ => BDFDB.TooltipUtils.create(badge, role, {position: "top"}));
avatar.style.setProperty("position", "relative");
avatar.style.setProperty("overflow", "visible");
avatar.style.setProperty("border-radius", 0);
avatar.appendChild(badge);
}
}
};
InternalBDFDB._processUserInfoNode = function (user, wrapper) {
if (wrapper && user && InternalData.UserBackgrounds[user.id]) for (let property in InternalData.UserBackgrounds[user.id]) wrapper.style.setProperty(property, InternalData.UserBackgrounds[user.id][property], "important");
if (!user || !wrapper) return;
if (InternalData.UserBackgrounds[user.id]) {
avatar.setAttribute(InternalData.userBannerAttribute, true);
for (let property in InternalData.UserBackgrounds[user.id]) wrapper.style.setProperty(property, InternalData.UserBackgrounds[user.id][property], "important");
}
};
InternalBDFDB.processMessageHeader = function (e) {
if (e.instance.props.message && e.instance.props.message.author) {
@ -7810,7 +7811,7 @@ module.exports = (_ => {
InternalBDFDB._processAvatarMount(e.instance.props.user, e.node.querySelector(BDFDB.dotCN.avatarwrapper), e.node);
};
InternalBDFDB.processUserPopout = function (e) {
InternalBDFDB._processAvatarMount(e.instance.props.user, e.node.querySelector(BDFDB.dotCN.userpopoutavatarwrapper), e.node);
InternalBDFDB._processAvatarMount(e.instance.props.user, e.node.querySelector(BDFDB.dotCN.avatarwrapper), e.node);
InternalBDFDB._processUserInfoNode(e.instance.props.user, e.node);
};
InternalBDFDB.processUserProfile = function (e) {

View File

@ -1301,7 +1301,8 @@
"UploadModal": {"props": ["uploadModal", "bgScale"]},
"UserBadges": {"props": ["profileBadgeStaff", "profileBadgePremium"]},
"UserInfo": {"props": ["userInfo", "discordTag"]},
"UserPopout": {"props": ["userPopout", "headerPlaying"]},
"UserPopout": {"props": ["headerNormal", "profileBadges"]},
"UserPopoutWrapper": {"props": ["userPopout", "headerPlaying"]},
"UserProfile": {"props": ["topSectionNormal", "tabBarContainer"]},
"UserSettingsAppearancePreview": {"props": ["preview", "firstMessage"]},
"UserSummaryItem": {"props": ["avatarContainerMasked", "container"]},
@ -2165,7 +2166,7 @@
"h5defaultmargin": ["Text", "defaultMarginh5"],
"headertitle": ["Text", "title"],
"headerwrapper": ["TextColor2", "wrapper"],
"height12": ["UserPopout", "height12"],
"height12": ["UserPopoutWrapper", "height12"],
"highlight": ["NotFound", "highlight"],
"homebuttonicon": ["HomeIcon", "homeIcon"],
"homebuttonpill": ["HomeIcon", "pill"],
@ -2913,10 +2914,10 @@
"titlebarwordmark": ["TitleBar", "wordmark"],
"titlebarwordmarkmac": ["TitleBar", "wordmarkMacOS"],
"titlebarwordmarkwindows": ["TitleBar", "wordmarkWindows"],
"titlesize10": ["UserPopout", "size10"],
"titlesize12": ["UserPopout", "size12"],
"titlesize14": ["UserPopout", "size14"],
"titlesize16": ["UserPopout", "size16"],
"titlesize10": ["UserPopoutWrapper", "size10"],
"titlesize12": ["UserPopoutWrapper", "size12"],
"titlesize14": ["UserPopoutWrapper", "size14"],
"titlesize16": ["UserPopoutWrapper", "size16"],
"toast": ["Toast", "toast"],
"toastavatar": ["Toast", "avatar"],
"toastbar": ["Toast", "bar"],
@ -2990,38 +2991,38 @@
"userinfosubtext": ["UserInfo", "subtext"],
"userinfotext": ["UserInfo", "text"],
"userinfousername": ["UserInfo", "username"],
"userpopout": ["UserPopout", "userPopout"],
"userpopoutavatarhint": ["UserPopout", "avatarHint"],
"userpopoutavatarhintinner": ["UserPopout", "avatarHintInner"],
"userpopoutavatarwrapper": ["UserPopout", "avatarWrapper"],
"userpopoutavatarwrappernormal": ["UserPopout", "avatarWrapperNormal"],
"userpopoutbody": ["UserPopout", "body"],
"userpopoutbodyinnerwrapper": ["UserPopout", "bodyInnerWrapper"],
"userpopoutbodytitle": ["UserPopout", "bodyTitle"],
"userpopoutcustomstatus": ["UserPopout", "customStatus"],
"userpopoutcustomstatusemoji": ["UserPopout", "customStatusEmoji"],
"userpopoutcustomstatussoloemoji": ["UserPopout", "customStatusSoloEmoji"],
"userpopoutcustomstatustext": ["UserPopout", "customStatusText"],
"userpopoutendbodysection": ["UserPopout", "endBodySection"],
"userpopoutfooter": ["UserPopout", "footer"],
"userpopoutheader": ["UserPopout", "header"],
"userpopoutheaderbottagwithnickname": ["UserPopout", "headerBotTagWithNickname"],
"userpopoutheadernamewrapper": ["UserPopout", "headerNameWrapper"],
"userpopoutheadernickname": ["UserPopout", "headerName"],
"userpopoutheadernormal": ["UserPopout", "headerNormal"],
"userpopoutheaderplaying": ["UserPopout", "headerPlaying"],
"userpopoutheaderspotify": ["UserPopout", "headerSpotify"],
"userpopoutheaderstreaming": ["UserPopout", "headerStreaming"],
"userpopoutheadertag": ["UserPopout", "headerTag"],
"userpopoutheadertagnonickname": ["UserPopout", "headerTagNoNickname"],
"userpopoutheadertagusernamenonickname": ["UserPopout", "headerTagUsernameNoNickname"],
"userpopoutheadertagwithnickname": ["UserPopout", "headerTagWithNickname"],
"userpopoutheadertext": ["UserPopout", "headerText"],
"userpopoutheadertop": ["UserPopout", "headerTop"],
"userpopoutprotip": ["UserPopout", "protip"],
"userpopout": ["UserPopoutWrapper", "userPopout"],
"userpopoutavatarhint": ["UserPopoutWrapper", "avatarHint"],
"userpopoutavatarhintinner": ["UserPopoutWrapper", "avatarHintInner"],
"userpopoutavatarwrapper": ["UserPopoutWrapper", "avatarWrapper"],
"userpopoutavatarwrappernormal": ["UserPopoutWrapper", "avatarWrapperNormal"],
"userpopoutbody": ["UserPopoutWrapper", "body"],
"userpopoutbodyinnerwrapper": ["UserPopoutWrapper", "bodyInnerWrapper"],
"userpopoutbodytitle": ["UserPopoutWrapper", "bodyTitle"],
"userpopoutcustomstatus": ["UserPopoutWrapper", "customStatus"],
"userpopoutcustomstatusemoji": ["UserPopoutWrapper", "customStatusEmoji"],
"userpopoutcustomstatussoloemoji": ["UserPopoutWrapper", "customStatusSoloEmoji"],
"userpopoutcustomstatustext": ["UserPopoutWrapper", "customStatusText"],
"userpopoutendbodysection": ["UserPopoutWrapper", "endBodySection"],
"userpopoutfooter": ["UserPopoutWrapper", "footer"],
"userpopoutheader": ["UserPopoutWrapper", "header"],
"userpopoutheaderbottagwithnickname": ["UserPopoutWrapper", "headerBotTagWithNickname"],
"userpopoutheadernamewrapper": ["UserPopoutWrapper", "headerNameWrapper"],
"userpopoutheadernickname": ["UserPopoutWrapper", "headerName"],
"userpopoutheadernormal": ["UserPopoutWrapper", "headerNormal"],
"userpopoutheaderplaying": ["UserPopoutWrapper", "headerPlaying"],
"userpopoutheaderspotify": ["UserPopoutWrapper", "headerSpotify"],
"userpopoutheaderstreaming": ["UserPopoutWrapper", "headerStreaming"],
"userpopoutheadertag": ["UserPopoutWrapper", "headerTag"],
"userpopoutheadertagnonickname": ["UserPopoutWrapper", "headerTagNoNickname"],
"userpopoutheadertagusernamenonickname": ["UserPopoutWrapper", "headerTagUsernameNoNickname"],
"userpopoutheadertagwithnickname": ["UserPopoutWrapper", "headerTagWithNickname"],
"userpopoutheadertext": ["UserPopoutWrapper", "headerText"],
"userpopoutheadertop": ["UserPopoutWrapper", "headerTop"],
"userpopoutprotip": ["UserPopoutWrapper", "protip"],
"userpopoutrole": ["Role", "role"],
"userpopoutrolecircle": ["Role", "roleCircle"],
"userpopoutrolelist": ["UserPopout", "rolesList"],
"userpopoutrolelist": ["UserPopoutWrapper", "rolesList"],
"userpopoutrolename": ["Role", "roleName"],
"userpopoutroles": ["Role", "root"],
"userprofile": ["UserProfile", "root"],
@ -3042,7 +3043,7 @@
"userprofiletopsectionxbox": ["UserProfile", "topSectionXbox"],
"userprofileusername": ["UserProfile", "username"],
"username": ["NameTag", "username"],
"usernotepopout": ["UserPopout", "note"],
"usernotepopout": ["UserPopoutWrapper", "note"],
"usernoteprofile": ["UserProfile", "note"],
"usernotetextarea": ["NoteTextarea", "textarea"],
"usersettingsappearancepreview": ["UserSettingsAppearancePreview", "preview"],
@ -3113,6 +3114,7 @@
},
"myId": "278543574059057154",
"myGuildId": "410787888507256842",
"userBannerAttribute": "data-has-banner",
"userIdAttribute": "data-user-id",
"userBackgroundsProperties": {
"background": "--user-background",

View File

@ -1,8 +1,11 @@
.supporter-Z3FfwL.hasBadge-4rT8_u .mask-1l8v16 {
-webkit-mask: url('data:image/svg+xml; utf8, <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1 1"><path fill="white" d="M 0,0 H 1 V 1 H 0.29565217 V 0.8 c 0,-0.1 -0.0347826,-0.14 -0.12173913,-0.14 H 0 Z"/></svg>') center/cover no-repeat;
}
.supporter-Z3FfwL.hasBadge-4rT8_u .avatarHint-1qgaV3 {
-webkit-mask: url('data:image/svg+xml; utf8, <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1 1"><path fill="white" d="M 0,0 H 1 V 1 H 0.34 V 0.8 C 0.34,0.7 0.3,0.66 0.2,0.66 H 0 Z"/></svg>');
.supporter-Z3FfwL.hasBadge-4rT8_u ~ .avatarHint-1qgaV3 {
-webkit-mask: url('data:image/svg+xml; utf8, <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1 1"><path fill="white" d="M 0,0 H 1 V 1 H 0.34 V 0.8 C 0.34,0.7 0.3,0.66 0.2,0.66 H 0 Z"/></svg>') center/cover no-repeat;
}
.supporter-Z3FfwL.hasBadge-4rT8_u ~ .avatarHint-1E3LMl {
-webkit-mask: url('data:image/svg+xml; utf8, <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1 1"><path fill="white" d="M 0,0 H 1 V 1 H 0.34 V 0.8 C 0.34,0.72 0.3,0.7 0.2,0.7 H 0 Z"/></svg>') center/cover no-repeat;
}
.supporter-Z3FfwL.hasBadge-4rT8_u .badge-7R_W3s {
-webkit-mask: url('data:image/svg+xml; utf8, <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 508.52 508.52"><path fill="black" d="M63.565, 476.737c0, 12.84, 7.755, 24.473, 19.61, 29.367c3.941, 1.621, 8.073, 2.415, 12.173, 2.415c8.263, 0, 16.4-3.242, 22.47-9.312L254.26, 362.765l136.442, 136.442c6.07, 6.07, 14.207, 9.312, 22.47, 9.312c4.1, 0, 8.232-0.795, 12.141-2.415c11.887-4.894, 19.642-16.527, 19.642-29.367V165.347H63.565V476.737z"/><path fill="black" d="M413.172, 0H95.347C77.804, 0, 63.565, 14.239, 63.565, 31.782v61.782h381.39V31.782C444.955, 14.239, 430.716, 0, 413.172, 0z"/></svg>') center/cover no-repeat !important;

View File

@ -1,8 +1,11 @@
.dev-A7f2Rx.hasBadge-4rT8_u .mask-1l8v16 {
-webkit-mask: url('data:image/svg+xml; utf8, <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1 1"><path fill="white" d="M 0,0 H 1 V 1 H 0.29565217 V 0.8 c 0,-0.1 -0.0347826,-0.14 -0.12173913,-0.14 H 0 Z"/></svg>') center/cover no-repeat;
}
.dev-A7f2Rx.hasBadge-4rT8_u .avatarHint-1qgaV3 {
-webkit-mask: url('data:image/svg+xml; utf8, <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1 1"><path fill="white" d="M 0,0 H 1 V 1 H 0.34 V 0.8 C 0.34,0.7 0.3,0.66 0.2,0.66 H 0 Z"/></svg>');
.dev-A7f2Rx.hasBadge-4rT8_u ~ .avatarHint-1qgaV3 {
-webkit-mask: url('data:image/svg+xml; utf8, <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1 1"><path fill="white" d="M 0,0 H 1 V 1 H 0.34 V 0.8 C 0.34,0.7 0.3,0.66 0.2,0.66 H 0 Z"/></svg>') center/cover no-repeat;
}
.dev-A7f2Rx.hasBadge-4rT8_u ~ .avatarHint-1E3LMl {
-webkit-mask: url('data:image/svg+xml; utf8, <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1 1"><path fill="white" d="M 0,0 H 1 V 1 H 0.34 V 0.8 C 0.34,0.72 0.3,0.7 0.2,0.7 H 0 Z"/></svg>') center/cover no-repeat;
}
.dev-A7f2Rx.hasBadge-4rT8_u .badge-7R_W3s {
-webkit-mask: url('data:image/svg+xml; utf8, <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 508.52 508.52"><path fill="black" d="M63.565, 476.737c0, 12.84, 7.755, 24.473, 19.61, 29.367c3.941, 1.621, 8.073, 2.415, 12.173, 2.415c8.263, 0, 16.4-3.242, 22.47-9.312L254.26, 362.765l136.442, 136.442c6.07, 6.07, 14.207, 9.312, 22.47, 9.312c4.1, 0, 8.232-0.795, 12.141-2.415c11.887-4.894, 19.642-16.527, 19.642-29.367V165.347H63.565V476.737z"/><path fill="black" d="M413.172, 0H95.347C77.804, 0, 63.565, 14.239, 63.565, 31.782v61.782h381.39V31.782C444.955, 14.239, 430.716, 0, 413.172, 0z"/></svg>') center/cover no-repeat !important;