Browse Source

fix: update modal styles

nc-expand-rows
DarkPhoenix2704 2 months ago
parent
commit
00dd853a49
  1. 59
      packages/nc-gui/components/dlg/ExpandTable.vue

59
packages/nc-gui/components/dlg/ExpandTable.vue

@ -35,20 +35,19 @@ const close = () => {
v-model:visible="dialogShow" v-model:visible="dialogShow"
:show-separator="false" :show-separator="false"
:header="$t('activity.createTable')" :header="$t('activity.createTable')"
size="medium" size="small"
@keydown.esc="dialogShow = false" @keydown.esc="dialogShow = false"
> >
<template #header> <div class="flex justify-between w-full text-base font-semibold mb-2 text-nc-content-gray-emphasis items-center">
<div class="flex justify-between w-full items-center"> Do you want to expand this table?
<div class="flex flex-row items-center gap-x-2 text-base font-semibold text-gray-800"> </div>
Do you want to expand this table? <div data-testid="nc-expand-table-modal" class="flex flex-col">
</div> <div v-if="(rows ?? 0) > 0" class="mb-4 nc-content-gray">
To accommodate your pasted data, we need to insert {{ rows }} additional records
</div> </div>
</template>
<div data-testid="nc-expand-table-modal" class="flex flex-col mt-1"> <div v-if="(affectedRows ?? 0) < 0" class="mb-2 nc-content-gray">
<div v-if="(rows ?? 0) > 0" class="mb-4"> The data you pasted will update {{ affectedRows }} records in subsequent pages.
To fit your pasted data into the table, we need to add
<span class="font-semibold text-gray-800"> {{ rows }} more records. </span>
</div> </div>
<a-radio-group v-if="(rows ?? 0) > 0" v-model:value="expand"> <a-radio-group v-if="(rows ?? 0) > 0" v-model:value="expand">
@ -61,38 +60,36 @@ const close = () => {
}" }"
:value="true" :value="true"
> >
<div class="text-gray-700"> <div class="nc-content-gray">
<span class="text-gray-800 font-semibold"> Expand the table </span> <span class="font-semibold"> Expand </span>
table to accommodate all pasted cells
so that all of the pasted cells will fit.
</div> </div>
</a-radio> </a-radio>
<a-radio <a-radio
data-testid="nc-table-expand-no" data-testid="nc-table-expand-no"
:style="{ :style="{
display: 'flex', display: 'flex',
height: '30px',
lineHeight: '30px', lineHeight: '30px',
}" }"
:value="false" :value="false"
> >
<span class="text-gray-800 font-semibold"> Dont expand the table. </span> <div class="nc-content-gray leading-5">
<span class="font-semibold"> Don't expand </span>
Values outside of the table will not be pasted. the table. Values beyond the table's current size will be skipped.
</div>
</a-radio> </a-radio>
</a-radio-group> </a-radio-group>
</div>
<div class="flex flex-row justify-end gap-x-2"> <div class="flex flex-row mt-5 justify-end gap-x-2">
<div class="flex gap-2 items-center"> <div class="flex gap-2 items-center">
<NcButton data-testid="nc-table-expand-cancel" type="secondary" size="small" @click="close"> <NcButton data-testid="nc-table-expand-cancel" type="secondary" size="small" @click="close">
{{ $t('labels.cancel') }} {{ $t('labels.cancel') }}
</NcButton> </NcButton>
</div> </div>
<div class="flex gap-2 items-center"> <div class="flex gap-2 items-center">
<NcButton data-testid="nc-table-expand" type="primary" size="small" @click="updateExpand"> <NcButton data-testid="nc-table-expand" type="primary" size="small" @click="updateExpand">
{{ $t('labels.continue') }} {{ $t('labels.continue') }}
</NcButton> </NcButton>
</div>
</div> </div>
</div> </div>
</NcModal> </NcModal>

Loading…
Cancel
Save