|
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') |
136 | | - }}</ActionCheckbox> |
| 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 |
| 140 | + :checked="editorPlainText" |
| 141 | + :text="t('mail', 'Plain text')" |
| 142 | + @check="editorPlainText = true" |
| 143 | + @uncheck="editorPlainText = false" |
| 144 | + >{{ t('mail', 'Plain text') }}</ActionCheckbox |
| 145 | + > |
137 | 146 | </Actions> |
138 | 147 | <div> |
139 | 148 | <input |
@@ -169,8 +178,8 @@ import uniqBy from 'lodash/fp/uniqBy' |
169 | 178 | import Autosize from 'vue-autosize' |
170 | 179 | import debouncePromise from 'debounce-promise' |
171 | 180 | import Actions from '@nextcloud/vue/dist/Components/Actions' |
| 181 | +import ActionButton from '@nextcloud/vue/dist/Components/ActionButton' |
172 | 182 | import ActionCheckbox from '@nextcloud/vue/dist/Components/ActionCheckbox' |
173 | | -import ActionText from '@nextcloud/vue/dist/Components/ActionText' |
174 | 183 | import Multiselect from '@nextcloud/vue/dist/Components/Multiselect' |
175 | 184 | import {translate as t} from '@nextcloud/l10n' |
176 | 185 | import Vue from 'vue' |
@@ -198,8 +207,8 @@ export default { |
198 | 207 | name: 'Composer', |
199 | 208 | components: { |
200 | 209 | Actions, |
| 210 | + ActionButton, |
201 | 211 | ActionCheckbox, |
202 | | - ActionText, |
203 | 212 | ComposerAttachments, |
204 | 213 | Loading, |
205 | 214 | Multiselect, |
@@ -348,6 +357,12 @@ export default { |
348 | 357 | onInputChanged() { |
349 | 358 | this.saveDraftDebounced(this.getMessageData()) |
350 | 359 | }, |
| 360 | + onAddLocalAttachment() { |
| 361 | + this.$refs.composerAttachments.onAddLocalAttachment() |
| 362 | + }, |
| 363 | + onAddCloudAttachment() { |
| 364 | + this.$refs.composerAttachments.onAddCloudAttachment() |
| 365 | + }, |
351 | 366 | onAutocomplete(term) { |
352 | 367 | if (term === undefined || term === '') { |
353 | 368 | return |
|
0 commit comments