This commit is contained in:
Mirco Wittrien 2020-10-14 21:08:41 +02:00
parent 6e8da76223
commit aa4c0ec2ae
34 changed files with 36 additions and 99 deletions

View File

@ -113,7 +113,6 @@ module.exports = (_ => {
let settingsPanel, settingsItems = []; let settingsPanel, settingsItems = [];
for (let key in settings) settingsItems.push(BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.SettingsSaveItem, { for (let key in settings) settingsItems.push(BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.SettingsSaveItem, {
className: BDFDB.disCN.marginbottom8,
type: "Switch", type: "Switch",
plugin: this, plugin: this,
keys: ["settings", key], keys: ["settings", key],

View File

@ -69,7 +69,6 @@ module.exports = (_ => {
let settingsPanel, settingsItems = []; let settingsPanel, settingsItems = [];
for (let key in settings) settingsItems.push(BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.SettingsSaveItem, { for (let key in settings) settingsItems.push(BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.SettingsSaveItem, {
className: BDFDB.disCN.marginbottom8,
type: "Switch", type: "Switch",
plugin: this, plugin: this,
keys: ["settings", key], keys: ["settings", key],

View File

@ -202,14 +202,12 @@ module.exports = (_ => {
title: "Settings", title: "Settings",
collapseStates: collapseStates, collapseStates: collapseStates,
children: Object.keys(settings).map(key => !this.defaults.settings[key].inner && BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.SettingsSaveItem, { children: Object.keys(settings).map(key => !this.defaults.settings[key].inner && BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.SettingsSaveItem, {
className: BDFDB.disCN.marginbottom8,
type: "Switch", type: "Switch",
plugin: this, plugin: this,
keys: ["settings", key], keys: ["settings", key],
label: this.defaults.settings[key].description, label: this.defaults.settings[key].description,
value: settings[key] value: settings[key]
})).concat(Object.keys(amounts).map(key => BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.SettingsSaveItem, { })).concat(Object.keys(amounts).map(key => BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.SettingsSaveItem, {
className: BDFDB.disCN.marginbottom8,
type: "TextInput", type: "TextInput",
childProps: { childProps: {
type: "number" type: "number"
@ -225,7 +223,6 @@ module.exports = (_ => {
title: "Automatically replace aliases in:", title: "Automatically replace aliases in:",
last: true, last: true,
children: Object.keys(settings).map(key => this.defaults.settings[key].inner && BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.SettingsSaveItem, { children: Object.keys(settings).map(key => this.defaults.settings[key].inner && BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.SettingsSaveItem, {
className: BDFDB.disCN.marginbottom8,
type: "Switch", type: "Switch",
plugin: this, plugin: this,
keys: ["settings", key], keys: ["settings", key],
@ -488,7 +485,7 @@ module.exports = (_ => {
this.createInputs(values), this.createInputs(values),
BDFDB.ArrayUtils.remove(Object.keys(this.defaults.configs), "file").map(key => BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.SettingsItem, { BDFDB.ArrayUtils.remove(Object.keys(this.defaults.configs), "file").map(key => BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.SettingsItem, {
type: "Switch", type: "Switch",
className: BDFDB.disCN.marginbottom8 + " input-config" + key, className: "input-config" + key,
label: this.defaults.configs[key].description, label: this.defaults.configs[key].description,
value: this.defaults.configs[key].value value: this.defaults.configs[key].value
})) }))
@ -515,7 +512,7 @@ module.exports = (_ => {
return [ return [
BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.FormComponents.FormItem, { BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.FormComponents.FormItem, {
title: "Replace:", title: "Replace:",
className: BDFDB.disCN.marginbottom8 + " input-wordvalue", className: "input-wordvalue",
children: BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.TextInput, { children: BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.TextInput, {
value: values.wordvalue, value: values.wordvalue,
placeholder: values.wordvalue, placeholder: values.wordvalue,
@ -535,7 +532,7 @@ module.exports = (_ => {
}), }),
BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.FormComponents.FormItem, { BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.FormComponents.FormItem, {
title: "With:", title: "With:",
className: BDFDB.disCN.marginbottom8 + " input-replacevalue", className: "input-replacevalue",
children: BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.TextInput, { children: BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.TextInput, {
type: "file", type: "file",
useFilePath: true, useFilePath: true,

View File

@ -92,14 +92,12 @@ module.exports = (_ => {
title: "Settings", title: "Settings",
collapseStates: collapseStates, collapseStates: collapseStates,
children: Object.keys(settings).map(key => BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.SettingsSaveItem, { children: Object.keys(settings).map(key => BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.SettingsSaveItem, {
className: BDFDB.disCN.marginbottom8,
type: "Switch", type: "Switch",
plugin: this, plugin: this,
keys: ["settings", key], keys: ["settings", key],
label: this.defaults.settings[key].description, label: this.defaults.settings[key].description,
value: settings[key] value: settings[key]
})).concat(Object.keys(replaces).map(rType => BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.SettingsSaveItem, { })).concat(Object.keys(replaces).map(rType => BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.SettingsSaveItem, {
className: BDFDB.disCN.marginbottom8,
type: "TextInput", type: "TextInput",
plugin: this, plugin: this,
keys: ["replaces", rType], keys: ["replaces", rType],
@ -179,7 +177,6 @@ module.exports = (_ => {
collapseStates: collapseStates, collapseStates: collapseStates,
children: Object.keys(replaces).map(rType => BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.SettingsItem, { children: Object.keys(replaces).map(rType => BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.SettingsItem, {
type: "Button", type: "Button",
className: BDFDB.disCN.marginbottom8,
color: BDFDB.LibraryComponents.Button.Colors.RED, color: BDFDB.LibraryComponents.Button.Colors.RED,
label: `Remove all ${rType} words`, label: `Remove all ${rType} words`,
onClick: _ => { onClick: _ => {
@ -401,7 +398,7 @@ module.exports = (_ => {
this.createInputs(values), this.createInputs(values),
BDFDB.ArrayUtils.remove(Object.keys(this.defaults.configs), "file").map(key => BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.SettingsItem, { BDFDB.ArrayUtils.remove(Object.keys(this.defaults.configs), "file").map(key => BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.SettingsItem, {
type: "Switch", type: "Switch",
className: BDFDB.disCN.marginbottom8 + " input-config" + key, className: "input-config" + key,
label: this.defaults.configs[key].description, label: this.defaults.configs[key].description,
value: this.defaults.configs[key].value value: this.defaults.configs[key].value
})) }))
@ -428,7 +425,7 @@ module.exports = (_ => {
return [ return [
BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.FormComponents.FormItem, { BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.FormComponents.FormItem, {
title: "Block/Censor:", title: "Block/Censor:",
className: BDFDB.disCN.marginbottom8 + " input-wordvalue", className: "input-wordvalue",
children: BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.TextInput, { children: BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.TextInput, {
key: "WORDVALUE", key: "WORDVALUE",
value: values.wordvalue, value: values.wordvalue,
@ -449,7 +446,7 @@ module.exports = (_ => {
}), }),
BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.FormComponents.FormItem, { BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.FormComponents.FormItem, {
title: "With:", title: "With:",
className: BDFDB.disCN.marginbottom8 + " input-replacevalue", className: "input-replacevalue",
children: BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.TextInput, { children: BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.TextInput, {
value: values.replacevalue, value: values.replacevalue,
placeholder: values.replacevalue, placeholder: values.replacevalue,

View File

@ -100,7 +100,6 @@ module.exports = (_ => {
title: "Settings", title: "Settings",
collapseStates: collapseStates, collapseStates: collapseStates,
children: Object.keys(settings => BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.SettingsSaveItem, { children: Object.keys(settings => BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.SettingsSaveItem, {
className: BDFDB.disCN.marginbottom8,
type: "Switch", type: "Switch",
plugin: this, plugin: this,
keys: ["settings", key], keys: ["settings", key],
@ -117,7 +116,6 @@ module.exports = (_ => {
title: "Format", title: "Format",
collapseStates: collapseStates, collapseStates: collapseStates,
children: Object.keys(choices).map(key => BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.SettingsSaveItem, { children: Object.keys(choices).map(key => BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.SettingsSaveItem, {
className: BDFDB.disCN.marginbottom8,
type: "Select", type: "Select",
plugin: this, plugin: this,
keys: ["choices", key], keys: ["choices", key],
@ -166,7 +164,6 @@ module.exports = (_ => {
})).concat(BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.FormComponents.FormDivider, { })).concat(BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.FormComponents.FormDivider, {
className: BDFDB.disCN.marginbottom8 className: BDFDB.disCN.marginbottom8
})).concat(Object.keys(formats).map(key => BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.SettingsSaveItem, { })).concat(Object.keys(formats).map(key => BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.SettingsSaveItem, {
className: BDFDB.disCN.marginbottom8,
type: "TextInput", type: "TextInput",
plugin: this, plugin: this,
keys: ["formats", key], keys: ["formats", key],
@ -180,7 +177,6 @@ module.exports = (_ => {
}))).concat(BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.FormComponents.FormDivider, { }))).concat(BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.FormComponents.FormDivider, {
className: BDFDB.disCN.marginbottom8 className: BDFDB.disCN.marginbottom8
})).concat(Object.keys(amounts).map(key => BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.SettingsSaveItem, { })).concat(Object.keys(amounts).map(key => BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.SettingsSaveItem, {
className: BDFDB.disCN.marginbottom8,
type: "TextInput", type: "TextInput",
childProps: { childProps: {
type: "number" type: "number"

View File

@ -65,7 +65,6 @@ module.exports = (_ => {
let settingsPanel, settingsItems = []; let settingsPanel, settingsItems = [];
for (let key in settings) settingsItems.push(BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.SettingsSaveItem, { for (let key in settings) settingsItems.push(BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.SettingsSaveItem, {
className: BDFDB.disCN.marginbottom8,
type: "Switch", type: "Switch",
plugin: this, plugin: this,
keys: ["settings", key], keys: ["settings", key],

View File

@ -95,7 +95,6 @@ module.exports = (_ => {
title: "Settings", title: "Settings",
collapseStates: collapseStates, collapseStates: collapseStates,
children: Object.keys(settings => BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.SettingsSaveItem, { children: Object.keys(settings => BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.SettingsSaveItem, {
className: BDFDB.disCN.marginbottom8,
type: "Switch", type: "Switch",
plugin: this, plugin: this,
keys: ["settings", key], keys: ["settings", key],
@ -112,7 +111,6 @@ module.exports = (_ => {
title: "Format", title: "Format",
collapseStates: collapseStates, collapseStates: collapseStates,
children: Object.keys(choices).map(key => BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.SettingsSaveItem, { children: Object.keys(choices).map(key => BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.SettingsSaveItem, {
className: BDFDB.disCN.marginbottom8,
type: "Select", type: "Select",
plugin: this, plugin: this,
keys: ["choices", key], keys: ["choices", key],
@ -161,7 +159,6 @@ module.exports = (_ => {
})).concat(BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.FormComponents.FormDivider, { })).concat(BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.FormComponents.FormDivider, {
className: BDFDB.disCN.marginbottom8 className: BDFDB.disCN.marginbottom8
})).concat(Object.keys(formats).map(key => BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.SettingsSaveItem, { })).concat(Object.keys(formats).map(key => BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.SettingsSaveItem, {
className: BDFDB.disCN.marginbottom8,
type: "TextInput", type: "TextInput",
plugin: this, plugin: this,
keys: ["formats", key], keys: ["formats", key],
@ -175,7 +172,6 @@ module.exports = (_ => {
}))).concat(BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.FormComponents.FormDivider, { }))).concat(BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.FormComponents.FormDivider, {
className: BDFDB.disCN.marginbottom8 className: BDFDB.disCN.marginbottom8
})).concat(Object.keys(amounts).map(key => BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.SettingsSaveItem, { })).concat(Object.keys(amounts).map(key => BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.SettingsSaveItem, {
className: BDFDB.disCN.marginbottom8,
type: "TextInput", type: "TextInput",
childProps: { childProps: {
type: "number" type: "number"

View File

@ -102,7 +102,6 @@ module.exports = (_ => {
title: "Settings", title: "Settings",
collapseStates: collapseStates, collapseStates: collapseStates,
children: Object.keys(settings).map(key => BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.SettingsSaveItem, { children: Object.keys(settings).map(key => BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.SettingsSaveItem, {
className: BDFDB.disCN.marginbottom8,
type: "Switch", type: "Switch",
plugin: this, plugin: this,
keys: ["settings", key], keys: ["settings", key],
@ -174,7 +173,6 @@ module.exports = (_ => {
direction: BDFDB.LibraryComponents.Flex.Direction.VERTICAL, direction: BDFDB.LibraryComponents.Flex.Direction.VERTICAL,
children: [ children: [
BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.SettingsSaveItem, { BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.SettingsSaveItem, {
className: BDFDB.disCN.marginbottom8,
type: "TextInput", type: "TextInput",
plugin: this, plugin: this,
keys: ["formats", key], keys: ["formats", key],

View File

@ -99,7 +99,6 @@ module.exports = (_ => {
let settingsPanel, settingsItems = []; let settingsPanel, settingsItems = [];
for (let key in settings) settingsItems.push(BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.SettingsSaveItem, { for (let key in settings) settingsItems.push(BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.SettingsSaveItem, {
className: BDFDB.disCN.marginbottom8,
type: "Switch", type: "Switch",
plugin: this, plugin: this,
keys: ["settings", key], keys: ["settings", key],
@ -110,7 +109,6 @@ module.exports = (_ => {
} }
})); }));
for (let key in amounts) settingsItems.push(BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.SettingsSaveItem, { for (let key in amounts) settingsItems.push(BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.SettingsSaveItem, {
className: BDFDB.disCN.marginbottom8,
type: "TextInput", type: "TextInput",
childProps: { childProps: {
type: "number" type: "number"

View File

@ -94,7 +94,6 @@ module.exports = (_ => {
let settingsPanel, settingsItems = []; let settingsPanel, settingsItems = [];
for (let key in settings) settingsItems.push(BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.SettingsSaveItem, { for (let key in settings) settingsItems.push(BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.SettingsSaveItem, {
className: BDFDB.disCN.marginbottom8,
type: "Switch", type: "Switch",
plugin: this, plugin: this,
keys: ["settings", key], keys: ["settings", key],
@ -102,7 +101,6 @@ module.exports = (_ => {
value: settings[key] value: settings[key]
})); }));
for (let key in amounts) settingsItems.push(BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.SettingsSaveItem, { for (let key in amounts) settingsItems.push(BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.SettingsSaveItem, {
className: BDFDB.disCN.marginbottom8,
type: "TextInput", type: "TextInput",
childProps: { childProps: {
type: "number" type: "number"

View File

@ -126,7 +126,6 @@ module.exports = (_ => {
let settingsPanel, settingsItems = []; let settingsPanel, settingsItems = [];
for (let key in settings) if (!this.defaults.settings[key].inner) settingsItems.push(BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.SettingsSaveItem, { for (let key in settings) if (!this.defaults.settings[key].inner) settingsItems.push(BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.SettingsSaveItem, {
className: BDFDB.disCN.marginbottom8,
type: "Switch", type: "Switch",
plugin: this, plugin: this,
keys: ["settings", key], keys: ["settings", key],
@ -137,7 +136,6 @@ module.exports = (_ => {
title: "Change Channels in:", title: "Change Channels in:",
first: settingsItems.length == 0, first: settingsItems.length == 0,
children: Object.keys(settings).map(key => this.defaults.settings[key].inner && BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.SettingsSaveItem, { children: Object.keys(settings).map(key => this.defaults.settings[key].inner && BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.SettingsSaveItem, {
className: BDFDB.disCN.marginbottom8,
type: "Switch", type: "Switch",
plugin: this, plugin: this,
keys: ["settings", key], keys: ["settings", key],
@ -147,7 +145,6 @@ module.exports = (_ => {
})); }));
settingsItems.push(BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.SettingsItem, { settingsItems.push(BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.SettingsItem, {
type: "Button", type: "Button",
className: BDFDB.disCN.marginbottom8,
color: BDFDB.LibraryComponents.Button.Colors.RED, color: BDFDB.LibraryComponents.Button.Colors.RED,
label: "Reset all Channels", label: "Reset all Channels",
onClick: _ => { onClick: _ => {
@ -510,7 +507,8 @@ module.exports = (_ => {
}), }),
BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.SettingsItem, { BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.SettingsItem, {
type: "Switch", type: "Switch",
className: BDFDB.disCN.marginbottom20 + " input-inheritcolor", className: "input-inheritcolor",
margin: 20,
label: this.labels.modal_inheritcolor_text, label: this.labels.modal_inheritcolor_text,
tag: BDFDB.LibraryComponents.FormComponents.FormTitle.Tags.H5, tag: BDFDB.LibraryComponents.FormComponents.FormTitle.Tags.H5,
value: channel.type == 4 && data.inheritColor, value: channel.type == 4 && data.inheritColor,

View File

@ -115,7 +115,6 @@ module.exports = (_ => {
let settingsPanel, settingsItems = [], innerItems = []; let settingsPanel, settingsItems = [], innerItems = [];
for (let key in settings) if (!this.defaults.settings[key].inner) settingsItems.push(BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.SettingsSaveItem, { for (let key in settings) if (!this.defaults.settings[key].inner) settingsItems.push(BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.SettingsSaveItem, {
className: BDFDB.disCN.marginbottom8,
type: "Switch", type: "Switch",
plugin: this, plugin: this,
keys: ["settings", key], keys: ["settings", key],
@ -126,7 +125,6 @@ module.exports = (_ => {
title: "Change Servers in:", title: "Change Servers in:",
first: settingsItems.length == 0, first: settingsItems.length == 0,
children: Object.keys(settings).map(key => this.defaults.settings[key].inner && BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.SettingsSaveItem, { children: Object.keys(settings).map(key => this.defaults.settings[key].inner && BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.SettingsSaveItem, {
className: BDFDB.disCN.marginbottom8,
type: "Switch", type: "Switch",
plugin: this, plugin: this,
keys: ["settings", key], keys: ["settings", key],
@ -136,7 +134,6 @@ module.exports = (_ => {
})); }));
settingsItems.push(BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.SettingsItem, { settingsItems.push(BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.SettingsItem, {
type: "Button", type: "Button",
className: BDFDB.disCN.marginbottom8,
color: BDFDB.LibraryComponents.Button.Colors.RED, color: BDFDB.LibraryComponents.Button.Colors.RED,
label: "Reset all Servers", label: "Reset all Servers",
onClick: _ => { onClick: _ => {
@ -456,6 +453,7 @@ module.exports = (_ => {
BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.SettingsItem, { BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.SettingsItem, {
className: "input-removeicon", className: "input-removeicon",
type: "Switch", type: "Switch",
margin: 0,
grow: 0, grow: 0,
label: BDFDB.LanguageUtils.LanguageStrings.REMOVE, label: BDFDB.LanguageUtils.LanguageStrings.REMOVE,
tag: BDFDB.LibraryComponents.FormComponents.FormTitle.Tags.H5, tag: BDFDB.LibraryComponents.FormComponents.FormTitle.Tags.H5,
@ -502,6 +500,7 @@ module.exports = (_ => {
BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.SettingsItem, { BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.SettingsItem, {
className: "input-removebanner", className: "input-removebanner",
type: "Switch", type: "Switch",
margin: 0,
grow: 0, grow: 0,
label: BDFDB.LanguageUtils.LanguageStrings.REMOVE, label: BDFDB.LanguageUtils.LanguageStrings.REMOVE,
tag: BDFDB.LibraryComponents.FormComponents.FormTitle.Tags.H5, tag: BDFDB.LibraryComponents.FormComponents.FormTitle.Tags.H5,

View File

@ -208,7 +208,6 @@ module.exports = (_ => {
let settingsPanel, settingsItems = []; let settingsPanel, settingsItems = [];
for (let key in settings) if (!this.defaults.settings[key].inner) settingsItems.push(BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.SettingsSaveItem, { for (let key in settings) if (!this.defaults.settings[key].inner) settingsItems.push(BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.SettingsSaveItem, {
className: BDFDB.disCN.marginbottom8,
type: "Switch", type: "Switch",
plugin: this, plugin: this,
keys: ["settings", key], keys: ["settings", key],
@ -219,7 +218,6 @@ module.exports = (_ => {
title: "Change Users in:", title: "Change Users in:",
first: settingsItems.length == 0, first: settingsItems.length == 0,
children: Object.keys(settings).map(key => this.defaults.settings[key].inner && BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.SettingsSaveItem, { children: Object.keys(settings).map(key => this.defaults.settings[key].inner && BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.SettingsSaveItem, {
className: BDFDB.disCN.marginbottom8,
type: "Switch", type: "Switch",
plugin: this, plugin: this,
keys: ["settings", key], keys: ["settings", key],
@ -229,7 +227,6 @@ module.exports = (_ => {
})); }));
settingsItems.push(BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.SettingsItem, { settingsItems.push(BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.SettingsItem, {
type: "Button", type: "Button",
className: BDFDB.disCN.marginbottom8,
color: BDFDB.LibraryComponents.Button.Colors.RED, color: BDFDB.LibraryComponents.Button.Colors.RED,
label: "Reset all Users", label: "Reset all Users",
onClick: _ => { onClick: _ => {
@ -1056,17 +1053,18 @@ module.exports = (_ => {
BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.SettingsItem, { BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.SettingsItem, {
className: "input-removeicon", className: "input-removeicon",
type: "Switch", type: "Switch",
margin: 0,
grow: 0, grow: 0,
label: BDFDB.LanguageUtils.LanguageStrings.REMOVE, label: BDFDB.LanguageUtils.LanguageStrings.REMOVE,
tag: BDFDB.LibraryComponents.FormComponents.FormTitle.Tags.H5, tag: BDFDB.LibraryComponents.FormComponents.FormTitle.Tags.H5,
value: data.removeIcon, value: data.removeIcon,
onChange: (value, instance) => { onChange: (value, instance) => {
let avatarInputIins = BDFDB.ReactUtils.findOwner(instance._reactInternalFiber.return.return, {key: "USERAVATAR"}); let avatarInputIns = BDFDB.ReactUtils.findOwner(instance._reactInternalFiber.return.return, {key: "USERAVATAR"});
if (avatarInputIins) { if (avatarInputIns) {
delete avatarInputIins.props.success; delete avatarInputIns.props.success;
delete avatarInputIins.props.errorMessage; delete avatarInputIns.props.errorMessage;
avatarInputIins.props.disabled = value; avatarInputIns.props.disabled = value;
BDFDB.ReactUtils.forceUpdate(avatarInputIins); BDFDB.ReactUtils.forceUpdate(avatarInputIns);
} }
} }
}) })
@ -1102,6 +1100,7 @@ module.exports = (_ => {
BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.SettingsItem, { BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.SettingsItem, {
className: "input-removestatus", className: "input-removestatus",
type: "Switch", type: "Switch",
margin: 0,
grow: 0, grow: 0,
label: BDFDB.LanguageUtils.LanguageStrings.REMOVE, label: BDFDB.LanguageUtils.LanguageStrings.REMOVE,
tag: BDFDB.LibraryComponents.FormComponents.FormTitle.Tags.H5, tag: BDFDB.LibraryComponents.FormComponents.FormTitle.Tags.H5,
@ -1186,7 +1185,8 @@ module.exports = (_ => {
}), }),
BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.SettingsItem, { BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.SettingsItem, {
type: "Switch", type: "Switch",
className: BDFDB.disCN.marginbottom20 + " input-userolecolor", className: "input-userolecolor",
margin: 20,
label: this.labels.modal_userolecolor_text, label: this.labels.modal_userolecolor_text,
tag: BDFDB.LibraryComponents.FormComponents.FormTitle.Tags.H5, tag: BDFDB.LibraryComponents.FormComponents.FormTitle.Tags.H5,
value: data.useRoleColor value: data.useRoleColor
@ -1216,7 +1216,8 @@ module.exports = (_ => {
}), }),
BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.SettingsItem, { BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.SettingsItem, {
type: "Switch", type: "Switch",
className: BDFDB.disCN.marginbottom20 + " input-ignoretagcolor", className: "input-ignoretagcolor",
margin: 20,
label: this.labels.modal_ignoretagcolor_text, label: this.labels.modal_ignoretagcolor_text,
tag: BDFDB.LibraryComponents.FormComponents.FormTitle.Tags.H5, tag: BDFDB.LibraryComponents.FormComponents.FormTitle.Tags.H5,
value: data.ignoreTagColor, value: data.ignoreTagColor,

View File

@ -285,7 +285,6 @@ module.exports = (_ => {
BDFDB.DataUtils.save(nonFriendsData, this, "nonfriends"); BDFDB.DataUtils.save(nonFriendsData, this, "nonfriends");
for (let key in settings) innerItems.push(BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.SettingsSaveItem, { for (let key in settings) innerItems.push(BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.SettingsSaveItem, {
className: BDFDB.disCN.marginbottom8,
type: "Switch", type: "Switch",
plugin: this, plugin: this,
keys: ["settings", key], keys: ["settings", key],
@ -293,7 +292,6 @@ module.exports = (_ => {
value: settings[key] value: settings[key]
})); }));
for (let key in amounts) if (key.indexOf("desktop") == -1 || "Notification" in window) innerItems.push(BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.SettingsSaveItem, { for (let key in amounts) if (key.indexOf("desktop") == -1 || "Notification" in window) innerItems.push(BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.SettingsSaveItem, {
className: BDFDB.disCN.marginbottom8,
type: "TextInput", type: "TextInput",
childProps: { childProps: {
type: "number" type: "number"
@ -383,7 +381,6 @@ module.exports = (_ => {
] ]
}) })
})].concat(Object.keys(notificationStrings).map(key => BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.SettingsSaveItem, { })].concat(Object.keys(notificationStrings).map(key => BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.SettingsSaveItem, {
className: BDFDB.disCN.marginbottom8,
type: "TextInput", type: "TextInput",
plugin: this, plugin: this,
keys: ["notificationstrings", key], keys: ["notificationstrings", key],

View File

@ -76,7 +76,6 @@ module.exports = (_ => {
let settingsPanel, settingsItems = []; let settingsPanel, settingsItems = [];
for (let key in settings) settingsItems.push(BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.SettingsSaveItem, { for (let key in settings) settingsItems.push(BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.SettingsSaveItem, {
className: BDFDB.disCN.marginbottom8,
type: "Switch", type: "Switch",
plugin: this, plugin: this,
keys: ["settings", key], keys: ["settings", key],
@ -88,7 +87,6 @@ module.exports = (_ => {
first: settingsItems.length == 0, first: settingsItems.length == 0,
last: true, last: true,
children: Object.keys(engines).filter(n => n && n != "_all").map(key => BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.SettingsSaveItem, { children: Object.keys(engines).filter(n => n && n != "_all").map(key => BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.SettingsSaveItem, {
className: BDFDB.disCN.marginbottom8,
type: "Switch", type: "Switch",
plugin: this, plugin: this,
keys: ["engines", key], keys: ["engines", key],

View File

@ -138,7 +138,6 @@ module.exports = (_ => {
settingsItems = settingsItems.concat(this.createSelects(false)); settingsItems = settingsItems.concat(this.createSelects(false));
for (let key in settings) settingsItems.push(BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.SettingsSaveItem, { for (let key in settings) settingsItems.push(BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.SettingsSaveItem, {
className: BDFDB.disCN.marginbottom8,
type: "Switch", type: "Switch",
plugin: this, plugin: this,
keys: ["settings", key], keys: ["settings", key],

View File

@ -240,14 +240,12 @@ module.exports = (_ => {
title: "Settings", title: "Settings",
collapseStates: collapseStates, collapseStates: collapseStates,
children: Object.keys(settings).map(key => !this.defaults.settings[key].inner && BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.SettingsSaveItem, { children: Object.keys(settings).map(key => !this.defaults.settings[key].inner && BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.SettingsSaveItem, {
className: BDFDB.disCN.marginbottom8,
type: "Switch", type: "Switch",
plugin: this, plugin: this,
keys: ["settings", key], keys: ["settings", key],
label: this.defaults.settings[key].description, label: this.defaults.settings[key].description,
value: settings[key] value: settings[key]
})).concat(Object.keys(amounts).map(key => BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.SettingsSaveItem, { })).concat(Object.keys(amounts).map(key => BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.SettingsSaveItem, {
className: BDFDB.disCN.marginbottom8,
type: "TextInput", type: "TextInput",
plugin: this, plugin: this,
keys: ["amounts", key], keys: ["amounts", key],
@ -258,7 +256,6 @@ module.exports = (_ => {
max: this.defaults.amounts[key].max, max: this.defaults.amounts[key].max,
value: amounts[key] value: amounts[key]
}))).concat(Object.keys(inputs).map(key => BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.SettingsSaveItem, { }))).concat(Object.keys(inputs).map(key => BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.SettingsSaveItem, {
className: BDFDB.disCN.marginbottom8,
type: "TextInput", type: "TextInput",
plugin: this, plugin: this,
keys: ["inputs", key], keys: ["inputs", key],
@ -276,7 +273,6 @@ module.exports = (_ => {
tag: BDFDB.LibraryComponents.FormComponents.FormTitle.Tags.H3, tag: BDFDB.LibraryComponents.FormComponents.FormTitle.Tags.H3,
children: "Add additional Context Menu Entry for:" children: "Add additional Context Menu Entry for:"
})].concat(Object.keys(settings).map(key => this.defaults.settings[key].inner && BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.SettingsSaveItem, { })].concat(Object.keys(settings).map(key => this.defaults.settings[key].inner && BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.SettingsSaveItem, {
className: BDFDB.disCN.marginbottom8,
type: "Switch", type: "Switch",
plugin: this, plugin: this,
keys: ["settings", key], keys: ["settings", key],
@ -288,7 +284,6 @@ module.exports = (_ => {
title: "Search Engines", title: "Search Engines",
collapseStates: collapseStates, collapseStates: collapseStates,
children: Object.keys(engines).filter(n => n && n != "_all").map(key => BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.SettingsSaveItem, { children: Object.keys(engines).filter(n => n && n != "_all").map(key => BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.SettingsSaveItem, {
className: BDFDB.disCN.marginbottom8,
type: "Switch", type: "Switch",
plugin: this, plugin: this,
keys: ["engines", key], keys: ["engines", key],

View File

@ -97,7 +97,6 @@ module.exports = (_ => {
title: "Settings", title: "Settings",
collapseStates: collapseStates, collapseStates: collapseStates,
children: Object.keys(settings => BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.SettingsSaveItem, { children: Object.keys(settings => BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.SettingsSaveItem, {
className: BDFDB.disCN.marginbottom8,
type: "Switch", type: "Switch",
plugin: this, plugin: this,
keys: ["settings", key], keys: ["settings", key],
@ -114,7 +113,6 @@ module.exports = (_ => {
title: "Format", title: "Format",
collapseStates: collapseStates, collapseStates: collapseStates,
children: Object.keys(choices).map(key => BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.SettingsSaveItem, { children: Object.keys(choices).map(key => BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.SettingsSaveItem, {
className: BDFDB.disCN.marginbottom8,
type: "Select", type: "Select",
plugin: this, plugin: this,
keys: ["choices", key], keys: ["choices", key],
@ -163,7 +161,6 @@ module.exports = (_ => {
})).concat(BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.FormComponents.FormDivider, { })).concat(BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.FormComponents.FormDivider, {
className: BDFDB.disCN.marginbottom8 className: BDFDB.disCN.marginbottom8
})).concat(Object.keys(formats).map(key => BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.SettingsSaveItem, { })).concat(Object.keys(formats).map(key => BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.SettingsSaveItem, {
className: BDFDB.disCN.marginbottom8,
type: "TextInput", type: "TextInput",
plugin: this, plugin: this,
keys: ["formats", key], keys: ["formats", key],
@ -177,7 +174,6 @@ module.exports = (_ => {
}))).concat(BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.FormComponents.FormDivider, { }))).concat(BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.FormComponents.FormDivider, {
className: BDFDB.disCN.marginbottom8 className: BDFDB.disCN.marginbottom8
})).concat(Object.keys(amounts).map(key => BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.SettingsSaveItem, { })).concat(Object.keys(amounts).map(key => BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.SettingsSaveItem, {
className: BDFDB.disCN.marginbottom8,
type: "TextInput", type: "TextInput",
childProps: { childProps: {
type: "number" type: "number"

View File

@ -107,7 +107,6 @@ module.exports = (_ => {
title: "Settings", title: "Settings",
collapseStates: collapseStates, collapseStates: collapseStates,
children: Object.keys(settings => BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.SettingsSaveItem, { children: Object.keys(settings => BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.SettingsSaveItem, {
className: BDFDB.disCN.marginbottom8,
type: "Switch", type: "Switch",
plugin: this, plugin: this,
keys: ["settings", key], keys: ["settings", key],
@ -124,7 +123,6 @@ module.exports = (_ => {
title: "Format", title: "Format",
collapseStates: collapseStates, collapseStates: collapseStates,
children: Object.keys(choices).map(key => BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.SettingsSaveItem, { children: Object.keys(choices).map(key => BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.SettingsSaveItem, {
className: BDFDB.disCN.marginbottom8,
type: "Select", type: "Select",
plugin: this, plugin: this,
keys: ["choices", key], keys: ["choices", key],
@ -173,7 +171,6 @@ module.exports = (_ => {
})).concat(BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.FormComponents.FormDivider, { })).concat(BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.FormComponents.FormDivider, {
className: BDFDB.disCN.marginbottom8 className: BDFDB.disCN.marginbottom8
})).concat(Object.keys(formats).map(key => BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.SettingsSaveItem, { })).concat(Object.keys(formats).map(key => BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.SettingsSaveItem, {
className: BDFDB.disCN.marginbottom8,
type: "TextInput", type: "TextInput",
plugin: this, plugin: this,
keys: ["formats", key], keys: ["formats", key],
@ -187,7 +184,6 @@ module.exports = (_ => {
}))).concat(BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.FormComponents.FormDivider, { }))).concat(BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.FormComponents.FormDivider, {
className: BDFDB.disCN.marginbottom8 className: BDFDB.disCN.marginbottom8
})).concat(Object.keys(amounts).map(key => BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.SettingsSaveItem, { })).concat(Object.keys(amounts).map(key => BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.SettingsSaveItem, {
className: BDFDB.disCN.marginbottom8,
type: "TextInput", type: "TextInput",
childProps: { childProps: {
type: "number" type: "number"

View File

@ -140,7 +140,6 @@ module.exports = (_ => {
for (let key in settings) { for (let key in settings) {
let isNativeTitlebarSetting = key == "displayNative"; let isNativeTitlebarSetting = key == "displayNative";
settingsItems.push(BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.SettingsSaveItem, { settingsItems.push(BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.SettingsSaveItem, {
className: BDFDB.disCN.marginbottom8,
type: "Switch", type: "Switch",
plugin: this, plugin: this,
keys: ["settings", key], keys: ["settings", key],

View File

@ -117,7 +117,6 @@ module.exports = (_ => {
title: "Settings", title: "Settings",
collapseStates: collapseStates, collapseStates: collapseStates,
children: Object.keys(settings).map(key => !this.defaults.settings[key].inner && BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.SettingsSaveItem, { children: Object.keys(settings).map(key => !this.defaults.settings[key].inner && BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.SettingsSaveItem, {
className: BDFDB.disCN.marginbottom8,
type: "Switch", type: "Switch",
plugin: this, plugin: this,
key: key, key: key,
@ -142,7 +141,6 @@ module.exports = (_ => {
tag: BDFDB.LibraryComponents.FormComponents.FormTitle.Tags.H3, tag: BDFDB.LibraryComponents.FormComponents.FormTitle.Tags.H3,
children: "Add Tags in:" children: "Add Tags in:"
})].concat(Object.keys(settings).map(key => this.defaults.settings[key].inner && BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.SettingsSaveItem, { })].concat(Object.keys(settings).map(key => this.defaults.settings[key].inner && BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.SettingsSaveItem, {
className: BDFDB.disCN.marginbottom8,
type: "Switch", type: "Switch",
plugin: this, plugin: this,
keys: ["settings", key], keys: ["settings", key],
@ -154,7 +152,6 @@ module.exports = (_ => {
title: "Tag Text Settings", title: "Tag Text Settings",
collapseStates: collapseStates, collapseStates: collapseStates,
children: Object.keys(inputs).map(key => BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.SettingsSaveItem, { children: Object.keys(inputs).map(key => BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.SettingsSaveItem, {
className: BDFDB.disCN.marginbottom8,
type: "TextInput", type: "TextInput",
plugin: this, plugin: this,
keys: ["inputs", key], keys: ["inputs", key],

View File

@ -83,7 +83,6 @@ module.exports = (_ => {
let settingsPanel, settingsItems = []; let settingsPanel, settingsItems = [];
for (let key in choices) settingsItems.push(BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.SettingsSaveItem, { for (let key in choices) settingsItems.push(BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.SettingsSaveItem, {
className: BDFDB.disCN.marginbottom8,
type: "Select", type: "Select",
plugin: this, plugin: this,
keys: ["choices", key], keys: ["choices", key],

View File

@ -153,7 +153,6 @@ module.exports = (_ => {
for (let key in settings) if (!this.defaults.settings[key].inner) settingsItems.push(BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.SettingsSaveItem, { for (let key in settings) if (!this.defaults.settings[key].inner) settingsItems.push(BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.SettingsSaveItem, {
className: BDFDB.disCN.marginbottom8,
type: "Switch", type: "Switch",
plugin: this, plugin: this,
keys: ["settings", key], keys: ["settings", key],
@ -164,7 +163,6 @@ module.exports = (_ => {
title: "Sort pinned DMs in the recent message order instead of the pinned at order in:", title: "Sort pinned DMs in the recent message order instead of the pinned at order in:",
first: settingsItems.length == 0, first: settingsItems.length == 0,
children: Object.keys(settings).map(key => this.defaults.settings[key].inner && BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.SettingsSaveItem, { children: Object.keys(settings).map(key => this.defaults.settings[key].inner && BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.SettingsSaveItem, {
className: BDFDB.disCN.marginbottom8,
type: "Switch", type: "Switch",
plugin: this, plugin: this,
keys: ["settings", key], keys: ["settings", key],

View File

@ -447,7 +447,6 @@ module.exports = (_ => {
title: "Settings", title: "Settings",
collapseStates: collapseStates, collapseStates: collapseStates,
children: Object.keys(settings).map(key => BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.SettingsSaveItem, { children: Object.keys(settings).map(key => BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.SettingsSaveItem, {
className: BDFDB.disCN.marginbottom8,
type: "Switch", type: "Switch",
plugin: this, plugin: this,
keys: ["settings", key], keys: ["settings", key],

View File

@ -101,7 +101,6 @@ module.exports = (_ => {
title: "Settings", title: "Settings",
collapseStates: collapseStates, collapseStates: collapseStates,
children: Object.keys(settings).filter(key => !this.defaults.settings[key].inner).map(key => BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.SettingsSaveItem, { children: Object.keys(settings).filter(key => !this.defaults.settings[key].inner).map(key => BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.SettingsSaveItem, {
className: BDFDB.disCN.marginbottom8,
type: "Switch", type: "Switch",
plugin: this, plugin: this,
keys: ["settings", key], keys: ["settings", key],
@ -112,7 +111,6 @@ module.exports = (_ => {
first: false, first: false,
last: true, last: true,
children: Object.keys(settings).filter(key => this.defaults.settings[key].inner).map(key => BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.SettingsSaveItem, { children: Object.keys(settings).filter(key => this.defaults.settings[key].inner).map(key => BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.SettingsSaveItem, {
className: BDFDB.disCN.marginbottom8,
type: "Switch", type: "Switch",
plugin: this, plugin: this,
keys: ["settings", key], keys: ["settings", key],

View File

@ -108,7 +108,6 @@ module.exports = (_ => {
let settingsPanel, settingsItems = []; let settingsPanel, settingsItems = [];
for (let key in settings) settingsItems.push(BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.SettingsSaveItem, { for (let key in settings) settingsItems.push(BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.SettingsSaveItem, {
className: BDFDB.disCN.marginbottom8,
type: "Switch", type: "Switch",
plugin: this, plugin: this,
keys: ["settings", key], keys: ["settings", key],

View File

@ -82,7 +82,6 @@ module.exports = (_ => {
let settingsPanel, settingsItems = [], innerItems = []; let settingsPanel, settingsItems = [], innerItems = [];
for (let key in settings) (!this.defaults.settings[key].inner ? settingsItems : innerItems).push(BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.SettingsSaveItem, { for (let key in settings) (!this.defaults.settings[key].inner ? settingsItems : innerItems).push(BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.SettingsSaveItem, {
className: BDFDB.disCN.marginbottom8,
type: "Switch", type: "Switch",
plugin: this, plugin: this,
keys: ["settings", key], keys: ["settings", key],

View File

@ -233,7 +233,6 @@ module.exports = (_ => {
title: "Settings", title: "Settings",
collapseStates: collapseStates, collapseStates: collapseStates,
children: Object.keys(settings).map(key => this.defaults.settings[key].cat == "settings" && BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.SettingsSaveItem, { children: Object.keys(settings).map(key => this.defaults.settings[key].cat == "settings" && BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.SettingsSaveItem, {
className: BDFDB.disCN.marginbottom8,
type: "Switch", type: "Switch",
plugin: this, plugin: this,
keys: ["settings", key], keys: ["settings", key],
@ -254,7 +253,6 @@ module.exports = (_ => {
tag: BDFDB.LibraryComponents.FormComponents.FormTitle.Tags.H3, tag: BDFDB.LibraryComponents.FormComponents.FormTitle.Tags.H3,
children: "Add additional details in the server tooltip for:" children: "Add additional details in the server tooltip for:"
})].concat(Object.keys(settings).map(key => this.defaults.settings[key].cat == "tooltip" && BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.SettingsSaveItem, { })].concat(Object.keys(settings).map(key => this.defaults.settings[key].cat == "tooltip" && BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.SettingsSaveItem, {
className: BDFDB.disCN.marginbottom8,
type: "Switch", type: "Switch",
plugin: this, plugin: this,
keys: ["settings", key], keys: ["settings", key],
@ -263,7 +261,6 @@ module.exports = (_ => {
}))).concat(BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.FormComponents.FormDivider, { }))).concat(BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.FormComponents.FormDivider, {
className: BDFDB.disCN.marginbottom8 className: BDFDB.disCN.marginbottom8
})).concat(Object.keys(amounts).map(key => this.defaults.amounts[key].cat == "tooltip" && BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.SettingsSaveItem, { })).concat(Object.keys(amounts).map(key => this.defaults.amounts[key].cat == "tooltip" && BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.SettingsSaveItem, {
className: BDFDB.disCN.marginbottom8,
type: "Slider", type: "Slider",
plugin: this, plugin: this,
keys: ["amounts", key], keys: ["amounts", key],
@ -279,7 +276,6 @@ module.exports = (_ => {
}))).concat(BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.FormComponents.FormDivider, { }))).concat(BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.FormComponents.FormDivider, {
className: BDFDB.disCN.marginbottom8 className: BDFDB.disCN.marginbottom8
})).concat(Object.keys(colors).map(key => BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.SettingsSaveItem, { })).concat(Object.keys(colors).map(key => BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.SettingsSaveItem, {
className: BDFDB.disCN.marginbottom8,
type: "TextInput", type: "TextInput",
plugin: this, plugin: this,
keys: ["colors", key], keys: ["colors", key],
@ -295,7 +291,6 @@ module.exports = (_ => {
title: "Time Format", title: "Time Format",
collapseStates: collapseStates, collapseStates: collapseStates,
children: Object.keys(choices).map(key => BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.SettingsSaveItem, { children: Object.keys(choices).map(key => BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.SettingsSaveItem, {
className: BDFDB.disCN.marginbottom8,
type: "Select", type: "Select",
plugin: this, plugin: this,
keys: ["choices", key], keys: ["choices", key],
@ -344,7 +339,6 @@ module.exports = (_ => {
})).concat(BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.FormComponents.FormDivider, { })).concat(BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.FormComponents.FormDivider, {
className: BDFDB.disCN.marginbottom8 className: BDFDB.disCN.marginbottom8
})).concat(Object.keys(formats).map(key => BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.SettingsSaveItem, { })).concat(Object.keys(formats).map(key => BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.SettingsSaveItem, {
className: BDFDB.disCN.marginbottom8,
type: "TextInput", type: "TextInput",
plugin: this, plugin: this,
keys: ["formats", key], keys: ["formats", key],
@ -358,7 +352,6 @@ module.exports = (_ => {
}))).concat(BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.FormComponents.FormDivider, { }))).concat(BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.FormComponents.FormDivider, {
className: BDFDB.disCN.marginbottom8 className: BDFDB.disCN.marginbottom8
})).concat(Object.keys(amounts).map(key => this.defaults.amounts[key].cat == "format" && BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.SettingsSaveItem, { })).concat(Object.keys(amounts).map(key => this.defaults.amounts[key].cat == "format" && BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.SettingsSaveItem, {
className: BDFDB.disCN.marginbottom8,
type: "TextInput", type: "TextInput",
plugin: this, plugin: this,
keys: ["amounts", key], keys: ["amounts", key],

View File

@ -473,7 +473,6 @@ module.exports = (_ => {
let settingsPanel, settingsItems = []; let settingsPanel, settingsItems = [];
for (let key in settings) settingsItems.push(BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.SettingsSaveItem, { for (let key in settings) settingsItems.push(BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.SettingsSaveItem, {
className: BDFDB.disCN.marginbottom8,
type: "Switch", type: "Switch",
plugin: this, plugin: this,
keys: ["settings", key], keys: ["settings", key],
@ -482,7 +481,6 @@ module.exports = (_ => {
})); }));
settingsItems.push(BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.SettingsItem, { settingsItems.push(BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.SettingsItem, {
type: "Button", type: "Button",
className: BDFDB.disCN.marginbottom8,
color: BDFDB.LibraryComponents.Button.Colors.RED, color: BDFDB.LibraryComponents.Button.Colors.RED,
label: "Reset all Folders", label: "Reset all Folders",
onClick: _ => { onClick: _ => {
@ -494,7 +492,6 @@ module.exports = (_ => {
})); }));
settingsItems.push(BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.SettingsItem, { settingsItems.push(BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.SettingsItem, {
type: "Button", type: "Button",
className: BDFDB.disCN.marginbottom8,
color: BDFDB.LibraryComponents.Button.Colors.RED, color: BDFDB.LibraryComponents.Button.Colors.RED,
label: "Remove all custom Icons", label: "Remove all custom Icons",
onClick: _ => { onClick: _ => {
@ -810,7 +807,8 @@ module.exports = (_ => {
}), }),
BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.SettingsItem, { BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.SettingsItem, {
type: "Switch", type: "Switch",
className: BDFDB.disCN.marginbottom20 + " input-usecloseicon", className: "input-usecloseicon",
margin: 20,
label: this.labels.modal_usecloseicon_text, label: this.labels.modal_usecloseicon_text,
tag: BDFDB.LibraryComponents.FormComponents.FormTitle.Tags.H5, tag: BDFDB.LibraryComponents.FormComponents.FormTitle.Tags.H5,
value: data.useCloseIcon value: data.useCloseIcon
@ -840,7 +838,8 @@ module.exports = (_ => {
}), }),
BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.SettingsItem, { BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.SettingsItem, {
type: "Switch", type: "Switch",
className: BDFDB.disCN.marginbottom20 + " input-swapcolors", className: "input-swapcolors",
margin: 20,
label: this.labels.modal_swapcolor_text, label: this.labels.modal_swapcolor_text,
tag: BDFDB.LibraryComponents.FormComponents.FormTitle.Tags.H5, tag: BDFDB.LibraryComponents.FormComponents.FormTitle.Tags.H5,
value: data.swapColors value: data.swapColors
@ -868,7 +867,8 @@ module.exports = (_ => {
}), }),
BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.SettingsItem, { BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.SettingsItem, {
type: "Switch", type: "Switch",
className: BDFDB.disCN.marginbottom20 + " input-copytooltipcolor", className: "input-copytooltipcolor",
margin: 20,
label: this.labels.modal_copytooltipcolor_text, label: this.labels.modal_copytooltipcolor_text,
tag: BDFDB.LibraryComponents.FormComponents.FormTitle.Tags.H5, tag: BDFDB.LibraryComponents.FormComponents.FormTitle.Tags.H5,
value: data.copyTooltipColor value: data.copyTooltipColor

View File

@ -206,7 +206,6 @@ module.exports = (_ => {
title: "Settings", title: "Settings",
collapseStates: collapseStates, collapseStates: collapseStates,
children: Object.keys(settings).map(key => BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.SettingsSaveItem, { children: Object.keys(settings).map(key => BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.SettingsSaveItem, {
className: BDFDB.disCN.marginbottom8,
type: "Switch", type: "Switch",
plugin: this, plugin: this,
keys: ["settings", key], keys: ["settings", key],

View File

@ -626,7 +626,6 @@ module.exports = (_ => {
title: "Settings", title: "Settings",
collapseStates: collapseStates, collapseStates: collapseStates,
children: Object.keys(settings).map(key => BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.SettingsSaveItem, { children: Object.keys(settings).map(key => BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.SettingsSaveItem, {
className: BDFDB.disCN.marginbottom8,
type: "Switch", type: "Switch",
plugin: this, plugin: this,
keys: ["settings", key], keys: ["settings", key],

View File

@ -68,7 +68,6 @@ module.exports = (_ => {
settingsItems = settingsItems.concat(this.createSelects(false)); settingsItems = settingsItems.concat(this.createSelects(false));
for (let key in settings) settingsItems.push(BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.SettingsSaveItem, { for (let key in settings) settingsItems.push(BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.SettingsSaveItem, {
className: BDFDB.disCN.marginbottom8,
type: "Switch", type: "Switch",
plugin: this, plugin: this,
keys: ["settings", key], keys: ["settings", key],

View File

@ -735,7 +735,6 @@ module.exports = (_ => {
title: "Settings", title: "Settings",
collapseStates: collapseStates, collapseStates: collapseStates,
children: Object.keys(settings).map(key => BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.SettingsSaveItem, { children: Object.keys(settings).map(key => BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.SettingsSaveItem, {
className: BDFDB.disCN.marginbottom8,
type: "Switch", type: "Switch",
plugin: this, plugin: this,
keys: ["settings", key], keys: ["settings", key],

View File

@ -5,8 +5,13 @@ module.exports = (_ => {
"info": { "info": {
"name": "ThemeSettings", "name": "ThemeSettings",
"author": "DevilBro", "author": "DevilBro",
"version": "1.2.1", "version": "1.2.2",
"description": "Allows you to change Theme Variables within BetterDiscord. Adds a Settings button (similar to Plugins) to customizable Themes in your Themes Page." "description": "Allows you to change Theme Variables within BetterDiscord. Adds a Settings button (similar to Plugins) to customizable Themes in your Themes Page."
},
"changeLog": {
"fixed": {
"Switch Fix": "Works again"
}
} }
}; };
return !window.BDFDB_Global || (!window.BDFDB_Global.loaded && !window.BDFDB_Global.started) ? class { return !window.BDFDB_Global || (!window.BDFDB_Global.loaded && !window.BDFDB_Global.started) ? class {
@ -119,7 +124,6 @@ module.exports = (_ => {
settingsItems.push(BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.SettingsItem, { settingsItems.push(BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.SettingsItem, {
type: "Button", type: "Button",
className: BDFDB.disCN.marginbottom8,
color: BDFDB.LibraryComponents.Button.Colors.GREEN, color: BDFDB.LibraryComponents.Button.Colors.GREEN,
label: "Update all variables", label: "Update all variables",
onClick: _ => { onClick: _ => {
@ -170,9 +174,9 @@ module.exports = (_ => {
} }
let varDescription = varStr.join("").replace(/\*\/|\/\*/g, "").replace(/:/g, ": ").replace(/: \//g, ":/").replace(/--/g, " --").replace(/\( --/g, "(--").trim(); let varDescription = varStr.join("").replace(/\*\/|\/\*/g, "").replace(/:/g, ": ").replace(/: \//g, ":/").replace(/--/g, " --").replace(/\( --/g, "(--").trim();
settingsItems.push(BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.SettingsItem, { settingsItems.push(BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.SettingsItem, {
className: BDFDB.disCN.marginbottom20,
dividerbottom: vars[vars.length-1] != varStr,
type: "TextInput", type: "TextInput",
margin: 20,
dividerBottom: vars[vars.length-1] != varStr,
childProps: { childProps: {
type: childType, type: childType,
mode: childMode, mode: childMode,