|
|
@ -15,6 +15,7 @@ const { view, $api } = useSmartsheetStoreOrThrow() |
|
|
|
const { copy } = useClipboard() |
|
|
|
const { copy } = useClipboard() |
|
|
|
const toast = useToast() |
|
|
|
const toast = useToast() |
|
|
|
const { $e } = useNuxtApp() |
|
|
|
const { $e } = useNuxtApp() |
|
|
|
|
|
|
|
const { dashboardUrl } = useDashboard() |
|
|
|
|
|
|
|
|
|
|
|
let showShareModel = $ref(false) |
|
|
|
let showShareModel = $ref(false) |
|
|
|
const passwordProtected = $ref(false) |
|
|
|
const passwordProtected = $ref(false) |
|
|
@ -57,7 +58,7 @@ const sharedViewUrl = computed(() => { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// todo: get dashboard url |
|
|
|
// todo: get dashboard url |
|
|
|
return `#/nc/${viewType}/${shared.value.uuid}` |
|
|
|
return `${dashboardUrl?.value}/nc/${viewType}/${shared.value.uuid}` |
|
|
|
}) |
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
async function saveAllowCSVDownload() { |
|
|
|
async function saveAllowCSVDownload() { |
|
|
@ -91,6 +92,11 @@ const saveShareLinkPassword = async () => { |
|
|
|
|
|
|
|
|
|
|
|
$e('a:view:share:enable-pwd') |
|
|
|
$e('a:view:share:enable-pwd') |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const copyLink = () => { |
|
|
|
|
|
|
|
copy(sharedViewUrl?.value as string) |
|
|
|
|
|
|
|
toast.info('Copied to clipboard') |
|
|
|
|
|
|
|
} |
|
|
|
</script> |
|
|
|
</script> |
|
|
|
|
|
|
|
|
|
|
|
<template> |
|
|
|
<template> |
|
|
@ -105,13 +111,13 @@ const saveShareLinkPassword = async () => { |
|
|
|
|
|
|
|
|
|
|
|
<!-- This view is shared via a private link --> |
|
|
|
<!-- This view is shared via a private link --> |
|
|
|
<a-modal v-model:visible="showShareModel" size="small" :title="$t('msg.info.privateLink')" :footer="null"> |
|
|
|
<a-modal v-model:visible="showShareModel" size="small" :title="$t('msg.info.privateLink')" :footer="null"> |
|
|
|
<div class="share-link-box nc-share-link-box"> |
|
|
|
<div class="share-link-box nc-share-link-box bg-primary-50"> |
|
|
|
<div class="flex-1 h-min">{{ sharedViewUrl }}</div> |
|
|
|
<div class="flex-1 h-min">{{ sharedViewUrl }}</div> |
|
|
|
<!-- <v-spacer /> --> |
|
|
|
<!-- <v-spacer /> --> |
|
|
|
<a v-t="['c:view:share:open-url']" :href="sharedViewUrl" target="_blank"> |
|
|
|
<a v-t="['c:view:share:open-url']" :href="sharedViewUrl" target="_blank"> |
|
|
|
<MdiOpenInNewIcon class="text-sm text-grey mt-1" /> |
|
|
|
<MdiOpenInNewIcon class="text-sm text-gray-500 mt-1" /> |
|
|
|
</a> |
|
|
|
</a> |
|
|
|
<MdiCopyIcon class="text-grey text-sm cursor-pointer" @click="copy(sharedViewUrl)" /> |
|
|
|
<MdiCopyIcon class="text-gray-500 text-sm cursor-pointer" @click="copyLink" /> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
|
|
<a-collapse ghost> |
|
|
|
<a-collapse ghost> |
|
|
@ -127,9 +133,9 @@ const saveShareLinkPassword = async () => { |
|
|
|
type="password" |
|
|
|
type="password" |
|
|
|
:placeholder="$t('placeholder.password.enter')" |
|
|
|
:placeholder="$t('placeholder.password.enter')" |
|
|
|
/> |
|
|
|
/> |
|
|
|
<a-button size="small" class="!text-xs" @click="saveShareLinkPassword">{{ |
|
|
|
<a-button size="small" class="!text-xs" @click="saveShareLinkPassword" |
|
|
|
$t('placeholder.password.save') |
|
|
|
>{{ $t('placeholder.password.save') }} |
|
|
|
}}</a-button> |
|
|
|
</a-button> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div> |
|
|
|
<div> |
|
|
|