Browse Source

feat(nc-gui): open base/table/view in new tab on pressing cltr & cliking on then

nc-feat/open-base-table-view-in-new-tab
Ramesh Mane 10 months ago
parent
commit
16ab2b6a31
  1. 2
      packages/nc-gui/components/dashboard/TreeView/ProjectNode.vue
  2. 2
      packages/nc-gui/components/dashboard/TreeView/TableNode.vue
  3. 2
      packages/nc-gui/composables/useTableNew.ts
  4. 13
      packages/nc-gui/store/views.ts

2
packages/nc-gui/components/dashboard/TreeView/ProjectNode.vue

@ -34,6 +34,8 @@ import {
useTablesStore,
useTabs,
useToggle,
useMagicKeys,
navigateToBlankTargetOpenOption,
} from '#imports'
import type { NcProject } from '#imports'

2
packages/nc-gui/components/dashboard/TreeView/TableNode.vue

@ -4,7 +4,7 @@ import { toRef } from '@vue/reactivity'
import { message } from 'ant-design-vue'
import { storeToRefs } from 'pinia'
import { ProjectRoleInj, TreeViewInj, useMagicKeys, useNuxtApp, useRoles, useTabs } from '#imports'
import { ProjectRoleInj, TreeViewInj, useNuxtApp, useRoles, useTabs, useMagicKeys } from '#imports'
import type { SidebarTableNode } from '~/lib'
const props = withDefaults(

2
packages/nc-gui/composables/useTableNew.ts

@ -20,6 +20,8 @@ import {
useNuxtApp,
useTabs,
watch,
useMagicKeys,
navigateToBlankTargetOpenOption,
} from '#imports'
export function useTableNew(param: { onTableCreate?: (tableMeta: TableType) => void; baseId: string; sourceId?: string }) {

13
packages/nc-gui/store/views.ts

@ -1,7 +1,7 @@
import type { FilterType, SortType, ViewType, ViewTypes } from 'nocodb-sdk'
import { acceptHMRUpdate, defineStore } from 'pinia'
import type { ViewPageType } from '~/lib'
import { navigateToBlankTargetOpenOption, useMagicKeys } from '#imports'
import { useMagicKeys, navigateToBlankTargetOpenOption } from '#imports'
export const useViewsStore = defineStore('viewsStore', () => {
const { $api } = useNuxtApp()
@ -266,8 +266,7 @@ export const useViewsStore = defineStore('viewsStore', () => {
}
} else {
if (cmdOrCtrl) {
await navigateTo(
router.resolve({
const href = router.resolve({
name: routeName,
params: {
viewTitle: view.id || '',
@ -275,11 +274,11 @@ export const useViewsStore = defineStore('viewsStore', () => {
baseId: baseIdOrBaseId,
slugs,
},
}).href,
{
}).href
await navigateTo(href, {
open: navigateToBlankTargetOpenOption,
},
)
})
} else {
await router.push({
name: routeName,

Loading…
Cancel
Save