From 26cd12f7bf5e212db6b6599d37c809d64189acd9 Mon Sep 17 00:00:00 2001
From: Mar0xy <marie@kaifa.ch>
Date: Sun, 15 Oct 2023 18:00:09 +0200
Subject: upd: add locale for quoted, add toasts and effects

---
 packages/frontend/src/components/MkNoteDetailed.vue | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)

(limited to 'packages/frontend/src/components/MkNoteDetailed.vue')

diff --git a/packages/frontend/src/components/MkNoteDetailed.vue b/packages/frontend/src/components/MkNoteDetailed.vue
index 32ea1f3e47..61d4016d69 100644
--- a/packages/frontend/src/components/MkNoteDetailed.vue
+++ b/packages/frontend/src/components/MkNoteDetailed.vue
@@ -450,6 +450,7 @@ function quote() {
 				}
 
 				quoted.value = res.length > 0;
+				os.toast(i18n.ts.quoted);
 			});
 		});
 	} else {
@@ -471,6 +472,7 @@ function quote() {
 				}
 
 				quoted.value = res.length > 0;
+				os.toast(i18n.ts.quoted);
 			});
 		});
 	}
@@ -548,7 +550,16 @@ function undoRenote() : void {
 	os.api("notes/unrenote", {
 		noteId: appearNote.id,
 	});
+	os.toast(i18n.ts.rmboost);
 	renoted.value = false;
+
+	const el = renoteButton.value as HTMLElement | null | undefined;
+	if (el) {
+		const rect = el.getBoundingClientRect();
+		const x = rect.left + (el.offsetWidth / 2);
+		const y = rect.top + (el.offsetHeight / 2);
+		os.popup(MkRippleEffect, { x, y }, {}, 'end');
+	}
 }
 
 function undoQuote() : void {
@@ -556,7 +567,16 @@ function undoQuote() : void {
 		noteId: appearNote.id,
 		quote: true
 	});
+	os.toast(i18n.ts.rmquote);
 	quoted.value = false;
+
+	const el = quoteButton.value as HTMLElement | null | undefined;
+	if (el) {
+		const rect = el.getBoundingClientRect();
+		const x = rect.left + (el.offsetWidth / 2);
+		const y = rect.top + (el.offsetHeight / 2);
+		os.popup(MkRippleEffect, { x, y }, {}, 'end');
+	}
 }
 
 function onContextmenu(ev: MouseEvent): void {
-- 
cgit v1.2.3-freya

