Skip to content

Commit 6aea449

Browse files
elzodyjuliusknorr
authored andcommitted
fix: Can close template filler modal
Signed-off-by: Elizabeth Danzberger <lizzy7128@tutanota.de>
1 parent 3390fc1 commit 6aea449

1 file changed

Lines changed: 10 additions & 4 deletions

File tree

apps/files/src/components/TemplateFiller.vue

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
-->
55

66
<template>
7-
<NcModal :show="show">
7+
<NcModal>
88
<div class="template-field-modal__content">
99
<form>
1010
<h3>{{ t('files', 'Fill template fields') }}</h3>
@@ -19,6 +19,7 @@
1919
</div>
2020

2121
<div class="template-field-modal__buttons">
22+
<NcLoadingIcon v-if="loading" :name="t('files', 'Submitting fields...')" />
2223
<NcButton aria-label="Submit button"
2324
type="primary"
2425
@click="submit">
@@ -30,7 +31,7 @@
3031

3132
<script lang="ts">
3233
import { defineComponent } from 'vue'
33-
import { NcModal, NcButton } from '@nextcloud/vue'
34+
import { NcModal, NcButton, NcLoadingIcon } from '@nextcloud/vue'
3435
import { translate as t } from '@nextcloud/l10n'
3536
import TemplateTextField from './TemplateFiller/TemplateTextField.vue'
3637
@@ -40,6 +41,7 @@ export default defineComponent({
4041
components: {
4142
NcModal,
4243
NcButton,
44+
NcLoadingIcon,
4345
TemplateTextField,
4446
},
4547
@@ -57,7 +59,7 @@ export default defineComponent({
5759
data() {
5860
return {
5961
localFields: {},
60-
show: true,
62+
loading: false,
6163
}
6264
},
6365
@@ -69,8 +71,11 @@ export default defineComponent({
6971
}
7072
},
7173
async submit() {
74+
this.loading = true
75+
7276
await this.onSubmit(this.localFields)
73-
this.show = false
77+
78+
this.$emit('close')
7479
},
7580
},
7681
})
@@ -90,6 +95,7 @@ $modal-margin: calc(var(--default-grid-baseline) * 4);
9095
.template-field-modal__buttons {
9196
display: flex;
9297
justify-content: flex-end;
98+
gap: var(--default-grid-baseline);
9399
margin: $modal-margin;
94100
margin-top: 0;
95101
}

0 commit comments

Comments
 (0)