refactor(frontend): os.tsに引き込んだscripts/api.tsの再exportをやめる (#12694)
* refactor(frontend): os.tsに引き込んだscripts/api.tsの再exportをやめる * fix * fix * renate to "misskeyApi" * rename file
This commit is contained in:
parent
ea41cc6ec0
commit
fa9c4a19b9
191 changed files with 581 additions and 468 deletions
|
@ -170,6 +170,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';
|
||||
|
@ -277,7 +278,7 @@ const keymap = {
|
|||
};
|
||||
|
||||
provide('react', (reaction: string) => {
|
||||
os.api('notes/reactions/create', {
|
||||
misskeyApi('notes/reactions/create', {
|
||||
noteId: appearNote.value.id,
|
||||
reaction: reaction,
|
||||
});
|
||||
|
@ -298,7 +299,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,
|
||||
});
|
||||
|
@ -350,7 +351,7 @@ function react(viaKeyboard = false): void {
|
|||
return;
|
||||
}
|
||||
|
||||
os.api('notes/reactions/create', {
|
||||
misskeyApi('notes/reactions/create', {
|
||||
noteId: appearNote.value.id,
|
||||
reaction: '❤️',
|
||||
});
|
||||
|
@ -371,7 +372,7 @@ function react(viaKeyboard = false): void {
|
|||
return;
|
||||
}
|
||||
|
||||
os.api('notes/reactions/create', {
|
||||
misskeyApi('notes/reactions/create', {
|
||||
noteId: appearNote.value.id,
|
||||
reaction: reaction,
|
||||
});
|
||||
|
@ -393,7 +394,7 @@ function undoReact(note): void {
|
|||
return;
|
||||
}
|
||||
|
||||
os.api('notes/reactions/delete', {
|
||||
misskeyApi('notes/reactions/delete', {
|
||||
noteId: note.id,
|
||||
});
|
||||
}
|
||||
|
@ -453,7 +454,7 @@ function showRenoteMenu(viaKeyboard = false): void {
|
|||
icon: 'ti ti-trash',
|
||||
danger: true,
|
||||
action: () => {
|
||||
os.api('notes/delete', {
|
||||
misskeyApi('notes/delete', {
|
||||
noteId: note.value.id,
|
||||
});
|
||||
isDeleted.value = true;
|
||||
|
@ -499,7 +500,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