Browse Source

feat(nc-gui): placeholder for table and multi field editor

pull/7634/head
Ramesh Mane 9 months ago
parent
commit
0bd08aa5d6
  1. 440
      packages/nc-gui/assets/img/empty-state/api-tokens.svg
  2. 0
      packages/nc-gui/assets/img/placeholder/api-tokens.png
  3. 0
      packages/nc-gui/assets/img/placeholder/invite-team.png
  4. 0
      packages/nc-gui/assets/img/placeholder/link-records.png
  5. 0
      packages/nc-gui/assets/img/placeholder/link-records.svg
  6. 0
      packages/nc-gui/assets/img/placeholder/multi-field-editor.png
  7. 0
      packages/nc-gui/assets/img/placeholder/table.png
  8. 0
      packages/nc-gui/assets/img/placeholder/webhooks.png
  9. 74
      packages/nc-gui/components/project/AllTables.vue
  10. 2
      packages/nc-gui/components/smartsheet/details/Fields.vue
  11. 4
      packages/nc-gui/lang/en.json

440
packages/nc-gui/assets/img/empty-state/api-tokens.svg

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 141 KiB

0
packages/nc-gui/assets/img/empty-state/api-token.png → packages/nc-gui/assets/img/placeholder/api-tokens.png

Before

Width:  |  Height:  |  Size: 77 KiB

After

Width:  |  Height:  |  Size: 77 KiB

0
packages/nc-gui/assets/img/empty-state/invite-team.png → packages/nc-gui/assets/img/placeholder/invite-team.png

Before

Width:  |  Height:  |  Size: 743 KiB

After

Width:  |  Height:  |  Size: 743 KiB

0
packages/nc-gui/assets/img/empty-state/link-records.png → packages/nc-gui/assets/img/placeholder/link-records.png

Before

Width:  |  Height:  |  Size: 64 KiB

After

Width:  |  Height:  |  Size: 64 KiB

0
packages/nc-gui/assets/img/empty-state/link-records.svg → packages/nc-gui/assets/img/placeholder/link-records.svg

Before

Width:  |  Height:  |  Size: 160 KiB

After

Width:  |  Height:  |  Size: 160 KiB

0
packages/nc-gui/assets/img/empty-state/multi-field-editor.png → packages/nc-gui/assets/img/placeholder/multi-field-editor.png

Before

Width:  |  Height:  |  Size: 122 KiB

After

Width:  |  Height:  |  Size: 122 KiB

0
packages/nc-gui/assets/img/empty-state/table.png → packages/nc-gui/assets/img/placeholder/table.png

Before

Width:  |  Height:  |  Size: 1.0 MiB

After

Width:  |  Height:  |  Size: 1.0 MiB

0
packages/nc-gui/assets/img/empty-state/webhooks.png → packages/nc-gui/assets/img/placeholder/webhooks.png

Before

Width:  |  Height:  |  Size: 161 KiB

After

Width:  |  Height:  |  Size: 161 KiB

74
packages/nc-gui/components/project/AllTables.vue

