Browse Source

fix(nc-gui): remove lazy loading baseIconColorPicker component

pull/7807/head
Ramesh Mane 9 months ago
parent
commit
c7a5b139d2
  1. 4
      packages/nc-gui/components/cmd-k/index.vue
  2. 4
      packages/nc-gui/components/dlg/ProjectDelete.vue
  3. 4
      packages/nc-gui/components/dlg/share-and-collaborate/View.vue
  4. 4
      packages/nc-gui/components/project/View.vue
  5. 4
      packages/nc-gui/components/workspace/ProjectList.vue

4
packages/nc-gui/components/cmd-k/index.vue

@ -387,11 +387,11 @@ defineExpose({
> >
<div class="cmdk-action-content w-full"> <div class="cmdk-action-content w-full">
<template v-if="title === 'Bases' || act.icon === 'project'"> <template v-if="title === 'Bases' || act.icon === 'project'">
<LazyGeneralBaseIconColorPicker :key="act.iconHue" :hue="act.iconHue" size="small" readonly> <GeneralBaseIconColorPicker :key="act.iconHue" :hue="act.iconHue" size="small" readonly>
<template #default> <template #default>
<GeneralProjectIcon type="database" /> <GeneralProjectIcon type="database" />
</template> </template>
</LazyGeneralBaseIconColorPicker> </GeneralBaseIconColorPicker>
</template> </template>
<template v-else> <template v-else>
<component <component

4
packages/nc-gui/components/dlg/ProjectDelete.vue

@ -52,7 +52,7 @@ const onDelete = async () => {
<GeneralDeleteModal v-model:visible="visible" :entity-name="$t('objects.project')" :on-delete="onDelete"> <GeneralDeleteModal v-model:visible="visible" :entity-name="$t('objects.project')" :on-delete="onDelete">
<template #entity-preview> <template #entity-preview>
<div v-if="base" class="flex flex-row items-center py-2 px-2.25 bg-gray-50 rounded-lg text-gray-700 mb-4"> <div v-if="base" class="flex flex-row items-center py-2 px-2.25 bg-gray-50 rounded-lg text-gray-700 mb-4">
<LazyGeneralBaseIconColorPicker <GeneralBaseIconColorPicker
:key="parseProp(base.meta).iconHue" :key="parseProp(base.meta).iconHue"
:hue="parseProp(base.meta).iconHue" :hue="parseProp(base.meta).iconHue"
size="small" size="small"
@ -63,7 +63,7 @@ const onDelete = async () => {
<template #default> <template #default>
<GeneralProjectIcon :type="base.type" class="nc-view-icon w-6 h-6" /> <GeneralProjectIcon :type="base.type" class="nc-view-icon w-6 h-6" />
</template> </template>
</LazyGeneralBaseIconColorPicker> </GeneralBaseIconColorPicker>
<div <div
class="capitalize text-ellipsis overflow-hidden select-none w-full pl-1.75" class="capitalize text-ellipsis overflow-hidden select-none w-full pl-1.75"
:style="{ wordBreak: 'keep-all', whiteSpace: 'nowrap', display: 'inline' }" :style="{ wordBreak: 'keep-all', whiteSpace: 'nowrap', display: 'inline' }"

4
packages/nc-gui/components/dlg/share-and-collaborate/View.vue

@ -154,7 +154,7 @@ watch(showShareModal, (val) => {
</div> </div>
<div class="share-base"> <div class="share-base">
<div class="flex flex-row items-center gap-x-2 px-4 pt-3 pb-3 select-none"> <div class="flex flex-row items-center gap-x-2 px-4 pt-3 pb-3 select-none">
<LazyGeneralBaseIconColorPicker <GeneralBaseIconColorPicker
:key="parseProp(base.meta).iconHue" :key="parseProp(base.meta).iconHue"
:hue="parseProp(base.meta).iconHue" :hue="parseProp(base.meta).iconHue"
size="small" size="small"
@ -165,7 +165,7 @@ watch(showShareModal, (val) => {
<template #default> <template #default>
<GeneralProjectIcon :type="base.type" class="nc-view-icon group-hover" /> <GeneralProjectIcon :type="base.type" class="nc-view-icon group-hover" />
</template> </template>
</LazyGeneralBaseIconColorPicker> </GeneralBaseIconColorPicker>
<div>{{ $t('activity.shareBase.label') }}</div> <div>{{ $t('activity.shareBase.label') }}</div>
<div <div

4
packages/nc-gui/components/project/View.vue

@ -82,7 +82,7 @@ watch(
<div class="flex flex-row items-center gap-x-3"> <div class="flex flex-row items-center gap-x-3">
<GeneralOpenLeftSidebarBtn /> <GeneralOpenLeftSidebarBtn />
<div class="flex flex-row items-center h-full gap-x-2.5"> <div class="flex flex-row items-center h-full gap-x-2.5">
<LazyGeneralBaseIconColorPicker <GeneralBaseIconColorPicker
:key="parseProp(openedProject?.meta).iconHue" :key="parseProp(openedProject?.meta).iconHue"
:hue="parseProp(openedProject?.meta).iconHue" :hue="parseProp(openedProject?.meta).iconHue"
size="small" size="small"
@ -92,7 +92,7 @@ watch(
<template #default> <template #default>
<GeneralProjectIcon :type="openedProject?.type" /> <GeneralProjectIcon :type="openedProject?.type" />
</template> </template>
</LazyGeneralBaseIconColorPicker> </GeneralBaseIconColorPicker>
<NcTooltip class="flex font-medium text-sm capitalize truncate max-w-150" show-on-truncate-only> <NcTooltip class="flex font-medium text-sm capitalize truncate max-w-150" show-on-truncate-only>
<template #title> {{ openedProject?.title }}</template> <template #title> {{ openedProject?.title }}</template>
<span class="truncate"> <span class="truncate">

4
packages/nc-gui/components/workspace/ProjectList.vue

@ -251,7 +251,7 @@ const setColor = async (hue: number, base: BaseType) => {
<template v-if="column.dataIndex === 'title'"> <template v-if="column.dataIndex === 'title'">
<div class="flex items-center nc-base-title gap-2.5 max-w-full -ml-1.5"> <div class="flex items-center nc-base-title gap-2.5 max-w-full -ml-1.5">
<div class="flex items-center gap-2 text-center"> <div class="flex items-center gap-2 text-center">
<LazyGeneralBaseIconColorPicker <GeneralBaseIconColorPicker
:key="parseProp(record.meta).iconHue" :key="parseProp(record.meta).iconHue"
:hue="parseProp(record.meta).iconHue" :hue="parseProp(record.meta).iconHue"
size="small" size="small"
@ -261,7 +261,7 @@ const setColor = async (hue: number, base: BaseType) => {
<template #default> <template #default>
<GeneralProjectIcon :type="record.type" /> <GeneralProjectIcon :type="record.type" />
</template> </template>
</LazyGeneralBaseIconColorPicker> </GeneralBaseIconColorPicker>
<!-- todo: replace with switch --> <!-- todo: replace with switch -->
</div> </div>

Loading…
Cancel
Save