Browse Source

mobile optimisations - work on merging right and left sidebar (WIP)

pull/4898/head
Daniel Spaude 2 years ago
parent
commit
51680382a0
No known key found for this signature in database
GPG Key ID: 654A3D1FA4F35FFE
  1. 16
      packages/nc-gui/components/smartsheet/sidebar/mobile.vue
  2. 18
      packages/nc-gui/pages/[projectType]/[projectId]/index.vue

16
packages/nc-gui/components/smartsheet/sidebar/mobile.vue

@ -135,20 +135,12 @@ function onOpenModal({
close(1000) close(1000)
} }
} }
onMounted(async () => {
await loadViews()
})
</script> </script>
<template> <template>
<!-- <div> --> <div>
<!-- MOBILE --> Mobile Views Menu <br />
<!-- <br /> views: {{ views.length }}
META: {{ JSON.stringify(meta) }} -->
<!-- <br />
VIEWS: {{ JSON.stringify(views.length) }}
<br /> -->
<a-layout-sider <a-layout-sider
ref="sidebar" ref="sidebar"
:collapsed="sidebarCollapsed" :collapsed="sidebarCollapsed"
@ -178,7 +170,7 @@ onMounted(async () => {
</template> </template>
</div> </div>
</a-layout-sider> </a-layout-sider>
<!-- </div> --> </div>
</template> </template>
<style scoped> <style scoped>

18
packages/nc-gui/pages/[projectType]/[projectId]/index.vue

@ -29,6 +29,7 @@ import {
useTheme, useTheme,
useUIPermission, useUIPermission,
} from '#imports' } from '#imports'
import { TableType } from 'nocodb-sdk'
definePageMeta({ definePageMeta({
hideHeader: true, hideHeader: true,
@ -65,6 +66,19 @@ const dataSourcesState = ref<string>('')
const dropdownOpen = ref(false) const dropdownOpen = ref(false)
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<TableType | undefined>(() => activeTab.value && metas.value[activeTab.value.id!])
provide(MetaInj, meta)
/** Sidebar ref */ /** Sidebar ref */
const sidebar = ref() const sidebar = ref()
@ -585,6 +599,10 @@ useEventListener(document, 'keydown', async (e: KeyboardEvent) => {
</div> </div>
</div> </div>
<!-- v-show="isMobileRightSidebarOpen" -->
<!-- meta: {{ JSON.stringify(meta) }} <br />
isMobileMode: {{ JSON.stringify(isMobileMode) }} <br /> -->
<SmartsheetSidebarMobile v-if="meta && isMobileMode" class="nc-left-sidebar-mobile" />
<LazyDashboardTreeView @create-base-dlg="toggleDialog(true, 'dataSources')" /> <LazyDashboardTreeView @create-base-dlg="toggleDialog(true, 'dataSources')" />
</a-layout-sider> </a-layout-sider>
</template> </template>

Loading…
Cancel
Save