|
|
@ -4,10 +4,21 @@ const { isMobileMode } = useGlobal() |
|
|
|
const { openedViewsTab, activeView } = storeToRefs(useViewsStore()) |
|
|
|
const { openedViewsTab, activeView } = storeToRefs(useViewsStore()) |
|
|
|
|
|
|
|
|
|
|
|
const { base, isSharedBase } = storeToRefs(useBase()) |
|
|
|
const { base, isSharedBase } = storeToRefs(useBase()) |
|
|
|
|
|
|
|
const { baseUrl } = useBase() |
|
|
|
|
|
|
|
|
|
|
|
const { activeTable } = storeToRefs(useTablesStore()) |
|
|
|
const { activeTable } = storeToRefs(useTablesStore()) |
|
|
|
|
|
|
|
const { tableUrl } = useTablesStore() |
|
|
|
|
|
|
|
|
|
|
|
const { isLeftSidebarOpen } = storeToRefs(useSidebarStore()) |
|
|
|
const { isLeftSidebarOpen } = storeToRefs(useSidebarStore()) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const openedBaseUrl = computed(() => { |
|
|
|
|
|
|
|
if (!base.value) return '' |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return `${window.location.origin}/#${baseUrl({ |
|
|
|
|
|
|
|
id: base.value.id!, |
|
|
|
|
|
|
|
type: 'database', |
|
|
|
|
|
|
|
})}` |
|
|
|
|
|
|
|
}) |
|
|
|
</script> |
|
|
|
</script> |
|
|
|
|
|
|
|
|
|
|
|
<template> |
|
|
|
<template> |
|
|
@ -21,19 +32,23 @@ const { isLeftSidebarOpen } = storeToRefs(useSidebarStore()) |
|
|
|
}" |
|
|
|
}" |
|
|
|
> |
|
|
|
> |
|
|
|
<template v-if="!isMobileMode"> |
|
|
|
<template v-if="!isMobileMode"> |
|
|
|
<NcTooltip |
|
|
|
<NuxtLink |
|
|
|
class="ml-0.75 max-w-1/4 max-w-" |
|
|
|
class="!hover:(text-black underline-gray-600) !underline-transparent ml-0.75 max-w-1/4" |
|
|
|
:class="{ |
|
|
|
:class="{ |
|
|
|
'!max-w-none': isSharedBase && !isMobileMode, |
|
|
|
'!max-w-none': isSharedBase && !isMobileMode, |
|
|
|
|
|
|
|
'!text-gray-500': activeTable, |
|
|
|
|
|
|
|
'!text-gray-700': !activeTable, |
|
|
|
}" |
|
|
|
}" |
|
|
|
|
|
|
|
:to="openedBaseUrl" |
|
|
|
> |
|
|
|
> |
|
|
|
|
|
|
|
<NcTooltip class="!text-inherit"> |
|
|
|
<template #title> |
|
|
|
<template #title> |
|
|
|
{{ base?.title }} |
|
|
|
{{ base?.title }} |
|
|
|
</template> |
|
|
|
</template> |
|
|
|
<div class="flex flex-row items-center gap-x-1.5"> |
|
|
|
<div class="flex flex-row items-center gap-x-1.5"> |
|
|
|
<GeneralProjectIcon |
|
|
|
<GeneralProjectIcon |
|
|
|
:meta="{ type: base?.type }" |
|
|
|
:meta="{ type: base?.type }" |
|
|
|
class="!grayscale" |
|
|
|
class="!grayscale min-w-4" |
|
|
|
:style="{ |
|
|
|
:style="{ |
|
|
|
filter: 'grayscale(100%) brightness(115%)', |
|
|
|
filter: 'grayscale(100%) brightness(115%)', |
|
|
|
}" |
|
|
|
}" |
|
|
@ -44,12 +59,13 @@ const { isLeftSidebarOpen } = storeToRefs(useSidebarStore()) |
|
|
|
'!flex': isSharedBase && !isMobileMode, |
|
|
|
'!flex': isSharedBase && !isMobileMode, |
|
|
|
}" |
|
|
|
}" |
|
|
|
> |
|
|
|
> |
|
|
|
<span class="truncate text-gray-700"> |
|
|
|
<span class="truncate !text-inherit"> |
|
|
|
{{ base?.title }} |
|
|
|
{{ base?.title }} |
|
|
|
</span> |
|
|
|
</span> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</NcTooltip> |
|
|
|
</NcTooltip> |
|
|
|
|
|
|
|
</NuxtLink> |
|
|
|
<div class="px-1.5 text-gray-500">/</div> |
|
|
|
<div class="px-1.5 text-gray-500">/</div> |
|
|
|
</template> |
|
|
|
</template> |
|
|
|
<template v-if="!(isMobileMode && !activeView?.is_default)"> |
|
|
|
<template v-if="!(isMobileMode && !activeView?.is_default)"> |
|
|
@ -64,14 +80,15 @@ const { isLeftSidebarOpen } = storeToRefs(useSidebarStore()) |
|
|
|
/> |
|
|
|
/> |
|
|
|
</template> |
|
|
|
</template> |
|
|
|
</LazyGeneralEmojiPicker> |
|
|
|
</LazyGeneralEmojiPicker> |
|
|
|
<NcTooltip |
|
|
|
<div |
|
|
|
class="truncate nc-active-table-title" |
|
|
|
v-if="activeTable" |
|
|
|
:class="{ |
|
|
|
:class="{ |
|
|
|
'max-w-1/2': isMobileMode || activeView?.is_default, |
|
|
|
'max-w-1/2': isMobileMode || activeView?.is_default, |
|
|
|
'max-w-20/100': !isSharedBase && !isMobileMode && !activeView?.is_default, |
|
|
|
'max-w-20/100': !isSharedBase && !isMobileMode && !activeView?.is_default, |
|
|
|
'max-w-none': isSharedBase && !isMobileMode, |
|
|
|
'max-w-none': isSharedBase && !isMobileMode, |
|
|
|
}" |
|
|
|
}" |
|
|
|
> |
|
|
|
> |
|
|
|
|
|
|
|
<NcTooltip class="truncate nc-active-table-title max-w-full"> |
|
|
|
<template #title> |
|
|
|
<template #title> |
|
|
|
{{ activeTable?.title }} |
|
|
|
{{ activeTable?.title }} |
|
|
|
</template> |
|
|
|
</template> |
|
|
@ -79,7 +96,7 @@ const { isLeftSidebarOpen } = storeToRefs(useSidebarStore()) |
|
|
|
class="text-ellipsis overflow-hidden text-gray-500 xs:ml-2" |
|
|
|
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-800 font-medium': isMobileMode || activeView?.is_default, |
|
|
|
}" |
|
|
|
}" |
|
|
|
:style="{ |
|
|
|
:style="{ |
|
|
|
wordBreak: 'keep-all', |
|
|
|
wordBreak: 'keep-all', |
|
|
@ -87,9 +104,19 @@ const { isLeftSidebarOpen } = storeToRefs(useSidebarStore()) |
|
|
|
display: 'inline', |
|
|
|
display: 'inline', |
|
|
|
}" |
|
|
|
}" |
|
|
|
> |
|
|
|
> |
|
|
|
|
|
|
|
<template v-if="activeView?.is_default"> |
|
|
|
{{ activeTable?.title }} |
|
|
|
{{ activeTable?.title }} |
|
|
|
|
|
|
|
</template> |
|
|
|
|
|
|
|
<NuxtLink |
|
|
|
|
|
|
|
v-else |
|
|
|
|
|
|
|
class="!text-inherit !underline-transparent !hover:(text-black underline-gray-600)" |
|
|
|
|
|
|
|
:to="tableUrl({ table: activeTable, completeUrl: true })" |
|
|
|
|
|
|
|
> |
|
|
|
|
|
|
|
{{ activeTable?.title }} |
|
|
|
|
|
|
|
</NuxtLink> |
|
|
|
</span> |
|
|
|
</span> |
|
|
|
</NcTooltip> |
|
|
|
</NcTooltip> |
|
|
|
|
|
|
|
</div> |
|
|
|
</template> |
|
|
|
</template> |
|
|
|
|
|
|
|
|
|
|
|
<div v-if="!isMobileMode" class="px-1 text-gray-500">/</div> |
|
|
|
<div v-if="!isMobileMode" class="px-1 text-gray-500">/</div> |
|
|
|