merge: upstream

This commit is contained in:
Marie 2024-01-09 02:57:57 +01:00
commit 7552cea69a
No known key found for this signature in database
GPG key ID: 56569BBE47D2C828
413 changed files with 5517 additions and 2309 deletions

View file

@ -190,6 +190,7 @@ import { focusPrev, focusNext } from '@/scripts/focus.js';
import { checkWordMute } from '@/scripts/check-word-mute.js';
import { userPage } from '@/filters/user.js';
import * as os from '@/os.js';
import { misskeyApi } from '@/scripts/misskey-api.js';
import * as sound from '@/scripts/sound.js';
import { defaultStore, noteViewInterruptors } from '@/store.js';
import { reactionPicker } from '@/scripts/reaction-picker.js';
@ -208,7 +209,7 @@ import { MenuItem } from '@/types/menu.js';
import MkRippleEffect from '@/components/MkRippleEffect.vue';
import { showMovedDialog } from '@/scripts/show-moved-dialog.js';
import { shouldCollapsed } from '@/scripts/collapsed.js';
import { useRouter } from '@/router.js';
import { useRouter } from '@/global/router/supplier.js';
const props = withDefaults(defineProps<{
note: Misskey.entities.Note;
@ -320,7 +321,7 @@ const keymap = {
};
provide('react', (reaction: string) => {
os.api('notes/reactions/create', {
misskeyApi('notes/reactions/create', {
noteId: appearNote.value.id,
reaction: reaction,
});
@ -341,7 +342,7 @@ if (props.mock) {
if (!props.mock) {
useTooltip(renoteButton, async (showing) => {
const renotes = await os.api('notes/renotes', {
const renotes = await misskeyApi('notes/renotes', {
noteId: appearNote.value.id,
limit: 11,
});
@ -359,7 +360,7 @@ if (!props.mock) {
});
useTooltip(quoteButton, async (showing) => {
const renotes = await os.api('notes/renotes', {
const renotes = await misskeyApi('notes/renotes', {
noteId: appearNote.value.id,
limit: 11,
quote: true,
@ -378,7 +379,7 @@ if (!props.mock) {
});
if ($i) {
os.api('notes/renotes', {
misskeyApi('notes/renotes', {
noteId: appearNote.value.id,
userId: $i.id,
limit: 1,
@ -453,7 +454,7 @@ function renote(visibility: Visibility | 'local') {
}
if (!props.mock) {
os.api('notes/create', {
misskeyApi('notes/create', {
renoteId: appearNote.value.id,
channelId: appearNote.value.channelId,
}).then(() => {
@ -479,7 +480,7 @@ function renote(visibility: Visibility | 'local') {
}
if (!props.mock) {
os.api('notes/create', {
misskeyApi('notes/create', {
localOnly: visibility === 'local' ? true : localOnlySetting,
visibility: noteVisibility,
renoteId: appearNote.value.id,
@ -503,7 +504,7 @@ function quote() {
renote: appearNote.value,
channel: appearNote.value.channel,
}).then(() => {
os.api('notes/renotes', {
misskeyApi('notes/renotes', {
noteId: appearNote.value.id,
userId: $i.id,
limit: 1,
@ -525,7 +526,7 @@ function quote() {
os.post({
renote: appearNote.value,
}).then(() => {
os.api('notes/renotes', {
misskeyApi('notes/renotes', {
noteId: appearNote.value.id,
userId: $i.id,
limit: 1,
@ -567,7 +568,7 @@ function like(): void {
if (props.mock) {
return;
}
os.api('notes/like', {
misskeyApi('notes/like', {
noteId: appearNote.value.id,
override: defaultLike.value,
});
@ -590,7 +591,7 @@ function react(viaKeyboard = false): void {
return;
}
os.api('notes/like', {
misskeyApi('notes/like', {
noteId: appearNote.value.id,
override: defaultLike.value,
});
@ -611,7 +612,7 @@ function react(viaKeyboard = false): void {
return;
}
os.api('notes/reactions/create', {
misskeyApi('notes/reactions/create', {
noteId: appearNote.value.id,
reaction: reaction,
});
@ -633,7 +634,7 @@ function undoReact(note): void {
return;
}
os.api('notes/reactions/delete', {
misskeyApi('notes/reactions/delete', {
noteId: note.id,
});
}
@ -642,7 +643,7 @@ function undoRenote(note) : void {
if (props.mock) {
return;
}
os.api('notes/unrenote', {
misskeyApi('notes/unrenote', {
noteId: note.id,
});
os.toast(i18n.ts.rmboost);
@ -719,7 +720,7 @@ function showRenoteMenu(viaKeyboard = false): void {
icon: 'ph-trash ph-bold ph-lg',
danger: true,
action: () => {
os.api('notes/delete', {
misskeyApi('notes/delete', {
noteId: note.value.id,
});
isDeleted.value = true;
@ -781,7 +782,7 @@ function scrollIntoView() {
}
function readPromo() {
os.api('promo/read', {
misskeyApi('promo/read', {
noteId: appearNote.value.id,
});
isDeleted.value = true;