Skip to content

Commit

Permalink
Item details: Show group function for group Items if defined (#2792)
Browse files Browse the repository at this point in the history
Closes #1483.

Signed-off-by: Florian Hotze <[email protected]>
  • Loading branch information
florian-h05 authored Oct 3, 2024
1 parent 4e341fd commit 6dc8c4b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
7 changes: 6 additions & 1 deletion bundles/org.openhab.ui/web/src/components/item/item-mixin.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,12 @@ export default {
getItemTypeLabel (item) {
let ret = item.type
if (item.type === 'Group' && item.groupType) {
ret += ` (${item.groupType})`
ret += ` (${item.groupType}`
if (item.function.name) {
ret += `:${item.function.name}`
if (item.function.params) ret += `(${item.function.params.join(',')})`
}
ret += ')'
}
return ret
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
</div>
<h2>{{ item.label }}</h2>
<!-- <h4 v-show="item.label">{{item.name}}</h4> -->
<h5 v-show="item.type">
<h5 v-show="item.type" style="margin-top: 10px; margin-bottom: 15px;">
<small>{{ getItemTypeLabel(item) }}</small>
</h5>
</f7-subnavbar>
Expand Down

0 comments on commit 6dc8c4b

Please sign in to comment.