Make title editable in the sidebar
Signed-off-by: Julius Härtl <jus@bitgrid.net>
This commit is contained in:
@@ -24,6 +24,8 @@
|
|||||||
<AppSidebar v-if="currentBoard && currentCard && copiedCard"
|
<AppSidebar v-if="currentBoard && currentCard && copiedCard"
|
||||||
:title="currentCard.title"
|
:title="currentCard.title"
|
||||||
:subtitle="subtitle"
|
:subtitle="subtitle"
|
||||||
|
:title-editable.sync="titleEditable"
|
||||||
|
@update:title="updateTitle"
|
||||||
@close="closeSidebar">
|
@close="closeSidebar">
|
||||||
<template #secondary-actions />
|
<template #secondary-actions />
|
||||||
<AppSidebarTab id="details"
|
<AppSidebarTab id="details"
|
||||||
@@ -253,6 +255,7 @@ export default {
|
|||||||
|
|
||||||
saving: false,
|
saving: false,
|
||||||
markdownIt: null,
|
markdownIt: null,
|
||||||
|
titleEditable: false,
|
||||||
descriptionEditing: false,
|
descriptionEditing: false,
|
||||||
mdeConfig: {
|
mdeConfig: {
|
||||||
autoDownloadFontAwesome: false,
|
autoDownloadFontAwesome: false,
|
||||||
@@ -434,6 +437,12 @@ export default {
|
|||||||
delete this.copiedCard.descriptionLastEdit
|
delete this.copiedCard.descriptionLastEdit
|
||||||
this.descriptionSaving = false
|
this.descriptionSaving = false
|
||||||
},
|
},
|
||||||
|
updateTitle(newTitle) {
|
||||||
|
this.$set(this.copiedCard, 'title', newTitle)
|
||||||
|
this.$store.dispatch('updateCardTitle', this.copiedCard).then(() => {
|
||||||
|
this.titleEditable = false
|
||||||
|
})
|
||||||
|
},
|
||||||
updateDescription() {
|
updateDescription() {
|
||||||
this.copiedCard.descriptionLastEdit = Date.now()
|
this.copiedCard.descriptionLastEdit = Date.now()
|
||||||
clearTimeout(this.descriptionSaveTimeout)
|
clearTimeout(this.descriptionSaveTimeout)
|
||||||
|
|||||||
Reference in New Issue
Block a user