diff --git a/Library/0BDFDB.plugin.js b/Library/0BDFDB.plugin.js index 1e74bbc66b..07e4a237ea 100644 --- a/Library/0BDFDB.plugin.js +++ b/Library/0BDFDB.plugin.js @@ -4792,7 +4792,7 @@ module.exports = (_ => { if (openedItem == this.props.id) openedItem = null; } render() { - let color = (typeof this.props.color == "string" ? this.props.color : Internal.LibraryComponents.MenuItems.Colors.DEFAULT).toLowerCase(); + let color = (typeof this.props.color == "string" ? this.props.color : Internal.DiscordConstants.MenuItemColors.DEFAULT).toLowerCase(); let isCustomColor = false; if (color) { if (DiscordClasses[`menu${color}`]) color = color; @@ -4800,7 +4800,7 @@ module.exports = (_ => { isCustomColor = true; color = BDFDB.ColorUtils.convert(color, "RGBA"); } - else color = (Internal.LibraryComponents.MenuItems.Colors.DEFAULT || "").toLowerCase(); + else color = (Internal.DiscordConstants.MenuItemColors.DEFAULT || "").toLowerCase(); } let renderPopout, onClose, hasPopout = BDFDB.ObjectUtils.is(this.props.popoutProps); if (hasPopout) { diff --git a/Plugins/EditChannels/EditChannels.plugin.js b/Plugins/EditChannels/EditChannels.plugin.js index 30322442dd..0400beacd9 100644 --- a/Plugins/EditChannels/EditChannels.plugin.js +++ b/Plugins/EditChannels/EditChannels.plugin.js @@ -232,7 +232,7 @@ module.exports = (_ => { BDFDB.ContextMenuUtils.createItem(BDFDB.LibraryComponents.MenuItems.MenuItem, { label: this.labels.submenu_resetsettings, id: BDFDB.ContextMenuUtils.createItemId(this.name, "settings-reset"), - color: BDFDB.LibraryComponents.MenuItems.Colors.DANGER, + color: BDFDB.DiscordConstants.MenuItemColors.DANGER, disabled: !changedChannels[e.instance.props.channel.id], action: event => { let remove = _ => { diff --git a/Plugins/EditRoles/EditRoles.plugin.js b/Plugins/EditRoles/EditRoles.plugin.js index 08f4d7de62..0cea87dd84 100644 --- a/Plugins/EditRoles/EditRoles.plugin.js +++ b/Plugins/EditRoles/EditRoles.plugin.js @@ -199,7 +199,7 @@ module.exports = (_ => { BDFDB.ContextMenuUtils.createItem(BDFDB.LibraryComponents.MenuItems.MenuItem, { label: this.labels.submenu_resetsettings, id: BDFDB.ContextMenuUtils.createItemId(this.name, "settings-reset"), - color: BDFDB.LibraryComponents.MenuItems.Colors.DANGER, + color: BDFDB.DiscordConstants.MenuItemColors.DANGER, disabled: !changedRoles[e.instance.props.id], action: event => { let remove = _ => { diff --git a/Plugins/EditServers/EditServers.plugin.js b/Plugins/EditServers/EditServers.plugin.js index 9a5b9ade54..b2bb50df9f 100644 --- a/Plugins/EditServers/EditServers.plugin.js +++ b/Plugins/EditServers/EditServers.plugin.js @@ -217,7 +217,7 @@ module.exports = (_ => { BDFDB.ContextMenuUtils.createItem(BDFDB.LibraryComponents.MenuItems.MenuItem, { label: this.labels.submenu_resetsettings, id: BDFDB.ContextMenuUtils.createItemId(this.name, "settings-reset"), - color: BDFDB.LibraryComponents.MenuItems.Colors.DANGER, + color: BDFDB.DiscordConstants.MenuItemColors.DANGER, disabled: !changedGuilds[e.instance.props.guild.id], action: event => { let remove = _ => { diff --git a/Plugins/EditUsers/EditUsers.plugin.js b/Plugins/EditUsers/EditUsers.plugin.js index 526664adc0..5ec920340f 100644 --- a/Plugins/EditUsers/EditUsers.plugin.js +++ b/Plugins/EditUsers/EditUsers.plugin.js @@ -467,7 +467,7 @@ module.exports = (_ => { BDFDB.ContextMenuUtils.createItem(BDFDB.LibraryComponents.MenuItems.MenuItem, { label: this.labels.submenu_resetsettings, id: BDFDB.ContextMenuUtils.createItemId(this.name, "settings-reset"), - color: BDFDB.LibraryComponents.MenuItems.Colors.DANGER, + color: BDFDB.DiscordConstants.MenuItemColors.DANGER, disabled: !changedUsers[user.id], action: event => { let remove = _ => { diff --git a/Plugins/GoogleSearchReplace/GoogleSearchReplace.plugin.js b/Plugins/GoogleSearchReplace/GoogleSearchReplace.plugin.js index 93431cc2bc..b82dc45aa8 100644 --- a/Plugins/GoogleSearchReplace/GoogleSearchReplace.plugin.js +++ b/Plugins/GoogleSearchReplace/GoogleSearchReplace.plugin.js @@ -154,7 +154,7 @@ module.exports = (_ => { for (let key in enabledEngines) items.push(BDFDB.ContextMenuUtils.createItem(BDFDB.LibraryComponents.MenuItems.MenuItem, { label: this.defaults.engines[key].name, id: BDFDB.ContextMenuUtils.createItemId(this.name, "search", key), - color: key == "_all" ? BDFDB.LibraryComponents.MenuItems.Colors.DANGER : BDFDB.LibraryComponents.MenuItems.Colors.DEFAULT, + color: key == "_all" ? BDFDB.DiscordConstants.MenuItemColors.DANGER : BDFDB.DiscordConstants.MenuItemColors.DEFAULT, persisting: true, action: event => { if (!event.shiftKey) BDFDB.ContextMenuUtils.close(e.instance); diff --git a/Plugins/ImageUtilities/ImageUtilities.plugin.js b/Plugins/ImageUtilities/ImageUtilities.plugin.js index 9de4e2d3ac..2bb0a632eb 100644 --- a/Plugins/ImageUtilities/ImageUtilities.plugin.js +++ b/Plugins/ImageUtilities/ImageUtilities.plugin.js @@ -929,7 +929,7 @@ module.exports = (_ => { }) : Object.keys(enabledEngines).map(key => BDFDB.ContextMenuUtils.createItem(BDFDB.LibraryComponents.MenuItems.MenuItem, { label: this.defaults.engines[key].name, id: BDFDB.ContextMenuUtils.createItemId(this.name, "search", key), - color: key == "_all" ? BDFDB.LibraryComponents.MenuItems.Colors.DANGER : BDFDB.LibraryComponents.MenuItems.Colors.DEFAULT, + color: key == "_all" ? BDFDB.DiscordConstants.MenuItemColors.DANGER : BDFDB.DiscordConstants.MenuItemColors.DEFAULT, persisting: true, action: event => { const open = (url, k) => BDFDB.DiscordUtils.openLink(this.defaults.engines[k].url.replace(imgUrlReplaceString, this.defaults.engines[k].raw ? url : encodeURIComponent(url)), {minimized: event.shiftKey}); diff --git a/Plugins/PinDMs/PinDMs.plugin.js b/Plugins/PinDMs/PinDMs.plugin.js index 061534da60..0ed5b00555 100644 --- a/Plugins/PinDMs/PinDMs.plugin.js +++ b/Plugins/PinDMs/PinDMs.plugin.js @@ -281,12 +281,12 @@ module.exports = (_ => { children: currentCategory ? BDFDB.ContextMenuUtils.createItem(BDFDB.LibraryComponents.MenuItems.MenuItem, { label: this.labels.context_unpinchannel, id: BDFDB.ContextMenuUtils.createItemId(this.name, "unpin-channellist"), - color: BDFDB.LibraryComponents.MenuItems.Colors.DANGER, + color: BDFDB.DiscordConstants.MenuItemColors.DANGER, action: _ => this.removeFromCategory(id, currentCategory, "channelList") }) : BDFDB.ContextMenuUtils.createItem(BDFDB.LibraryComponents.MenuItems.MenuItem, { label: this.labels.context_addtonewcategory, id: BDFDB.ContextMenuUtils.createItemId(this.name, "new-channellist"), - color: BDFDB.LibraryComponents.MenuItems.Colors.BRAND, + color: BDFDB.DiscordConstants.MenuItemColors.BRAND, action: _ => this.openCategorySettingsModal({ id: this.generateId("channelList"), name: `${this.labels.header_pinneddms} #${categories.length + 1}`, @@ -312,7 +312,7 @@ module.exports = (_ => { BDFDB.ContextMenuUtils.createItem(BDFDB.LibraryComponents.MenuItems.MenuItem, { label: this.labels[pinnedInGuild ? "context_unpinguild" : "context_pinguild"], id: BDFDB.ContextMenuUtils.createItemId(this.name, pinnedInGuild ? "unpin-serverlist" : "pin-serverlist"), - color: pinnedInGuild ? BDFDB.LibraryComponents.MenuItems.Colors.DANGER : BDFDB.LibraryComponents.MenuItems.Colors.DEFAULT, + color: pinnedInGuild ? BDFDB.DiscordConstants.MenuItemColors.DANGER : BDFDB.DiscordConstants.MenuItemColors.DEFAULT, action: _ => { if (!pinnedInGuild) this.addPin(id, "guildList"); else this.removePin(id, "guildList"); @@ -525,7 +525,7 @@ module.exports = (_ => { BDFDB.ContextMenuUtils.createItem(BDFDB.LibraryComponents.MenuItems.MenuItem, { label: BDFDB.LanguageUtils.LanguageStrings.DELETE_CATEGORY, id: BDFDB.ContextMenuUtils.createItemId(this.name, "remove-category"), - color: BDFDB.LibraryComponents.MenuItems.Colors.DANGER, + color: BDFDB.DiscordConstants.MenuItemColors.DANGER, action: _ => { let newData = this.getPinnedChannels("channelList"); delete newData[category.id]; diff --git a/Plugins/ServerFolders/ServerFolders.plugin.js b/Plugins/ServerFolders/ServerFolders.plugin.js index c339538a6d..abcd23c37b 100644 --- a/Plugins/ServerFolders/ServerFolders.plugin.js +++ b/Plugins/ServerFolders/ServerFolders.plugin.js @@ -588,7 +588,7 @@ module.exports = (_ => { BDFDB.ContextMenuUtils.createItem(BDFDB.LibraryComponents.MenuItems.MenuItem, { label: this.labels.serversubmenu_removefromfolder, id: BDFDB.ContextMenuUtils.createItemId(this.name, "remove-from-folder"), - color: BDFDB.LibraryComponents.MenuItems.Colors.DANGER, + color: BDFDB.DiscordConstants.MenuItemColors.DANGER, action: _ => this.removeGuildFromFolder(folder.folderId, e.instance.props.guild.id) }) ] : [ @@ -650,7 +650,7 @@ module.exports = (_ => { children: BDFDB.ContextMenuUtils.createItem(BDFDB.LibraryComponents.MenuItems.MenuItem, { label: this.labels.foldercontext_removefolder, id: BDFDB.ContextMenuUtils.createItemId(this.name, "remove-folder"), - color: BDFDB.LibraryComponents.MenuItems.Colors.DANGER, + color: BDFDB.DiscordConstants.MenuItemColors.DANGER, action: event => { BDFDB.ModalUtils.confirm(this, this.labels.foldercontext_removefolder_confirm.replace("{{var0}}", folder.folderName ? `"${folder.folderName}"` : "").trim(), _ => { this.removeFolder(e.instance.props.folderId);