Browse Source

fix: Fixed View style for mobile view

pull/6498/head
Muhammed Mustafa 1 year ago
parent
commit
12419d7a0d
  1. 6
      packages/nc-gui/components/dashboard/Sidebar.vue
  2. 2
      packages/nc-gui/components/dashboard/Sidebar/TopSection.vue

6
packages/nc-gui/components/dashboard/Sidebar.vue

@ -5,11 +5,15 @@ const { isWorkspaceLoading } = storeToRefs(workspaceStore)
const { isSharedBase } = storeToRefs(useProject()) const { isSharedBase } = storeToRefs(useProject())
const { isMobileMode } = useGlobal()
const treeViewDom = ref<HTMLElement>() const treeViewDom = ref<HTMLElement>()
const isTreeViewOnScrollTop = ref(false) const isTreeViewOnScrollTop = ref(false)
const checkScrollTopMoreThanZero = () => { const checkScrollTopMoreThanZero = () => {
if (isMobileMode.value) return
if (treeViewDom.value) { if (treeViewDom.value) {
if (treeViewDom.value.scrollTop > 0) { if (treeViewDom.value.scrollTop > 0) {
isTreeViewOnScrollTop.value = true isTreeViewOnScrollTop.value = true
@ -43,7 +47,7 @@ onUnmounted(() => {
</div> </div>
<div <div
ref="treeViewDom" ref="treeViewDom"
class="flex flex-col nc-scrollbar-dark-md flex-grow" class="flex flex-col nc-scrollbar-dark-md flex-grow xs:(border-transparent pt-2)"
:class="{ :class="{
'border-t-1': !isSharedBase, 'border-t-1': !isSharedBase,
'border-transparent': !isTreeViewOnScrollTop, 'border-transparent': !isTreeViewOnScrollTop,

2
packages/nc-gui/components/dashboard/Sidebar/TopSection.vue

@ -43,7 +43,7 @@ const navigateToSettings = () => {
</div> </div>
</template> </template>
<template v-else-if="!isSharedBase"> <template v-else-if="!isSharedBase">
<div class="flex flex-col p-1 gap-y-0.5 mt-0.25 mb-0.5 truncate"> <div class="xs:hidden flex flex-col p-1 gap-y-0.5 mt-0.25 mb-0.5 truncate">
<DashboardSidebarTopSectionHeader /> <DashboardSidebarTopSectionHeader />
<NcButton <NcButton

Loading…
Cancel
Save