Browse Source

fix: Improved View info UI

pull/6539/head
Muhammed Mustafa 1 year ago
parent
commit
f313687bbe
  1. 21
      packages/nc-gui/components/smartsheet/toolbar/ViewInfo.vue
  2. 9
      packages/nc-gui/windi.config.ts

21
packages/nc-gui/components/smartsheet/toolbar/ViewInfo.vue

@ -23,7 +23,7 @@ const { isLeftSidebarOpen } = storeToRefs(useSidebarStore())
}" }"
> >
<template v-if="!isMobileMode"> <template v-if="!isMobileMode">
<NcTooltip class="ml-0.75"> <NcTooltip class="ml-0.75 max-w-1/4">
<template #title> <template #title>
{{ project?.title }} {{ project?.title }}
</template> </template>
@ -32,10 +32,14 @@ const { isLeftSidebarOpen } = storeToRefs(useSidebarStore())
:meta="{ type: project?.type }" :meta="{ type: project?.type }"
class="!grayscale" class="!grayscale"
:style="{ :style="{
filter: 'grayscale(100%)', filter: 'grayscale(100%) brightness(115%)',
}" }"
/> />
<div class="text-gray-500">..</div> <div class="hidden !2xl:(flex truncate ml-1)">
<span class="truncate text-gray-700">
{{ project?.title }}
</span>
</div>
</div> </div>
</NcTooltip> </NcTooltip>
<div class="px-1.5 text-gray-500">/</div> <div class="px-1.5 text-gray-500">/</div>
@ -55,16 +59,15 @@ const { isLeftSidebarOpen } = storeToRefs(useSidebarStore())
<NcTooltip <NcTooltip
class="truncate nc-active-table-title" class="truncate nc-active-table-title"
:class="{ :class="{
'max-w-1/2': !isMobileMode && activeView?.is_default, 'max-w-1/2': isMobileMode || activeView?.is_default,
'max-w-20/100': !isMobileMode && !activeView?.is_default, 'max-w-20/100': !isMobileMode && !activeView?.is_default,
'max-w-1/4': isMobileMode,
}" }"
> >
<template #title> <template #title>
{{ activeTable?.title }} {{ activeTable?.title }}
</template> </template>
<span <span
class="text-ellipsis overflow-hidden text-gray-500" class="text-ellipsis overflow-hidden text-gray-500 xs:ml-2"
:class="{ :class="{
'text-gray-500': !isMobileMode, 'text-gray-500': !isMobileMode,
'text-gray-700 font-medium': isMobileMode || activeView?.is_default, 'text-gray-700 font-medium': isMobileMode || activeView?.is_default,
@ -83,18 +86,18 @@ const { isLeftSidebarOpen } = storeToRefs(useSidebarStore())
<div v-if="!isMobileMode" class="px-1 text-gray-500">/</div> <div v-if="!isMobileMode" class="px-1 text-gray-500">/</div>
<template v-if="!(isMobileMode && activeView?.is_default)"> <template v-if="!(isMobileMode && activeView?.is_default)">
<!-- <LazyGeneralEmojiPicker :emoji="activeView?.meta?.icon" readonly size="xsmall"> <LazyGeneralEmojiPicker v-if="isMobileMode" :emoji="activeView?.meta?.icon" readonly size="xsmall">
<template #default> <template #default>
<GeneralViewIcon :meta="{ type: activeView?.type }" class="min-w-4.5 text-lg flex" /> <GeneralViewIcon :meta="{ type: activeView?.type }" class="min-w-4.5 text-lg flex" />
</template> </template>
</LazyGeneralEmojiPicker> --> </LazyGeneralEmojiPicker>
<NcTooltip <NcTooltip
class="truncate nc-active-view-title" class="truncate nc-active-view-title"
:class="{ :class="{
'max-w-2/5': !isMobileMode && activeView?.is_default, 'max-w-2/5': !isMobileMode && activeView?.is_default,
'max-w-3/5': !isMobileMode && !activeView?.is_default, 'max-w-3/5': !isMobileMode && !activeView?.is_default,
'max-w-1/4': isMobileMode, 'max-w-1/2': isMobileMode,
}" }"
> >
<template #title> <template #title>

9
packages/nc-gui/windi.config.ts

@ -56,15 +56,18 @@ export default defineConfig({
}, },
extend: { extend: {
screens: { screens: {
xs: { 'xs': {
max: '480px', max: '480px',
}, },
sm: { 'sm': {
min: '480px', min: '480px',
}, },
md: { 'md': {
min: '820px', min: '820px',
}, },
'2xl': {
min: '1780px',
},
}, },
textColor: { textColor: {
primary: 'rgba(var(--color-primary), var(--tw-text-opacity))', primary: 'rgba(var(--color-primary), var(--tw-text-opacity))',

Loading…
Cancel
Save