Fix showing an editor save button in cases where it wasn't required

This commit is contained in:
kolaente 2021-08-20 18:56:50 +02:00
parent 08a34d8a68
commit 9fda82839b
No known key found for this signature in database
GPG key ID: F40E70337AB24C9B
4 changed files with 7 additions and 4 deletions

View file

@ -169,7 +169,7 @@ describe('Task', () => {
cy.get('.task-view .details.content.description .editor .vue-easymde .EasyMDEContainer .CodeMirror-scroll') cy.get('.task-view .details.content.description .editor .vue-easymde .EasyMDEContainer .CodeMirror-scroll')
.type('{selectall}New Description') .type('{selectall}New Description')
cy.get('.task-view .details.content.description .editor a') cy.get('.task-view .details.content.description .editor a')
.contains('Done') .contains('save')
.click() .click()
cy.get('.task-view .details.content.description h3 span.is-small.has-text-success') cy.get('.task-view .details.content.description h3 span.is-small.has-text-success')

View file

@ -96,7 +96,8 @@ export default {
default: () => '', default: () => '',
}, },
showSave: { showSave: {
default: true, type: Boolean,
default: false,
}, },
}, },
computed: { computed: {

View file

@ -78,6 +78,7 @@
" "
v-model="c.comment" v-model="c.comment"
:bottom-actions="actions[c.id]" :bottom-actions="actions[c.id]"
:show-save="true"
/> />
</div> </div>
</div> </div>
@ -113,7 +114,6 @@
:upload-callback="attachmentUpload" :upload-callback="attachmentUpload"
:upload-enabled="true" :upload-enabled="true"
:placeholder="$t('task.comment.placeholder')" :placeholder="$t('task.comment.placeholder')"
:show-save="false"
v-if="editorActive" v-if="editorActive"
v-model="newComment.comment" v-model="newComment.comment"
/> />

View file

@ -23,7 +23,9 @@
@change="save" @change="save"
:placeholder="$t('task.description.placeholder')" :placeholder="$t('task.description.placeholder')"
:empty-text="$t('task.description.empty')" :empty-text="$t('task.description.empty')"
v-model="task.description"/> :show-save="true"
v-model="task.description"
/>
</div> </div>
</template> </template>