diff --git a/CHANGELOG.md b/CHANGELOG.md index 452d898da..698b4acea 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -20,6 +20,7 @@ - Feat: 通知を種類ごとに 全員から受け取る/フォロー中のユーザーのみ受け取る/フォロワーのみ受け取る/相互のみ受け取る/指定したリストのメンバーのみ受け取る/受け取らない から選べるように - Enhance: タイムラインからRenoteを除外するオプションを追加 - Enhance: ユーザーページのノート一覧でRenoteを除外できるように +- Enhance: タイムラインでファイルが添付されたノートのみ表示するオプションを追加 - Enhance: モデレーションログ機能の強化 - Enhance: 依存関係の更新 - Enhance: ローカリゼーションの更新 diff --git a/locales/index.d.ts b/locales/index.d.ts index 099ebbfc7..15736f699 100644 --- a/locales/index.d.ts +++ b/locales/index.d.ts @@ -1128,6 +1128,7 @@ export interface Locale { "edited": string; "notificationRecieveConfig": string; "mutualFollow": string; + "fileAttachedOnly": string; "_announcement": { "forExistingUsers": string; "forExistingUsersDescription": string; diff --git a/locales/ja-JP.yml b/locales/ja-JP.yml index 321c2c5f0..dcdff1b31 100644 --- a/locales/ja-JP.yml +++ b/locales/ja-JP.yml @@ -1125,6 +1125,7 @@ showRenotes: "リノートを表示" edited: "編集済み" notificationRecieveConfig: "通知の受信設定" mutualFollow: "相互フォロー" +fileAttachedOnly: "ファイル付きのみ" _announcement: forExistingUsers: "既存ユーザーのみ" diff --git a/packages/frontend/src/components/MkTimeline.vue b/packages/frontend/src/components/MkTimeline.vue index 3e7c53751..1dcafd6be 100644 --- a/packages/frontend/src/components/MkTimeline.vue +++ b/packages/frontend/src/components/MkTimeline.vue @@ -24,9 +24,11 @@ const props = withDefaults(defineProps<{ sound?: boolean; withRenotes?: boolean; withReplies?: boolean; + onlyFiles?: boolean; }>(), { withRenotes: true, withReplies: false, + onlyFiles: false, }); const emit = defineEmits<{ @@ -69,10 +71,12 @@ if (props.src === 'antenna') { query = { withRenotes: props.withRenotes, withReplies: props.withReplies, + withFiles: props.onlyFiles ? true : undefined, }; connection = stream.useChannel('homeTimeline', { withRenotes: props.withRenotes, withReplies: props.withReplies, + withFiles: props.onlyFiles ? true : undefined, }); connection.on('note', prepend); @@ -82,10 +86,12 @@ if (props.src === 'antenna') { query = { withRenotes: props.withRenotes, withReplies: props.withReplies, + withFiles: props.onlyFiles ? true : undefined, }; connection = stream.useChannel('localTimeline', { withRenotes: props.withRenotes, withReplies: props.withReplies, + withFiles: props.onlyFiles ? true : undefined, }); connection.on('note', prepend); } else if (props.src === 'social') { @@ -93,10 +99,12 @@ if (props.src === 'antenna') { query = { withRenotes: props.withRenotes, withReplies: props.withReplies, + withFiles: props.onlyFiles ? true : undefined, }; connection = stream.useChannel('hybridTimeline', { withRenotes: props.withRenotes, withReplies: props.withReplies, + withFiles: props.onlyFiles ? true : undefined, }); connection.on('note', prepend); } else if (props.src === 'global') { @@ -104,10 +112,12 @@ if (props.src === 'antenna') { query = { withRenotes: props.withRenotes, withReplies: props.withReplies, + withFiles: props.onlyFiles ? true : undefined, }; connection = stream.useChannel('globalTimeline', { withRenotes: props.withRenotes, withReplies: props.withReplies, + withFiles: props.onlyFiles ? true : undefined, }); connection.on('note', prepend); } else if (props.src === 'mentions') { @@ -131,11 +141,13 @@ if (props.src === 'antenna') { query = { withRenotes: props.withRenotes, withReplies: props.withReplies, + withFiles: props.onlyFiles ? true : undefined, listId: props.list, }; connection = stream.useChannel('userList', { withRenotes: props.withRenotes, withReplies: props.withReplies, + withFiles: props.onlyFiles ? true : undefined, listId: props.list, }); connection.on('note', prepend); diff --git a/packages/frontend/src/pages/timeline.vue b/packages/frontend/src/pages/timeline.vue index a11c6fa07..3c29ccdce 100644 --- a/packages/frontend/src/pages/timeline.vue +++ b/packages/frontend/src/pages/timeline.vue @@ -15,11 +15,12 @@ SPDX-License-Identifier: AGPL-3.0-only