diff options
author | Julius Härtl <jus@bitgrid.net> | 2019-08-29 16:50:33 +0200 |
---|---|---|
committer | Julius Härtl <jus@bitgrid.net> | 2019-09-10 09:01:23 +0200 |
commit | bd281daa47152dc09c0f6c2bbc9e5a308d1748bd (patch) | |
tree | 73227cf96161871a259688624b5d4f78637fc3d6 /apps/workflowengine/src/components/Operation.vue | |
parent | aa00f401b39c2b63cba7e5e8f6cdec8528466069 (diff) | |
download | nextcloud-server-bd281daa47152dc09c0f6c2bbc9e5a308d1748bd.tar.gz nextcloud-server-bd281daa47152dc09c0f6c2bbc9e5a308d1748bd.zip |
Move to vuex store
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Diffstat (limited to 'apps/workflowengine/src/components/Operation.vue')
-rw-r--r-- | apps/workflowengine/src/components/Operation.vue | 39 |
1 files changed, 16 insertions, 23 deletions
diff --git a/apps/workflowengine/src/components/Operation.vue b/apps/workflowengine/src/components/Operation.vue index 30f26eb6ec4..1ee7a2e4c9d 100644 --- a/apps/workflowengine/src/components/Operation.vue +++ b/apps/workflowengine/src/components/Operation.vue @@ -1,34 +1,26 @@ <template> - <div class="actions__item" :class="{'colored': !!color}" :style="{ backgroundColor: color }"> - <div class="icon" :class="icon"></div> - <h3>{{ title }}</h3> - <small>{{ description }}</small> + <div class="actions__item" :class="{'colored': colored}" :style="{ backgroundColor: colored ? operation.color : 'transparent' }"> + <div class="icon" :class="operation.iconClass" :style="{ backgroundImage: operation.iconClass ? '' : `url(${operation.icon})` }" /> + <h3>{{ operation.name }}</h3> + <small>{{ operation.description }}</small> <slot /> </div> </template> <script> - export default { - name: "Operation", - props: { - icon: { - type: String, - required: true - }, - title: { - type: String, - required: true - }, - description: { - type: String, - required: true - }, - color: { - type: String, - required: false - }, +export default { + name: 'Operation', + props: { + operation: { + type: Object, + required: true + }, + colored: { + type: Boolean, + default: true } } +} </script> <style scoped lang="scss"> @@ -50,6 +42,7 @@ background-position: center center; margin-top: 10px; margin-bottom: 20px; + background-repeat: no-repeat; } h3, small { padding: 6px; |