fix(front): Fix broken copy button in embed modal
Part-of: <https://dev.funkwhale.audio/funkwhale/funkwhale/-/merge_requests/2642>
This commit is contained in:
parent
08c142cfff
commit
eb0c644b93
|
@ -0,0 +1 @@
|
||||||
|
Fixed an issue where the copy button didn't copy the Embed code in the embed modal.
|
|
@ -39,8 +39,7 @@ const iframeSrc = computed(() => {
|
||||||
const frameWidth = computed(() => width.value ?? '100%')
|
const frameWidth = computed(() => width.value ?? '100%')
|
||||||
const embedCode = computed(() => `<iframe width="${frameWidth.value}" height="${height.value}" scrolling="no" frameborder="no" src="${iframeSrc.value.replace(/&/g, '&')}"></iframe>`)
|
const embedCode = computed(() => `<iframe width="${frameWidth.value}" height="${height.value}" scrolling="no" frameborder="no" src="${iframeSrc.value.replace(/&/g, '&')}"></iframe>`)
|
||||||
|
|
||||||
const textarea = ref()
|
const { copy, copied } = useClipboard({ source: embedCode })
|
||||||
const { copy, copied } = useClipboard({ source: textarea })
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
@ -103,8 +102,7 @@ const { copy, copied } = useClipboard({ source: textarea })
|
||||||
{{ $t('components.audio.EmbedWizard.help.embed') }}
|
{{ $t('components.audio.EmbedWizard.help.embed') }}
|
||||||
</p>
|
</p>
|
||||||
<textarea
|
<textarea
|
||||||
ref="textarea"
|
v-model="embedCode"
|
||||||
:value="embedCode"
|
|
||||||
rows="5"
|
rows="5"
|
||||||
readonly
|
readonly
|
||||||
/>
|
/>
|
||||||
|
|
Loading…
Reference in New Issue