fix(front): Fix broken copy button in embed modal

Part-of: <https://dev.funkwhale.audio/funkwhale/funkwhale/-/merge_requests/2642>
environments/review-docs-2085-h577jp/deployments/18808
Ciarán Ainsworth 2023-11-22 11:18:30 +00:00 zatwierdzone przez Marge
rodzic 08c142cfff
commit eb0c644b93
2 zmienionych plików z 3 dodań i 4 usunięć

Wyświetl plik

@ -0,0 +1 @@
Fixed an issue where the copy button didn't copy the Embed code in the embed modal.

Wyświetl plik

@ -39,8 +39,7 @@ const iframeSrc = computed(() => {
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, '&amp;')}"></iframe>`)
const textarea = ref()
const { copy, copied } = useClipboard({ source: textarea })
const { copy, copied } = useClipboard({ source: embedCode })
</script>
<template>
@ -103,8 +102,7 @@ const { copy, copied } = useClipboard({ source: textarea })
{{ $t('components.audio.EmbedWizard.help.embed') }}
</p>
<textarea
ref="textarea"
:value="embedCode"
v-model="embedCode"
rows="5"
readonly
/>