This commit is contained in:
Mirco Wittrien 2019-11-21 11:38:04 +01:00
parent 3070f97ae1
commit 6254555cfa
12 changed files with 25 additions and 25 deletions

View File

@ -312,7 +312,7 @@ class ChatAliases {
children: [
BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.ContextMenuItem, {
label: "Add to ChatAliases",
action: e => {
action: _ => {
BDFDB.ContextMenuUtils.close(menu);
this.openAddModal(text);
}

View File

@ -304,7 +304,7 @@ class ChatFilter {
children: [
BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.ContextMenuItem, {
label: "Add to ChatFilter",
action: e => {
action: _ => {
BDFDB.ContextMenuUtils.close(menu);
this.openAddModal(text);
}

View File

@ -154,7 +154,7 @@ class EditChannels {
children: [
BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.ContextMenuItem, {
label: this.labels.submenu_channelsettings_text,
action: e => {
action: _ => {
BDFDB.ContextMenuUtils.close(menu);
this.showChannelSettings(instance.props.channel);
}
@ -162,7 +162,7 @@ class EditChannels {
BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.ContextMenuItem, {
label: this.labels.submenu_resetsettings_text,
disabled: !BDFDB.DataUtils.load(this, "channels", instance.props.channel.id),
action: e => {
action: _ => {
BDFDB.ContextMenuUtils.close(menu);
BDFDB.DataUtils.remove(this, "channels", instance.props.channel.id);
this.forceUpdateAll();

View File

@ -145,7 +145,7 @@ class EditServers {
children: [
BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.ContextMenuItem, {
label: this.labels.submenu_serversettings_text,
action: e => {
action: _ => {
BDFDB.ContextMenuUtils.close(menu);
this.showServerSettings(instance.props.guild);
}
@ -153,7 +153,7 @@ class EditServers {
BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.ContextMenuItem, {
label: this.labels.submenu_resetsettings_text,
disabled: !BDFDB.DataUtils.load(this, "servers", instance.props.guild.id),
action: e => {
action: _ => {
BDFDB.ContextMenuUtils.close(menu);
BDFDB.DataUtils.remove(this, "servers", instance.props.guild.id);
this.forceUpdateAll(instance.props.guild.id);

View File

@ -201,7 +201,7 @@ class EditUsers {
children: [
BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.ContextMenuItem, {
label: this.labels.submenu_usersettings_text,
action: e => {
action: _ => {
BDFDB.ContextMenuUtils.close(menu);
this.showUserSettings(instance.props.user);
}
@ -209,7 +209,7 @@ class EditUsers {
BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.ContextMenuItem, {
label: this.labels.submenu_resetsettings_text,
disabled: !BDFDB.DataUtils.load(this, "users", instance.props.user.id),
action: e => {
action: _ => {
BDFDB.ContextMenuUtils.close(menu);
BDFDB.DataUtils.remove(this, "users", instance.props.user.id);
this.forceUpdateAll();

View File

@ -163,7 +163,7 @@ class GoogleTranslateOption {
const translateUntranslateItem = BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.ContextMenuItem, {
label: translated ? this.labels.context_messageuntranslateoption_text : this.labels.context_messagetranslateoption_text,
hint: BDFDB.BDUtils.isPluginEnabled("MessageUtilities") ? BDFDB.BDUtils.getPlugin("MessageUtilities").getActiveShortcutString("__Translate_Message") : null,
action: e => {
action: _ => {
BDFDB.ContextMenuUtils.close(menu);
this.translateMessage(instance.props.message, instance.props.target, instance.props.channel);
}
@ -177,8 +177,8 @@ class GoogleTranslateOption {
var foundtranslation, foundinput, foundoutput;
const searchTranslationItem = BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.ContextMenuItem, {
label: this.labels.context_googletranslateoption_text,
action: e => {
var item = BDFDB.DOMUtils.getParent(BDFDB.dotCN.contextmenuitem, e.target);
action: event => {
var item = BDFDB.DOMUtils.getParent(BDFDB.dotCN.contextmenuitem, event.target);
if (item) {
var createTooltip = () => {
BDFDB.TooltipUtils.create(item, `From ${foundinput.name}:\n${text}\n\nTo ${foundoutput.name}:\n${foundtranslation}`, {type:"right", selector:"googletranslate-tooltip"});
@ -214,7 +214,7 @@ class GoogleTranslateOption {
children.splice(index + 1, 0, BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.ContextMenuItem, {
label: this.labels[translated ? "popout_untranslateoption_text" : "popout_translateoption_text"],
className: BDFDB.disCN.optionpopoutitem,
action: e => {
action: _ => {
this.translateMessage(instance.props.message, instance.props.target, instance.props.channel);
instance.props.onClose();
}

View File

@ -342,7 +342,7 @@ class PluginRepo {
BDFDB.TimeUtils.timeout(() => {for (let child of returnvalue.props.children) if (child && child.props && child.props.label == "BandagedBD" && Array.isArray(child.props.render)) {
const repoItem = BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.ContextMenuItem, {
label: "Plugin Repo",
action: e => {
action: _ => {
if (!this.loading.is) BDFDB.ContextMenuUtils.close(menu);
this.openPluginRepoModal();
}

View File

@ -3,7 +3,7 @@
class RevealAllSpoilersOption {
getName () {return "RevealAllSpoilersOption";}
getVersion () {return "1.0.2";}
getVersion () {return "1.0.3";}
getAuthor () {return "DevilBro";}
@ -69,7 +69,7 @@ class RevealAllSpoilersOption {
BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.ContextMenuItem, {
label: "Reveal all Spoilers",
hint: BDFDB.BDUtils.isPluginEnabled("MessageUtilities") ? BDFDB.BDUtils.getPlugin("MessageUtilities").getActiveShortcutString("__Reveal_Spoilers") : null,
action: e => {
action: _ => {
BDFDB.ContextMenuUtils.close(e.instance);
this.revealAllSpoilers(messagediv);
}

View File

@ -349,8 +349,8 @@ class ServerFolders {
children: BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.ContextMenuItem, {
label: this.labels.foldercontext_removefolder_text,
danger: true,
action: e => {
BDFDB.ContextMenuUtils.close(BDFDB.DOMUtils.getParent(BDFDB.dotCN.contextmenu, e.target));
action: _ => {
BDFDB.ContextMenuUtils.close(instance);
BDFDB.ModalUtils.confirm(this, `Are you sure you want to remove the folder${folder.folderName ? (" '" + folder.folderName + '"') : ""}?`, () => {this.removeFolder(folderid);});
}
})
@ -364,7 +364,7 @@ class ServerFolders {
let addtofolderitems = [], openguilds = BDFDB.LibraryModules.FolderStore.getSortedGuilds().filter(n => !n.folderId).map(n => n.guilds[0]);
for (let i = 0; i < folders.length; i++) addtofolderitems.push(BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.ContextMenuItem, {
label: folders[i].folderName || (this.labels.modal_tabheader1_text + " #" + parseInt(i+1)),
action: e => {
action: _ => {
BDFDB.ContextMenuUtils.close(menu);
this.addGuildToFolder(folders[i].folderId, guildid);
}
@ -379,7 +379,7 @@ class ServerFolders {
BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.ContextMenuItem, {
label: this.labels.serversubmenu_removefromfolder_text,
danger: true,
action: e => {
action: _ => {
BDFDB.ContextMenuUtils.close(menu);
this.removeGuildFromFolder(folder.folderId, guildid);
}
@ -388,7 +388,7 @@ class ServerFolders {
BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.ContextMenuItem, {
label: this.labels.serversubmenu_createfolder_text,
disabled: !openguilds.length,
action: e => {
action: _ => {
BDFDB.ContextMenuUtils.close(menu);
this.openFolderCreationMenu(openguilds, guildid);
}

View File

@ -167,7 +167,7 @@ class ServerHider {
children: [
BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.ContextMenuItem, {
label: this.labels.submenu_openhidemenu_text,
action: e => {
action: _ => {
BDFDB.ContextMenuUtils.close(menu);
this.showServerModal();
}
@ -175,7 +175,7 @@ class ServerHider {
BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.ContextMenuItem, {
label: this.labels.submenu_hideserver_text,
disabled: !(instance.props.guild && !instance.props.target.getAttribute("folder")),
action: e => {
action: _ => {
BDFDB.ContextMenuUtils.close(menu);
this.toggleServer(instance.props.guild, instance.props.target, false);
}

View File

@ -178,7 +178,7 @@ class SpellCheck {
let similarWords = this.getSimilarWords(word.toLowerCase().trim());
for (let suggestion of similarWords.sort()) items.push(BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.ContextMenuItem, {
label: suggestion,
action: e => {
action: _ => {
BDFDB.ContextMenuUtils.close(menu);
this.replaceWord(textarea, word, suggestion);
}
@ -194,7 +194,7 @@ class SpellCheck {
BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.ContextMenuItem, {
label: this.labels.context_spellcheck_text,
hint: word,
action: e => {
action: _ => {
BDFDB.ContextMenuUtils.close(menu);
this.addToOwnDictionary(word);
}

View File

@ -402,7 +402,7 @@ class ThemeRepo {
BDFDB.TimeUtils.timeout(() => {for (let child of returnvalue.props.children) if (child && child.props && child.props.label == "BandagedBD" && Array.isArray(child.props.render)) {
const repoItem = BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.ContextMenuItem, {
label: "Theme Repo",
action: e => {
action: _ => {
if (!this.loading.is) BDFDB.ContextMenuUtils.close(menu);
this.openThemeRepoModal();
}