From ff58a5823e5d588fc476a4fe106e5f3687028985 Mon Sep 17 00:00:00 2001 From: Daniel Spaude Date: Mon, 2 Jan 2023 15:04:55 +0100 Subject: [PATCH] mobile optimisations - put views into the tree view on left sidebar (WIP) --- .../nc-gui/components/dashboard/TreeView.vue | 20 +-- .../dashboard/TreeViewTableEntry.vue | 163 ++++++++++-------- 2 files changed, 103 insertions(+), 80 deletions(-) diff --git a/packages/nc-gui/components/dashboard/TreeView.vue b/packages/nc-gui/components/dashboard/TreeView.vue index b360d55e07..383d5bd935 100644 --- a/packages/nc-gui/components/dashboard/TreeView.vue +++ b/packages/nc-gui/components/dashboard/TreeView.vue @@ -579,22 +579,20 @@ const setIcon = async (icon: string, table: TableType) => { :key="`sortable-${bases[0].id}-${bases[0].id && bases[0].id in keys ? keys[bases[0].id] : '0'}`" :nc-base="bases[0].id" > -
- -
+ :set-menu-context="setMenuContext" + :icon="icon" + :set-icon="setIcon" + :active-table="activeTable" + :open-rename-table-dialog="openRenameTableDialog" + /> diff --git a/packages/nc-gui/components/dashboard/TreeViewTableEntry.vue b/packages/nc-gui/components/dashboard/TreeViewTableEntry.vue index f7ea9dbbd2..5145a86502 100644 --- a/packages/nc-gui/components/dashboard/TreeViewTableEntry.vue +++ b/packages/nc-gui/components/dashboard/TreeViewTableEntry.vue @@ -14,87 +14,112 @@ const props = defineProps<{ openRenameTableDialog: (table: TableType, baseId?: string | undefined, rightClick?: boolean) => void }>() +const table = useVModel(props, 'modelValue') // , emits) + const { deleteTable } = useTable() +// const { views, loadViews, isLoading } = useViews(table) +const { views } = useViews(table) -// const emits = defineEmits(['update:modelValue']) +// onMounted(async () => { +// await loadViews() +// loadViews() +// }) -const table = useVModel(props, 'modelValue') // , emits) +// const emits = defineEmits(['update:modelValue']) // const { bases, isSharedBase } = useProject() const { isUIAllowed } = useUIPermission()