Browse Source

fix: Fixed UI for field option in fields page

pull/6903/head
Muhammed Mustafa 1 year 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"> <NcMenu style="padding-top: 0.45rem !important">
<template v-if="fieldStatus(field) !== 'add'"> <template v-if="fieldStatus(field) !== 'add'">
<NcTooltip placement="top"> <NcTooltip placement="top">
<template #title>Click to copy Field Id</template> <template #title>{{ $t('msg.clickToCopyFieldId') }}</template>
<div <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)" @click="onClickCopyFieldUrl(field)"
> >
<div class="flex flex-col gap-y-1"> <div class="flex flex-row items-baseline gap-x-1 font-bold text-xs">
<div class="text-gray-700">Field Id:</div> <div class="text-gray-600">{{ $t('labels.idColon') }}</div>
<div class="flex flex-row text-gray-500 text-xs"> <div class="flex flex-row text-gray-600 text-xs">
{{ field.id }} {{ field.id }}
</div> </div>
</div> </div>
<GeneralIcon v-if="isFieldIdCopied" icon="check" class="mt-0.75" /> <NcButton size="xsmall" type="secondary" class="!group-hover:bg-gray-100">
<GeneralIcon v-else icon="copy" class="mt-0.75" /> <GeneralIcon v-if="isFieldIdCopied" icon="check" />
<GeneralIcon v-else icon="copy" />
</NcButton>
</div> </div>
</NcTooltip> </NcTooltip>
<a-menu-divider class="mb-1.5" /> <a-menu-divider class="my-1.5" />
</template> </template>
<NcMenuItem key="table-explorer-duplicate" @click="duplicateField(field)"> <NcMenuItem key="table-explorer-duplicate" @click="duplicateField(field)">
@ -998,20 +1000,22 @@ const onFieldOptionUpdate = () => {
<template #overlay> <template #overlay>
<NcMenu> <NcMenu>
<NcTooltip placement="top"> <NcTooltip placement="top">
<template #title>Click to copy Field Id</template> <template #title>{{ $t('msg.clickToCopyFieldId') }}</template>
<div <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)" @click="onClickCopyFieldUrl(displayColumn)"
> >
<div class="flex flex-col gap-y-1"> <div class="flex flex-row items-baseline gap-x-1 font-bold text-xs">
<div class="text-gray-700">Field Id:</div> <div class="text-gray-600">{{ $t('labels.idColon') }}</div>
<div class="flex flex-row text-xs text-gray-500"> <div class="flex flex-row text-gray-600 text-xs">
{{ displayColumn.id }} {{ displayColumn.id }}
</div> </div>
</div> </div>
<GeneralIcon v-if="isFieldIdCopied" icon="check" class="mt-0.75" /> <NcButton size="xsmall" type="secondary" class="!group-hover:bg-gray-100">
<GeneralIcon v-else icon="copy" class="mt-0.75" /> <GeneralIcon v-if="isFieldIdCopied" icon="check" />
<GeneralIcon v-else icon="copy" />
</NcButton>
</div> </div>
</NcTooltip> </NcTooltip>
</NcMenu> </NcMenu>

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

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

Loading…
Cancel
Save