Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 8 additions & 7 deletions src/components/TagItem.vue
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@
</NcActionButton>
<NcColorPicker
v-if="!renameTagLabel"
v-model="editColor"
class="app-navigation-entry-bullet-wrapper"
:value="`#${tag.color}`"
@input="updateColor">
<div :style="{ backgroundColor: tag.color }" class="color0 app-navigation-entry-bullet" />
@submit="updateColor">
<div :style="{ backgroundColor: editColor }" class="color0 app-navigation-entry-bullet" />
</NcColorPicker>
<ActionInput
v-if="renameTagInput"
Expand Down Expand Up @@ -101,6 +101,7 @@ export default {
return {
isAdded: false,
editing: false,
editColor: null,
tagLabel: true,
tagInput: false,
showSaving: false,
Expand All @@ -119,14 +120,13 @@ export default {
this.$emit('delete-tag', this.tag)
},

async updateColor(newColor) {
this.editColor = newColor
async updateColor() {
this.showSaving = false
try {
await this.mainStore.updateTag({
tag: this.tag,
displayName: this.tag.displayName,
color: newColor,
color: this.editColor,
})
this.showSaving = false
} catch (error) {
Expand All @@ -140,6 +140,7 @@ export default {
this.renameTagLabel = false
this.renameTagInput = true
this.showSaving = false
this.editColor = this.tag.color
},

async renameTag(tag, event) {
Expand All @@ -151,7 +152,7 @@ export default {
await this.mainStore.updateTag({
tag,
displayName,
color: tag.color,
color: this.tag.color,
})
this.renameTagLabel = true
this.renameTagInput = false
Expand Down
Loading