Fix operation list when scope is limited
Signed-off-by: Julius Härtl <jus@bitgrid.net>
This commit is contained in:
parent
0fccda86c2
commit
fce33f39d3
|
@ -33,12 +33,12 @@
|
||||||
@input="setValue">
|
@input="setValue">
|
||||||
<template slot="singleLabel" slot-scope="props">
|
<template slot="singleLabel" slot-scope="props">
|
||||||
<span v-if="props.option.icon" class="option__icon" :class="props.option.icon" />
|
<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>
|
<span class="option__title option__title_single">{{ props.option.label }}</span>
|
||||||
</template>
|
</template>
|
||||||
<template slot="option" slot-scope="props">
|
<template slot="option" slot-scope="props">
|
||||||
<span v-if="props.option.icon" class="option__icon" :class="props.option.icon" />
|
<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>
|
<span class="option__title">{{ props.option.label }}</span>
|
||||||
</template>
|
</template>
|
||||||
</Multiselect>
|
</Multiselect>
|
||||||
|
|
|
@ -10,7 +10,9 @@
|
||||||
type="text"
|
type="text"
|
||||||
placeholder="e.g. 18:00"
|
placeholder="e.g. 18:00"
|
||||||
@input="update">
|
@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>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
@ -56,7 +58,9 @@ export default {
|
||||||
timezone: data[0].split(' ', 2)[1]
|
timezone: data[0].split(' ', 2)[1]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch (e) {}
|
} catch (e) {
|
||||||
|
// ignore invalid values
|
||||||
|
}
|
||||||
},
|
},
|
||||||
validate() {
|
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
|
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
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
<template slot="selection" slot-scope="{ values, search, isOpen }">
|
<template slot="selection" slot-scope="{ values, search, isOpen }">
|
||||||
<div v-if="values.length && !isOpen" class="eventlist">
|
<div v-if="values.length && !isOpen" class="eventlist">
|
||||||
<img class="option__icon" :src="values[0].entity.icon">
|
<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>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<template slot="option" slot-scope="props">
|
<template slot="option" slot-scope="props">
|
||||||
|
|
|
@ -27,24 +27,21 @@ const validateRegex = function(string) {
|
||||||
if (!string) {
|
if (!string) {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
const result = regexRegex.exec(string)
|
return regexRegex.exec(string) !== null
|
||||||
return result !== null
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const validateIPv4 = function(string) {
|
const validateIPv4 = function(string) {
|
||||||
if (!string) {
|
if (!string) {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
const result = regexIPv4.exec(string)
|
return regexIPv4.exec(string) !== null
|
||||||
return result !== null
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const validateIPv6 = function(string) {
|
const validateIPv6 = function(string) {
|
||||||
if (!string) {
|
if (!string) {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
const result = regexIPv6.exec(string)
|
return regexIPv6.exec(string) !== null
|
||||||
return result !== null
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const stringValidator = (check) => {
|
const stringValidator = (check) => {
|
||||||
|
|
|
@ -71,7 +71,9 @@ const store = new Vuex.Store({
|
||||||
plugin = Object.assign(
|
plugin = Object.assign(
|
||||||
{ color: 'var(--color-primary-element)' },
|
{ color: 'var(--color-primary-element)' },
|
||||||
plugin, state.operations[plugin.id] || {})
|
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: {
|
actions: {
|
||||||
|
|
Loading…
Reference in New Issue