diff --git a/packages/nc-gui/components/dlg/share-and-collaborate/SharePage.vue b/packages/nc-gui/components/dlg/share-and-collaborate/SharePage.vue index c3f7ab9201..51198ff83b 100644 --- a/packages/nc-gui/components/dlg/share-and-collaborate/SharePage.vue +++ b/packages/nc-gui/components/dlg/share-and-collaborate/SharePage.vue @@ -108,11 +108,11 @@ const isOpenCustomUrl = computed(() => { }) const customUrl = computed({ - get: () => (isOpenCustomUrl.value ? activeView.value?.custom_path ?? '' : ''), + get: () => (isOpenCustomUrl.value ? activeView.value?.custom_url_path ?? '' : ''), set: async (value) => { if (!activeView.value) return - activeView.value = { ...(activeView.value as any), custom_path: isOpenCustomUrl.value ? value : null } + activeView.value = { ...(activeView.value as any), custom_url_path: isOpenCustomUrl.value ? value : null } }, }) @@ -124,9 +124,9 @@ const toggleCustomUrl = async () => { isUpdating.value.password = true try { if (passwordProtected.value) { - activeView.value = { ...(activeView.value as any), custom_path: null } + activeView.value = { ...(activeView.value as any), custom_url_path: null } } else { - activeView.value = { ...(activeView.value as any), custom_path: '' } + activeView.value = { ...(activeView.value as any), custom_url_path: '' } } await updateSharedView() @@ -251,6 +251,17 @@ function sharedViewUrl() { }` } +const dashboardUrl1 = computed(() => { + // get base url for workspace + const baseUrl = getBaseUrl(workspaceStore.activeWorkspaceId) + + if (baseUrl) { + return `${baseUrl}${appInfo.value?.dashboardPath}` + } + + return dashboardUrl.value +}) + const toggleViewShare = async () => { if (!activeView.value?.id) return @@ -317,7 +328,7 @@ async function updateSharedView() { await $api.dbViewShare.update(activeView.value.id!, { meta, password: activeView.value.password, - ...(activeView.value?.custom_path ? { custom_path: activeView.value?.custom_path } : {}), + custom_url_path: activeView.value?.custom_url_path ?? null, }) } catch (e: any) { message.error(await extractSdkResponseErrorMsg(e)) @@ -337,8 +348,6 @@ const updateSharedViewWithDebounce = useDebounceFn( async function savePreFilledMode() { await updateSharedView() } - -watchEffect(() => {})