Show call to action for task description if there is none

This commit is contained in:
kolaente 2021-01-20 22:33:11 +01:00
parent 4dac10454e
commit 9f35ac372b
No known key found for this signature in database
GPG key ID: F40E70337AB24C9B
2 changed files with 11 additions and 1 deletions

View file

@ -29,9 +29,14 @@
v-if="isEditActive" v-if="isEditActive"
v-model="text"/> v-model="text"/>
<div class="preview content" v-html="preview" v-if="isPreviewActive"> <div class="preview content" v-html="preview" v-if="isPreviewActive && text !== ''">
</div> </div>
<p class="has-text-centered has-text-grey is-italic" v-if="isPreviewActive && text === '' && emptyText !== ''">
{{ emptyText }}
<a @click="toggleEdit">Edit</a>.
</p>
<ul class="actions"> <ul class="actions">
<template v-if="hasEditBottom"> <template v-if="hasEditBottom">
<li> <li>
@ -96,6 +101,10 @@ export default {
bottomActions: { bottomActions: {
default: () => [], default: () => [],
}, },
emptyText: {
type: String,
default: () => '',
},
}, },
data() { data() {
return { return {

View file

@ -22,6 +22,7 @@
:upload-enabled="true" :upload-enabled="true"
@change="save" @change="save"
placeholder="Click here to enter a description..." placeholder="Click here to enter a description..."
empty-text="No description available yet."
v-model="task.description"/> v-model="task.description"/>
</div> </div>
</template> </template>