Browse Source

fix: shared view url correction

nc-feat/amplify
Pranav C 1 year ago
parent
commit
d2767f9a9e
  1. 2
      packages/nc-gui/components/dlg/share-and-collaborate/ShareBase.vue
  2. 12
      packages/nc-gui/components/dlg/share-and-collaborate/SharePage.vue
  3. 2
      packages/nc-gui/middleware/auth.global.ts

2
packages/nc-gui/components/dlg/share-and-collaborate/ShareBase.vue

@ -37,9 +37,11 @@ const workspaceStore = useWorkspace()
const url = computed(() => {
if (!sharedBase.value || !sharedBase.value.uuid) return ''
// get base url for workspace
const baseUrl = getBaseUrl(workspaceStore.activeWorkspaceId)
let dashboardUrl1 = dashboardUrl.value
if (baseUrl) {
dashboardUrl1 = `${baseUrl}${appInfo.value?.dashboardPath}`
}

12
packages/nc-gui/components/dlg/share-and-collaborate/SharePage.vue

@ -165,9 +165,15 @@ function sharedViewUrl() {
viewType = 'view'
}
return encodeURI(
`${getBaseUrl(workspaceStore.activeWorkspaceId)}${appInfo.value?.dashboardPath}#/nc/${viewType}/${activeView.value.uuid}`,
)
// get base url for workspace
const baseUrl = getBaseUrl(workspaceStore.activeWorkspaceId)
let dashboardUrl1 = dashboardUrl.value
if (baseUrl) {
dashboardUrl1 = `${baseUrl}${appInfo.value?.dashboardPath}`
}
return encodeURI(`${dashboardUrl1}#/nc/${viewType}/${activeView.value.uuid}`)
}
const toggleViewShare = async () => {

2
packages/nc-gui/middleware/auth.global.ts

@ -1,6 +1,6 @@
import type { Api } from 'nocodb-sdk'
import type { Actions } from '~/composables/useGlobal/types'
import { defineNuxtRouteMiddleware, extractSdkResponseErrorMsg, message, navigateTo, useApi, useGlobal, useRoles } from '#imports'
import { defineNuxtRouteMiddleware, message, navigateTo, useApi, useGlobal, useRoles } from '#imports'
/**
* Global auth middleware

Loading…
Cancel
Save