Skip to content
Merged
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Make title editable in the sidebar
Signed-off-by: Julius Härtl <jus@bitgrid.net>
  • Loading branch information
juliusknorr committed Aug 29, 2020
commit 3e2e7c121682cee190b008e0cb58b5f19c024138
9 changes: 9 additions & 0 deletions src/components/card/CardSidebar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@
<AppSidebar v-if="currentBoard && currentCard && copiedCard"
:title="currentCard.title"
:subtitle="subtitle"
:title-editable.sync="titleEditable"
@update:title="updateTitle"
@close="closeSidebar">
<template #secondary-actions />
<AppSidebarTab id="details"
Expand Down Expand Up @@ -253,6 +255,7 @@ export default {

saving: false,
markdownIt: null,
titleEditable: false,
descriptionEditing: false,
mdeConfig: {
autoDownloadFontAwesome: false,
Expand Down Expand Up @@ -434,6 +437,12 @@ export default {
delete this.copiedCard.descriptionLastEdit
this.descriptionSaving = false
},
updateTitle(newTitle) {
this.$set(this.copiedCard, 'title', newTitle)
this.$store.dispatch('updateCardTitle', this.copiedCard).then(() => {
this.titleEditable = false
})
},
updateDescription() {
this.copiedCard.descriptionLastEdit = Date.now()
clearTimeout(this.descriptionSaveTimeout)
Expand Down