Skip to content

Commit 54a3498

Browse files
authored
Rule edit: Add descriptions to triggers, actions & conditions sections (#3008)
Closes openhab/openhab-core#4503. Signed-off-by: Florian Hotze <[email protected]>
1 parent 9a9d363 commit 54a3498

File tree

1 file changed

+12
-7
lines changed

1 file changed

+12
-7
lines changed

bundles/org.openhab.ui/web/src/pages/settings/rules/rule-edit.vue

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -99,9 +99,14 @@
9999
</f7-button>
100100
</div>
101101
<div v-for="section in ['triggers', 'actions', 'conditions']" :key="section">
102-
<f7-block-title medium style="margin-bottom: var(--f7-list-margin-vertical)" v-if="isEditable || rule[section].length > 0">
103-
{{ SECTION_LABELS[section][0] }}
104-
</f7-block-title>
102+
<template v-if="isEditable || rule[section].length > 0">
103+
<f7-block-title medium class="no-margin-bottom">
104+
{{ SECTION_LABELS[section][0] }}
105+
</f7-block-title>
106+
<f7-block-footer class="no-margin-top margin-horizontal" style="margin-bottom: var(--f7-list-margin-vertical)">
107+
{{ SECTION_LABELS[section][1] }}
108+
</f7-block-footer>
109+
</template>
105110
<f7-list sortable swipeout media-list @sortable:sort="(ev) => reorderModule(ev, section)">
106111
<f7-list-item media
107112
:title="mod.label || suggestedModuleTitle(mod, null, section)"
@@ -118,7 +123,7 @@
118123
</f7-list-item>
119124
</f7-list>
120125
<f7-list v-if="isEditable">
121-
<f7-list-item link no-chevron media-item :color="($theme.dark) ? 'black' : 'white'" :subtitle="SECTION_LABELS[section][1]" @click="addModule(section)">
126+
<f7-list-item link no-chevron media-item :color="($theme.dark) ? 'black' : 'white'" :subtitle="SECTION_LABELS[section][2]" @click="addModule(section)">
122127
<f7-icon slot="media" color="green" aurora="f7:plus_circle_fill" ios="f7:plus_circle_fill" md="material:control_point" />
123128
</f7-list-item>
124129
<!-- <f7-list-button :color="(showModuleControls) ? 'gray' : 'blue'" :title="sectionLabels[section][1]"></f7-list-button> -->
@@ -202,9 +207,9 @@ export default {
202207
data () {
203208
return {
204209
SECTION_LABELS: {
205-
triggers: ['When', 'Add Trigger'],
206-
actions: ['Then', 'Add Action'],
207-
conditions: ['But only if', 'Add Condition']
210+
triggers: ['When', 'Events that cause this rule to run', 'Add Trigger'],
211+
actions: ['Then', 'Actions to take when this rule runs', 'Add Action'],
212+
conditions: ['But only if', 'Conditions that must be matched for the actions of this rule to run', 'Add Condition']
208213
},
209214
210215
ready: false,

0 commit comments

Comments
 (0)