@ -122,47 +122,55 @@ const onCreateBaseClick = () => {
</component>
</div>
<template v-if="activeTables.length">
<div class="flex flex-row w-full text-gray-400 border-b-1 border-gray-50 py-3 px-2.5">
<div class="w-2/5">{{ $t('objects.table') }}</div>
<div class="w-1/5">{{ $t('general.source') }}</div>
<div class="w-1/5">{{ $t('labels.createdOn') }}</div>
</div>
<div
class="nc-base-view-all-table-list nc-scrollbar-md"
:style="{
height: 'calc(100vh - var(--topbar-height) - 18rem)',
}"
>
<div class="flex flex-row w-full text-gray-400 border-b-1 border-gray-50 py-3 px-2.5">
<div class="w-2/5">{{ $t('objects.table') }}</div>
<div class="w-1/5">{{ $t('general.source') }}</div>
<div class="w-1/5">{{ $t('labels.createdOn') }}</div>
</div>
<div
v-for="table in [...activeTables].sort(
class="nc-base-view-all-table-list nc-scrollbar-md"
:style="{
height: 'calc(100vh - var(--topbar-height) - 18rem)',
}"
>
<div
v-for="table in [...activeTables].sort(
(a, b) => a.source_id!.localeCompare(b.source_id!) * 20
)"
:key="table.id"
class="py-4 flex flex-row w-full cursor-pointer hover:bg-gray-100 border-b-1 border-gray-100 px-2.25"
data-testid="proj-view-list__item"
@click="openTable(table)"
>
<div class="flex flex-row w-2/5 items-center gap-x-2" data-testid="proj-view-list__item-title">
<div class="min-w-5 flex items-center justify-center">
<GeneralTableIcon :meta="table" class="text-gray-500" />
:key="table.id"
class="py-4 flex flex-row w-full cursor-pointer hover:bg-gray-100 border-b-1 border-gray-100 px-2.25"
data-testid="proj-view-list__item"
@click="openTable(table)"
>
<div class="flex flex-row w-2/5 items-center gap-x-2" data-testid="proj-view-list__item-title">
<div class="min-w-5 flex items-center justify-center">
<GeneralTableIcon :meta="table" class="text-gray-500" />
</div>
{{ table?.title }}
</div>
{{ table?.title }}
</div>
<div class="w-1/5 text-gray-600" data-testid="proj-view-list__item-type">
<div v-if="table.source_id === defaultBase?.id" class="ml-0.75">-</div>
<div v-else class="capitalize flex flex-row items-center gap-x-0.5">
<GeneralBaseLogo class="w-4 mr-1" />
{{ sources.get(table.source_id!)?.alias }}
<div class="w-1/5 text-gray-600" data-testid="proj-view-list__item-type">
<div v-if="table.source_id === defaultBase?.id" class="ml-0.75">-</div>
<div v-else class="capitalize flex flex-row items-center gap-x-0.5">
<GeneralBaseLogo class="w-4 mr-1" />
{{ sources.get(table.source_id!)?.alias }}
</div>
</div>
<div class="w-1/5 text-gray-400 ml-0.25" data-testid="proj-view-list__item-created-at">
{{ dayjs(table?.created_at).fromNow() }}
</div>
</div>
<div class="w-1/5 text-gray-400 ml-0.25" data-testid="proj-view-list__item-created-at">
{{ dayjs(table?.created_at).fromNow() }}
</div>
</template>
<div v-else class="py-3 flex items-center gap-6 <lg:flex-col">
<img src="~assets/img/placeholder/table.png" class="!w-[23rem] flex-none" />
<div class="text-center lg:text-left">
<div class="text-2xl text-gray-800 font-bold">{{ $t('placeholder.createTable') }}</div>
<div class="text-sm text-gray-700 pt-6">
{{ $t('placeholder.createTableLabel') }}
</div>
</div>
</div>
</template>
<template v-else>fdas</template>
<ProjectImportModal v-if="defaultBase" v-model:visible="isImportModalOpen" :source="defaultBase" />
<LazyDashboardSettingsDataSourcesCreateBase v-model:open="isNewBaseModalOpen" />
</div>
@ -177,7 +185,7 @@ const onCreateBaseClick = () => {
}
.label {
@apply text-base font-medium;
@apply text-base font-medium break-normal;
}
}

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

@ -1254,7 +1254,7 @@ watch(
@add="onFieldAdd"
/>
<div v-else class="w-[25rem] flex flex-col justify-center p-4 items-center">
<img src="~assets/img/fieldPlaceholder.svg" class="!w-[18rem]" />
<img src="~assets/img/placeholder/multi-field-editor.png" class="!w-[18rem]" />
<div class="text-2xl text-gray-600 font-bold text-center pt-6">{{ $t('labels.multiField.selectField') }}</div>
<div class="text-center text-sm px-2 text-gray-500 pt-6">
{{ $t('labels.multiField.selectFieldLabel') }}

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

@ -959,7 +959,9 @@
"decimal7": "1.0000000",
"decimal8": "1.00000000",
"value": "Value",
"key": "Key"
"key": "Key",
"createTable": "Create your First Table!",
"createTableLabel": "From scratch or import or connect to external database"
},
"msg": {
"clickToCopyFieldId": "Click to copy Field Id",

Loading…
Cancel
Save