Browse Source

fix: keep duplicate modals open until job is completed

pull/6643/head
mertmit 1 year ago
parent
commit
e117bf6d48
  1. 12
      packages/nc-gui/components/dlg/ProjectDuplicate.vue
  2. 6
      packages/nc-gui/components/dlg/TableDuplicate.vue

12
packages/nc-gui/components/dlg/ProjectDuplicate.vue

@ -128,7 +128,15 @@ const isEaster = ref(false)
</script> </script>
<template> <template>
<GeneralModal v-if="base" v-model:visible="dialogShow" class="!w-[30rem]" wrap-class-name="nc-modal-base-duplicate"> <GeneralModal
v-if="base"
v-model:visible="dialogShow"
:closable="!isLoading"
:mask-closable="!isLoading"
:keyboard="!isLoading"
class="!w-[30rem]"
wrap-class-name="nc-modal-base-duplicate"
>
<div> <div>
<div class="prose-xl font-bold self-center" @dblclick="isEaster = !isEaster"> <div class="prose-xl font-bold self-center" @dblclick="isEaster = !isEaster">
{{ $t('general.duplicate') }} {{ $t('objects.project') }} {{ $t('general.duplicate') }} {{ $t('objects.project') }}
@ -147,7 +155,7 @@ const isEaster = ref(false)
</div> </div>
</div> </div>
<div class="flex flex-row gap-x-2 mt-2.5 pt-2.5 justify-end"> <div class="flex flex-row gap-x-2 mt-2.5 pt-2.5 justify-end">
<NcButton key="back" type="secondary" @click="dialogShow = false">{{ $t('general.cancel') }}</NcButton> <NcButton v-if="!isLoading" key="back" type="secondary" @click="dialogShow = false">{{ $t('general.cancel') }}</NcButton>
<NcButton key="submit" v-e="['a:base:duplicate']" :loading="isLoading" @click="_duplicate" <NcButton key="submit" v-e="['a:base:duplicate']" :loading="isLoading" @click="_duplicate"
>{{ $t('general.confirm') }} >{{ $t('general.confirm') }}
</NcButton> </NcButton>

6
packages/nc-gui/components/dlg/TableDuplicate.vue

@ -115,10 +115,12 @@ const isEaster = ref(false)
<GeneralModal <GeneralModal
v-model:visible="dialogShow" v-model:visible="dialogShow"
:class="{ active: dialogShow }" :class="{ active: dialogShow }"
:closable="!isLoading"
:mask-closable="!isLoading"
:keyboard="!isLoading"
centered centered
wrap-class-name="nc-modal-table-duplicate" wrap-class-name="nc-modal-table-duplicate"
:footer="null" :footer="null"
:closable="false"
class="!w-[30rem]" class="!w-[30rem]"
@keydown.esc="dialogShow = false" @keydown.esc="dialogShow = false"
> >
@ -140,7 +142,7 @@ const isEaster = ref(false)
</div> </div>
</div> </div>
<div class="flex flex-row gap-x-2 mt-2.5 pt-2.5 justify-end"> <div class="flex flex-row gap-x-2 mt-2.5 pt-2.5 justify-end">
<NcButton key="back" type="secondary" @click="dialogShow = false">{{ $t('general.cancel') }}</NcButton> <NcButton v-if="!isLoading" key="back" type="secondary" @click="dialogShow = false">{{ $t('general.cancel') }}</NcButton>
<NcButton key="submit" v-e="['a:table:duplicate']" type="primary" :loading="isLoading" @click="_duplicate" <NcButton key="submit" v-e="['a:table:duplicate']" type="primary" :loading="isLoading" @click="_duplicate"
>{{ $t('general.confirm') }} >{{ $t('general.confirm') }}
</NcButton> </NcButton>

Loading…
Cancel
Save