diff --git a/Library/0BDFDB.plugin.js b/Library/0BDFDB.plugin.js index dd549d341b..9f3f5759af 100644 --- a/Library/0BDFDB.plugin.js +++ b/Library/0BDFDB.plugin.js @@ -825,7 +825,7 @@ module.exports = (_ => { BDFDB.TimeUtils.timeout(_ => { BDFDB.ModalUtils.open(addon, { header: `${addon.name} ${BDFDB.LanguageUtils.LanguageStrings.SETTINGS}`, - subheader: "", + subHeader: "", className: BDFDB.disCN._repomodal, headerClassName: BDFDB.disCN._repomodalheader, contentClassName: BDFDB.disCN._repomodalsettings, @@ -3644,7 +3644,7 @@ module.exports = (_ => { }), BDFDB.ReactUtils.createElement(InternalComponents.LibraryComponents.TextElement, { size: InternalComponents.LibraryComponents.TextElement.Sizes.SIZE_12, - children: typeof config.subheader == "string" || BDFDB.ReactUtils.isValidElement(config.subheader) ? config.subheader : (name || "") + children: typeof config.subHeader == "string" || BDFDB.ReactUtils.isValidElement(config.subHeader) ? config.subHeader : (name || "") }) ] }), @@ -3695,10 +3695,16 @@ module.exports = (_ => { }; BDFDB.ModalUtils.confirm = function (plugin, text, callback) { if (!BDFDB.ObjectUtils.is(plugin) || typeof text != "string") return; - BDFDB.ModalUtils.open(plugin, {text, header: BDFDB.LanguageUtils.LibraryStrings.confirm, className: BDFDB.disCN.modalconfirmmodal, scroller: false, buttons: [ - {contents: BDFDB.LanguageUtils.LanguageStrings.OKAY, close: true, color: "RED", click: typeof callback == "function" ? callback : _ => {}}, - {contents: BDFDB.LanguageUtils.LanguageStrings.CANCEL, close: true} - ]}); + BDFDB.ModalUtils.open(plugin, { + text: text, + header: BDFDB.LanguageUtils.LibraryStrings.confirm, + className: BDFDB.disCN.modalconfirmmodal, + scroller: false, + buttons: [ + {contents: BDFDB.LanguageUtils.LanguageStrings.OKAY, close: true, color: "RED", onClick: callback}, + {contents: BDFDB.LanguageUtils.LanguageStrings.CANCEL, close: true} + ] + }); }; const RealMenuItems = BDFDB.ModuleUtils.findByProperties("MenuItem", "MenuGroup"); diff --git a/Plugins/ChatAliases/ChatAliases.plugin.js b/Plugins/ChatAliases/ChatAliases.plugin.js index 5a80d41a56..7bd23474e6 100644 --- a/Plugins/ChatAliases/ChatAliases.plugin.js +++ b/Plugins/ChatAliases/ChatAliases.plugin.js @@ -509,7 +509,7 @@ module.exports = (_ => { BDFDB.ModalUtils.open(this, { size: "MEDIUM", header: BDFDB.LanguageUtils.LibraryStringsFormat("add_to", "ChatAliases"), - subheader: "", + subHeader: "", children: [ this.createInputs(values), BDFDB.ArrayUtils.remove(Object.keys(this.defaults.configs), "file").map(key => BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.SettingsItem, { @@ -525,7 +525,7 @@ module.exports = (_ => { contents: BDFDB.LanguageUtils.LanguageStrings.ADD, color: "BRAND", close: true, - click: modal => { + onClick: modal => { let configs = {}; for (let key in this.defaults.configs) { let configInput = modal.querySelector(`.input-config${key} ${BDFDB.dotCN.switchinner}`); diff --git a/Plugins/ChatFilter/ChatFilter.plugin.js b/Plugins/ChatFilter/ChatFilter.plugin.js index 8fb3a62fa4..fa478e6c4b 100644 --- a/Plugins/ChatFilter/ChatFilter.plugin.js +++ b/Plugins/ChatFilter/ChatFilter.plugin.js @@ -455,7 +455,7 @@ module.exports = (_ => { BDFDB.ModalUtils.open(this, { size: "MEDIUM", header: BDFDB.LanguageUtils.LibraryStringsFormat("add_to", "ChatFilter"), - subheader: "", + subHeader: "", children: [ this.createInputs(values), BDFDB.ArrayUtils.remove(Object.keys(this.defaults.configs), "file").map(key => BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.SettingsItem, { @@ -471,7 +471,7 @@ module.exports = (_ => { contents: BDFDB.LanguageUtils.LanguageStrings.ADD, color: "BRAND", close: true, - click: modal => { + onClick: modal => { let newConfigs = {}; for (let key in this.defaults.configs) { let configInput = modal.querySelector(`.input-config${key} ${BDFDB.dotCN.switchinner}`); diff --git a/Plugins/DisplayLargeMessages/DisplayLargeMessages.plugin.js b/Plugins/DisplayLargeMessages/DisplayLargeMessages.plugin.js index bbe852715a..c991cc3227 100644 --- a/Plugins/DisplayLargeMessages/DisplayLargeMessages.plugin.js +++ b/Plugins/DisplayLargeMessages/DisplayLargeMessages.plugin.js @@ -303,7 +303,7 @@ module.exports = (_ => { BDFDB.ModalUtils.open(this, { size: "LARGE", header: BDFDB.LanguageUtils.LanguageStrings.MESSAGE_PREVIEW, - subheader: "", + subHeader: "", children: BDFDB.ReactUtils.createElement("div", { className: BDFDB.disCNS.messagepopout + BDFDB.disCN._displaylargemessagespreviewmessage, children: BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.MessageGroup, { diff --git a/Plugins/EditChannels/EditChannels.plugin.js b/Plugins/EditChannels/EditChannels.plugin.js index 480d97cf70..2d81017ae2 100644 --- a/Plugins/EditChannels/EditChannels.plugin.js +++ b/Plugins/EditChannels/EditChannels.plugin.js @@ -610,7 +610,7 @@ module.exports = (_ => { BDFDB.ModalUtils.open(this, { size: "MEDIUM", header: this.labels.modal_header, - subheader: channel.name, + subHeader: channel.name, children: [ BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.FormComponents.FormItem, { title: this.labels.modal_channelname, @@ -700,7 +700,7 @@ module.exports = (_ => { contents: BDFDB.LanguageUtils.LanguageStrings.SAVE, color: "BRAND", close: true, - click: modal => { + onClick: modal => { let oldData = Object.assign({}, data); let channelNameInput = modal.querySelector(".input-channelname " + BDFDB.dotCN.input); diff --git a/Plugins/EditServers/EditServers.plugin.js b/Plugins/EditServers/EditServers.plugin.js index 3ab13415ca..b9add4fbc7 100644 --- a/Plugins/EditServers/EditServers.plugin.js +++ b/Plugins/EditServers/EditServers.plugin.js @@ -425,7 +425,7 @@ module.exports = (_ => { BDFDB.ModalUtils.open(this, { size: "MEDIUM", header: this.labels.modal_header, - subheader: guild.name, + subHeader: guild.name, children: [ BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.ModalComponents.ModalTabContent, { tab: this.labels.modal_tabheader1, @@ -629,7 +629,7 @@ module.exports = (_ => { contents: BDFDB.LanguageUtils.LanguageStrings.SAVE, color: "BRAND", close: true, - click: modal => { + onClick: modal => { let oldData = Object.assign({}, data); let guildNameInput = modal.querySelector(".input-guildname " + BDFDB.dotCN.input); diff --git a/Plugins/EditUsers/EditUsers.plugin.js b/Plugins/EditUsers/EditUsers.plugin.js index 50d4a19081..6324d00ab8 100644 --- a/Plugins/EditUsers/EditUsers.plugin.js +++ b/Plugins/EditUsers/EditUsers.plugin.js @@ -1167,7 +1167,7 @@ module.exports = (_ => { BDFDB.ModalUtils.open(this, { size: "MEDIUM", header: this.labels.modal_header, - subheader: member.nick || user.username, + subHeader: member.nick || user.username, children: [ BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.ModalComponents.ModalTabContent, { tab: this.labels.modal_tabheader1, @@ -1399,7 +1399,7 @@ module.exports = (_ => { contents: BDFDB.LanguageUtils.LanguageStrings.SAVE, color: "BRAND", close: true, - click: modal => { + onClick: modal => { let oldData = Object.assign({}, data); let userNameInput = modal.querySelector(".input-username " + BDFDB.dotCN.input); diff --git a/Plugins/FriendNotifications/FriendNotifications.plugin.js b/Plugins/FriendNotifications/FriendNotifications.plugin.js index 5c65cdeea9..74c8e72f5a 100644 --- a/Plugins/FriendNotifications/FriendNotifications.plugin.js +++ b/Plugins/FriendNotifications/FriendNotifications.plugin.js @@ -806,7 +806,7 @@ module.exports = (_ => { BDFDB.ModalUtils.open(this, { size: "MEDIUM", header: "LogIn/-Out Timelog", - subheader: "", + subHeader: "", className: BDFDB.disCN._friendnotificationstimelogmodal, titleChildren: BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.SearchBar, { autoFocus: true, diff --git a/Plugins/PinDMs/PinDMs.plugin.js b/Plugins/PinDMs/PinDMs.plugin.js index 2a78090681..61e2176bb2 100644 --- a/Plugins/PinDMs/PinDMs.plugin.js +++ b/Plugins/PinDMs/PinDMs.plugin.js @@ -883,7 +883,7 @@ module.exports = (_ => { if (BDFDB.ObjectUtils.is(data) && type) BDFDB.ModalUtils.open(this, { size: "MEDIUM", header: BDFDB.LanguageUtils.LanguageStrings.CATEGORY_SETTINGS, - subheader: data.name, + subHeader: data.name, children: [ BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.FormComponents.FormItem, { title: BDFDB.LanguageUtils.LanguageStrings.CATEGORY_NAME, @@ -914,7 +914,7 @@ module.exports = (_ => { contents: isNew ? BDFDB.LanguageUtils.LanguageStrings.CREATE : BDFDB.LanguageUtils.LanguageStrings.SAVE, color: "BRAND", close: true, - click: modal => { + onClick: modal => { data.name = modal.querySelector(".input-categoryname " + BDFDB.dotCN.input).value.trim() || data.name; data.color = BDFDB.ColorUtils.getSwatchColor(modal, 1); diff --git a/Plugins/ServerFolders/ServerFolders.plugin.js b/Plugins/ServerFolders/ServerFolders.plugin.js index 954833dcdc..17cf3501ee 100644 --- a/Plugins/ServerFolders/ServerFolders.plugin.js +++ b/Plugins/ServerFolders/ServerFolders.plugin.js @@ -1034,7 +1034,7 @@ module.exports = (_ => { BDFDB.ModalUtils.open(this, { size: "MEDIUM", header: this.labels.serversubmenu_createfolder, - subheader: "", + subHeader: "", contentClassName: BDFDB.disCN.listscroller, children: guilds.map((guild, i) => { return [ @@ -1065,7 +1065,7 @@ module.exports = (_ => { contents: BDFDB.LanguageUtils.LanguageStrings.DONE, color: "BRAND", close: true, - click: (modal, instance) => { + onClick: (modal, instance) => { this.createFolder(BDFDB.ArrayUtils.removeCopies(targetedGuildIds)); } }] diff --git a/Plugins/ServerHider/ServerHider.plugin.js b/Plugins/ServerHider/ServerHider.plugin.js index 135f1de76d..28e5f50edc 100644 --- a/Plugins/ServerHider/ServerHider.plugin.js +++ b/Plugins/ServerHider/ServerHider.plugin.js @@ -215,7 +215,7 @@ module.exports = (_ => { BDFDB.ModalUtils.open(this, { size: "MEDIUM", header: this.labels.modal_header, - subheader: "", + subHeader: "", contentClassName: BDFDB.disCN.listscroller, children: guilds.map((guild, i) => { let folder = folders.find(folder => folder.guildIds.includes(guild.id) && !foldersAdded.includes(folder.folderId)); @@ -286,7 +286,7 @@ module.exports = (_ => { contents: BDFDB.LanguageUtils.LanguageStrings.FORM_LABEL_ALL, color: "TRANSPARENT", look: "LINK", - click: (modal, instance) => { + onClick: (modal, instance) => { let enabled = hiddenGuildIds.includes(guilds[0].id); hiddenGuildIds = [].concat(enabled ? [] : guilds.map(n => n.id)); BDFDB.DataUtils.save(hiddenGuildIds, this, "hidden", "servers"); diff --git a/Plugins/ShowHiddenChannels/ShowHiddenChannels.plugin.js b/Plugins/ShowHiddenChannels/ShowHiddenChannels.plugin.js index 85bdb35c83..1add6edd4b 100644 --- a/Plugins/ShowHiddenChannels/ShowHiddenChannels.plugin.js +++ b/Plugins/ShowHiddenChannels/ShowHiddenChannels.plugin.js @@ -537,7 +537,7 @@ module.exports = (_ => { BDFDB.ModalUtils.open(this, { size: "MEDIUM", header: BDFDB.LanguageUtils.LanguageStrings.CHANNEL + " " + BDFDB.LanguageUtils.LanguageStrings.ACCESSIBILITY, - subheader: "#" + channel.name, + subHeader: "#" + channel.name, className: BDFDB.disCN._showhiddenchannelsaccessmodal, contentClassName: BDFDB.disCN.listscroller, children: [ diff --git a/Plugins/SpotifyControls/SpotifyControls.plugin.js b/Plugins/SpotifyControls/SpotifyControls.plugin.js index c50b077d6e..c8006a013d 100644 --- a/Plugins/SpotifyControls/SpotifyControls.plugin.js +++ b/Plugins/SpotifyControls/SpotifyControls.plugin.js @@ -619,13 +619,13 @@ module.exports = (_ => { if (!BDFDB.LibraryModules.SpotifyTrackUtils.hasConnectedAccount()) BDFDB.ModalUtils.open(this, { size: "SMALL", header: this.name + ": Something is missing...", - subheader: "You need to connect a Spotify account", + subHeader: "You need to connect a Spotify account", text: "You are missing a connected Spotify account, without a connected account you won't be able to use Spotify Controls. To connect a Spotify account with your discord account click the button below.", buttons: [{ contents: BDFDB.LanguageUtils.LanguageStrings.CONNECT, color: "BRAND", close: true, - click: modal => { + onClick: modal => { BDFDB.LibraryModules.UserSettingsUtils.open(BDFDB.DiscordConstants.UserSettingsSections.CONNECTIONS) } }] diff --git a/Plugins/ThemeSettings/ThemeSettings.plugin.js b/Plugins/ThemeSettings/ThemeSettings.plugin.js index ac8aacca97..98cb6bfad6 100644 --- a/Plugins/ThemeSettings/ThemeSettings.plugin.js +++ b/Plugins/ThemeSettings/ThemeSettings.plugin.js @@ -99,14 +99,14 @@ module.exports = (_ => { let open = _ => { BDFDB.ModalUtils.open(this, { header: `${addon.name} ${BDFDB.LanguageUtils.LanguageStrings.SETTINGS}`, - subheader: "", + subHeader: "", className: BDFDB.disCN._repomodal, headerClassName: BDFDB.disCN._repomodalheader, contentClassName: BDFDB.disCN._repomodalsettings, footerClassName: BDFDB.disCN._repomodalfooter, size: "MEDIUM", children: this.createThemeInputs(addon, imports, vars), - buttons: [{contents: BDFDB.LanguageUtils.LanguageStrings.SAVE, color: "BRAND", click: modal => {this.updateTheme(modal, addon);}}] + buttons: [{contents: BDFDB.LanguageUtils.LanguageStrings.SAVE, color: "BRAND", onClick: modal => {this.updateTheme(modal, addon);}}] }); }; if (isBeta) { diff --git a/Plugins/UserNotes/UserNotes.plugin.js b/Plugins/UserNotes/UserNotes.plugin.js index 3da42dadc8..d0542a693e 100644 --- a/Plugins/UserNotes/UserNotes.plugin.js +++ b/Plugins/UserNotes/UserNotes.plugin.js @@ -111,7 +111,7 @@ module.exports = (_ => { BDFDB.ModalUtils.open(this, { size: "LARGE", header: BDFDB.LanguageUtils.LanguageStrings.USERS + " " + BDFDB.LanguageUtils.LanguageStrings.NOTE, - subheader: user.username, + subHeader: user.username, scroller: false, children: [ BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.TextArea, { @@ -124,7 +124,7 @@ module.exports = (_ => { contents: BDFDB.LanguageUtils.LanguageStrings.SAVE, color: "BRAND", close: true, - click: modal => { + onClick: modal => { note = modal.querySelector("textarea").value; if (note) BDFDB.DataUtils.save(note, this, "notes", user.id); else BDFDB.DataUtils.remove(this, "notes", user.id);