This commit is contained in:
Mirco Wittrien 2020-07-15 17:06:13 +02:00
parent 7033feef33
commit 4aea2c8ade
2 changed files with 7 additions and 6 deletions

View File

@ -420,7 +420,7 @@ var EditUsers = (_ => {
this.changeUserColor(children[index], e.instance.props.user.id, {changeBackground:true});
this.injectBadge(children, e.instance.props.user.id, BDFDB.LibraryModules.LastGuildStore.getGuildId(), 2, {
tagClass: BDFDB.disCN.bottagnametag,
inverted: !!e.instance.props.activity
inverted: typeof e.instance.getMode == "function" && e.instance.getMode() !== "Normal"
});
}
}
@ -1247,7 +1247,7 @@ var EditUsers = (_ => {
color: "BRAND",
close: true,
click: modal => {
let olddata = Object.assign({}, data);
let oldData = Object.assign({}, data);
let userNameInput = modal.querySelector(".input-username " + BDFDB.dotCN.input);
let userTagInput = modal.querySelector(".input-usertag " + BDFDB.dotCN.input);
@ -1275,7 +1275,7 @@ var EditUsers = (_ => {
let changed = false;
if (Object.keys(data).every(key => data[key] == null || data[key] == false) && (changed = true)) BDFDB.DataUtils.remove(this, "users", user.id);
else if (!BDFDB.equals(olddata, data) && (changed = true)) BDFDB.DataUtils.save(data, this, "users", user.id);
else if (!BDFDB.equals(oldData, data) && (changed = true)) BDFDB.DataUtils.save(data, this, "users", user.id);
if (changed) this.forceUpdateAll();
}
}]

View File

@ -12,7 +12,7 @@ var OwnerTag = (_ => {
return class OwnerTag {
getName () {return "OwnerTag";}
getVersion () {return "1.2.9";}
getVersion () {return "1.3.0";}
getAuthor () {return "DevilBro";}
@ -20,7 +20,7 @@ var OwnerTag = (_ => {
constructor () {
this.changelog = {
"added":[["Ignore bots","Added options to not add admin tag for bots with admin rights"]]
"fixed":[["BotTag","BotTag style is now properly inverted on the userpopout if the user is playing a game etc."]]
};
this.patchedModules = {
@ -214,7 +214,8 @@ var OwnerTag = (_ => {
if (userType) {
let [children, index] = BDFDB.ReactUtils.findParent(e.returnvalue, {props: [["className", BDFDB.disCN.userpopoutheadertagwithnickname]]});
if (index > -1) this.injectOwnerTag(children, e.instance.props.user, userType, 2, {
tagClass: BDFDB.disCNS.userpopoutheaderbottagwithnickname + BDFDB.disCN.bottagnametag
tagClass: BDFDB.disCNS.userpopoutheaderbottagwithnickname + BDFDB.disCN.bottagnametag,
inverted: typeof e.instance.getMode == "function" && e.instance.getMode() !== "Normal"
});
}
}