merge: upstream
This commit is contained in:
commit
7552cea69a
413 changed files with 5517 additions and 2309 deletions
|
|
@ -190,6 +190,7 @@ import { checkWordMute } from '@/scripts/check-word-mute.js';
|
|||
import { userPage } from '@/filters/user.js';
|
||||
import * as os from '@/os.js';
|
||||
import * as sound from '@/scripts/sound.js';
|
||||
import { misskeyApi } from '@/scripts/misskey-api.js';
|
||||
import { defaultStore, noteViewInterruptors } from '@/store.js';
|
||||
import { reactionPicker } from '@/scripts/reaction-picker.js';
|
||||
import { extractUrlFromMfm } from '@/scripts/extract-url-from-mfm.js';
|
||||
|
|
@ -207,7 +208,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;
|
||||
|
|
@ -319,7 +320,7 @@ const keymap = {
|
|||
};
|
||||
|
||||
provide('react', (reaction: string) => {
|
||||
os.api('notes/reactions/create', {
|
||||
misskeyApi('notes/reactions/create', {
|
||||
noteId: appearNote.value.id,
|
||||
reaction: reaction,
|
||||
});
|
||||
|
|
@ -340,7 +341,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,
|
||||
});
|
||||
|
|
@ -358,7 +359,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,
|
||||
|
|
@ -377,7 +378,7 @@ if (!props.mock) {
|
|||
});
|
||||
|
||||
if ($i) {
|
||||
os.api('notes/renotes', {
|
||||
misskeyApi('notes/renotes', {
|
||||
noteId: appearNote.value.id,
|
||||
userId: $i.id,
|
||||
limit: 1,
|
||||
|
|
@ -452,7 +453,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(() => {
|
||||
|
|
@ -478,7 +479,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,
|
||||
|
|
@ -502,7 +503,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,
|
||||
|
|
@ -524,7 +525,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,
|
||||
|
|
@ -566,7 +567,7 @@ function like(): void {
|
|||
if (props.mock) {
|
||||
return;
|
||||
}
|
||||
os.api('notes/like', {
|
||||
misskeyApi('notes/like', {
|
||||
noteId: appearNote.value.id,
|
||||
override: defaultLike.value,
|
||||
});
|
||||
|
|
@ -589,7 +590,7 @@ function react(viaKeyboard = false): void {
|
|||
return;
|
||||
}
|
||||
|
||||
os.api('notes/like', {
|
||||
misskeyApi('notes/reactions/create', {
|
||||
noteId: appearNote.value.id,
|
||||
override: defaultLike.value,
|
||||
});
|
||||
|
|
@ -610,7 +611,7 @@ function react(viaKeyboard = false): void {
|
|||
return;
|
||||
}
|
||||
|
||||
os.api('notes/reactions/create', {
|
||||
misskeyApi('notes/reactions/create', {
|
||||
noteId: appearNote.value.id,
|
||||
reaction: reaction,
|
||||
});
|
||||
|
|
@ -632,7 +633,7 @@ function undoReact(note): void {
|
|||
return;
|
||||
}
|
||||
|
||||
os.api('notes/reactions/delete', {
|
||||
misskeyApi('notes/reactions/delete', {
|
||||
noteId: note.id,
|
||||
});
|
||||
}
|
||||
|
|
@ -641,7 +642,7 @@ function undoRenote(note) : void {
|
|||
if (props.mock) {
|
||||
return;
|
||||
}
|
||||
os.api('notes/unrenote', {
|
||||
misskeyApi('notes/unrenote', {
|
||||
noteId: note.id,
|
||||
});
|
||||
os.toast(i18n.ts.rmboost);
|
||||
|
|
@ -718,7 +719,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;
|
||||
|
|
@ -776,7 +777,7 @@ function focusAfter() {
|
|||
}
|
||||
|
||||
function readPromo() {
|
||||
os.api('promo/read', {
|
||||
misskeyApi('promo/read', {
|
||||
noteId: appearNote.value.id,
|
||||
});
|
||||
isDeleted.value = true;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue