summaryrefslogtreecommitdiff
path: root/packages/frontend/src/components
diff options
context:
space:
mode:
authorsyuilo <Syuilotan@yahoo.co.jp>2023-09-29 16:56:17 +0900
committersyuilo <Syuilotan@yahoo.co.jp>2023-09-29 16:56:17 +0900
commite5c339b86a06da9f573e17397017748737c91e44 (patch)
tree6362952a28d8a2505d08a95ef021bc9a31ed9cee /packages/frontend/src/components
parentUpdate create.test.ts (diff)
downloadmisskey-e5c339b86a06da9f573e17397017748737c91e44.tar.gz
misskey-e5c339b86a06da9f573e17397017748737c91e44.tar.bz2
misskey-e5c339b86a06da9f573e17397017748737c91e44.zip
enhance(frontend): タイムラインでファイルが添付されたノートのみ表示するオプションを追加
Diffstat (limited to 'packages/frontend/src/components')
-rw-r--r--packages/frontend/src/components/MkTimeline.vue12
1 files changed, 12 insertions, 0 deletions
diff --git a/packages/frontend/src/components/MkTimeline.vue b/packages/frontend/src/components/MkTimeline.vue
index 3e7c537512..1dcafd6be1 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);