From 9fda82839bd7f9d1967ff93a73aca9cab3868626 Mon Sep 17 00:00:00 2001 From: kolaente Date: Fri, 20 Aug 2021 18:56:50 +0200 Subject: [PATCH] Fix showing an editor save button in cases where it wasn't required --- cypress/integration/task/task.spec.js | 2 +- src/components/input/editor.vue | 3 ++- src/components/tasks/partials/comments.vue | 2 +- src/components/tasks/partials/description.vue | 4 +++- 4 files changed, 7 insertions(+), 4 deletions(-) diff --git a/cypress/integration/task/task.spec.js b/cypress/integration/task/task.spec.js index ac948115..d7b60e4c 100644 --- a/cypress/integration/task/task.spec.js +++ b/cypress/integration/task/task.spec.js @@ -169,7 +169,7 @@ describe('Task', () => { cy.get('.task-view .details.content.description .editor .vue-easymde .EasyMDEContainer .CodeMirror-scroll') .type('{selectall}New Description') cy.get('.task-view .details.content.description .editor a') - .contains('Done') + .contains('save') .click() cy.get('.task-view .details.content.description h3 span.is-small.has-text-success') diff --git a/src/components/input/editor.vue b/src/components/input/editor.vue index 0208ec12..4786c784 100644 --- a/src/components/input/editor.vue +++ b/src/components/input/editor.vue @@ -96,7 +96,8 @@ export default { default: () => '', }, showSave: { - default: true, + type: Boolean, + default: false, }, }, computed: { diff --git a/src/components/tasks/partials/comments.vue b/src/components/tasks/partials/comments.vue index 03d09c85..e0379c1e 100644 --- a/src/components/tasks/partials/comments.vue +++ b/src/components/tasks/partials/comments.vue @@ -78,6 +78,7 @@ " v-model="c.comment" :bottom-actions="actions[c.id]" + :show-save="true" /> @@ -113,7 +114,6 @@ :upload-callback="attachmentUpload" :upload-enabled="true" :placeholder="$t('task.comment.placeholder')" - :show-save="false" v-if="editorActive" v-model="newComment.comment" /> diff --git a/src/components/tasks/partials/description.vue b/src/components/tasks/partials/description.vue index e9590719..fe3ef7b3 100644 --- a/src/components/tasks/partials/description.vue +++ b/src/components/tasks/partials/description.vue @@ -23,7 +23,9 @@ @change="save" :placeholder="$t('task.description.placeholder')" :empty-text="$t('task.description.empty')" - v-model="task.description"/> + :show-save="true" + v-model="task.description" + />