Browse Source

fix: Fixed UI for field option in fields page

pull/6903/head
Muhammed Mustafa 11 months ago
parent
commit
c9cbf63df3
  1. 34
      packages/nc-gui/components/smartsheet/details/Fields.vue
  2. 2
      packages/nc-gui/lang/en.json

34
packages/nc-gui/components/smartsheet/details/Fields.vue

@ -859,23 +859,25 @@ const onFieldOptionUpdate = () => {
<NcMenu style="padding-top: 0.45rem !important">
<template v-if="fieldStatus(field) !== 'add'">
<NcTooltip placement="top">
<template #title>Click to copy Field Id</template>
<template #title>{{ $t('msg.clickToCopyFieldId') }}</template>
<div
class="flex flex-row px-3 py-2 w-42 justify-between items-start hover:bg-gray-100 cursor-pointer"
class="flex flex-row px-3 py-2 w-46 justify-between items-center group hover:bg-gray-100 cursor-pointer"
@click="onClickCopyFieldUrl(field)"
>
<div class="flex flex-col gap-y-1">
<div class="text-gray-700">Field Id:</div>
<div class="flex flex-row text-gray-500 text-xs">
<div class="flex flex-row items-baseline gap-x-1 font-bold text-xs">
<div class="text-gray-600">{{ $t('labels.idColon') }}</div>
<div class="flex flex-row text-gray-600 text-xs">
{{ field.id }}
</div>
</div>
<GeneralIcon v-if="isFieldIdCopied" icon="check" class="mt-0.75" />
<GeneralIcon v-else icon="copy" class="mt-0.75" />
<NcButton size="xsmall" type="secondary" class="!group-hover:bg-gray-100">
<GeneralIcon v-if="isFieldIdCopied" icon="check" />
<GeneralIcon v-else icon="copy" />
</NcButton>
</div>
</NcTooltip>
<a-menu-divider class="mb-1.5" />
<a-menu-divider class="my-1.5" />
</template>
<NcMenuItem key="table-explorer-duplicate" @click="duplicateField(field)">
@ -998,20 +1000,22 @@ const onFieldOptionUpdate = () => {
<template #overlay>
<NcMenu>
<NcTooltip placement="top">
<template #title>Click to copy Field Id</template>
<template #title>{{ $t('msg.clickToCopyFieldId') }}</template>
<div
class="flex flex-row px-3 py-2 w-42 justify-between items-start hover:bg-gray-100 cursor-pointer"
class="flex flex-row px-3 py-2 w-46 justify-between items-center group hover:bg-gray-100 cursor-pointer"
@click="onClickCopyFieldUrl(displayColumn)"
>
<div class="flex flex-col gap-y-1">
<div class="text-gray-700">Field Id:</div>
<div class="flex flex-row text-xs text-gray-500">
<div class="flex flex-row items-baseline gap-x-1 font-bold text-xs">
<div class="text-gray-600">{{ $t('labels.idColon') }}</div>
<div class="flex flex-row text-gray-600 text-xs">
{{ displayColumn.id }}
</div>
</div>
<GeneralIcon v-if="isFieldIdCopied" icon="check" class="mt-0.75" />
<GeneralIcon v-else icon="copy" class="mt-0.75" />
<NcButton size="xsmall" type="secondary" class="!group-hover:bg-gray-100">
<GeneralIcon v-if="isFieldIdCopied" icon="check" />
<GeneralIcon v-else icon="copy" />
</NcButton>
</div>
</NcTooltip>
</NcMenu>

2
packages/nc-gui/lang/en.json

@ -419,6 +419,7 @@
"headerName": "Header Name",
"icon": "Icon",
"max": "Max",
"idColon": "Id:",
"copiedRecordURL": "Copied Record URL",
"copyRecordURL": "Copy Record URL",
"duplicateRecord": "Duplicate record",
@ -901,6 +902,7 @@
"key": "Key"
},
"msg": {
"clickToCopyFieldId": "Click to copy Field Id",
"enterPassword": "Enter password",
"bySigningUp": "By signing up, you agree to the",
"subscribeToOurWeeklyNewsletter": "Subscribe to our weekly newsletter",

Loading…
Cancel
Save