merge: branch develop

This commit is contained in:
Mar0xy 2023-10-18 19:56:42 +02:00
commit cf6e720139
No known key found for this signature in database
GPG key ID: 56569BBE47D2C828
97 changed files with 1565 additions and 853 deletions

View file

@ -42,6 +42,7 @@ import { useStream } from '@/stream.js';
import { i18n } from '@/i18n.js';
import { claimAchievement } from '@/scripts/achievements.js';
import { $i } from '@/account.js';
import { defaultStore } from "@/store.js";
const props = withDefaults(defineProps<{
user: Misskey.entities.UserDetailed,
@ -52,6 +53,10 @@ const props = withDefaults(defineProps<{
large: false,
});
const emit = defineEmits<{
(_: 'update:user', value: Misskey.entities.UserDetailed): void
}>();
let isFollowing = $ref(props.user.isFollowing);
let hasPendingFollowRequestFromYou = $ref(props.user.hasPendingFollowRequestFromYou);
let wait = $ref(false);
@ -95,6 +100,11 @@ async function onClick() {
} else {
await os.api('following/create', {
userId: props.user.id,
withReplies: defaultStore.state.defaultWithReplies,
});
emit('update:user', {
...props.user,
withReplies: defaultStore.state.defaultWithReplies
});
hasPendingFollowRequestFromYou = true;

View file

@ -25,11 +25,13 @@ const props = withDefaults(defineProps<{
sound?: boolean;
withRenotes?: boolean;
withReplies?: boolean;
withBots?: boolean;
onlyFiles?: boolean;
}>(), {
withRenotes: true,
withReplies: false,
onlyFiles: false,
withBots: true,
});
const emit = defineEmits<{
@ -93,11 +95,13 @@ if (props.src === 'antenna') {
query = {
withRenotes: props.withRenotes,
withReplies: props.withReplies,
withBots: props.withBots,
withFiles: props.onlyFiles ? true : undefined,
};
connection = stream.useChannel('localTimeline', {
withRenotes: props.withRenotes,
withReplies: props.withReplies,
withBots: props.withBots,
withFiles: props.onlyFiles ? true : undefined,
});
connection.on('note', prepend);
@ -106,11 +110,13 @@ if (props.src === 'antenna') {
query = {
withRenotes: props.withRenotes,
withReplies: props.withReplies,
withBots: props.withBots,
withFiles: props.onlyFiles ? true : undefined,
};
connection = stream.useChannel('hybridTimeline', {
withRenotes: props.withRenotes,
withReplies: props.withReplies,
withBots: props.withBots,
withFiles: props.onlyFiles ? true : undefined,
});
connection.on('note', prepend);
@ -118,10 +124,12 @@ if (props.src === 'antenna') {
endpoint = 'notes/global-timeline';
query = {
withRenotes: props.withRenotes,
withBots: props.withBots,
withFiles: props.onlyFiles ? true : undefined,
};
connection = stream.useChannel('globalTimeline', {
withRenotes: props.withRenotes,
withBots: props.withBots,
withFiles: props.onlyFiles ? true : undefined,
});
connection.on('note', prepend);

View file

@ -46,7 +46,7 @@ SPDX-License-Identifier: AGPL-3.0-only
</div>
</div>
<button class="_button" :class="$style.menu" @click="showMenu"><i class="ph-dots-three ph-bold ph-lg"></i></button>
<MkFollowButton v-if="$i && user.id != $i.id" :class="$style.follow" :user="user" mini/>
<MkFollowButton v-if="$i && user.id != $i.id" v-model:user="user" :class="$style.follow" mini/>
</div>
<div v-else>
<MkLoading/>