Browse Source

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

pull/7807/head
Ramesh Mane 8 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
$e('c:project:delete')
}
watchEffect(() => {
console.log('base', base.value)
})
</script>
<template>
@ -427,7 +423,7 @@ watchEffect(() => {
<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" />
<LazyGeneralBaseColorPicker
<LazyGeneralBaseIconColorPicker
v-else
:key="parseProp(base.meta).iconHue"
:hue="parseProp(base.meta).iconHue"
@ -438,7 +434,7 @@ watchEffect(() => {
<template #default>
<GeneralProjectIcon :type="base?.type" />
</template>
</LazyGeneralBaseColorPicker>
</LazyGeneralBaseIconColorPicker>
</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">
<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">
<LazyGeneralBaseColorPicker
<LazyGeneralBaseIconColorPicker
:key="parseProp(base.meta).iconHue"
:hue="parseProp(base.meta).iconHue"
size="small"
class="!w-auto !h-auto"
iconClass="nc-view-icon w-6 h-6"
icon-class="nc-view-icon w-6 h-6"
readonly
>
<template #default>
<GeneralProjectIcon :type="base.type" class="nc-view-icon w-6 h-6" />
</template>
</LazyGeneralBaseColorPicker>
</LazyGeneralBaseIconColorPicker>
<div
class="capitalize text-ellipsis overflow-hidden select-none w-full pl-1.75"
: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 class="share-base">
<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"
:hue="parseProp(base.meta).iconHue"
size="small"
class="!w-auto !h-auto"
iconClass="nc-view-icon group-hover"
icon-class="nc-view-icon group-hover"
readonly
>
<template #default>
<GeneralProjectIcon :type="base.type" class="nc-view-icon group-hover" />
</template>
</LazyGeneralBaseColorPicker>
</LazyGeneralBaseIconColorPicker>
<div>{{ $t('activity.shareBase.label') }}</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">
<GeneralOpenLeftSidebarBtn />
<div class="flex flex-row items-center h-full gap-x-2.5">
<LazyGeneralBaseColorPicker
<LazyGeneralBaseIconColorPicker
:key="parseProp(openedProject?.meta).iconHue"
:hue="parseProp(openedProject?.meta).iconHue"
size="small"
@ -92,7 +92,7 @@ watch(
<template #default>
<GeneralProjectIcon :type="openedProject?.type" />
</template>
</LazyGeneralBaseColorPicker>
</LazyGeneralBaseIconColorPicker>
<NcTooltip class="flex font-medium text-sm capitalize truncate max-w-150" show-on-truncate-only>
<template #title> {{ openedProject?.title }}</template>
<span class="truncate">

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

@ -10,6 +10,7 @@ import {
isEeUI,
message,
navigateTo,
parseProp,
ref,
storeToRefs,
useBases,
@ -17,7 +18,6 @@ import {
useNuxtApp,
useRoles,
useWorkspace,
parseProp,
} from '#imports'
const workspaceStore = useWorkspace()
@ -251,7 +251,7 @@ const setColor = async (hue: number, base: BaseType) => {
<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 gap-2 text-center">
<LazyGeneralBaseColorPicker
<LazyGeneralBaseIconColorPicker
:key="parseProp(record.meta).iconHue"
:hue="parseProp(record.meta).iconHue"
size="small"
@ -261,7 +261,7 @@ const setColor = async (hue: number, base: BaseType) => {
<template #default>
<GeneralProjectIcon :type="record.type" />
</template>
</LazyGeneralBaseColorPicker>
</LazyGeneralBaseIconColorPicker>
<!-- todo: replace with switch -->
</div>

Loading…
Cancel
Save