Merge remote-tracking branch 'misskey-dev/develop' into prismisskey
# Conflicts: # packages/backend/src/server/api/stream/channels/global-timeline.ts # packages/backend/src/server/api/stream/channels/home-timeline.ts # packages/backend/src/server/api/stream/channels/hybrid-timeline.ts # packages/backend/src/server/api/stream/channels/local-timeline.ts # packages/frontend/src/pages/settings/general.vue # packages/frontend/src/pages/timeline.vue # packages/frontend/src/ui/deck/deck-store.ts
This commit is contained in:
commit
81f56f08b7
31 changed files with 275 additions and 60 deletions
|
|
@ -15,14 +15,19 @@ import * as sound from '@/scripts/sound.js';
|
|||
import { $i } from '@/account.js';
|
||||
import { defaultStore } from '@/store.js';
|
||||
|
||||
const props = defineProps<{
|
||||
const props = withDefaults(defineProps<{
|
||||
src: string;
|
||||
list?: string;
|
||||
antenna?: string;
|
||||
channel?: string;
|
||||
role?: string;
|
||||
sound?: boolean;
|
||||
}>();
|
||||
withRenotes?: boolean;
|
||||
withReplies?: boolean;
|
||||
}>(), {
|
||||
withRenotes: true,
|
||||
withReplies: false,
|
||||
});
|
||||
|
||||
const emit = defineEmits<{
|
||||
(ev: 'note'): void;
|
||||
|
|
@ -62,10 +67,12 @@ if (props.src === 'antenna') {
|
|||
} else if (props.src === 'home') {
|
||||
endpoint = 'notes/timeline';
|
||||
query = {
|
||||
withReplies: defaultStore.state.showTimelineReplies,
|
||||
withRenotes: props.withRenotes,
|
||||
withReplies: props.withReplies,
|
||||
};
|
||||
connection = stream.useChannel('homeTimeline', {
|
||||
withReplies: defaultStore.state.showTimelineReplies,
|
||||
withRenotes: props.withRenotes,
|
||||
withReplies: props.withReplies,
|
||||
});
|
||||
connection.on('note', prepend);
|
||||
|
||||
|
|
@ -73,10 +80,12 @@ if (props.src === 'antenna') {
|
|||
} else if (props.src === 'local') {
|
||||
endpoint = 'notes/local-timeline';
|
||||
query = {
|
||||
withReplies: defaultStore.state.showTimelineReplies,
|
||||
withRenotes: props.withRenotes,
|
||||
withReplies: props.withReplies,
|
||||
};
|
||||
connection = stream.useChannel('localTimeline', {
|
||||
withReplies: defaultStore.state.showTimelineReplies,
|
||||
withRenotes: props.withRenotes,
|
||||
withReplies: props.withReplies,
|
||||
});
|
||||
connection.on('note', prepend);
|
||||
} else if (props.src === 'media') {
|
||||
|
|
@ -93,10 +102,12 @@ if (props.src === 'antenna') {
|
|||
} else if (props.src === 'social') {
|
||||
endpoint = 'notes/hybrid-timeline';
|
||||
query = {
|
||||
withReplies: defaultStore.state.showTimelineReplies,
|
||||
withRenotes: props.withRenotes,
|
||||
withReplies: props.withReplies,
|
||||
};
|
||||
connection = stream.useChannel('hybridTimeline', {
|
||||
withReplies: defaultStore.state.showTimelineReplies,
|
||||
withRenotes: props.withRenotes,
|
||||
withReplies: props.withReplies,
|
||||
});
|
||||
connection.on('note', prepend);
|
||||
} else if (props.src === 'all') {
|
||||
|
|
@ -111,10 +122,12 @@ if (props.src === 'antenna') {
|
|||
} else if (props.src === 'global') {
|
||||
endpoint = 'notes/global-timeline';
|
||||
query = {
|
||||
withReplies: defaultStore.state.showTimelineReplies,
|
||||
withRenotes: props.withRenotes,
|
||||
withReplies: props.withReplies,
|
||||
};
|
||||
connection = stream.useChannel('globalTimeline', {
|
||||
withReplies: defaultStore.state.showTimelineReplies,
|
||||
withRenotes: props.withRenotes,
|
||||
withReplies: props.withReplies,
|
||||
});
|
||||
connection.on('note', prepend);
|
||||
} else if (props.src === 'mentions') {
|
||||
|
|
@ -136,9 +149,13 @@ if (props.src === 'antenna') {
|
|||
} else if (props.src === 'list') {
|
||||
endpoint = 'notes/user-list-timeline';
|
||||
query = {
|
||||
withRenotes: props.withRenotes,
|
||||
withReplies: props.withReplies,
|
||||
listId: props.list,
|
||||
};
|
||||
connection = stream.useChannel('userList', {
|
||||
withRenotes: props.withRenotes,
|
||||
withReplies: props.withReplies,
|
||||
listId: props.list,
|
||||
});
|
||||
connection.on('note', prepend);
|
||||
|
|
|
|||
|
|
@ -114,8 +114,7 @@ function showMenu(ev) {
|
|||
}
|
||||
|
||||
function exploreOtherServers() {
|
||||
// TODO: 言語をよしなに
|
||||
window.open('https://join.misskey.page/ja-JP/instances', '_blank');
|
||||
window.open('https://join.misskey.page/instances', '_blank');
|
||||
}
|
||||
</script>
|
||||
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@ import { onMounted, onUnmounted, ref, inject } from 'vue';
|
|||
import tinycolor from 'tinycolor2';
|
||||
import XTabs, { Tab } from './MkPageHeader.tabs.vue';
|
||||
import { scrollToTop } from '@/scripts/scroll.js';
|
||||
import { globalEvents } from '@/events';
|
||||
import { globalEvents } from '@/events.js';
|
||||
import { injectPageMetadata } from '@/scripts/page-metadata.js';
|
||||
import { $i, openAccountMenu as openAccountMenu_ } from '@/account.js';
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue