Add textarea input for welcome messages

This commit is contained in:
Angelina Filippova 2020-11-09 19:37:03 +03:00
parent 1ab003bb11
commit d0c9ecf233

View file

@ -41,6 +41,14 @@
:input-value="inputValue" :input-value="inputValue"
@change="update($event, settingGroup.group, settingGroup.key, settingParent, setting.key, setting.type, nested)" @change="update($event, settingGroup.group, settingGroup.key, settingParent, setting.key, setting.type, nested)"
/> />
<el-input
v-if="textareaInput"
:value="inputValue"
:placeholder="setting.suggestions ? setting.suggestions[0] : null"
:data-search="setting.key || setting.group"
type="textarea"
class="input"
@input="update($event, settingGroup.group, settingGroup.key, settingParent, setting.key, setting.type, nested)"/>
<el-input <el-input
v-else-if="setting.type === 'string' || v-else-if="setting.type === 'string' ||
(Array.isArray(setting.type) && setting.type.includes('string') && setting.type.includes('atom'))" (Array.isArray(setting.type) && setting.type.includes('string') && setting.type.includes('atom'))"
@ -292,6 +300,9 @@ export default {
settings() { settings() {
return this.$store.state.settings.settings return this.$store.state.settings.settings
}, },
textareaInput() {
return this.settingGroup.key === ':welcome' && this.setting.key === ':message'
},
updatedSettings() { updatedSettings() {
return this.$store.state.settings.updatedSettings return this.$store.state.settings.updatedSettings
}, },