Browse Source

Merge pull request #8023 from nocodb/fix/8022-copy-url

fix: Use useCopy composable for copying content to clipboard
pull/8024/head
Pranav C 8 months ago committed by GitHub
parent
commit
719421604f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 6
      packages/nc-gui/components/general/CopyUrl.vue

6
packages/nc-gui/components/general/CopyUrl.vue

@ -12,19 +12,21 @@ const isCopied = ref({
embed: false,
})
const { copy } = useCopy()
const openUrl = async () => {
window.open(url.value, '_blank', 'noopener,noreferrer')
}
const embedHtml = async () => {
await navigator.clipboard.writeText(`<iframe src="${url.value}" width="100%" height="100%" style="border: none;"></iframe>`)
await copy(`<iframe src="${url.value}" width="100%" height="100%" style="border: none;"></iframe>`)
isCopied.value.embed = true
}
const copyUrl = async () => {
isCopied.value.link = false
await navigator.clipboard.writeText(url.value)
await copy(url.value)
setTimeout(() => {
isCopied.value.link = true

Loading…
Cancel
Save