Browse Source

fix(nc-gui): expanded form small changes

pull/7452/head
Ramesh Mane 11 months ago
parent
commit
25efad37de
  1. 39
      packages/nc-gui/components/smartsheet/expanded-form/index.vue

39
packages/nc-gui/components/smartsheet/expanded-form/index.vue

@ -557,10 +557,11 @@ export default {
</div> </div>
<div class="flex gap-2"> <div class="flex gap-2">
<NcButton <NcButton
v-if="isUIAllowed('dataEdit') && !isNew" v-if="!isNew && rowId"
type="secondary" type="secondary"
class="!xs:hidden text-gray-700" class="!xs:hidden text-gray-700"
@click="!isNew ? copyRecordUrl() : () => {}" :disabled="isLoading"
@click="copyRecordUrl()"
> >
<div v-e="['c:row-expand:copy-url']" data-testid="nc-expanded-form-copy-url" class="flex gap-2 items-center"> <div v-e="['c:row-expand:copy-url']" data-testid="nc-expanded-form-copy-url" class="flex gap-2 items-center">
<component :is="iconMap.check" v-if="isRecordLinkCopied" class="cursor-pointer nc-duplicate-row" /> <component :is="iconMap.check" v-if="isRecordLinkCopied" class="cursor-pointer nc-duplicate-row" />
@ -568,9 +569,9 @@ export default {
{{ isRecordLinkCopied ? $t('labels.copiedRecordURL') : $t('labels.copyRecordURL') }} {{ isRecordLinkCopied ? $t('labels.copiedRecordURL') : $t('labels.copyRecordURL') }}
</div> </div>
</NcButton> </NcButton>
<NcDropdown v-if="isUIAllowed('dataEdit') && !isNew" placement="bottomRight"> <NcDropdown v-if="!isNew" placement="bottomRight">
<NcButton type="secondary" class="nc-expand-form-more-actions w-10"> <NcButton type="secondary" class="nc-expand-form-more-actions w-10" :disabled="isLoading">
<GeneralIcon icon="threeDotVertical" class="text-md text-gray-700" /> <GeneralIcon icon="threeDotVertical" class="text-md" :class="isLoading ? 'text-gray-300' : 'text-gray-700'" />
</NcButton> </NcButton>
<template #overlay> <template #overlay>
<NcMenu> <NcMenu>
@ -580,13 +581,7 @@ export default {
{{ $t('general.reload') }} {{ $t('general.reload') }}
</div> </div>
</NcMenuItem> </NcMenuItem>
<NcMenuItem v-if="isMobileMode" class="text-gray-700" @click="!isNew ? copyRecordUrl() : () => {}"> <NcMenuItem v-if="isUIAllowed('dataEdit')" class="text-gray-700" @click="!isNew ? onDuplicateRow() : () => {}">
<div v-e="['c:row-expand:copy-url']" data-testid="nc-expanded-form-copy-url" class="flex gap-2 items-center">
<component :is="iconMap.link" class="cursor-pointer nc-duplicate-row" />
{{ $t('labels.copyRecordURL') }}
</div>
</NcMenuItem>
<NcMenuItem class="text-gray-700" @click="!isNew ? onDuplicateRow() : () => {}">
<div <div
v-e="['c:row-expand:duplicate']" v-e="['c:row-expand:duplicate']"
data-testid="nc-expanded-form-duplicate" data-testid="nc-expanded-form-duplicate"
@ -598,8 +593,12 @@ export default {
</span> </span>
</div> </div>
</NcMenuItem> </NcMenuItem>
<NcDivider /> <NcDivider v-if="isUIAllowed('dataEdit')" />
<NcMenuItem class="!text-red-500 !hover:bg-red-50" @click="!isNew && onDeleteRowClick()"> <NcMenuItem
v-if="isUIAllowed('dataEdit')"
class="!text-red-500 !hover:bg-red-50"
@click="!isNew && onDeleteRowClick()"
>
<div v-e="['c:row-expand:delete']" data-testid="nc-expanded-form-delete" class="flex gap-2 items-center"> <div v-e="['c:row-expand:delete']" data-testid="nc-expanded-form-delete" class="flex gap-2 items-center">
<component :is="iconMap.delete" class="cursor-pointer nc-delete-row" /> <component :is="iconMap.delete" class="cursor-pointer nc-delete-row" />
<span class="-ml-0.25"> <span class="-ml-0.25">
@ -802,17 +801,23 @@ export default {
class="w-full h-16 border-t-1 border-gray-200 bg-white flex items-center justify-end p-3 xs:(p-0 mt-4 border-t-0 gap-x-4 justify-between)" class="w-full h-16 border-t-1 border-gray-200 bg-white flex items-center justify-end p-3 xs:(p-0 mt-4 border-t-0 gap-x-4 justify-between)"
> >
<NcDropdown v-if="!isNew && isMobileMode" placement="bottomRight"> <NcDropdown v-if="!isNew && isMobileMode" placement="bottomRight">
<NcButton type="secondary" class="nc-expand-form-more-actions w-10"> <NcButton type="secondary" class="nc-expand-form-more-actions w-10" :disabled="isLoading">
<GeneralIcon icon="threeDotVertical" class="text-md text-gray-700" /> <GeneralIcon icon="threeDotVertical" class="text-md" :class="isLoading ? 'text-gray-300' : 'text-gray-700'" />
</NcButton> </NcButton>
<template #overlay> <template #overlay>
<NcMenu> <NcMenu>
<NcMenuItem v-if="!isNew" class="text-gray-700" @click="_loadRow()"> <NcMenuItem class="text-gray-700" @click="_loadRow()">
<div v-e="['c:row-expand:reload']" class="flex gap-2 items-center" data-testid="nc-expanded-form-reload"> <div v-e="['c:row-expand:reload']" class="flex gap-2 items-center" data-testid="nc-expanded-form-reload">
<component :is="iconMap.reload" class="cursor-pointer" /> <component :is="iconMap.reload" class="cursor-pointer" />
{{ $t('general.reload') }} {{ $t('general.reload') }}
</div> </div>
</NcMenuItem> </NcMenuItem>
<NcMenuItem v-if="rowId" class="text-gray-700" @click="!isNew ? copyRecordUrl() : () => {}">
<div v-e="['c:row-expand:copy-url']" data-testid="nc-expanded-form-copy-url" class="flex gap-2 items-center">
<component :is="iconMap.link" class="cursor-pointer nc-duplicate-row" />
{{ $t('labels.copyRecordURL') }}
</div>
</NcMenuItem>
<NcDivider /> <NcDivider />
<NcMenuItem <NcMenuItem
v-if="isUIAllowed('dataEdit') && !isNew" v-if="isUIAllowed('dataEdit') && !isNew"

Loading…
Cancel
Save