This commit is contained in:
Mirco Wittrien 2020-12-24 12:23:10 +01:00
parent f0eff5b194
commit b0f44f682f
2 changed files with 13 additions and 2 deletions

View File

@ -7956,7 +7956,7 @@ module.exports = (_ => {
getSettingsPanel (collapseStates = {}) {
let settingsPanel;
let getString = (key, property) => {
return BDFDB.LanguageUtils.LibraryStringsCheck[`settings_${key}_${property}`] ? BDFDB.LanguageUtils.LibraryStringsFormat(`settings_${key}_${property}`, BDFDB.BDUtils.getSettingsProperty("name", BDFDB.BDUtils.getSettings(BDFDB.BDUtils.settingsIds[key])) || BDFDB_Global.LibraryModules.StringUtils.upperCaseFirstChar(key.replace(/([A-Z])/g, " $1"))) : InternalBDFDB.defaults.settings[key][property];
return BDFDB.LanguageUtils.LibraryStringsCheck[`settings_${key}_${property}`] ? BDFDB.LanguageUtils.LibraryStringsFormat(`settings_${key}_${property}`, BDFDB.BDUtils.getSettingsProperty("name", BDFDB.BDUtils.settingsIds[key]) || BDFDB_Global.LibraryModules.StringUtils.upperCaseFirstChar(key.replace(/([A-Z])/g, " $1"))) : InternalBDFDB.defaults.settings[key][property];
};
return settingsPanel = BDFDB.PluginUtils.createSettingsPanel(BDFDB, {
collapseStates: collapseStates,

View File

@ -348,7 +348,7 @@ module.exports = (_ => {
nativeClass: true,
iconSVG: translateIconGeneral
}),
width: 400,
width: 450,
padding: 10,
animation: BDFDB.LibraryComponents.PopoutContainer.Animation.SCALE,
position: BDFDB.LibraryComponents.PopoutContainer.Positions.TOP,
@ -388,6 +388,17 @@ module.exports = (_ => {
}));
}
popoutelements = popoutelements.concat(this.createSelects(true));
popoutelements.push(BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.SettingsSaveItem, {
type: "Switch",
plugin: this,
keys: ["settings", "sendOriginalMessage"],
label: this.defaults.settings.sendOriginalMessage.description,
tag: BDFDB.LibraryComponents.FormComponents.FormTitle.Tags.H5,
value: settings.sendOriginalMessage,
onChange: value => {
settings.sendOriginalMessage = value;
}
}));
popoutelements.push(BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.SettingsItem, {
type: "Switch",
label: "Translate your Messages before sending",