diff --git a/src/store/modules/normalizers.js b/src/store/modules/normalizers.js
index 8be6220d..ba4bea81 100644
--- a/src/store/modules/normalizers.js
+++ b/src/store/modules/normalizers.js
@@ -81,14 +81,14 @@ export const parseTuples = (tuples, key) => {
return [...acc, { [mascot.tuple[0]]: { ...mascot.tuple[1], id: `f${(~~(Math.random() * 1e8)).toString(16)}` }}]
}, [])
} else if (
- item.tuple[0] === ':groups' ||
- item.tuple[0] === ':replace' ||
- item.tuple[0] === ':retries' ||
- item.tuple[0] === ':crontab'
- ) {
+ item.tuple[0] === ':groups' || item.tuple[0] === ':replace' || item.tuple[0] === ':retries') {
accum[item.tuple[0]] = item.tuple[1].reduce((acc, group) => {
return [...acc, { [group.tuple[0]]: { value: group.tuple[1], id: `f${(~~(Math.random() * 1e8)).toString(16)}` }}]
}, [])
+ } else if (item.tuple[0] === ':crontab') {
+ accum[item.tuple[0]] = item.tuple[1].reduce((acc, group) => {
+ return { ...acc, [group.tuple[1]]: group.tuple[0] }
+ }, {})
} else if (item.tuple[0] === ':match_actor') {
accum[item.tuple[0]] = Object.keys(item.tuple[1]).reduce((acc, regex) => {
return [...acc, { [regex]: { value: item.tuple[1][regex], id: `f${(~~(Math.random() * 1e8)).toString(16)}` }}]
diff --git a/src/views/settings/components/Inputs.vue b/src/views/settings/components/Inputs.vue
index d99871b2..300f09c7 100644
--- a/src/views/settings/components/Inputs.vue
+++ b/src/views/settings/components/Inputs.vue
@@ -84,11 +84,12 @@
-
+
-
+
+
@@ -106,7 +107,7 @@
+
+
diff --git a/src/views/settings/components/inputComponents/EditableKeywordInput.vue b/src/views/settings/components/inputComponents/EditableKeywordInput.vue
index a6ecde4d..fe5b9c7b 100644
--- a/src/views/settings/components/inputComponents/EditableKeywordInput.vue
+++ b/src/views/settings/components/inputComponents/EditableKeywordInput.vue
@@ -8,14 +8,6 @@
-
:
@@ -109,19 +101,13 @@ export default {
this.$store.dispatch('UpdateState', { group, key, input, value })
},
wrapUpdatedSettings(value, input, type) {
- if (type === 'map') {
- return value.reduce((acc, element) => {
+ return type === 'map'
+ ? value.reduce((acc, element) => {
return { ...acc, [Object.keys(element)[0]]: Object.values(element)[0].value }
}, {})
- } else if (input === ':crontab') {
- return value.reduce((acc, element) => {
- return { ...acc, [Object.values(element)[0].value]: ['reversed_tuple', Object.keys(element)[0]] }
- }, {})
- } else {
- return value.reduce((acc, element) => {
+ : value.reduce((acc, element) => {
return { ...acc, [Object.keys(element)[0]]: ['list', Object.values(element)[0].value] }
}, {})
- }
}
}
}
diff --git a/src/views/settings/components/inputComponents/index.js b/src/views/settings/components/inputComponents/index.js
index 389b304e..788d1f99 100644
--- a/src/views/settings/components/inputComponents/index.js
+++ b/src/views/settings/components/inputComponents/index.js
@@ -1,5 +1,6 @@
export { default as AutoLinkerInput } from './AutoLinkerInput'
export { default as EditableKeywordInput } from './EditableKeywordInput'
+export { default as CrontabInput } from './CrontabInput'
export { default as IconsInput } from './IconsInput'
export { default as MascotsInput } from './MascotsInput'
export { default as MultipleSelect } from './MultipleSelect'
diff --git a/src/views/settings/styles/main.scss b/src/views/settings/styles/main.scss
index fd8e69d2..562308b5 100644
--- a/src/views/settings/styles/main.scss
+++ b/src/views/settings/styles/main.scss
@@ -14,15 +14,6 @@
font-family: monospace;
padding: 0 3px 0 3px;
}
- .crontab-name-input {
- width: 30%;
- margin-left: 8px;
- margin-right: 10px
- }
- .crontab-value-input {
- width: 70%;
- margin-right: 8px
- }
.delete-setting-button {
margin-left: 5px;
}
@@ -334,7 +325,6 @@
margin-right: 10px
}
-
@media only screen and (min-width: 1824px) {
.submit-button-container {
max-width: 1637px;
@@ -345,6 +335,12 @@
}
@media only screen and (max-width:480px) {
+ .crontab {
+ width: 100%;
+ label {
+ width: 100%;
+ }
+ }
.delete-setting-button {
margin: 4px 0 0 5px;
height: 28px;
@@ -388,6 +384,10 @@
margin: 0;
padding: 0 15px 10px 0;
}
+ .el-form-item.crontab-container:first-child {
+ margin: 0;
+ padding: 0 ;
+ }
.el-form-item:first-child .mascot-form-item {
padding: 0;
}