From 5e9f6a90df9c999d36283d2ba9eb8e23ccfd7d7b Mon Sep 17 00:00:00 2001 From: syuilo Date: Sat, 4 Nov 2023 18:27:22 +0900 Subject: [PATCH] =?UTF-8?q?enhance(frontend):=20=E3=83=8E=E3=83=BC?= =?UTF-8?q?=E3=83=88=E5=86=85=E3=81=AE=E3=82=AB=E3=82=B9=E3=82=BF=E3=83=A0?= =?UTF-8?q?=E7=B5=B5=E6=96=87=E5=AD=97=E3=82=92=E3=82=AF=E3=83=AA=E3=83=83?= =?UTF-8?q?=E3=82=AF=E3=81=99=E3=82=8B=E3=81=93=E3=81=A8=E3=81=A7=E3=80=81?= =?UTF-8?q?=E3=82=B3=E3=83=94=E3=83=BC=E3=81=8A=E3=82=88=E3=81=B3=E3=83=AA?= =?UTF-8?q?=E3=82=A2=E3=82=AF=E3=82=B7=E3=83=A7=E3=83=B3=E3=81=8C=E3=81=A7?= =?UTF-8?q?=E3=81=8D=E3=82=8B=E3=82=88=E3=81=86=E3=81=AB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG.md | 1 + locales/index.d.ts | 1 + locales/ja-JP.yml | 1 + packages/frontend/src/components/MkNote.vue | 22 ++++++++-- .../src/components/MkNoteDetailed.vue | 6 +-- .../frontend/src/components/MkNoteSimple.vue | 2 +- .../frontend/src/components/MkNoteSub.vue | 2 +- .../src/components/MkSubNoteContent.vue | 2 +- .../frontend/src/components/MkUserInfo.vue | 2 +- .../frontend/src/components/MkUserPopup.vue | 2 +- .../src/components/MkUserSetupDialog.User.vue | 2 +- .../src/components/global/MkCustomEmoji.vue | 43 ++++++++++++++++++- .../global/MkMisskeyFlavoredMarkdown.ts | 5 ++- .../src/components/page/page.text.vue | 2 +- packages/frontend/src/pages/channel.vue | 2 +- packages/frontend/src/pages/clip.vue | 2 +- packages/frontend/src/pages/user/home.vue | 4 +- .../frontend/src/pages/welcome.timeline.vue | 2 +- 18 files changed, 82 insertions(+), 21 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0ad55752b..403875512 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -47,6 +47,7 @@ - Enhance: プラグインで`Plugin:register_note_view_interruptor`を用いてnoteの代わりにnullを返却することでノートを非表示にできるようになりました - Enhance: AiScript関数`Mk:nyaize()`が追加されました - Enhance: 情報→ツール はナビゲーションバーにツールとして独立した項目になりました +- Enhance: ノート内のカスタム絵文字をクリックすることで、コピーおよびリアクションができるように - Enhance: その他細かなブラッシュアップ - Fix: 投稿フォームでのユーザー変更がプレビューに反映されない問題を修正 - Fix: ユーザーページの ノート > ファイル付き タブにリプライが表示されてしまう diff --git a/locales/index.d.ts b/locales/index.d.ts index 50b11acc0..aedaaa9f7 100644 --- a/locales/index.d.ts +++ b/locales/index.d.ts @@ -1160,6 +1160,7 @@ export interface Locale { "useGroupedNotifications": string; "signupPendingError": string; "cwNotationRequired": string; + "doReaction": string; "_announcement": { "forExistingUsers": string; "forExistingUsersDescription": string; diff --git a/locales/ja-JP.yml b/locales/ja-JP.yml index de4e8ce2b..6ecebfc39 100644 --- a/locales/ja-JP.yml +++ b/locales/ja-JP.yml @@ -1157,6 +1157,7 @@ disableStreamingTimeline: "タイムラインのリアルタイム更新を無 useGroupedNotifications: "通知をグルーピングして表示する" signupPendingError: "メールアドレスの確認中に問題が発生しました。リンクの有効期限が切れている可能性があります。" cwNotationRequired: "「内容を隠す」がオンの場合は注釈の記述が必要です。" +doReaction: "リアクションする" _announcement: forExistingUsers: "既存ユーザーのみ" diff --git a/packages/frontend/src/components/MkNote.vue b/packages/frontend/src/components/MkNote.vue index 30a68f38f..0ae3423a2 100644 --- a/packages/frontend/src/components/MkNote.vue +++ b/packages/frontend/src/components/MkNote.vue @@ -53,19 +53,28 @@ SPDX-License-Identifier: AGPL-3.0-only

- +

({{ i18n.ts.private }}) - +
{{ i18n.t('translatedFrom', { x: translation.sourceLang }) }}: - +
@@ -242,6 +251,13 @@ const keymap = { 's': () => showContent.value !== showContent.value, }; +provide('react', (reaction: string) => { + os.api('notes/reactions/create', { + noteId: appearNote.id, + reaction: reaction, + }); +}); + if (props.mock) { watch(() => props.note, (to) => { note = deepClone(to); diff --git a/packages/frontend/src/components/MkNoteDetailed.vue b/packages/frontend/src/components/MkNoteDetailed.vue index 9e9b1035d..ff2941344 100644 --- a/packages/frontend/src/components/MkNoteDetailed.vue +++ b/packages/frontend/src/components/MkNoteDetailed.vue @@ -67,19 +67,19 @@ SPDX-License-Identifier: AGPL-3.0-only

- +

({{ i18n.ts.private }}) - + RN:
{{ i18n.t('translatedFrom', { x: translation.sourceLang }) }}: - +
diff --git a/packages/frontend/src/components/MkNoteSimple.vue b/packages/frontend/src/components/MkNoteSimple.vue index dc401a7ec..28b00af24 100644 --- a/packages/frontend/src/components/MkNoteSimple.vue +++ b/packages/frontend/src/components/MkNoteSimple.vue @@ -10,7 +10,7 @@ SPDX-License-Identifier: AGPL-3.0-only

- +

diff --git a/packages/frontend/src/components/MkNoteSub.vue b/packages/frontend/src/components/MkNoteSub.vue index 3cc876700..f61b963d9 100644 --- a/packages/frontend/src/components/MkNoteSub.vue +++ b/packages/frontend/src/components/MkNoteSub.vue @@ -12,7 +12,7 @@ SPDX-License-Identifier: AGPL-3.0-only

- +

diff --git a/packages/frontend/src/components/MkSubNoteContent.vue b/packages/frontend/src/components/MkSubNoteContent.vue index 51dabee16..e9f2b838d 100644 --- a/packages/frontend/src/components/MkSubNoteContent.vue +++ b/packages/frontend/src/components/MkSubNoteContent.vue @@ -9,7 +9,7 @@ SPDX-License-Identifier: AGPL-3.0-only ({{ i18n.ts.private }}) ({{ i18n.ts.deleted }}) - + RN: ...
diff --git a/packages/frontend/src/components/MkUserInfo.vue b/packages/frontend/src/components/MkUserInfo.vue index c13ef60f3..eaebbf03e 100644 --- a/packages/frontend/src/components/MkUserInfo.vue +++ b/packages/frontend/src/components/MkUserInfo.vue @@ -14,7 +14,7 @@ SPDX-License-Identifier: AGPL-3.0-only {{ i18n.ts.followsYou }}
- +
{{ i18n.ts.noAccountDescription }}
diff --git a/packages/frontend/src/components/MkUserPopup.vue b/packages/frontend/src/components/MkUserPopup.vue index bcba4196b..20eb9b3e9 100644 --- a/packages/frontend/src/components/MkUserPopup.vue +++ b/packages/frontend/src/components/MkUserPopup.vue @@ -27,7 +27,7 @@ SPDX-License-Identifier: AGPL-3.0-only
- +
{{ i18n.ts.noAccountDescription }}
diff --git a/packages/frontend/src/components/MkUserSetupDialog.User.vue b/packages/frontend/src/components/MkUserSetupDialog.User.vue index 746781d71..4fbaf7545 100644 --- a/packages/frontend/src/components/MkUserSetupDialog.User.vue +++ b/packages/frontend/src/components/MkUserSetupDialog.User.vue @@ -13,7 +13,7 @@ SPDX-License-Identifier: AGPL-3.0-only
- +
{{ i18n.ts.noAccountDescription }}
diff --git a/packages/frontend/src/components/global/MkCustomEmoji.vue b/packages/frontend/src/components/global/MkCustomEmoji.vue index 063b122f8..1e17bab84 100644 --- a/packages/frontend/src/components/global/MkCustomEmoji.vue +++ b/packages/frontend/src/components/global/MkCustomEmoji.vue @@ -5,14 +5,27 @@ SPDX-License-Identifier: AGPL-3.0-only