|
|
@ -29,6 +29,9 @@ const indicator = h(LoadingOutlined, { |
|
|
|
const router = useRouter() |
|
|
|
const router = useRouter() |
|
|
|
const route = router.currentRoute |
|
|
|
const route = router.currentRoute |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const { isSharedBase } = storeToRefs(useProject()) |
|
|
|
|
|
|
|
const { projectUrl } = useProject() |
|
|
|
|
|
|
|
|
|
|
|
const { setMenuContext, openRenameTableDialog, duplicateTable, contextMenuTarget } = inject(TreeViewInj)! |
|
|
|
const { setMenuContext, openRenameTableDialog, duplicateTable, contextMenuTarget } = inject(TreeViewInj)! |
|
|
|
|
|
|
|
|
|
|
|
const project = inject(ProjectInj)! |
|
|
|
const project = inject(ProjectInj)! |
|
|
@ -65,8 +68,6 @@ const projectRole = inject(ProjectRoleInj) |
|
|
|
|
|
|
|
|
|
|
|
const { activeProjectId } = storeToRefs(useProjects()) |
|
|
|
const { activeProjectId } = storeToRefs(useProjects()) |
|
|
|
|
|
|
|
|
|
|
|
const { projectUrl } = useProject() |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const toggleDialog = inject(ToggleDialogInj, () => {}) |
|
|
|
const toggleDialog = inject(ToggleDialogInj, () => {}) |
|
|
|
|
|
|
|
|
|
|
|
const { $e } = useNuxtApp() |
|
|
|
const { $e } = useNuxtApp() |
|
|
@ -228,9 +229,6 @@ const addNewProjectChildEntity = async () => { |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// todo: temp |
|
|
|
|
|
|
|
const isSharedBase = ref(false) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const onProjectClick = async (project: NcProject, ignoreNavigation?: boolean, toggleIsExpanded?: boolean) => { |
|
|
|
const onProjectClick = async (project: NcProject, ignoreNavigation?: boolean, toggleIsExpanded?: boolean) => { |
|
|
|
if (!project) { |
|
|
|
if (!project) { |
|
|
|
return |
|
|
|
return |
|
|
@ -247,12 +245,6 @@ const onProjectClick = async (project: NcProject, ignoreNavigation?: boolean, to |
|
|
|
|
|
|
|
|
|
|
|
const isProjectPopulated = projectsStore.isProjectPopulated(project.id!) |
|
|
|
const isProjectPopulated = projectsStore.isProjectPopulated(project.id!) |
|
|
|
|
|
|
|
|
|
|
|
let isSharedBase = false |
|
|
|
|
|
|
|
// if shared base ignore navigation |
|
|
|
|
|
|
|
if (route.value.params.typeOrId === 'base') { |
|
|
|
|
|
|
|
isSharedBase = true |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (!isProjectPopulated) project.isLoading = true |
|
|
|
if (!isProjectPopulated) project.isLoading = true |
|
|
|
|
|
|
|
|
|
|
|
if (!ignoreNavigation) { |
|
|
|
if (!ignoreNavigation) { |
|
|
@ -260,7 +252,7 @@ const onProjectClick = async (project: NcProject, ignoreNavigation?: boolean, to |
|
|
|
projectUrl({ |
|
|
|
projectUrl({ |
|
|
|
id: project.id!, |
|
|
|
id: project.id!, |
|
|
|
type: 'database', |
|
|
|
type: 'database', |
|
|
|
isSharedBase, |
|
|
|
isSharedBase: isSharedBase.value, |
|
|
|
}), |
|
|
|
}), |
|
|
|
) |
|
|
|
) |
|
|
|
} |
|
|
|
} |
|
|
|