diff --git a/front/components/Result/FileShareResult.vue b/front/components/Result/FileShareResult.vue index f474625..9e72c93 100644 --- a/front/components/Result/FileShareResult.vue +++ b/front/components/Result/FileShareResult.vue @@ -2,8 +2,7 @@ import { Button } from '@/components/ui/button' import FilePreviewView from '@/components/FilePreviewView.vue' import { Input } from '@/components/ui/input' -import { useClipboard, useShare } from '@vueuse/core' -import { toast } from 'vue-sonner' +import { useShare } from '@vueuse/core' import { useQuery } from '@tanstack/vue-query' import useMyAppShare from '@/composables/useMyAppShare' import useMyAppConfig from '@/composables/useMyAppConfig' @@ -49,7 +48,6 @@ const getShareUrl = (id: string) => { return `${appConfig?.value?.site_url}/s/${id}` } -const { copy } = useClipboard() const { share, isSupported: isShareSupported } = useShare() const handleShare = async (id: string, fileName?: string) => { @@ -106,19 +104,11 @@ const handleShowQrCode = (id: string) => { > - { - copy(getShareUrl(file?.id as string)) - toast.success(t('page.result.file.copySuccess')) - } - " - > - - + :value="getShareUrl(file?.id as string)" + @click.stop + /> { {{ t('page.result.file.pickupCode') }} - { - copy(selectedFileShare?.pickup_code as string) - toast.success(t('page.result.file.copySuccess')) - } - " - > - - + @@ -187,19 +165,7 @@ const handleShowQrCode = (id: string) => { > - { - copy(getShareUrl(selectedFileShare?.id as string)) - toast.success(t('page.result.file.copySuccess')) - } - " - > - - + diff --git a/front/components/Result/TextShareResult.vue b/front/components/Result/TextShareResult.vue index 4fdd200..8e650e7 100644 --- a/front/components/Result/TextShareResult.vue +++ b/front/components/Result/TextShareResult.vue @@ -1,8 +1,6 @@ @@ -60,19 +57,7 @@ const { t } = useI18n() {{ t('page.result.text.pickupCode') }} - { - copy(data?.pickup_code as string) - toast.success(t('page.result.text.copySuccess')) - } - " - > - - + @@ -86,19 +71,7 @@ const { t } = useI18n() {{ t('page.result.text.link') }} - { - copy(url) - toast.success(t('page.result.text.copySuccess')) - } - " - > - - + { const { remaining, start } = useCountdown(expireSeconds.value) -const { copy } = useClipboard() - onMounted(() => { start() }) @@ -74,19 +69,7 @@ const handlePreview = async () => { {{ t('page.shareView.textShare.title') }} - { - copy(previewText as string) - toast.success(t('page.result.text.copySuccess')) - } - " - > - - +