Skip to content

Commit 2626e23

Browse files
committed
fix: go back warining discards the reply text
Signed-off-by: greta <gretadoci@gmail.com> Signed-off-by: Richard Steinmetz <richard@steinmetz.cloud> [skip ci]
1 parent 5e860fd commit 2626e23

1 file changed

Lines changed: 57 additions & 58 deletions

File tree

src/components/NewMessageModal.vue

Lines changed: 57 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -4,67 +4,66 @@
44
:name="modalTitle"
55
:additional-trap-elements="additionalTrapElements"
66
@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" />
2314
</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" />
3522
</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>
5741
</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 }}
6553
</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>
6867
<Composer ref="composer"
6968
:from-account="composerData.accountId"
7069
:from-alias="composerData.aliasId"
@@ -106,7 +105,7 @@
106105
@upload-attachment="onAttachmentUploading"
107106
@send="onSend"
108107
@show-toolbar="handleShow" />
109-
</template>
108+
</KeepAlive>
110109
</Modal>
111110
</template>
112111
<script>

0 commit comments

Comments
 (0)