From 528df24988095c889c729f89f1a04483e13a39f2 Mon Sep 17 00:00:00 2001 From: keven1024 Date: Mon, 27 Apr 2026 23:25:57 +0800 Subject: [PATCH] refactor(front): replace clipboard functionality with CopyButton component in FileShareResult, TextShareResult, and TextShareView components --- front/components/Result/FileShareResult.vue | 48 +++------------------ front/components/Result/TextShareResult.vue | 31 +------------ front/components/Share/TextShareView.vue | 19 +------- 3 files changed, 10 insertions(+), 88 deletions(-) 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) => { > - + :value="getShareUrl(file?.id as string)" + @click.stop + /> +
@@ -187,19 +165,7 @@ const handleShowQrCode = (id: string) => { > - + +
@@ -86,19 +71,7 @@ const { t } = useI18n()
{{ t('page.result.text.link') }}
- + +