diff --git a/packages/nc-gui/components/smartsheet/sidebar/mobile.vue b/packages/nc-gui/components/smartsheet/sidebar/mobile.vue index 22b3c99a4d..a525d74c0b 100644 --- a/packages/nc-gui/components/smartsheet/sidebar/mobile.vue +++ b/packages/nc-gui/components/smartsheet/sidebar/mobile.vue @@ -37,8 +37,6 @@ const setLastOpenedViewId = (viewId?: string) => { const { isUIAllowed } = useUIPermission() -const { isMobileMode } = useGlobal() - const router = useRouter() const route = useRoute() @@ -51,10 +49,10 @@ const { $e } = useNuxtApp() // FOO. // const sidebarCollapsed = computed(() => !isOpen.value || isMobileMode.value) -const sidebarCollapsed = false +// const sidebarCollapsed = false /** Sidebar ref */ -const sidebar = ref() +// const sidebar = ref() /** Watch route param and change active view based on `viewTitle` */ watch( @@ -155,30 +153,27 @@ function onOpenModal({ class="nc-view-sidebar relative shadow h-full w-full !flex-1 !min-w-0 !max-w-[150px] !w-[150px] lg:(!max-w-[250px] !w-[250px])" theme="light" > --> - -
- - -
- -
- + +
+ +
+ - - {{ meta?.title }} - + {{ meta?.title }} + - -
+ -
- -
- -
-
+
+ +
+ +
+
- + - +
diff --git a/packages/nc-gui/pages/[projectType]/[projectId]/index.vue b/packages/nc-gui/pages/[projectType]/[projectId]/index.vue index c6315348fc..8ec9bbff58 100644 --- a/packages/nc-gui/pages/[projectType]/[projectId]/index.vue +++ b/packages/nc-gui/pages/[projectType]/[projectId]/index.vue @@ -66,11 +66,15 @@ const dataSourcesState = ref('') const dropdownOpen = ref(false) +const activeView = ref() + const { activeTab } = useTabs() const { metas } = useMetas() // const { tables } = useProject() // const activeTable = computed(() => ([TabType.TABLE, TabType.VIEW].includes(activeTab.value?.type) ? activeTab.value.id : null)) const meta = computed(() => activeTab.value && metas.value[activeTab.value.id!]) + +provide(ActiveViewInj, activeView) provide(MetaInj, meta) const showViewsMobileSidebar = ref(false) @@ -613,7 +617,6 @@ useEventListener(document, 'keydown', async (e: KeyboardEvent) => {