|
4 | 4 | :name="modalTitle" |
5 | 5 | :additional-trap-elements="additionalTrapElements" |
6 | 6 | @close="$event.type === 'click' ? onClose() : onMinimize()"> |
7 | | - <EmptyContent v-if="error" |
8 | | - :name="t('mail', 'Error sending your message')" |
9 | | - class="empty-content" |
10 | | - role="alert"> |
11 | | - <p>{{ error }}</p> |
12 | | - <template #action> |
13 | | - <NcButton type="tertiary" |
14 | | - :aria-label="t('mail', 'Go back')" |
15 | | - @click="error = undefined"> |
16 | | - {{ t('mail', 'Go back') }} |
17 | | - </NcButton> |
18 | | - <NcButton type="tertiary" |
19 | | - :aria-label="t('mail', 'Retry')" |
20 | | - @click="onSend"> |
21 | | - {{ t('mail', 'Retry') }} |
22 | | - </NcButton> |
| 7 | + <NcButton class="maximize-button" |
| 8 | + type="tertiary-no-background" |
| 9 | + :aria-label="t('mail', 'Maximize composer')" |
| 10 | + @click="onMaximize"> |
| 11 | + <template #icon> |
| 12 | + <MaximizeIcon v-if="!largerModal" :size="20" /> |
| 13 | + <DefaultComposerIcon v-else :size="20" /> |
23 | 14 | </template> |
24 | | - </EmptyContent> |
25 | | - <Loading v-else-if="uploadingAttachments" :hint="t('mail', 'Uploading attachments …')" role="alert" /> |
26 | | - <Loading v-else-if="sending" |
27 | | - :hint="t('mail', 'Sending …')" |
28 | | - role="alert" /> |
29 | | - <EmptyContent v-else-if="warning" |
30 | | - :name="t('mail', 'Warning sending your message')" |
31 | | - class="empty-content" |
32 | | - role="alert"> |
33 | | - <template #description> |
34 | | - {{ warning }} |
| 15 | + </NcButton> |
| 16 | + <NcButton class="minimize-button" |
| 17 | + type="tertiary-no-background" |
| 18 | + :aria-label="t('mail', 'Minimize composer')" |
| 19 | + @click="onMinimize"> |
| 20 | + <template #icon> |
| 21 | + <MinimizeIcon :size="20" /> |
35 | 22 | </template> |
36 | | - <template #action> |
37 | | - <NcButton type="tertiary" |
38 | | - :aria-label="t('mail', 'Go back')" |
39 | | - @click="warning = undefined"> |
40 | | - {{ t('mail', 'Go back') }} |
41 | | - </NcButton> |
42 | | - <NcButton type="tertiary" |
43 | | - :aria-label="t('mail', 'Send anyway')" |
44 | | - @click="onForceSend"> |
45 | | - {{ t('mail', 'Send anyway') }} |
46 | | - </NcButton> |
47 | | - </template> |
48 | | - </EmptyContent> |
49 | | - <template v-else> |
50 | | - <NcButton class="maximize-button" |
51 | | - type="tertiary-no-background" |
52 | | - :aria-label="t('mail', 'Maximize composer')" |
53 | | - @click="onMaximize"> |
54 | | - <template #icon> |
55 | | - <MaximizeIcon v-if="!largerModal" :size="20" /> |
56 | | - <DefaultComposerIcon v-else :size="20" /> |
| 23 | + </NcButton> |
| 24 | + <KeepAlive> |
| 25 | + <EmptyContent v-if="error" |
| 26 | + :name="t('mail', 'Error sending your message')" |
| 27 | + class="empty-content" |
| 28 | + role="alert"> |
| 29 | + <p>{{ error }}</p> |
| 30 | + <template #action> |
| 31 | + <NcButton type="tertiary" |
| 32 | + :aria-label="t('mail', 'Go back')" |
| 33 | + @click="error = undefined"> |
| 34 | + {{ t('mail', 'Go back') }} |
| 35 | + </NcButton> |
| 36 | + <NcButton type="tertiary" |
| 37 | + :aria-label="t('mail', 'Retry')" |
| 38 | + @click="onSend"> |
| 39 | + {{ t('mail', 'Retry') }} |
| 40 | + </NcButton> |
57 | 41 | </template> |
58 | | - </NcButton> |
59 | | - <NcButton class="minimize-button" |
60 | | - type="tertiary-no-background" |
61 | | - :aria-label="t('mail', 'Minimize composer')" |
62 | | - @click="onMinimize"> |
63 | | - <template #icon> |
64 | | - <MinimizeIcon :size="20" /> |
| 42 | + </EmptyContent> |
| 43 | + <Loading v-else-if="uploadingAttachments" :hint="t('mail', 'Uploading attachments …')" role="alert" /> |
| 44 | + <Loading v-else-if="sending" |
| 45 | + :hint="t('mail', 'Sending …')" |
| 46 | + role="alert" /> |
| 47 | + <EmptyContent v-else-if="warning" |
| 48 | + :name="t('mail', 'Warning sending your message')" |
| 49 | + class="empty-content" |
| 50 | + role="alert"> |
| 51 | + <template #description> |
| 52 | + {{ warning }} |
65 | 53 | </template> |
66 | | - </NcButton> |
67 | | - |
| 54 | + <template #action> |
| 55 | + <NcButton type="tertiary" |
| 56 | + :aria-label="t('mail', 'Go back')" |
| 57 | + @click="warning = undefined"> |
| 58 | + {{ t('mail', 'Go back') }} |
| 59 | + </NcButton> |
| 60 | + <NcButton type="tertiary" |
| 61 | + :aria-label="t('mail', 'Send anyway')" |
| 62 | + @click="onForceSend"> |
| 63 | + {{ t('mail', 'Send anyway') }} |
| 64 | + </NcButton> |
| 65 | + </template> |
| 66 | + </EmptyContent> |
68 | 67 | <Composer ref="composer" |
69 | 68 | :from-account="composerData.accountId" |
70 | 69 | :from-alias="composerData.aliasId" |
|
106 | 105 | @upload-attachment="onAttachmentUploading" |
107 | 106 | @send="onSend" |
108 | 107 | @show-toolbar="handleShow" /> |
109 | | - </template> |
| 108 | + </KeepAlive> |
110 | 109 | </Modal> |
111 | 110 | </template> |
112 | 111 | <script> |
|
0 commit comments