merge: upstream
This commit is contained in:
commit
7552cea69a
413 changed files with 5517 additions and 2309 deletions
|
|
@ -245,6 +245,7 @@ import { checkWordMute } from '@/scripts/check-word-mute.js';
|
|||
import { userPage } from '@/filters/user.js';
|
||||
import { notePage } from '@/filters/note.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';
|
||||
|
|
@ -336,7 +337,7 @@ watch(() => props.expandAllCws, (expandAllCws) => {
|
|||
});
|
||||
|
||||
if ($i) {
|
||||
os.api('notes/renotes', {
|
||||
misskeyApi('notes/renotes', {
|
||||
noteId: appearNote.value.id,
|
||||
userId: $i.id,
|
||||
limit: 1,
|
||||
|
|
@ -355,7 +356,7 @@ const keymap = {
|
|||
};
|
||||
|
||||
provide('react', (reaction: string) => {
|
||||
os.api('notes/reactions/create', {
|
||||
misskeyApi('notes/reactions/create', {
|
||||
noteId: appearNote.value.id,
|
||||
reaction: reaction,
|
||||
});
|
||||
|
|
@ -403,7 +404,7 @@ useNoteCapture({
|
|||
});
|
||||
|
||||
useTooltip(renoteButton, async (showing) => {
|
||||
const renotes = await os.api('notes/renotes', {
|
||||
const renotes = await misskeyApi('notes/renotes', {
|
||||
noteId: appearNote.value.id,
|
||||
limit: 11,
|
||||
});
|
||||
|
|
@ -421,7 +422,7 @@ useTooltip(renoteButton, async (showing) => {
|
|||
});
|
||||
|
||||
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,
|
||||
|
|
@ -502,7 +503,7 @@ function renote(visibility: Visibility | 'local') {
|
|||
os.popup(MkRippleEffect, { x, y }, {}, 'end');
|
||||
}
|
||||
|
||||
os.api('notes/create', {
|
||||
misskeyApi('notes/create', {
|
||||
renoteId: appearNote.value.id,
|
||||
channelId: appearNote.value.channelId,
|
||||
}).then(() => {
|
||||
|
|
@ -526,7 +527,7 @@ function renote(visibility: Visibility | 'local') {
|
|||
noteVisibility = smallerVisibility(visibility === 'local' || visibility === 'specified' ? appearNote.value.visibility : visibility, 'home');
|
||||
}
|
||||
|
||||
os.api('notes/create', {
|
||||
misskeyApi('notes/create', {
|
||||
localOnly: visibility === 'local' ? true : localOnlySetting,
|
||||
visibility: noteVisibility,
|
||||
renoteId: appearNote.value.id,
|
||||
|
|
@ -546,7 +547,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,
|
||||
|
|
@ -568,7 +569,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,
|
||||
|
|
@ -605,7 +606,7 @@ function react(viaKeyboard = false): void {
|
|||
pleaseLogin();
|
||||
showMovedDialog();
|
||||
if (appearNote.value.reactionAcceptance === 'likeOnly') {
|
||||
os.api('notes/like', {
|
||||
misskeyApi('notes/like', {
|
||||
noteId: appearNote.value.id,
|
||||
override: defaultLike.value,
|
||||
});
|
||||
|
|
@ -621,7 +622,7 @@ function react(viaKeyboard = false): void {
|
|||
reactionPicker.show(reactButton.value, reaction => {
|
||||
sound.play('reaction');
|
||||
|
||||
os.api('notes/reactions/create', {
|
||||
misskeyApi('notes/reactions/create', {
|
||||
noteId: appearNote.value.id,
|
||||
reaction: reaction,
|
||||
});
|
||||
|
|
@ -638,7 +639,7 @@ function like(): void {
|
|||
pleaseLogin();
|
||||
showMovedDialog();
|
||||
sound.play('reaction');
|
||||
os.api('notes/like', {
|
||||
misskeyApi('notes/like', {
|
||||
noteId: appearNote.value.id,
|
||||
override: defaultLike.value,
|
||||
});
|
||||
|
|
@ -654,14 +655,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);
|
||||
|
|
@ -721,7 +722,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;
|
||||
|
|
@ -743,7 +744,7 @@ const repliesLoaded = ref(false);
|
|||
|
||||
function loadReplies() {
|
||||
repliesLoaded.value = true;
|
||||
os.api('notes/children', {
|
||||
misskeyApi('notes/children', {
|
||||
noteId: appearNote.value.id,
|
||||
limit: 30,
|
||||
showQuotes: false,
|
||||
|
|
@ -758,7 +759,7 @@ const quotesLoaded = ref(false);
|
|||
|
||||
function loadQuotes() {
|
||||
quotesLoaded.value = true;
|
||||
os.api('notes/renotes', {
|
||||
misskeyApi('notes/renotes', {
|
||||
noteId: appearNote.value.id,
|
||||
limit: 30,
|
||||
quote: true,
|
||||
|
|
@ -773,7 +774,7 @@ const conversationLoaded = ref(false);
|
|||
|
||||
function loadConversation() {
|
||||
conversationLoaded.value = true;
|
||||
os.api('notes/conversation', {
|
||||
misskeyApi('notes/conversation', {
|
||||
noteId: appearNote.value.replyId,
|
||||
}).then(res => {
|
||||
conversation.value = res.reverse();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue