多维表格
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

67 lines
2.3 KiB

<script setup lang="ts">
const workspaceStore = useWorkspace()
const { isLeftSidebarOpen } = storeToRefs(useSidebarStore())
const { activeWorkspace, isWorkspaceLoading } = storeToRefs(workspaceStore)
const { activeViewTitleOrId } = storeToRefs(useViewsStore())
const { activeTableId } = storeToRefs(useTablesStore())
const { isMobileMode } = useGlobal()
const showSidebarBtn = computed(() => !(isMobileMode.value && !activeViewTitleOrId.value && !activeTableId.value))
</script>
<template>
<div
class="flex items-center nc-sidebar-header w-full border-b-1 border-gray-200 group md:(px-2 py-1.2) xs:(px-1 py-1)"
:data-workspace-title="activeWorkspace?.title"
style="height: var(--topbar-height)"
>
<div v-if="!isWorkspaceLoading" class="flex flex-row items-center w-full">
<WorkspaceMenu />
<div class="flex flex-grow min-w-1"></div>
<NcTooltip
class="flex"
:class="{
'!opacity-100': !isLeftSidebarOpen,
}"
placement="bottom"
hide-on-click
>
<template #title>
{{ isLeftSidebarOpen ? `${$t('title.hideSidebar')}` : `${$t('title.showSidebar')}` }}
</template>
<NcButton
v-if="showSidebarBtn"
v-e="['c:leftSidebar:hideToggle']"
:type="isMobileMode ? 'secondary' : 'text'"
:size="isMobileMode ? 'medium' : 'small'"
class="nc-sidebar-left-toggle-icon !text-gray-700 !hover:text-gray-800 !xs:(h-10.5 max-h-10.5 max-w-10.5) !md:(hover:bg-gray-200)"
@click="isLeftSidebarOpen = !isLeftSidebarOpen"
>
<div class="flex items-center text-inherit">
<GeneralIcon v-if="isMobileMode" icon="close" />
<GeneralIcon
v-else
icon="doubleLeftArrow"
Nc Fix: UI improvements - left sidebar (#8244) * fix(nc-gui); update toolbar menu text grom GroupBy to Group * fix(nc-gui): move sidebar base, table expand icon to the right side * fix(nc-gui): sidebar base, table, view menu options padding issue * fix(nc-gui): add background color for row on hover in grid view * fix(nc-gui): reduce width of index column * fix(nc-gui): on hover grid row bg opacity issue * fix(nc-gui): reduce font size and grid cell height * fix(nc-gui): sidebar view menu alignment issue on mobile screen * fix(nc-gui): reduce font size * fix(nc-gui): set column default width to 180px * fix(nc-gui): keep only sidebar changes & revert all other changes * fix(nc-gui): change table icon * fix(nc-gui): trim base, table, view title while saving it * fix(nc-gui): increate left sidebar max width * fix(nc-gui): show truncated base/table/view name until standard end * fix(nc-gui): oss sidebar base menu options alignment issue * fix(nc-gui): use valid classname * fix(nc-gui): sidebar external db source menu ui fixes * fix(nc-gui): small changes * chore(nc-gui): lint * fix(nc-gui): pw test fail issue * fix(nc-gui): trim title while creating base, table, view * fix(nc-gui): some of the sidebar pw test fail issues * fix(test): sidebar test fail issue * fix(test): projectCollaboration test fail issue * fix(nc-gui): change font size of view menu option view mode chip text * fix(nc-gui): grayed out create view dropdown plus icon color * fix(nc-gui): grayed out table icon and reduce width of default view context menu * fix(nc-gui): remove copyright text from user menu * fix(nc-gui): chevron icon and show/hide sidebar icon should be gray in color
7 months ago
class="duration-150 transition-all !text-lg -mt-0.5 !text-gray-500/75"
:class="{
'transform rotate-180': !isLeftSidebarOpen,
}"
/>
</div>
</NcButton>
</NcTooltip>
</div>
<div v-else class="flex flex-row items-center w-full mt-0.25 ml-2.5 gap-x-3">
<a-skeleton-input :active="true" class="!w-6 !h-6 !rounded overflow-hidden" />
<a-skeleton-input :active="true" class="!w-40 !h-6 !rounded overflow-hidden" />
</div>
</div>
</template>