From 94eec5a7ef773b5d28b06b763c50920dd433d2eb Mon Sep 17 00:00:00 2001 From: didu4 Date: Fri, 14 Nov 2025 13:20:02 +0400 Subject: [PATCH 1/4] =?UTF-8?q?=D0=B4=D0=BE=D0=B1=D0=B0=D0=B2=D0=B8=D0=BB?= =?UTF-8?q?=20=D0=B2=20=D1=82=D1=80=D0=B5=D1=85=D1=82=D0=BE=D1=87=D0=B5?= =?UTF-8?q?=D1=87=D0=BD=D0=BE=D0=B5=20=D0=BC=D0=B5=D0=BD=D1=8E=20=D0=B4?= =?UTF-8?q?=D0=BB=D1=8F=20=D0=B0=D0=B4=D0=BC=D0=B8=D0=BD=D0=BE=D0=B2=20?= =?UTF-8?q?=D0=BA=D0=BD=D0=BE=D0=BF=D0=BA=D1=83=20=D0=BA=D0=BE=D0=BF=D0=B8?= =?UTF-8?q?=D1=80=D0=BE=D0=B2=D0=B0=D0=BD=D0=B8=D1=8F=20id,=20=D1=80=D0=B5?= =?UTF-8?q?=D0=B0=D0=BB=D0=B8=D0=B7=D0=BE=D0=B2=D0=B0=D0=BB=20=D1=87=D0=B5?= =?UTF-8?q?=D1=80=D0=B5=D0=B7=20=D0=BD=D0=BE=D0=B2=D1=83=D1=8E=20=D1=84?= =?UTF-8?q?=D1=83=D0=BD=D0=BA=D1=86=D0=B8=D1=8E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/TheReviewCard.vue | 37 ++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/src/components/TheReviewCard.vue b/src/components/TheReviewCard.vue index 1c93776..b6f90a8 100644 --- a/src/components/TheReviewCard.vue +++ b/src/components/TheReviewCard.vue @@ -55,6 +55,7 @@ @@ -78,6 +79,8 @@ import apiClient from '@/api'; import { onMounted, onUpdated, ref, nextTick, watch } from 'vue'; import { useProfileStore } from '@/store'; import { useDisplay } from 'vuetify'; +import { useToastStore } from '@/store/toastStore'; +import { ToastType } from '@/models'; const profileStore = useProfileStore(); const { mobile } = useDisplay(); @@ -95,6 +98,7 @@ const redactedText = ref([]); const expanded = ref(false); const showExpandButton = ref(false); const commentText = ref([]); +const toastStore = useToastStore(); async function deleteComment() { await apiClient.DELETE('/rating/comment/{uuid}', { @@ -103,6 +107,39 @@ async function deleteComment() { emit('comment-deleted'); } +async function copyCommentID() { + if (!propsLocal.comment.raw.uuid) { + toastStore.push({ + title: 'Ошибка при копировании.', + type: ToastType.Error, + description: 'ID комментария не найден.', + }); + return; + } + + try { + const type = 'text/plain'; + const clipboardItemData = { + [type]: propsLocal.comment.raw.uuid, + }; + const clipboardItem = new ClipboardItem(clipboardItemData); + await navigator.clipboard.write([clipboardItem]); + + toastStore.push({ + title: 'ID успешно скопирован!', + type: ToastType.Info, + description: 'ID комментария успешно скопирован в буфер обмена.', + }); + } catch (err) { + console.error('Ошибка при копировании', err); + toastStore.push({ + title: 'Ошибка при копировании.', + type: ToastType.Error, + description: 'Не удалось скопировать ID.', + }); + } +} + function cleanupText(text: string) { return text .replace(/</g, '<') From 1880a475e2b2731ec30b064b6df018c24e7b1dbf Mon Sep 17 00:00:00 2001 From: didu4 Date: Tue, 18 Nov 2025 00:05:15 +0400 Subject: [PATCH 2/4] =?UTF-8?q?=D0=BF=D0=BE=D0=BC=D0=B5=D0=BD=D1=8F=D0=BB?= =?UTF-8?q?=20=D0=BA=D0=BD=D0=BE=D0=BF=D0=BA=D0=B8=20=D0=A3=D0=B4=D0=B0?= =?UTF-8?q?=D0=BB=D0=B8=D1=82=D1=8C=20=D0=B8=20=D0=9A=D0=BE=D0=BF=D0=B8?= =?UTF-8?q?=D1=80=D0=BE=D0=B2=D0=B0=D1=82=D1=8C=20ID=20=D0=BC=D0=B5=D1=81?= =?UTF-8?q?=D1=82=D0=B0=D0=BC=D0=B8,=20=D0=B4=D0=BE=D0=B1=D0=B0=D0=B2?= =?UTF-8?q?=D0=B8=D0=BB=20=D0=BC=D0=B5=D0=B6=D0=B4=D1=83=20=D0=BD=D0=B8?= =?UTF-8?q?=D0=BC=D0=B8=20=D1=80=D0=B0=D0=B7=D1=80=D1=8B=D0=B2=20=D1=87?= =?UTF-8?q?=D0=B5=D1=80=D0=B5=D0=B7=20gap,=20=D1=83=D0=B1=D1=80=D0=B0?= =?UTF-8?q?=D0=BB=20=D0=BF=D1=80=D0=BE=D0=BF=D0=B8=D1=81=D1=8B=D0=B2=D0=B0?= =?UTF-8?q?=D0=BD=D0=B8=D0=B5=20=D0=BE=D1=88=D0=B8=D0=B1=D0=BA=D0=B8=20?= =?UTF-8?q?=D0=B2=20=D0=BA=D0=BE=D0=BD=D1=81=D0=BE=D0=BB=D1=8C,=20=D0=BE?= =?UTF-8?q?=D0=B1=D0=BB=D0=B5=D0=B3=D1=87=D0=B8=D0=BB=20toast?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/TheReviewCard.vue | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/components/TheReviewCard.vue b/src/components/TheReviewCard.vue index b6f90a8..4b11ef5 100644 --- a/src/components/TheReviewCard.vue +++ b/src/components/TheReviewCard.vue @@ -54,8 +54,10 @@ @@ -126,12 +128,10 @@ async function copyCommentID() { await navigator.clipboard.write([clipboardItem]); toastStore.push({ - title: 'ID успешно скопирован!', + title: 'ID комментария скопирован в буфер обмена', type: ToastType.Info, - description: 'ID комментария успешно скопирован в буфер обмена.', }); - } catch (err) { - console.error('Ошибка при копировании', err); + } catch { toastStore.push({ title: 'Ошибка при копировании.', type: ToastType.Error, From 77aa92cf27603d2e5dafb2f266581ed8892801c0 Mon Sep 17 00:00:00 2001 From: didu4 Date: Tue, 18 Nov 2025 00:08:49 +0400 Subject: [PATCH 3/4] =?UTF-8?q?=D0=BF=D1=80=D0=BE=20=D1=84=D0=BE=D1=80?= =?UTF-8?q?=D0=BC=D0=B0=D1=82=D0=B8=D1=80=D0=BE=D0=B2=D0=B0=D0=BD=D0=B8?= =?UTF-8?q?=D0=B5=20=D0=B7=D0=B0=D0=B1=D1=8B=D0=BB...?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/TheReviewCard.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/TheReviewCard.vue b/src/components/TheReviewCard.vue index 4b11ef5..1242f70 100644 --- a/src/components/TheReviewCard.vue +++ b/src/components/TheReviewCard.vue @@ -54,7 +54,7 @@ - + + + +