Browse Source

fix(nc-gui): rename baseColorPicker component name to baseIconColorPicker

pull/7807/head
Ramesh Mane 9 months ago
parent
commit
e3308123f7
  1. 8
      packages/nc-gui/components/dashboard/TreeView/ProjectNode.vue
  2. 6
      packages/nc-gui/components/dlg/ProjectDelete.vue
  3. 6
      packages/nc-gui/components/dlg/share-and-collaborate/View.vue
  4. 0
      packages/nc-gui/components/general/BaseIconColorPicker.vue
  5. 4
      packages/nc-gui/components/project/View.vue
  6. 6
      packages/nc-gui/components/workspace/ProjectList.vue

8
packages/nc-gui/components/dashboard/TreeView/ProjectNode.vue

@ -385,10 +385,6 @@ const projectDelete = () => {
isProjectDeleteDialogVisible.value = true isProjectDeleteDialogVisible.value = true
$e('c:project:delete') $e('c:project:delete')
} }
watchEffect(() => {
console.log('base', base.value)
})
</script> </script>
<template> <template>
@ -427,7 +423,7 @@ watchEffect(() => {
<div v-e="['c:base:emojiSelect']" class="flex items-center select-none w-6 h-full"> <div v-e="['c:base:emojiSelect']" class="flex items-center select-none w-6 h-full">
<a-spin v-if="base.isLoading" class="!ml-1.25 !flex !flex-row !items-center !my-0.5 w-8" :indicator="indicator" /> <a-spin v-if="base.isLoading" class="!ml-1.25 !flex !flex-row !items-center !my-0.5 w-8" :indicator="indicator" />
<LazyGeneralBaseColorPicker <LazyGeneralBaseIconColorPicker
v-else v-else
:key="parseProp(base.meta).iconHue" :key="parseProp(base.meta).iconHue"
:hue="parseProp(base.meta).iconHue" :hue="parseProp(base.meta).iconHue"
@ -438,7 +434,7 @@ watchEffect(() => {
<template #default> <template #default>
<GeneralProjectIcon :type="base?.type" /> <GeneralProjectIcon :type="base?.type" />
</template> </template>
</LazyGeneralBaseColorPicker> </LazyGeneralBaseIconColorPicker>
</div> </div>
</div> </div>

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

@ -52,18 +52,18 @@ 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">
<LazyGeneralBaseColorPicker <LazyGeneralBaseIconColorPicker
:key="parseProp(base.meta).iconHue" :key="parseProp(base.meta).iconHue"
:hue="parseProp(base.meta).iconHue" :hue="parseProp(base.meta).iconHue"
size="small" size="small"
class="!w-auto !h-auto" class="!w-auto !h-auto"
iconClass="nc-view-icon w-6 h-6" icon-class="nc-view-icon w-6 h-6"
readonly readonly
> >
<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>
</LazyGeneralBaseColorPicker> </LazyGeneralBaseIconColorPicker>
<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' }"

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

@ -154,18 +154,18 @@ 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">
<LazyGeneralBaseColorPicker <LazyGeneralBaseIconColorPicker
:key="parseProp(base.meta).iconHue" :key="parseProp(base.meta).iconHue"
:hue="parseProp(base.meta).iconHue" :hue="parseProp(base.meta).iconHue"
size="small" size="small"
class="!w-auto !h-auto" class="!w-auto !h-auto"
iconClass="nc-view-icon group-hover" icon-class="nc-view-icon group-hover"
readonly readonly
> >
<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>
</LazyGeneralBaseColorPicker> </LazyGeneralBaseIconColorPicker>
<div>{{ $t('activity.shareBase.label') }}</div> <div>{{ $t('activity.shareBase.label') }}</div>
<div <div

0
packages/nc-gui/components/general/BaseColorPicker.vue → packages/nc-gui/components/general/BaseIconColorPicker.vue

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">
<LazyGeneralBaseColorPicker <LazyGeneralBaseIconColorPicker
: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>
</LazyGeneralBaseColorPicker> </LazyGeneralBaseIconColorPicker>
<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">

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

@ -10,6 +10,7 @@ import {
isEeUI, isEeUI,
message, message,
navigateTo, navigateTo,
parseProp,
ref, ref,
storeToRefs, storeToRefs,
useBases, useBases,
@ -17,7 +18,6 @@ import {
useNuxtApp, useNuxtApp,
useRoles, useRoles,
useWorkspace, useWorkspace,
parseProp,
} from '#imports' } from '#imports'
const workspaceStore = useWorkspace() const workspaceStore = useWorkspace()
@ -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">
<LazyGeneralBaseColorPicker <LazyGeneralBaseIconColorPicker
: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>
</LazyGeneralBaseColorPicker> </LazyGeneralBaseIconColorPicker>
<!-- todo: replace with switch --> <!-- todo: replace with switch -->
</div> </div>

Loading…
Cancel
Save