This commit is contained in:
Mirco Wittrien 2020-02-11 17:11:59 +01:00
parent 31c2e29b8d
commit ca77b08a2f
8 changed files with 194 additions and 190 deletions

View File

@ -6832,9 +6832,7 @@
InternalComponents.LibraryComponents.Avatar = (BDFDB.ModuleUtils.findByProperties("AnimatedAvatar") || {}).default;
InternalComponents.LibraryComponents.BadgeComponents = Object.assign({}, BDFDB.ModuleUtils.findByProperties("IconBadge", "NumberBadge"));
InternalComponents.LibraryComponents.BadgeComponents.AnimationContainer = BDFDB.ReactUtils.getValue(window.BDFDB, "LibraryComponents.BadgeComponents.AnimationContainer") || reactInitialized && class BDFDB_BadgeContainer extends LibraryModules.React.Component {
InternalComponents.LibraryComponents.BadgeAnimationContainer = BDFDB.ReactUtils.getValue(window.BDFDB, "LibraryComponents.BadgeAnimationContainer") || reactInitialized && class BDFDB_BadgeAnimationContainer extends LibraryModules.React.Component {
componentDidMount() {BDFDB.ReactUtils.forceUpdate(this);}
componentWillAppear(e) {if (typeof e == "function") e();}
componentWillEnter(e) {if (typeof e == "function") e();}
@ -6849,6 +6847,8 @@
}
};
InternalComponents.LibraryComponents.Badges = BDFDB.ModuleUtils.findByProperties("IconBadge", "NumberBadge");
InternalComponents.LibraryComponents.BotTag = BDFDB.ReactUtils.getValue(window.BDFDB, "LibraryComponents.BotTag") || reactInitialized && class BDFDB_BotTag extends LibraryModules.React.Component {
handleClick(e) {if (typeof this.props.onClick == "function") this.props.onClick(e, this);}
handleContextMenu(e) {if (typeof this.props.onContextMenu == "function") this.props.onContextMenu(e, this);}
@ -7510,7 +7510,7 @@
selected: this.state.isDropHovering || this.props.selected || this.state.hovered,
upperBadge: this.props.unavailable ? InternalComponents.LibraryComponents.GuildComponents.Items.renderUnavailableBadge() : InternalComponents.LibraryComponents.GuildComponents.Items.renderIconBadge(this.props.audio, this.props.video, this.props.screenshare),
lowerBadge: this.props.badge > 0 ? InternalComponents.LibraryComponents.GuildComponents.Items.renderMentionBadge(this.props.badge) : null,
lowerBadgeWidth: InternalComponents.LibraryComponents.BadgeComponents.getBadgeWidthForValue(this.props.badge),
lowerBadgeWidth: InternalComponents.LibraryComponents.Badges.getBadgeWidthForValue(this.props.badge),
children: BDFDB.ReactUtils.createElement(InternalComponents.LibraryComponents.NavItem, {
to: {
pathname: BDFDB.DiscordConstants.Routes.CHANNEL(this.props.guild.id, this.props.selectedChannelId),
@ -10008,13 +10008,13 @@
after: e => {
let [children, index] = BDFDB.ReactUtils.findChildren(e.returnValue, {name: "TransitionGroup"});
if (index > -1) {
children[index].props.children.push(!e.thisObject.props.lowerLeftBadge ? null : BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.BadgeComponents.AnimationContainer, {
children[index].props.children.push(!e.thisObject.props.lowerLeftBadge ? null : BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.BadgeAnimationContainer, {
className: BDFDB.disCN.guildlowerleftbadge,
key: "lower-left-badge",
animatedStyle: e.thisObject.getLowerLeftBadgeStyles(),
children: e.thisObject.props.lowerLeftBadge
}));
children[index].props.children.push(!e.thisObject.props.upperLeftBadge ? null : BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.BadgeComponents.AnimationContainer, {
children[index].props.children.push(!e.thisObject.props.upperLeftBadge ? null : BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.BadgeAnimationContainer, {
className: BDFDB.disCN.guildupperleftbadge,
key: "upper-left-badge",
animatedStyle: e.thisObject.getUpperLeftBadgeStyles(),

File diff suppressed because one or more lines are too long

View File

@ -1,119 +1,121 @@
//META{"name":"BetterFriendCount","website":"https://github.com/mwittrien/BetterDiscordAddons/tree/master/Plugins/BetterFriendCount","source":"https://raw.githubusercontent.com/mwittrien/BetterDiscordAddons/master/Plugins/BetterFriendCount/BetterFriendCount.plugin.js"}*//
class BetterFriendCount {
getName () {return "BetterFriendCount";}
var BetterFriendCount = (_ => {
return class BetterFriendCount {
getName () {return "BetterFriendCount";}
getVersion () {return "1.2.3";}
getVersion () {return "1.2.4";}
getAuthor () {return "DevilBro";}
getAuthor () {return "DevilBro";}
getDescription () {return "Shows the amount of total and online friends and blocked users in the friends tab.";}
getDescription () {return "Shows the amount of total and online friends and blocked users in the friends tab.";}
constructor () {
this.changelog = {
"improved":[["New Library Structure & React","Restructured my Library and switched to React rendering instead of DOM manipulation"]]
};
constructor () {
this.changelog = {
"improved":[["New Library Structure & React","Restructured my Library and switched to React rendering instead of DOM manipulation"]]
};
this.patchedModules = {
after: {
TabBar: "render",
PeopleListItem: ["componentWillMount","componentWillUnmount"]
}
};
}
initConstructor () {
this.relationshipTypes = {};
for (let type in BDFDB.DiscordConstants.RelationshipTypes) this.relationshipTypes[BDFDB.DiscordConstants.RelationshipTypes[type]] = type;
}
//legacy
load () {}
start () {
if (!window.BDFDB) window.BDFDB = {myPlugins:{}};
if (window.BDFDB && window.BDFDB.myPlugins && typeof window.BDFDB.myPlugins == "object") window.BDFDB.myPlugins[this.getName()] = this;
let libraryScript = document.querySelector("head script#BDFDBLibraryScript");
if (!libraryScript || (performance.now() - libraryScript.getAttribute("date")) > 600000) {
if (libraryScript) libraryScript.remove();
libraryScript = document.createElement("script");
libraryScript.setAttribute("id", "BDFDBLibraryScript");
libraryScript.setAttribute("type", "text/javascript");
libraryScript.setAttribute("src", "https://mwittrien.github.io/BetterDiscordAddons/Plugins/BDFDB.min.js");
libraryScript.setAttribute("date", performance.now());
libraryScript.addEventListener("load", _ => {this.initialize();});
document.head.appendChild(libraryScript);
}
else if (window.BDFDB && typeof BDFDB === "object" && BDFDB.loaded) this.initialize();
this.startTimeout = setTimeout(_ => {
try {return this.initialize();}
catch (err) {console.error(`%c[${this.getName()}]%c`, "color: #3a71c1; font-weight: 700;", "", "Fatal Error: Could not initiate plugin! " + err);}
}, 30000);
}
initialize () {
if (window.BDFDB && typeof BDFDB === "object" && BDFDB.loaded) {
if (this.started) return;
BDFDB.PluginUtils.init(this);
BDFDB.ModuleUtils.forceAllUpdates(this, "TabBar");
}
else console.error(`%c[${this.getName()}]%c`, "color: #3a71c1; font-weight: 700;", "", "Fatal Error: Could not load BD functions!");
}
stop () {
if (window.BDFDB && typeof BDFDB === "object" && BDFDB.loaded) {
this.stopping = true;
BDFDB.ModuleUtils.forceAllUpdates(this, "TabBar");
BDFDB.PluginUtils.clear(this);
}
}
// begin of own functions
processTabBar (e) {
if (e.returnvalue.props.children) for (let checkchild of e.returnvalue.props.children) if (checkchild && checkchild.props.id == "ADD_FRIEND") {
let relationships = BDFDB.LibraryModules.FriendUtils.getRelationships(), relationshipCount = {};
for (let type in this.relationshipTypes) relationshipCount[this.relationshipTypes[type]] = 0;
for (let id in relationships) relationshipCount[this.relationshipTypes[relationships[id]]]++;
for (let child of e.returnvalue.props.children) if (child && child.props.id != "ADD_FRIEND") {
let newchildren = [child.props.children].flat().filter(child => BDFDB.ReactUtils.getValue(child, "type.displayName") != "NumberBadge");
switch (child.props.id) {
case "ALL":
newchildren.push(this.createBadge(relationshipCount.FRIEND));
break;
case "ONLINE":
newchildren.push(this.createBadge(BDFDB.LibraryModules.StatusMetaUtils.getOnlineFriendCount()));
break;
case "PENDING":
newchildren.push(this.createBadge(relationshipCount.PENDING_INCOMING));
newchildren.push(this.createBadge(relationshipCount.PENDING_OUTGOING));
break;
case "BLOCKED":
newchildren.push(this.createBadge(relationshipCount.BLOCKED));
break;
this.patchedModules = {
after: {
TabBar: "render",
PeopleListItem: ["componentWillMount","componentWillUnmount"]
}
child.props.children = newchildren;
};
}
initConstructor () {
this.relationshipTypes = {};
for (let type in BDFDB.DiscordConstants.RelationshipTypes) this.relationshipTypes[BDFDB.DiscordConstants.RelationshipTypes[type]] = type;
}
//legacy
load () {}
start () {
if (!window.BDFDB) window.BDFDB = {myPlugins:{}};
if (window.BDFDB && window.BDFDB.myPlugins && typeof window.BDFDB.myPlugins == "object") window.BDFDB.myPlugins[this.getName()] = this;
let libraryScript = document.querySelector("head script#BDFDBLibraryScript");
if (!libraryScript || (performance.now() - libraryScript.getAttribute("date")) > 600000) {
if (libraryScript) libraryScript.remove();
libraryScript = document.createElement("script");
libraryScript.setAttribute("id", "BDFDBLibraryScript");
libraryScript.setAttribute("type", "text/javascript");
libraryScript.setAttribute("src", "https://mwittrien.github.io/BetterDiscordAddons/Plugins/BDFDB.min.js");
libraryScript.setAttribute("date", performance.now());
libraryScript.addEventListener("load", _ => {this.initialize();});
document.head.appendChild(libraryScript);
}
else if (window.BDFDB && typeof BDFDB === "object" && BDFDB.loaded) this.initialize();
this.startTimeout = setTimeout(_ => {
try {return this.initialize();}
catch (err) {console.error(`%c[${this.getName()}]%c`, "color: #3a71c1; font-weight: 700;", "", "Fatal Error: Could not initiate plugin! " + err);}
}, 30000);
}
initialize () {
if (window.BDFDB && typeof BDFDB === "object" && BDFDB.loaded) {
if (this.started) return;
BDFDB.PluginUtils.init(this);
BDFDB.ModuleUtils.forceAllUpdates(this, "TabBar");
}
else console.error(`%c[${this.getName()}]%c`, "color: #3a71c1; font-weight: 700;", "", "Fatal Error: Could not load BD functions!");
}
stop () {
if (window.BDFDB && typeof BDFDB === "object" && BDFDB.loaded) {
this.stopping = true;
BDFDB.ModuleUtils.forceAllUpdates(this, "TabBar");
BDFDB.PluginUtils.clear(this);
}
}
}
processPeopleListItem () {
BDFDB.TimeUtils.clear(this.rerenderTimeout);
this.rerenderTimeout = BDFDB.TimeUtils.timeout(_ => {
delete this.rerenderTimeout;
BDFDB.ModuleUtils.forceAllUpdates(this, "TabBar");
}, 1000);
// begin of own functions
processTabBar (e) {
if (e.returnvalue.props.children) for (let checkchild of e.returnvalue.props.children) if (checkchild && checkchild.props.id == "ADD_FRIEND") {
let relationships = BDFDB.LibraryModules.FriendUtils.getRelationships(), relationshipCount = {};
for (let type in this.relationshipTypes) relationshipCount[this.relationshipTypes[type]] = 0;
for (let id in relationships) relationshipCount[this.relationshipTypes[relationships[id]]]++;
for (let child of e.returnvalue.props.children) if (child && child.props.id != "ADD_FRIEND") {
let newchildren = [child.props.children].flat().filter(child => BDFDB.ReactUtils.getValue(child, "type.displayName") != "NumberBadge");
switch (child.props.id) {
case "ALL":
newchildren.push(this.createBadge(relationshipCount.FRIEND));
break;
case "ONLINE":
newchildren.push(this.createBadge(BDFDB.LibraryModules.StatusMetaUtils.getOnlineFriendCount()));
break;
case "PENDING":
newchildren.push(this.createBadge(relationshipCount.PENDING_INCOMING));
newchildren.push(this.createBadge(relationshipCount.PENDING_OUTGOING));
break;
case "BLOCKED":
newchildren.push(this.createBadge(relationshipCount.BLOCKED));
break;
}
child.props.children = newchildren;
}
}
}
processPeopleListItem () {
BDFDB.TimeUtils.clear(this.rerenderTimeout);
this.rerenderTimeout = BDFDB.TimeUtils.timeout(_ => {
delete this.rerenderTimeout;
BDFDB.ModuleUtils.forceAllUpdates(this, "TabBar");
}, 1000);
}
createBadge (amount) {
return BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.Badges.NumberBadge, {
className: BDFDB.disCN.peoplesbadge,
count: amount,
style: {marginLeft: 6}
});
}
}
createBadge (amount) {
return BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.BadgeComponents.NumberBadge, {
className: BDFDB.disCN.peoplesbadge,
count: amount,
style: {marginLeft: 6}
});
}
}
})();

View File

@ -1,87 +1,89 @@
//META{"name":"BetterNsfwTag","website":"https://github.com/mwittrien/BetterDiscordAddons/tree/master/Plugins/BetterNsfwTag","source":"https://raw.githubusercontent.com/mwittrien/BetterDiscordAddons/master/Plugins/BetterNsfwTag/BetterNsfwTag.plugin.js"}*//
class BetterNsfwTag {
getName () {return "BetterNsfwTag";}
var BetterNsfwTag = (_ => {
return class BetterNsfwTag {
getName () {return "BetterNsfwTag";}
getVersion () {return "1.2.2";}
getVersion () {return "1.2.3";}
getAuthor () {return "DevilBro";}
getAuthor () {return "DevilBro";}
getDescription () {return "Adds a more noticeable tag to NSFW channels.";}
getDescription () {return "Adds a more noticeable tag to NSFW channels.";}
constructor () {
this.changelog = {
"improved":[["New Library Structure & React","Restructured my Library and switched to React rendering instead of DOM manipulation"]]
};
this.patchedModules = {
after: {
ChannelItem: "render"
constructor () {
this.changelog = {
"improved":[["New Library Structure & React","Restructured my Library and switched to React rendering instead of DOM manipulation"]]
};
this.patchedModules = {
after: {
ChannelItem: "render"
}
};
}
//legacy
load () {}
start () {
if (!window.BDFDB) window.BDFDB = {myPlugins:{}};
if (window.BDFDB && window.BDFDB.myPlugins && typeof window.BDFDB.myPlugins == "object") window.BDFDB.myPlugins[this.getName()] = this;
let libraryScript = document.querySelector("head script#BDFDBLibraryScript");
if (!libraryScript || (performance.now() - libraryScript.getAttribute("date")) > 600000) {
if (libraryScript) libraryScript.remove();
libraryScript = document.createElement("script");
libraryScript.setAttribute("id", "BDFDBLibraryScript");
libraryScript.setAttribute("type", "text/javascript");
libraryScript.setAttribute("src", "https://mwittrien.github.io/BetterDiscordAddons/Plugins/BDFDB.min.js");
libraryScript.setAttribute("date", performance.now());
libraryScript.addEventListener("load", _ => {this.initialize();});
document.head.appendChild(libraryScript);
}
};
}
//legacy
load () {}
start () {
if (!window.BDFDB) window.BDFDB = {myPlugins:{}};
if (window.BDFDB && window.BDFDB.myPlugins && typeof window.BDFDB.myPlugins == "object") window.BDFDB.myPlugins[this.getName()] = this;
let libraryScript = document.querySelector("head script#BDFDBLibraryScript");
if (!libraryScript || (performance.now() - libraryScript.getAttribute("date")) > 600000) {
if (libraryScript) libraryScript.remove();
libraryScript = document.createElement("script");
libraryScript.setAttribute("id", "BDFDBLibraryScript");
libraryScript.setAttribute("type", "text/javascript");
libraryScript.setAttribute("src", "https://mwittrien.github.io/BetterDiscordAddons/Plugins/BDFDB.min.js");
libraryScript.setAttribute("date", performance.now());
libraryScript.addEventListener("load", _ => {this.initialize();});
document.head.appendChild(libraryScript);
else if (window.BDFDB && typeof BDFDB === "object" && BDFDB.loaded) this.initialize();
this.startTimeout = setTimeout(_ => {
try {return this.initialize();}
catch (err) {console.error(`%c[${this.getName()}]%c`, "color: #3a71c1; font-weight: 700;", "", "Fatal Error: Could not initiate plugin! " + err);}
}, 30000);
}
else if (window.BDFDB && typeof BDFDB === "object" && BDFDB.loaded) this.initialize();
this.startTimeout = setTimeout(_ => {
try {return this.initialize();}
catch (err) {console.error(`%c[${this.getName()}]%c`, "color: #3a71c1; font-weight: 700;", "", "Fatal Error: Could not initiate plugin! " + err);}
}, 30000);
}
initialize () {
if (window.BDFDB && typeof BDFDB === "object" && BDFDB.loaded) {
if (this.started) return;
BDFDB.PluginUtils.init(this);
initialize () {
if (window.BDFDB && typeof BDFDB === "object" && BDFDB.loaded) {
if (this.started) return;
BDFDB.PluginUtils.init(this);
BDFDB.ModuleUtils.forceAllUpdates(this);
BDFDB.ModuleUtils.forceAllUpdates(this);
}
else console.error(`%c[${this.getName()}]%c`, "color: #3a71c1; font-weight: 700;", "", "Fatal Error: Could not load BD functions!");
}
else console.error(`%c[${this.getName()}]%c`, "color: #3a71c1; font-weight: 700;", "", "Fatal Error: Could not load BD functions!");
}
stop () {
if (window.BDFDB && typeof BDFDB === "object" && BDFDB.loaded) {
this.stopping = true;
stop () {
if (window.BDFDB && typeof BDFDB === "object" && BDFDB.loaded) {
this.stopping = true;
BDFDB.ModuleUtils.forceAllUpdates(this);
BDFDB.PluginUtils.clear(this);
BDFDB.ModuleUtils.forceAllUpdates(this);
BDFDB.PluginUtils.clear(this);
}
}
}
// begin of own functions
// begin of own functions
processChannelItem (e) {
if (e.instance.props.channel && e.instance.props.channel.nsfw) {
let [children, index] = BDFDB.ReactUtils.findChildren(e.returnvalue, {props:[["className", BDFDB.disCN.channelchildren]]});
if (index > -1 && children[index].props && children[index].props.children) {
let [oldTagParent, oldTagIndex] = BDFDB.ReactUtils.findChildren(children[index], {key: "NSFW-badge"});
if (oldTagIndex > -1) oldTagParent.splice(oldTagIndex, 1);
children[index].props.children.unshift(BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.BadgeComponents.TextBadge, {
className: "NSFW-badge",
key: "NSFW-badge",
style: {borderRadius: "3px"},
text: "NSFW"
}));
processChannelItem (e) {
if (e.instance.props.channel && e.instance.props.channel.nsfw) {
let [children, index] = BDFDB.ReactUtils.findChildren(e.returnvalue, {props:[["className", BDFDB.disCN.channelchildren]]});
if (index > -1 && children[index].props && children[index].props.children) {
let [oldTagParent, oldTagIndex] = BDFDB.ReactUtils.findChildren(children[index], {key: "NSFW-badge"});
if (oldTagIndex > -1) oldTagParent.splice(oldTagIndex, 1);
children[index].props.children.unshift(BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.Badges.TextBadge, {
className: "NSFW-badge",
key: "NSFW-badge",
style: {borderRadius: "3px"},
text: "NSFW"
}));
}
}
}
}
}
}();

View File

@ -424,12 +424,12 @@ var PinDMs = (_ => {
style: {color: color},
children: category.name,
}),
unreadAmount ? BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.BadgeComponents.NumberBadge, {
unreadAmount ? BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.Badges.NumberBadge, {
className: BDFDB.disCN._pindmspinnedchannelsheaderamount,
count: unreadAmount,
style: {backgroundColor: BDFDB.DiscordConstants.Colors.STATUS_RED}
}) : null,
settings.showCategoryAmount ? BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.BadgeComponents.NumberBadge, {
settings.showCategoryAmount ? BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.Badges.NumberBadge, {
className: BDFDB.disCN._pindmspinnedchannelsheaderamount,
count: foundDMs.length,
style: {backgroundColor: BDFDB.DiscordConstants.Colors.BRAND}
@ -650,7 +650,7 @@ var PinDMs = (_ => {
}
if (e.returnvalue && this.isPinned(e.instance.props.channel.id, "pinnedRecents") && BDFDB.DataUtils.get(this, "settings", "showPinIcon")) {
let [children, index] = BDFDB.ReactUtils.findChildren(e.returnvalue, {name:"BlobMask"});
if (index > -1) children[index].props.upperLeftBadge = BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.BadgeComponents.IconBadge, {
if (index > -1) children[index].props.upperLeftBadge = BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.Badges.IconBadge, {
className: BDFDB.disCN.guildbadgeiconbadge2,
name: BDFDB.LibraryComponents.SvgIcon.Names.NOVA_PIN,
style: {backgroundColor: null, transform: "scale(-1, 1)"}

View File

@ -70,7 +70,7 @@ var PluginRepo = (_ => {
return class PluginRepo {
getName () {return "PluginRepo";}
getVersion () {return "1.9.0";}
getVersion () {return "1.9.1";}
getAuthor () {return "DevilBro";}
@ -481,7 +481,7 @@ var PluginRepo = (_ => {
return buttonConfig && {
data: plugin,
controls: [
plugin.new == newStates.NEW && BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.BadgeComponents.TextBadge, {
plugin.new == newStates.NEW && BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.Badges.TextBadge, {
style: {
borderRadius: 3,
textTransform: "uppercase",

View File

@ -631,8 +631,8 @@ var ServerFolders = (_ => {
if (BDFDB.DataUtils.get(this, "settings", "showCountBadge")) {
[children, index] = BDFDB.ReactUtils.findChildren(e.returnvalue, {name:"BlobMask"});
if (index > -1) {
children[index].props.upperLeftBadgeWidth = BDFDB.LibraryComponents.BadgeComponents.getBadgeWidthForValue(e.instance.props.guildIds.length);
children[index].props.upperLeftBadge = BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.BadgeComponents.NumberBadge, {
children[index].props.upperLeftBadgeWidth = BDFDB.LibraryComponents.Badges.getBadgeWidthForValue(e.instance.props.guildIds.length);
children[index].props.upperLeftBadge = BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.Badges.NumberBadge, {
count: e.instance.props.guildIds.length,
style: {backgroundColor: BDFDB.DiscordConstants.Colors.BRAND}
});

View File

@ -126,7 +126,7 @@ var ThemeRepo = (_ => {
return class ThemeRepo {
getName () {return "ThemeRepo";}
getVersion () {return "1.9.0";}
getVersion () {return "1.9.1";}
getAuthor () {return "DevilBro";}
@ -707,7 +707,7 @@ var ThemeRepo = (_ => {
return buttonConfig && {
data: theme,
controls: [
theme.new == newStates.NEW && BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.BadgeComponents.TextBadge, {
theme.new == newStates.NEW && BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.Badges.TextBadge, {
style: {
borderRadius: 3,
textTransform: "uppercase",