This commit is contained in:
Mirco Wittrien 2020-02-03 15:10:28 +01:00
parent dd0f1574f1
commit 1deb4cd66f
3 changed files with 25 additions and 8 deletions

View File

@ -4404,6 +4404,7 @@
var DiscordClassModules = {};
DiscordClassModules.BDFDB = {
BDFDBundefined: "BDFDB_undefined",
avatarBadgeWrapper: "wrapper-hd42F_",
avatarStatusHovered: "statusHovered-gF2976",
cardInner: "inner-OP_8zd",
cardWrapper: "card-rT4Wbb",
@ -4935,6 +4936,7 @@
autocompleteselected: ["Autocomplete", "selectorSelected"],
autocompleteselector: ["Autocomplete", "selector"],
avatar: ["Avatar", "avatar"],
avatarbadgewrapper: ["BDFDB", "avatarBadgeWrapper"],
avatarcursordefault: ["Avatar", "cursorDefault"],
avataricon: ["AvatarIcon", "icon"],
avatariconactivelarge: ["AvatarIcon", "iconActiveLarge"],
@ -9728,9 +9730,21 @@
];
InternalBDFDB._processAvatarRender = function (user, avatar) {
if (BDFDB.ReactUtils.isValidElement(avatar) && BDFDB.ObjectUtils.is(user)) {
let changed = false;
if (avatar.type == "img") avatar = BDFDB.ReactUtils.createElement("div", {
className: BDFDB.disCN.avatarbadgewrapper,
children: avatar
});
avatar.props["user_by_BDFDB"] = user.id;
if (BDFDB_Patrons.includes(user.id) && BDFDB.DataUtils.get(BDFDB, "settings", "showSupportBadges")) avatar.props.className = BDFDB.DOMUtils.formatClassName(avatar.props.className, BDFDB.disCN.bdfdbsupporter);
if (user.id == "278543574059057154") avatar.props.className = BDFDB.DOMUtils.formatClassName(avatar.props.className, BDFDB.disCN.bdfdbdev);
if (BDFDB_Patrons.includes(user.id) && BDFDB.DataUtils.get(BDFDB, "settings", "showSupportBadges")) {
changed = true;
avatar.props.className = BDFDB.DOMUtils.formatClassName(avatar.props.className, BDFDB.disCN.bdfdbsupporter);
}
if (user.id == "278543574059057154") {
changed = true;
avatar.props.className = BDFDB.DOMUtils.formatClassName(avatar.props.className, BDFDB.disCN.bdfdbdev);
}
if (changed) return avatar;
}
};
InternalBDFDB._processAvatarMount = function (user, avatar) {
@ -9752,8 +9766,7 @@
let renderChildren = avatarWrapper.props.children;
avatarWrapper.props.children = (...args) => {
let renderedChildren = renderChildren(...args);
InternalBDFDB._processAvatarRender(e.instance.props.message.author, renderedChildren);
return renderedChildren;
return InternalBDFDB._processAvatarRender(e.instance.props.message.author, renderedChildren) || renderedChildren;
};
}
}

View File

@ -70,6 +70,7 @@
left: 7px !important;
}
.wrapper-hd42F_.supporter-Z3FfwL:after,
.wrapper-3t9DeA.supporter-Z3FfwL:after {
content: "" !important;
-webkit-mask: var(--supporterbadge) center/cover no-repeat !important;
@ -81,18 +82,19 @@
left: -2px !important;
bottom: -3px !important;
}
.member-3-YXUe .wrapper-3t9DeA..supporter-Z3FfwL:after {
.member-3-YXUe .wrapper-3t9DeA.supporter-Z3FfwL:after {
width: 10px !important;
height: 10px !important;
left: -1px !important;
bottom: -1px !important;
}
.wrapper-3t9DeA..supporter-Z3FfwL [mask="url(#svg-mask-avatar-default)"] {
.wrapper-hd42F_.supporter-Z3FfwL,
.wrapper-3t9DeA.supporter-Z3FfwL [mask="url(#svg-mask-avatar-default)"] {
-webkit-mask: url('data:image/svg+xml; utf8, <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" viewBox="0 0 1 1"><circle fill="white" cx="0.5" cy="0.5" r="0.5"></circle><rect fill="black" x="-0.15" y="0.6375" width="0.5" height="0.5" rx="0.13125" ry="0.13125"></rect></svg>');
}
.wrapper-3t9DeA..supporter-Z3FfwL [mask="url(#svg-mask-avatar-status-round-32)"] {
.wrapper-3t9DeA.supporter-Z3FfwL [mask="url(#svg-mask-avatar-status-round-32)"] {
-webkit-mask: url('data:image/svg+xml; utf8, <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" viewBox="0 0 1 1"><circle fill="white" cx="0.5" cy="0.5" r="0.5"></circle><circle fill="black" cx="0.84375" cy="0.84375" r="0.25"></circle><rect fill="black" x="-0.15" y="0.6375" width="0.5" height="0.5" rx="0.13125" ry="0.13125"></rect></svg>');
}
.wrapper-3t9DeA..supporter-Z3FfwL [mask="url(#svg-mask-avatar-status-round-40)"] {
.wrapper-3t9DeA.supporter-Z3FfwL [mask="url(#svg-mask-avatar-status-round-40)"] {
-webkit-mask: url('data:image/svg+xml; utf8, <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" viewBox="0 0 1 1"><circle fill="white" cx="0.5" cy="0.5" r="0.5"></circle><circle fill="black" cx="0.85" cy="0.85" r="0.25"></circle><rect fill="black" x="-0.15" y="0.6375" width="0.5" height="0.5" rx="0.13125" ry="0.13125"></rect></svg>');
}

View File

@ -70,6 +70,7 @@
left: 7px !important;
}
.wrapper-hd42F_.dev-A7f2Rx:after,
.wrapper-3t9DeA.dev-A7f2Rx:after {
content: "" !important;
-webkit-mask: var(--themedevbadge) center/cover no-repeat !important;
@ -87,6 +88,7 @@
left: -1px !important;
bottom: -1px !important;
}
.wrapper-hd42F_.dev-A7f2Rx,
.wrapper-3t9DeA.dev-A7f2Rx [mask="url(#svg-mask-avatar-default)"] {
-webkit-mask: url('data:image/svg+xml; utf8, <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" viewBox="0 0 1 1"><circle fill="white" cx="0.5" cy="0.5" r="0.5"></circle><rect fill="black" x="-0.15" y="0.6375" width="0.5" height="0.5" rx="0.13125" ry="0.13125"></rect></svg>');
}