|
123 | 123 | ></TextEditor> |
124 | 124 | </div> |
125 | 125 | <div class="composer-actions"> |
126 | | - <ComposerAttachments v-model="attachments" @upload="onAttachmentsUploading" /> |
| 126 | + <ComposerAttachments ref="composerAttachments" v-model="attachments" @upload="onAttachmentsUploading" /> |
127 | 127 | <div class="composer-actions-right"> |
128 | 128 | <p class="composer-actions-draft"> |
129 | 129 | <span v-if="savingDraft === true" id="draft-status">{{ t('mail', 'Saving draft …') }}</span> |
130 | 130 | <span v-else-if="savingDraft === false" id="draft-status">{{ t('mail', 'Draft saved') }}</span> |
131 | 131 | </p> |
132 | 132 | <Actions> |
133 | | - <ActionText icon="icon-info">{{ t('mail', 'Message options') }}</ActionText> |
134 | | - <ActionCheckbox :checked.sync="editorPlainText" :text="t('mail', 'Plain text')">{{ |
135 | | - t('mail', 'Plain text') |
| 133 | + <ActionButton icon="icon-upload" @click="onAddLocalAttachment">{{ |
| 134 | + t('mail', 'Upload attachment') |
| 135 | + }}</ActionButton> |
| 136 | + <ActionButton icon="icon-folder" @click="onAddCloudAttachment">{{ |
| 137 | + t('mail', 'Add attachment from Files') |
| 138 | + }}</ActionButton> |
| 139 | + <ActionCheckbox :checked="!editorPlainText" @check="editorPlainText = false" @uncheck="editorPlainText = true" :text="t('mail', 'Enable text formatting')">{{ |
| 140 | + t('mail', 'Enable text formatting') |
136 | 141 | }}</ActionCheckbox> |
137 | 142 | </Actions> |
138 | 143 | <div> |
@@ -169,8 +174,8 @@ import uniqBy from 'lodash/fp/uniqBy' |
169 | 174 | import Autosize from 'vue-autosize' |
170 | 175 | import debouncePromise from 'debounce-promise' |
171 | 176 | import Actions from '@nextcloud/vue/dist/Components/Actions' |
| 177 | +import ActionButton from '@nextcloud/vue/dist/Components/ActionButton' |
172 | 178 | import ActionCheckbox from '@nextcloud/vue/dist/Components/ActionCheckbox' |
173 | | -import ActionText from '@nextcloud/vue/dist/Components/ActionText' |
174 | 179 | import Multiselect from '@nextcloud/vue/dist/Components/Multiselect' |
175 | 180 | import {translate as t} from '@nextcloud/l10n' |
176 | 181 | import Vue from 'vue' |
@@ -198,8 +203,8 @@ export default { |
198 | 203 | name: 'Composer', |
199 | 204 | components: { |
200 | 205 | Actions, |
| 206 | + ActionButton, |
201 | 207 | ActionCheckbox, |
202 | | - ActionText, |
203 | 208 | ComposerAttachments, |
204 | 209 | Loading, |
205 | 210 | Multiselect, |
@@ -348,6 +353,12 @@ export default { |
348 | 353 | onInputChanged() { |
349 | 354 | this.saveDraftDebounced(this.getMessageData()) |
350 | 355 | }, |
| 356 | + onAddLocalAttachment() { |
| 357 | + this.$refs.composerAttachments.onAddLocalAttachment() |
| 358 | + }, |
| 359 | + onAddCloudAttachment() { |
| 360 | + this.$refs.composerAttachments.onAddCloudAttachment() |
| 361 | + }, |
351 | 362 | onAutocomplete(term) { |
352 | 363 | if (term === undefined || term === '') { |
353 | 364 | return |
|
0 commit comments