summaryrefslogtreecommitdiff
path: root/packages/frontend/src/components/MkNoteSub.vue
diff options
context:
space:
mode:
authorMarie <marie@kaifa.ch>2024-01-09 02:57:57 +0100
committerMarie <marie@kaifa.ch>2024-01-09 02:57:57 +0100
commit7552cea69ae21b31799d54b246dcd45e96654926 (patch)
tree389031f25fee72180157869a9e60c31704e198a9 /packages/frontend/src/components/MkNoteSub.vue
parentmerge: additional authorised fetch logging (#328) (diff)
parentfeat(ci): api.jsonのバリデーションチェックCIを追加 (#12950) (diff)
downloadsharkey-7552cea69ae21b31799d54b246dcd45e96654926.tar.gz
sharkey-7552cea69ae21b31799d54b246dcd45e96654926.tar.bz2
sharkey-7552cea69ae21b31799d54b246dcd45e96654926.zip
merge: upstream
Diffstat (limited to 'packages/frontend/src/components/MkNoteSub.vue')
-rw-r--r--packages/frontend/src/components/MkNoteSub.vue23
1 files changed, 12 insertions, 11 deletions
diff --git a/packages/frontend/src/components/MkNoteSub.vue b/packages/frontend/src/components/MkNoteSub.vue
index d725ca15af..9d403bf09e 100644
--- a/packages/frontend/src/components/MkNoteSub.vue
+++ b/packages/frontend/src/components/MkNoteSub.vue
@@ -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,