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>pull/3142/head
parent
0864b52e09
commit
64a0bf08df
|
@ -52,7 +52,7 @@
|
|||
<group-form ref="groupForm" v-if="itemType === 'Group'" :item="item" :createMode="createMode" />
|
||||
</f7-list-group>
|
||||
<f7-list-group v-if="!hideCategory">
|
||||
<f7-list-input ref="category" label="Category" autocomplete="off" type="text" placeholder="temperature, firstfloor..." :value="itemCategory"
|
||||
<f7-list-input ref="category" label="Icon" autocomplete="off" type="text" placeholder="temperature, firstfloor..." :value="itemCategory"
|
||||
@input="itemCategory = $event.target.value" :disabled="!editable" :clear-button="editable">
|
||||
<div slot="root-end" style="margin-left: calc(35% + 14px)">
|
||||
<oh-icon :icon="itemCategory" :state="(createMode || itemType === 'Image') ? null : item.state" height="32" width="32" />
|
||||
|
|
|
@ -237,7 +237,7 @@ export default {
|
|||
const yamlObj = {
|
||||
label: this.item.label,
|
||||
type: this.item.type,
|
||||
category: this.item.category || '',
|
||||
icon: this.item.category || '',
|
||||
groupNames: this.item.groupNames || [],
|
||||
tags: this.item.tags
|
||||
// metadata: this.item.metadata
|
||||
|
@ -257,7 +257,7 @@ export default {
|
|||
if (updatedItem.tags == null) updatedItem.tags = []
|
||||
this.$set(this.item, 'label', updatedItem.label)
|
||||
this.$set(this.item, 'type', updatedItem.type)
|
||||
this.$set(this.item, 'category', updatedItem.category)
|
||||
this.$set(this.item, 'category', updatedItem.icon)
|
||||
this.$set(this.item, 'groupNames', updatedItem.groupNames)
|
||||
this.$set(this.item, 'groupType', updatedItem.groupType)
|
||||
this.$set(this.item, 'function', updatedItem.function)
|
||||
|
|
Loading…
Reference in New Issue