Browse Source

fix: get main url

Signed-off-by: mertmit <mertmit99@gmail.com>
pull/6621/head
mertmit 1 year ago
parent
commit
f96bf586f6
  1. 5
      packages/nc-gui/components/general/ShareProject.vue
  2. 6
      packages/nc-gui/composables/useGlobal/actions.ts

5
packages/nc-gui/components/general/ShareProject.vue

@ -38,7 +38,10 @@ useEventListener(document, 'keydown', async (e: KeyboardEvent) => {
}) })
const copySharedBase = async () => { const copySharedBase = async () => {
navigateTo(`/copy-shared-base?base=${route.params.baseId}`) const baseUrl = getMainUrl()
navigateTo(`${baseUrl || ''}#/copy-shared-base?base=${route.params.baseId}`, {
external: true,
})
} }
</script> </script>

6
packages/nc-gui/composables/useGlobal/actions.ts

@ -146,5 +146,9 @@ export function useGlobalActions(state: State): Actions {
return undefined return undefined
} }
return { signIn, signOut, refreshToken, loadAppInfo, setIsMobileMode, navigateToProject, getBaseUrl, ncNavigateTo } const getMainUrl = () => {
return undefined
}
return { signIn, signOut, refreshToken, loadAppInfo, setIsMobileMode, navigateToProject, getBaseUrl, ncNavigateTo, getMainUrl }
} }

Loading…
Cancel
Save