diff options
| author | Mar0xy <marie@kaifa.ch> | 2023-10-15 18:00:09 +0200 |
|---|---|---|
| committer | Mar0xy <marie@kaifa.ch> | 2023-10-15 18:00:09 +0200 |
| commit | 26cd12f7bf5e212db6b6599d37c809d64189acd9 (patch) | |
| tree | 38636be8c89b84990d217f976ccaaee3ce1c1106 /packages/frontend/src/components/MkNote.vue | |
| parent | upd: move some strings into i18n (diff) | |
| download | sharkey-26cd12f7bf5e212db6b6599d37c809d64189acd9.tar.gz sharkey-26cd12f7bf5e212db6b6599d37c809d64189acd9.tar.bz2 sharkey-26cd12f7bf5e212db6b6599d37c809d64189acd9.zip | |
upd: add locale for quoted, add toasts and effects
Diffstat (limited to 'packages/frontend/src/components/MkNote.vue')
| -rw-r--r-- | packages/frontend/src/components/MkNote.vue | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/packages/frontend/src/components/MkNote.vue b/packages/frontend/src/components/MkNote.vue index 2f5966be6d..eb6f95248e 100644 --- a/packages/frontend/src/components/MkNote.vue +++ b/packages/frontend/src/components/MkNote.vue @@ -406,6 +406,7 @@ function quote() { } quoted.value = res.length > 0; + os.toast(i18n.ts.quoted); }); }); } else { @@ -427,6 +428,7 @@ function quote() { } quoted.value = res.length > 0; + os.toast(i18n.ts.quoted); }); }); } @@ -502,7 +504,16 @@ function undoRenote(note) : void { os.api("notes/unrenote", { noteId: note.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(note) : void { @@ -510,7 +521,16 @@ function undoQuote(note) : void { noteId: note.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 { |