aboutsummaryrefslogtreecommitdiffstats
path: root/apps/workflowengine/src/components/Checks/RequestUserAgent.vue
diff options
context:
space:
mode:
authorJulius Härtl <jus@bitgrid.net>2019-09-10 09:44:20 +0200
committerJulius Härtl <jus@bitgrid.net>2019-09-10 09:44:20 +0200
commit7683208dfa4cf5f0ff196ee0cabdacf8046592eb (patch)
treee4923006ebe0a67e7e512886fb3322c5a2570f92 /apps/workflowengine/src/components/Checks/RequestUserAgent.vue
parent9e0078824e1303c78575c4287ce3f228659d8ab5 (diff)
downloadnextcloud-server-7683208dfa4cf5f0ff196ee0cabdacf8046592eb.tar.gz
nextcloud-server-7683208dfa4cf5f0ff196ee0cabdacf8046592eb.zip
Workflow vue cleanup
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Diffstat (limited to 'apps/workflowengine/src/components/Checks/RequestUserAgent.vue')
-rw-r--r--apps/workflowengine/src/components/Checks/RequestUserAgent.vue17
1 files changed, 9 insertions, 8 deletions
diff --git a/apps/workflowengine/src/components/Checks/RequestUserAgent.vue b/apps/workflowengine/src/components/Checks/RequestUserAgent.vue
index c65bba50353..e80071ab9fa 100644
--- a/apps/workflowengine/src/components/Checks/RequestUserAgent.vue
+++ b/apps/workflowengine/src/components/Checks/RequestUserAgent.vue
@@ -77,12 +77,14 @@ export default {
options() {
return [...this.predefinedTypes, this.customValue]
},
+ matchingPredefined() {
+ return this.predefinedTypes
+ .map(groups => groups.children)
+ .flat()
+ .find((type) => this.newValue === type.pattern)
+ },
isPredefined() {
- const matchingPredefined = this.predefinedTypes.map(groups => groups.children).flat().find((type) => this.newValue === type.pattern)
- if (matchingPredefined) {
- return true
- }
- return false
+ return !!this.matchingPredefined
},
customValue() {
return {
@@ -97,9 +99,8 @@ export default {
}
},
currentValue() {
- const matchingPredefined = this.predefinedTypes.map(groups => groups.children).flat().find((type) => this.newValue === type.pattern)
- if (matchingPredefined) {
- return matchingPredefined
+ if (this.matchingPredefined) {
+ return this.matchingPredefined
}
return {
icon: 'icon-settings-dark',