@@ -187,13 +177,14 @@
import AceEditor from 'vue2-ace-editor'
import 'brace/mode/elixir'
import 'default-passive-events'
-import { AutoLinkerInput } from './inputComponents'
+import { AutoLinkerInput, MascotsInput } from './inputComponents'
export default {
name: 'Inputs',
components: {
editor: AceEditor,
- AutoLinkerInput
+ AutoLinkerInput,
+ MascotsInput
},
props: {
customLabelWidth: {
@@ -265,11 +256,6 @@ export default {
labelWidth() {
return this.isMobile ? '100px' : '240px'
},
- mascotsValue() {
- return Object.keys(this.data)
- .map(mascotName =>
- [mascotName, this.data[mascotName][':url'], this.data[mascotName][':mime_type']])
- },
proxyUrlData() {
if (!this.data[this.setting.key]) {
return null
@@ -319,12 +305,6 @@ export default {
}, {})
this.updateSetting({ ...updatedValue, '': [] }, this.settingGroup.group, this.settingGroup.key, this.setting.key)
},
- addRowToMascots() {
- const updatedValue = this.data[':mascots'].reduce((acc, el, i) => {
- return { ...acc, [el[0]]: { url: el[1], mime_type: el[2] }}
- }, {})
- this.updateSetting({ ...updatedValue, '': { url: '', mime_type: '' }}, this.settingGroup.group, 'assets', 'mascots')
- },
deleteEditableKeywordRow(index) {
const filteredValues = this.editableKeywordData(this.data).filter((el, i) => index !== i)
const updatedValue = filteredValues.reduce((acc, el, i) => {
@@ -334,13 +314,6 @@ export default {
this.updateSetting(updatedValue, this.settingGroup.group, this.settingGroup.key, this.setting.key)
},
deleteIcondRow(index) {},
- deleteMascotsRow(index) {
- const filteredValues = this.data[':mascots'].filter((el, i) => index !== i)
- const updatedValue = filteredValues.reduce((acc, el, i) => {
- return { ...acc, [el[0]]: { url: el[1], mime_type: el[2] }}
- }, {})
- this.updateSetting(updatedValue, this.settingGroup.group, 'assets', 'mascots')
- },
editableKeywordWithInput(key) {
return key === ':replace'
},
@@ -367,21 +340,6 @@ export default {
this.updateSetting(updatedValue, this.settingGroup.group, this.settingGroup.key, this.setting.key)
},
parseIcons(value, inputType, index) {},
- parseMascots(value, inputType, index) {
- const updatedValue = this.data[':mascots'].reduce((acc, el, i) => {
- if (index === i) {
- if (inputType === 'name') {
- return { ...acc, [value]: { url: el[1], mime_type: el[2] }}
- } else if (inputType === 'url') {
- return { ...acc, [el[0]]: { url: value, mime_type: el[2] }}
- } else {
- return { ...acc, [el[0]]: { url: el[1], mime_type: value }}
- }
- }
- return { ...acc, [el[0]]: { url: el[1], mime_type: el[2] }}
- }, {})
- this.updateSetting(updatedValue, this.settingGroup.group, 'assets', 'mascots')
- },
parseRateLimiter(value, input, typeOfInput, typeOfLimit, currentValue) {
if (typeOfLimit === 'oneLimit') {
const valueToSend = typeOfInput === 'scale' ? { 'tuple': [value, currentValue[1]] } : { 'tuple': [currentValue[0], value] }
diff --git a/src/views/settings/components/inputComponents/AutoLinkerInput.vue b/src/views/settings/components/inputComponents/AutoLinkerInput.vue
index 0a305f9b..97f7adf8 100644
--- a/src/views/settings/components/inputComponents/AutoLinkerInput.vue
+++ b/src/views/settings/components/inputComponents/AutoLinkerInput.vue
@@ -34,7 +34,6 @@ export default {
}
}
},
- computed: {},
methods: {
autoLinkerBooleanValue(key) {
const value = this.data[this.setting.key]
diff --git a/src/views/settings/components/inputComponents/MascotsInput.vue b/src/views/settings/components/inputComponents/MascotsInput.vue
new file mode 100644
index 00000000..8bcc73cb
--- /dev/null
+++ b/src/views/settings/components/inputComponents/MascotsInput.vue
@@ -0,0 +1,103 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/settings/components/inputComponents/index.js b/src/views/settings/components/inputComponents/index.js
index ff6dfc2b..eb2d7b83 100644
--- a/src/views/settings/components/inputComponents/index.js
+++ b/src/views/settings/components/inputComponents/index.js
@@ -1 +1,2 @@
export { default as AutoLinkerInput } from './AutoLinkerInput'
+export { default as MascotsInput } from './MascotsInput'