|
|
@ -1,6 +1,7 @@ |
|
|
|
import type { BaseType, OracleUi, ProjectType, TableType } from 'nocodb-sdk' |
|
|
|
import type { BaseType, OracleUi, ProjectType, TableType } from 'nocodb-sdk' |
|
|
|
import { SqlUiFactory } from 'nocodb-sdk' |
|
|
|
import { SqlUiFactory } from 'nocodb-sdk' |
|
|
|
import { isString } from '@vueuse/core' |
|
|
|
import { isString } from '@vueuse/core' |
|
|
|
|
|
|
|
import { useRoute } from 'vue-router' |
|
|
|
import { |
|
|
|
import { |
|
|
|
ClientType, |
|
|
|
ClientType, |
|
|
|
computed, |
|
|
|
computed, |
|
|
@ -11,7 +12,6 @@ import { |
|
|
|
useInjectionState, |
|
|
|
useInjectionState, |
|
|
|
useNuxtApp, |
|
|
|
useNuxtApp, |
|
|
|
useRoles, |
|
|
|
useRoles, |
|
|
|
useRoute, |
|
|
|
|
|
|
|
useRouter, |
|
|
|
useRouter, |
|
|
|
useTheme, |
|
|
|
useTheme, |
|
|
|
} from '#imports' |
|
|
|
} from '#imports' |
|
|
@ -42,9 +42,9 @@ const [setup, use] = useInjectionState(() => { |
|
|
|
|
|
|
|
|
|
|
|
const lastOpenedViewMap = ref<Record<string, string>>({}) |
|
|
|
const lastOpenedViewMap = ref<Record<string, string>>({}) |
|
|
|
|
|
|
|
|
|
|
|
let forcedProjectId: string | undefined |
|
|
|
const forcedProjectId = ref<string>() |
|
|
|
|
|
|
|
|
|
|
|
const projectId = computed(() => forcedProjectId || (route.params.projectId as string)) |
|
|
|
const projectId = computed(() => forcedProjectId.value || (route.params.projectId as string)) |
|
|
|
|
|
|
|
|
|
|
|
// todo: refactor path param name and variable name
|
|
|
|
// todo: refactor path param name and variable name
|
|
|
|
const projectType = $computed(() => route.params.projectType as string) |
|
|
|
const projectType = $computed(() => route.params.projectType as string) |
|
|
@ -107,7 +107,7 @@ const [setup, use] = useInjectionState(() => { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
async function loadProject(withTheme = true, forcedId?: string) { |
|
|
|
async function loadProject(withTheme = true, forcedId?: string) { |
|
|
|
if (forcedId) forcedProjectId = forcedId |
|
|
|
if (forcedId) forcedProjectId.value = forcedId |
|
|
|
if (projectType === 'base') { |
|
|
|
if (projectType === 'base') { |
|
|
|
try { |
|
|
|
try { |
|
|
|
const baseData = await api.public.sharedBaseGet(route.params.projectId as string) |
|
|
|
const baseData = await api.public.sharedBaseGet(route.params.projectId as string) |
|
|
|