diff options
author | Julius Härtl <jus@bitgrid.net> | 2019-10-11 15:05:58 +0200 |
---|---|---|
committer | Arthur Schiwon <blizzz@arthur-schiwon.de> | 2019-10-29 18:03:55 +0100 |
commit | fce33f39d3a5459ac98662c799ad4eee41fa98bf (patch) | |
tree | ee6807f13400e103eba5403ce5bb8450d45d7c2d /apps | |
parent | 0fccda86c2dd4abff2e24f1f397ed900b090af1b (diff) | |
download | nextcloud-server-fce33f39d3a5459ac98662c799ad4eee41fa98bf.tar.gz nextcloud-server-fce33f39d3a5459ac98662c799ad4eee41fa98bf.zip |
Fix operation list when scope is limited
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Diffstat (limited to 'apps')
-rw-r--r-- | apps/workflowengine/src/components/Checks/FileMimeType.vue | 4 | ||||
-rw-r--r-- | apps/workflowengine/src/components/Checks/RequestTime.vue | 8 | ||||
-rw-r--r-- | apps/workflowengine/src/components/Event.vue | 2 | ||||
-rw-r--r-- | apps/workflowengine/src/helpers/validators.js | 9 | ||||
-rw-r--r-- | apps/workflowengine/src/store.js | 4 |
5 files changed, 15 insertions, 12 deletions
diff --git a/apps/workflowengine/src/components/Checks/FileMimeType.vue b/apps/workflowengine/src/components/Checks/FileMimeType.vue index 862c4a42011..e91636f5130 100644 --- a/apps/workflowengine/src/components/Checks/FileMimeType.vue +++ b/apps/workflowengine/src/components/Checks/FileMimeType.vue @@ -33,12 +33,12 @@ @input="setValue"> <template slot="singleLabel" slot-scope="props"> <span v-if="props.option.icon" class="option__icon" :class="props.option.icon" /> - <img v-else :src="props.option.iconUrl" /> + <img v-else :src="props.option.iconUrl"> <span class="option__title option__title_single">{{ props.option.label }}</span> </template> <template slot="option" slot-scope="props"> <span v-if="props.option.icon" class="option__icon" :class="props.option.icon" /> - <img v-else :src="props.option.iconUrl" /> + <img v-else :src="props.option.iconUrl"> <span class="option__title">{{ props.option.label }}</span> </template> </Multiselect> diff --git a/apps/workflowengine/src/components/Checks/RequestTime.vue b/apps/workflowengine/src/components/Checks/RequestTime.vue index cd702ecae82..196f3e2afa4 100644 --- a/apps/workflowengine/src/components/Checks/RequestTime.vue +++ b/apps/workflowengine/src/components/Checks/RequestTime.vue @@ -10,7 +10,9 @@ type="text" placeholder="e.g. 18:00" @input="update"> - <p v-if="!valid" class="invalid-hint">{{ t('workflowengine', 'Please enter a valid time span')}}</p> + <p v-if="!valid" class="invalid-hint"> + {{ t('workflowengine', 'Please enter a valid time span') }} + </p> </div> </template> @@ -56,7 +58,9 @@ export default { timezone: data[0].split(' ', 2)[1] } } - } catch (e) {} + } catch (e) { + // ignore invalid values + } }, validate() { return this.newValue.startTime && this.newValue.startTime.match(/^(0[0-9]|1[0-9]|2[0-3]|[0-9]):[0-5][0-9]$/i) !== null diff --git a/apps/workflowengine/src/components/Event.vue b/apps/workflowengine/src/components/Event.vue index 1afdfa80be7..97608fde062 100644 --- a/apps/workflowengine/src/components/Event.vue +++ b/apps/workflowengine/src/components/Event.vue @@ -15,7 +15,7 @@ <template slot="selection" slot-scope="{ values, search, isOpen }"> <div v-if="values.length && !isOpen" class="eventlist"> <img class="option__icon" :src="values[0].entity.icon"> - <span class="text option__title option__title_single" v-for="(value, index) in values">{{ value.displayName }} <span v-if="index+1 < values.length">, </span></span> + <span v-for="(value, index) in values" :key="value.id" class="text option__title option__title_single">{{ value.displayName }} <span v-if="index+1 < values.length">, </span></span> </div> </template> <template slot="option" slot-scope="props"> diff --git a/apps/workflowengine/src/helpers/validators.js b/apps/workflowengine/src/helpers/validators.js index 4936b9200f7..d64adfa1385 100644 --- a/apps/workflowengine/src/helpers/validators.js +++ b/apps/workflowengine/src/helpers/validators.js @@ -27,24 +27,21 @@ const validateRegex = function(string) { if (!string) { return false } - const result = regexRegex.exec(string) - return result !== null + return regexRegex.exec(string) !== null } const validateIPv4 = function(string) { if (!string) { return false } - const result = regexIPv4.exec(string) - return result !== null + return regexIPv4.exec(string) !== null } const validateIPv6 = function(string) { if (!string) { return false } - const result = regexIPv6.exec(string) - return result !== null + return regexIPv6.exec(string) !== null } const stringValidator = (check) => { diff --git a/apps/workflowengine/src/store.js b/apps/workflowengine/src/store.js index cbd9b29c81c..a18540f8035 100644 --- a/apps/workflowengine/src/store.js +++ b/apps/workflowengine/src/store.js @@ -71,7 +71,9 @@ const store = new Vuex.Store({ plugin = Object.assign( { color: 'var(--color-primary-element)' }, plugin, state.operations[plugin.id] || {}) - Vue.set(state.operations, plugin.id, plugin) + if (typeof state.operations[plugin.id] !== 'undefined') { + Vue.set(state.operations, plugin.id, plugin) + } } }, actions: { |