This commit is contained in:
Mirco Wittrien 2019-11-10 20:40:40 +01:00
parent fe54035c7c
commit be2599e61f
3 changed files with 15 additions and 14 deletions

View File

@ -6907,12 +6907,6 @@ var BDFDB = {
let childcomponent = LibraryComponents[this.props.type];
if (!childcomponent) return null;
if (this.props.mini && childcomponent.Sizes) this.props.size = childcomponent.Sizes.MINI || childcomponent.Sizes.MIN;
let childprops = Object.assign({}, this.props, {
className: this.props.childClassName,
type: this.props.childType,
onChange: this.handleChange.bind(this)
});
BDFDB.ObjectUtils.delete(childprops, "id", "basis", "dividerbottom", "dividertop", "label", "labelchildren", "mini", "note", "childClassName", "childType");
return BDFDB.ReactUtils.createElement(LibraryComponents.Flex, {
className: BDFDB.DOMUtils.formatClassName(this.props.className, this.props.disabled && BDFDB.disCN.disabled),
id: this.props.id,
@ -6937,7 +6931,9 @@ var BDFDB = {
shrink: this.props.basis ? 0 : 1,
basis: this.props.basis,
wrap: true,
children: BDFDB.ReactUtils.createElement(childcomponent, childprops)
children: BDFDB.ReactUtils.createElement(childcomponent, BDFDB.ObjectUtils.exclude(Object.assign({}, this.props, this.props.childProps, {
onChange: this.handleChange.bind(this)
}), "id", "basis", "dividerbottom", "dividertop", "label", "labelchildren", "mini", "note", "childProps"))
})
]
}),
@ -7138,7 +7134,7 @@ var BDFDB = {
render() {
let childprops = Object.assign({}, this.props, {
className: BDFDB.DOMUtils.formatClassName(this.props.size && LibraryComponents.TextInput.Sizes[this.props.size.toUpperCase()] && BDFDB.disCN["input" + this.props.size.toLowerCase()] || BDFDB.disCN.inputdefault, this.props.inputClassName, this.props.focused && BDFDB.disCN.inputfocused, this.props.error || this.props.errorMessage ? BDFDB.disCN.inputerror : (this.props.success && BDFDB.disCN.inputsuccess), this.props.disabled && BDFDB.disCN.inputdisabled, this.props.editable && BDFDB.disCN.inputeditable),
disabled: this.props.disabled,
type: this.props.type == "color" || this.props.type == "file" ? "text" : this.props.type,
onKeyDown: this.handleKeyDown.bind(this),
onChange: this.handleChange.bind(this),
onInput: this.handleInput.bind(this),
@ -7180,11 +7176,15 @@ var BDFDB = {
]
}) : null,
BDFDB.ReactUtils.createElement("input", childprops),
this.props.type == "color" ? BDFDB.ReactUtils.createElement("div", {
className: BDFDB.disCN.inputerrormessage,
children: this.props.errorMessage
}) : null,
this.props.errorMessage ? BDFDB.ReactUtils.createElement("div", {
className: BDFDB.disCN.inputerrormessage,
children: this.props.errorMessage
}) : null
]
}) : null,
].filter(n => n)
});
}
} : LibraryComponents.TextInput;

File diff suppressed because one or more lines are too long

View File

@ -3,7 +3,7 @@
class EmojiStatistics {
getName () {return "EmojiStatistics";}
getVersion () {return "2.8.7";}
getVersion () {return "2.8.8";}
getAuthor () {return "DevilBro";}
@ -83,7 +83,9 @@ class EmojiStatistics {
for (let key in amounts) settingsitems.push(BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.SettingsSaveItem, {
className: BDFDB.disCN.marginbottom8,
type: "TextInput",
childType: "number",
childProps: {
type: "number"
},
plugin: this,
keys: ["amounts", key],
label: this.defaults.amounts[key].description,
@ -144,7 +146,6 @@ class EmojiStatistics {
// begin of own functions
processEmojiPicker (e) {
if (this.stopping) return;
this.loadEmojiList();
let settings = BDFDB.DataUtils.get(this, "settings");
if (settings.enableEmojiStatisticsButton) {