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

@ -92,6 +92,7 @@ import MkCwButton from '@/components/MkCwButton.vue';
import { notePage } from '@/filters/note.js';
import * as os from '@/os.js';
import * as sound from '@/scripts/sound.js';
import { misskeyApi } from '@/scripts/misskey-api.js';
import { i18n } from '@/i18n.js';
import { $i } from '@/account.js';
import { userPage } from '@/filters/user.js';
@ -166,7 +167,7 @@ useNoteCapture({
});
if ($i) {
os.api('notes/renotes', {
misskeyApi('notes/renotes', {
noteId: appearNote.value.id,
userId: $i.id,
limit: 1,
@ -196,7 +197,7 @@ function react(viaKeyboard = false): void {
showMovedDialog();
sound.play('reaction');
if (props.note.reactionAcceptance === 'likeOnly') {
os.api('notes/like', {
misskeyApi('notes/like', {
noteId: props.note.id,
override: defaultLike.value,
});
@ -210,7 +211,7 @@ function react(viaKeyboard = false): void {
} else {
blur();
reactionPicker.show(reactButton.value, reaction => {
os.api('notes/reactions/create', {
misskeyApi('notes/reactions/create', {
noteId: props.note.id,
reaction: reaction,
});
@ -227,7 +228,7 @@ function like(): void {
pleaseLogin();
showMovedDialog();
sound.play('reaction');
os.api('notes/like', {
misskeyApi('notes/like', {
noteId: props.note.id,
override: defaultLike.value,
});
@ -243,14 +244,14 @@ function like(): void {
function undoReact(note): void {
const oldReaction = note.myReaction;
if (!oldReaction) return;
os.api('notes/reactions/delete', {
misskeyApi('notes/reactions/delete', {
noteId: note.id,
});
}
function undoRenote() : void {
if (!renoted.value) return;
os.api('notes/unrenote', {
misskeyApi('notes/unrenote', {
noteId: appearNote.value.id,
});
os.toast(i18n.ts.rmboost);
@ -324,7 +325,7 @@ function renote(visibility: 'public' | 'home' | 'followers' | 'specified' | 'loc
os.popup(MkRippleEffect, { x, y }, {}, 'end');
}
os.api('notes/create', {
misskeyApi('notes/create', {
renoteId: props.note.id,
channelId: props.note.channelId,
}).then(() => {
@ -340,7 +341,7 @@ function renote(visibility: 'public' | 'home' | 'followers' | 'specified' | 'loc
os.popup(MkRippleEffect, { x, y }, {}, 'end');
}
os.api('notes/create', {
misskeyApi('notes/create', {
renoteId: props.note.id,
localOnly: visibility === 'local' ? true : false,
visibility: visibility === 'local' || visibility === 'specified' ? props.note.visibility : visibility,
@ -360,7 +361,7 @@ function quote() {
renote: appearNote.value,
channel: appearNote.value.channel,
}).then(() => {
os.api('notes/renotes', {
misskeyApi('notes/renotes', {
noteId: props.note.id,
userId: $i.id,
limit: 1,
@ -382,7 +383,7 @@ function quote() {
os.post({
renote: appearNote.value,
}).then(() => {
os.api('notes/renotes', {
misskeyApi('notes/renotes', {
noteId: props.note.id,
userId: $i.id,
limit: 1,
@ -411,7 +412,7 @@ function menu(viaKeyboard = false): void {
}
if (props.detail) {
os.api('notes/children', {
misskeyApi('notes/children', {
noteId: props.note.id,
limit: numberOfReplies.value,
showQuotes: false,