Make saving a text edit a button
This commit is contained in:
parent
f8b3c2bb58
commit
08a34d8a68
2 changed files with 17 additions and 3 deletions
|
@ -20,17 +20,27 @@
|
|||
</template>
|
||||
</p>
|
||||
|
||||
<ul class="actions">
|
||||
<template v-if="isEditEnabled && !showPreviewText">
|
||||
<ul class="actions" v-if="bottomActions.length > 0">
|
||||
<template v-if="isEditEnabled && !showPreviewText && showSave">
|
||||
<li>
|
||||
<a v-if="!isEditActive" @click="toggleEdit">{{ $t('input.editor.edit') }}</a>
|
||||
<a v-else @click="toggleEdit" class="done-edit">{{ $t('input.editor.done') }}</a>
|
||||
<a v-else @click="toggleEdit" class="done-edit">{{ $t('misc.save') }}</a>
|
||||
</li>
|
||||
</template>
|
||||
<li v-for="(action, k) in bottomActions" :key="k">
|
||||
<a @click="action.action">{{ action.title }}</a>
|
||||
</li>
|
||||
</ul>
|
||||
<template v-else-if="showSave">
|
||||
<ul v-if="!isEditActive" class="actions">
|
||||
<li>
|
||||
<a @click="toggleEdit">{{ $t('input.editor.edit') }}</a>
|
||||
</li>
|
||||
</ul>
|
||||
<x-button v-else @click="toggleEdit" type="secondary" :shadow="false">
|
||||
{{ $t('misc.save') }}
|
||||
</x-button>
|
||||
</template>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
@ -85,6 +95,9 @@ export default {
|
|||
type: String,
|
||||
default: () => '',
|
||||
},
|
||||
showSave: {
|
||||
default: true,
|
||||
},
|
||||
},
|
||||
computed: {
|
||||
showPreviewText() {
|
||||
|
|
|
@ -113,6 +113,7 @@
|
|||
:upload-callback="attachmentUpload"
|
||||
:upload-enabled="true"
|
||||
:placeholder="$t('task.comment.placeholder')"
|
||||
:show-save="false"
|
||||
v-if="editorActive"
|
||||
v-model="newComment.comment"
|
||||
/>
|
||||
|
|
Loading…
Reference in a new issue