Skip to content

Commit 64a0bf0

Browse files
Item edit: Relabel category to icon (#3149)
Closes #3146. Changed label from "Category" to "Icon" to make usage more clear and make it consistent with the documentation. --------- Signed-off-by: Sebastian Gerber <github@sgerber.de>
1 parent 0864b52 commit 64a0bf0

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

bundles/org.openhab.ui/web/src/components/item/item-form.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252
<group-form ref="groupForm" v-if="itemType === 'Group'" :item="item" :createMode="createMode" />
5353
</f7-list-group>
5454
<f7-list-group v-if="!hideCategory">
55-
<f7-list-input ref="category" label="Category" autocomplete="off" type="text" placeholder="temperature, firstfloor..." :value="itemCategory"
55+
<f7-list-input ref="category" label="Icon" autocomplete="off" type="text" placeholder="temperature, firstfloor..." :value="itemCategory"
5656
@input="itemCategory = $event.target.value" :disabled="!editable" :clear-button="editable">
5757
<div slot="root-end" style="margin-left: calc(35% + 14px)">
5858
<oh-icon :icon="itemCategory" :state="(createMode || itemType === 'Image') ? null : item.state" height="32" width="32" />

bundles/org.openhab.ui/web/src/pages/settings/items/item-edit.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ export default {
237237
const yamlObj = {
238238
label: this.item.label,
239239
type: this.item.type,
240-
category: this.item.category || '',
240+
icon: this.item.category || '',
241241
groupNames: this.item.groupNames || [],
242242
tags: this.item.tags
243243
// metadata: this.item.metadata
@@ -257,7 +257,7 @@ export default {
257257
if (updatedItem.tags == null) updatedItem.tags = []
258258
this.$set(this.item, 'label', updatedItem.label)
259259
this.$set(this.item, 'type', updatedItem.type)
260-
this.$set(this.item, 'category', updatedItem.category)
260+
this.$set(this.item, 'category', updatedItem.icon)
261261
this.$set(this.item, 'groupNames', updatedItem.groupNames)
262262
this.$set(this.item, 'groupType', updatedItem.groupType)
263263
this.$set(this.item, 'function', updatedItem.function)

0 commit comments

Comments
 (0)