File tree Expand file tree Collapse file tree
apps/files/src/components Expand file tree Collapse file tree Original file line number Diff line number Diff line change 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 >
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 " >
3031
3132<script lang="ts">
3233import { defineComponent } from ' vue'
33- import { NcModal , NcButton } from ' @nextcloud/vue'
34+ import { NcModal , NcButton , NcLoadingIcon } from ' @nextcloud/vue'
3435import { translate as t } from ' @nextcloud/l10n'
3536import 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}
You can’t perform that action at this time.
0 commit comments