Update 0BDFDB.plugin.js
This commit is contained in:
parent
c2a773d59a
commit
37eb97e95f
|
@ -2,7 +2,7 @@
|
|||
* @name BDFDB
|
||||
* @author DevilBro
|
||||
* @authorId 278543574059057154
|
||||
* @version 3.1.7
|
||||
* @version 3.1.8
|
||||
* @description Required Library for DevilBro's Plugins
|
||||
* @invite Jx3TjNS
|
||||
* @donate https://www.paypal.me/MircoWittrien
|
||||
|
@ -2944,15 +2944,17 @@ module.exports = (_ => {
|
|||
BDFDB.UserUtils.getStatusColor = function (status, useColor) {
|
||||
if (!Internal.DiscordConstants.Colors) return null;
|
||||
status = typeof status == "string" ? status.toLowerCase() : null;
|
||||
let color = "";
|
||||
switch (status) {
|
||||
case "online": return useColor ? Internal.DiscordConstants.Colors.GREEN_360 : "var(--status-positive)";
|
||||
case "idle": return useColor ? Internal.DiscordConstants.Colors.YELLOW_300 : "var(--status-warning)";
|
||||
case "dnd": return useColor ? Internal.DiscordConstants.Colors.RED_RED_400 : "var(--status-danger)";
|
||||
case "playing": return useColor ? Internal.DiscordConstants.Colors.BRAND : "var(--bdfdb-blurple)";
|
||||
case "listening": return Internal.DiscordConstants.Colors.SPOTIFY;
|
||||
case "streaming": return Internal.DiscordConstants.Colors.TWITCH;
|
||||
default: return Internal.DiscordConstants.Colors.PRIMARY_400;
|
||||
case "online": color = (useColor ? Internal.DiscordConstants.Colors.GREEN_360 : "var(--status-positive)"); break;
|
||||
case "idle": color = (useColor ? Internal.DiscordConstants.Colors.YELLOW_300 : "var(--status-warning)"); break;
|
||||
case "dnd": color = (useColor ? Internal.DiscordConstants.Colors.RED_400 : "var(--status-danger)"); break;
|
||||
case "playing": color = (useColor ? Internal.DiscordConstants.Colors.BRAND : "var(--bdfdb-blurple)"); break;
|
||||
case "listening": color = Internal.DiscordConstants.Colors.SPOTIFY; break;
|
||||
case "streaming": color = Internal.DiscordConstants.Colors.TWITCH; break;
|
||||
default: color = Internal.DiscordConstants.Colors.PRIMARY_400; break;
|
||||
}
|
||||
return (color || Internal.DiscordConstants.Colors.GREEN_360).replace(/calc\(.+\s*\*\s*([0-9\.\%]+)\)/g, "$1");
|
||||
};
|
||||
BDFDB.UserUtils.getActivity = function (id = BDFDB.UserUtils.me.id) {
|
||||
for (let activity of Internal.LibraryStores.PresenceStore.getActivities(id)) if (activity.type != Internal.DiscordConstants.ActivityTypes.CUSTOM_STATUS) return activity;
|
||||
|
@ -4562,7 +4564,7 @@ module.exports = (_ => {
|
|||
render() {
|
||||
if (this.state.hasError) return Internal.LibraryModules.React.createElement("span", {
|
||||
style: {
|
||||
background: Internal.DiscordConstants.Colors.PRIMARY_400,
|
||||
background: Internal.DiscordConstants.Colors.PRIMARY,
|
||||
borderRadius: 5,
|
||||
color: "var(--status-danger)",
|
||||
fontSize: 12,
|
||||
|
@ -6148,7 +6150,7 @@ module.exports = (_ => {
|
|||
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);}
|
||||
render() {
|
||||
let color = BDFDB.ColorUtils.convert(this.props.role.colorString, "RGB") || Internal.DiscordConstants.Colors.PRIMARY_400;
|
||||
let color = BDFDB.ColorUtils.convert(this.props.role.colorString, "RGB") || Internal.DiscordConstants.Colors.PRIMARY_300;
|
||||
return BDFDB.ReactUtils.createElement("li", {
|
||||
className: BDFDB.DOMUtils.formatClassName(BDFDB.disCN.userrole, this.props.className),
|
||||
style: {borderColor: BDFDB.ColorUtils.setAlpha(color, 0.6)},
|
||||
|
|
Loading…
Reference in New Issue