diff --git a/CHANGELOG.md b/CHANGELOG.md index 215555df7..6550db980 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,7 +14,9 @@ - アカウント登録にメールアドレスの設定を必須にするオプション - クライアント: アニメーションを減らす設定をメニューのアニメーションにも適用するように - クライアント: MFM関数構文のサジェストを実装 +- クライアント: 未読の通知のみ表示する機能 - ActivityPub: HTML -> MFMの変換を強化 +- API: i/notifications に unreadOnly オプションを追加 - API: ap系のエンドポイントをログイン必須化+レートリミット追加 - Misskeyのコマンドラインオプションを廃止 - 代わりに環境変数で設定することができます diff --git a/locales/ja-JP.yml b/locales/ja-JP.yml index 0be87cf2c..eb72c7ca1 100644 --- a/locales/ja-JP.yml +++ b/locales/ja-JP.yml @@ -792,6 +792,7 @@ unresolved: "未解決" itsOn: "オンになっています" itsOff: "オフになっています" emailRequiredForSignup: "アカウント登録にメールアドレスを必須にする" +unread: "未読" _signup: almostThere: "ほとんど完了です" diff --git a/src/client/components/notifications.vue b/src/client/components/notifications.vue index e91f18a69..8be1e191b 100644 --- a/src/client/components/notifications.vue +++ b/src/client/components/notifications.vue @@ -48,6 +48,11 @@ export default defineComponent({ required: false, default: null, }, + unreadOnly: { + type: Boolean, + required: false, + default: false, + }, }, data() { @@ -58,6 +63,7 @@ export default defineComponent({ limit: 10, params: () => ({ includeTypes: this.allIncludeTypes || undefined, + unreadOnly: this.unreadOnly, }) }, }; @@ -76,6 +82,11 @@ export default defineComponent({ }, deep: true }, + unreadOnly: { + handler() { + this.reload(); + }, + }, // TODO: vue/vuexのバグか仕様かは不明なものの、プロフィール更新するなどして $i が更新されると、 // mutingNotificationTypes に変化が無くてもこのハンドラーが呼び出され無駄なリロードが発生するのを直す '$i.mutingNotificationTypes': { diff --git a/src/client/pages/notifications.vue b/src/client/pages/notifications.vue index 6cbcc9b8e..9728b87bf 100644 --- a/src/client/pages/notifications.vue +++ b/src/client/pages/notifications.vue @@ -2,13 +2,13 @@
- +