From c0ad5b34f12644be48bc7b4048051195ba907e1e Mon Sep 17 00:00:00 2001 From: Muhammed Mustafa Date: Mon, 30 Oct 2023 05:26:26 +0000 Subject: [PATCH 1/6] fix: Renamed Add base to Create Base --- packages/nc-gui/components/dashboard/Sidebar/TopSection.vue | 2 +- packages/nc-gui/lang/en.json | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/nc-gui/components/dashboard/Sidebar/TopSection.vue b/packages/nc-gui/components/dashboard/Sidebar/TopSection.vue index 29939b1fbc..2b409eef86 100644 --- a/packages/nc-gui/components/dashboard/Sidebar/TopSection.vue +++ b/packages/nc-gui/components/dashboard/Sidebar/TopSection.vue @@ -75,7 +75,7 @@ const navigateToSettings = () => {
-
{{ $t('title.newProj') }}
+
{{ $t('title.createBase') }}
diff --git a/packages/nc-gui/lang/en.json b/packages/nc-gui/lang/en.json index 00d68cc1c5..d21206d79b 100644 --- a/packages/nc-gui/lang/en.json +++ b/packages/nc-gui/lang/en.json @@ -339,6 +339,7 @@ "erdView": "ERD View", "newBase": "New Data Source", "newProj": "New Base", + "createBase": "Create Base", "myProject": "My Bases", "formTitle": "Form Title", "collabView": "Collaborative View", From 3893305821e9639914df65ebf0fa7a55e8f448cd Mon Sep 17 00:00:00 2001 From: Muhammed Mustafa Date: Mon, 30 Oct 2023 05:26:27 +0000 Subject: [PATCH 2/6] fix: Added link for table section in bread crumb --- .../smartsheet/toolbar/ViewInfo.vue | 50 +++++++++++-------- packages/nc-gui/store/tables.ts | 21 ++++++++ 2 files changed, 50 insertions(+), 21 deletions(-) diff --git a/packages/nc-gui/components/smartsheet/toolbar/ViewInfo.vue b/packages/nc-gui/components/smartsheet/toolbar/ViewInfo.vue index cba6d82fc4..ba72727a89 100644 --- a/packages/nc-gui/components/smartsheet/toolbar/ViewInfo.vue +++ b/packages/nc-gui/components/smartsheet/toolbar/ViewInfo.vue @@ -6,6 +6,7 @@ const { openedViewsTab, activeView } = storeToRefs(useViewsStore()) const { base, isSharedBase } = storeToRefs(useBase()) const { activeTable } = storeToRefs(useTablesStore()) +const { tableUrl } = useTablesStore() const { isLeftSidebarOpen } = storeToRefs(useSidebarStore()) @@ -33,7 +34,7 @@ const { isLeftSidebarOpen } = storeToRefs(useSidebarStore())
- - - - {{ activeTable?.title }} - - + + + + + {{ activeTable?.title }} + + + +
/
diff --git a/packages/nc-gui/store/tables.ts b/packages/nc-gui/store/tables.ts index 23765e6a24..81b2501487 100644 --- a/packages/nc-gui/store/tables.ts +++ b/packages/nc-gui/store/tables.ts @@ -213,6 +213,26 @@ export const useTablesStore = defineStore('tablesStore', () => { } } + const tableUrl = ({ table, completeUrl }: { table: TableType; completeUrl: boolean }) => { + const base = basesStore.bases.get(table.base_id!) + if (!base) return + + const nuxtPageName = 'index-typeOrId-baseId-index-index-viewId-viewTitle' + + const url = router.resolve({ + name: nuxtPageName, + params: { + typeOrId: workspaceStore.activeWorkspaceId, + baseId: base.id, + viewId: table.id, + }, + }) + + if (completeUrl) return `${window.location.origin}${url.href}` + + return url.href + } + return { baseTables, loadProjectTables, @@ -223,6 +243,7 @@ export const useTablesStore = defineStore('tablesStore', () => { updateTable, activeTableId, navigateToTable, + tableUrl, } }) From b956df63f8f216164d82a0fcdf18efbbbe19395c Mon Sep 17 00:00:00 2001 From: Muhammed Mustafa Date: Mon, 30 Oct 2023 05:26:27 +0000 Subject: [PATCH 3/6] fix: Aligned breadcrumb in project and table page --- packages/nc-gui/components/project/View.vue | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/packages/nc-gui/components/project/View.vue b/packages/nc-gui/components/project/View.vue index 00bbdd3079..2f84304a2c 100644 --- a/packages/nc-gui/components/project/View.vue +++ b/packages/nc-gui/components/project/View.vue @@ -73,9 +73,11 @@ watch( >
- -
- {{ openedProject?.title }} +
+ +
+ {{ openedProject?.title }} +
From 1e3f5811d66bf7cf79075e79ae887fd931f0c8bd Mon Sep 17 00:00:00 2001 From: Muhammed Mustafa Date: Mon, 30 Oct 2023 05:26:27 +0000 Subject: [PATCH 4/6] fix: Made project breadcrumb clickable and table node clickable only on default view case --- .../smartsheet/toolbar/ViewInfo.vue | 71 ++++++++++++------- packages/nc-gui/store/tables.ts | 2 +- 2 files changed, 46 insertions(+), 27 deletions(-) diff --git a/packages/nc-gui/components/smartsheet/toolbar/ViewInfo.vue b/packages/nc-gui/components/smartsheet/toolbar/ViewInfo.vue index ba72727a89..9f89244739 100644 --- a/packages/nc-gui/components/smartsheet/toolbar/ViewInfo.vue +++ b/packages/nc-gui/components/smartsheet/toolbar/ViewInfo.vue @@ -4,11 +4,21 @@ const { isMobileMode } = useGlobal() const { openedViewsTab, activeView } = storeToRefs(useViewsStore()) const { base, isSharedBase } = storeToRefs(useBase()) +const { baseUrl } = useBase() const { activeTable } = storeToRefs(useTablesStore()) const { tableUrl } = useTablesStore() const { isLeftSidebarOpen } = storeToRefs(useSidebarStore()) + +const openedBaseUrl = computed(() => { + if (!base.value) return '' + + return `${window.location.origin}/#${baseUrl({ + id: base.value.id!, + type: 'database', + })}` +})