Merge remote-tracking branch 'misskey-original/develop' into develop
# Conflicts: # package.json # packages/backend/src/server/api/endpoints.ts # packages/frontend/src/components/MkButton.vue # packages/frontend/src/components/MkDrive.vue # packages/frontend/src/components/MkEmojiPicker.section.vue # packages/frontend/src/components/MkEmojiPicker.vue # packages/frontend/src/components/MkFoldableSection.vue # packages/frontend/src/components/MkInput.vue # packages/frontend/src/components/MkMenu.vue # packages/frontend/src/components/MkNote.vue # packages/frontend/src/components/MkPostForm.vue # packages/frontend/src/components/MkSignupDialog.form.vue # packages/frontend/src/components/MkSwitch.button.vue # packages/frontend/src/components/MkTab.vue # packages/frontend/src/components/MkTimeline.vue # packages/frontend/src/components/MkUserSelectDialog.vue # packages/frontend/src/components/global/MkCustomEmoji.vue # packages/frontend/src/components/global/MkMisskeyFlavoredMarkdown.ts # packages/frontend/src/os.ts # packages/frontend/src/pages/admin/index.vue # packages/frontend/src/pages/user/home.vue # packages/frontend/src/ui/universal.vue
This commit is contained in:
commit
942b7f1b3c
250 changed files with 2788 additions and 1788 deletions
|
|
@ -18,6 +18,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
|||
|
||||
<script lang="ts" setup>
|
||||
import { computed, watch, onUnmounted, provide, ref, shallowRef } from 'vue';
|
||||
import Misskey from 'misskey-js';
|
||||
import { Connection } from 'misskey-js/built/streaming.js';
|
||||
import MkNotes from '@/components/MkNotes.vue';
|
||||
import MkPullToRefresh from '@/components/MkPullToRefresh.vue';
|
||||
|
|
@ -29,7 +30,7 @@ import { defaultStore } from '@/store.js';
|
|||
import { Paging } from '@/components/MkPagination.vue';
|
||||
|
||||
const props = withDefaults(defineProps<{
|
||||
src: string;
|
||||
src: 'home' | 'local' | 'social' | 'global' | 'mentions' | 'directs' | 'list' | 'antenna' | 'channel' | 'role';
|
||||
list?: string;
|
||||
antenna?: string;
|
||||
channel?: string;
|
||||
|
|
@ -94,6 +95,7 @@ const stream = useStream();
|
|||
|
||||
function connectChannel() {
|
||||
if (props.src === 'antenna') {
|
||||
if (props.antenna == null) return;
|
||||
connection = stream.useChannel('antenna', {
|
||||
antennaId: props.antenna,
|
||||
});
|
||||
|
|
@ -139,16 +141,19 @@ function connectChannel() {
|
|||
connection = stream.useChannel('main');
|
||||
connection.on('mention', onNote);
|
||||
} else if (props.src === 'list') {
|
||||
if (props.list == null) return;
|
||||
connection = stream.useChannel('userList', {
|
||||
withRenotes: props.withRenotes,
|
||||
withFiles: props.onlyFiles ? true : undefined,
|
||||
listId: props.list,
|
||||
});
|
||||
} else if (props.src === 'channel') {
|
||||
if (props.channel == null) return;
|
||||
connection = stream.useChannel('channel', {
|
||||
channelId: props.channel,
|
||||
});
|
||||
} else if (props.src === 'role') {
|
||||
if (props.role == null) return;
|
||||
connection = stream.useChannel('roleTimeline', {
|
||||
roleId: props.role,
|
||||
});
|
||||
|
|
@ -156,7 +161,7 @@ function connectChannel() {
|
|||
if (props.src.startsWith('custom-timeline')) {
|
||||
return;
|
||||
}
|
||||
if (props.src !== 'directs' || props.src !== 'mentions') connection.on('note', prepend);
|
||||
if (props.src !== 'directs' && props.src !== 'mentions') connection.on('note', prepend);
|
||||
}
|
||||
|
||||
function disconnectChannel() {
|
||||
|
|
@ -165,7 +170,7 @@ function disconnectChannel() {
|
|||
}
|
||||
|
||||
function updatePaginationQuery() {
|
||||
let endpoint: string | null;
|
||||
let endpoint: keyof Misskey.Endpoints | null;
|
||||
let query: TimelineQueryType | null;
|
||||
|
||||
if (props.src === 'antenna') {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue