From e3679f739b2a3c5323eaea829e8d9d24068d8246 Mon Sep 17 00:00:00 2001 From: syuilo Date: Sun, 20 Sep 2020 11:26:09 +0900 Subject: [PATCH] wip --- src/client/components/note.vue | 6 +++--- src/client/components/user-menu.vue | 2 +- src/client/deck.vue | 2 +- src/client/pages/my-settings/index.vue | 4 +++- 4 files changed, 8 insertions(+), 6 deletions(-) diff --git a/src/client/components/note.vue b/src/client/components/note.vue index ac165f3b7f..903d7631ac 100644 --- a/src/client/components/note.vue +++ b/src/client/components/note.vue @@ -440,7 +440,7 @@ export default defineComponent({ reply(viaKeyboard = false) { pleaseLogin(); - this.$root.post({ + os.post({ reply: this.appearNote, animation: !viaKeyboard, }, () => { @@ -464,7 +464,7 @@ export default defineComponent({ text: this.$t('quote'), icon: faQuoteRight, action: () => { - this.$root.post({ + os.post({ renote: this.appearNote, }); } @@ -550,7 +550,7 @@ export default defineComponent({ noteId: this.appearNote.id }); - this.$root.post({ initialNote: this.appearNote, renote: this.appearNote.renote, reply: this.appearNote.reply }); + os.post({ initialNote: this.appearNote, renote: this.appearNote.renote, reply: this.appearNote.reply }); }); }, diff --git a/src/client/components/user-menu.vue b/src/client/components/user-menu.vue index 7a42340dfc..8f0addf3a0 100644 --- a/src/client/components/user-menu.vue +++ b/src/client/components/user-menu.vue @@ -30,7 +30,7 @@ export default defineComponent({ icon: faEnvelope, text: this.$t('sendMessage'), action: () => { - this.$root.post({ specified: this.user }); + os.post({ specified: this.user }); } }, this.$store.state.i.id != this.user.id ? { type: 'link', diff --git a/src/client/deck.vue b/src/client/deck.vue index 78b3061f99..5598bce3fc 100644 --- a/src/client/deck.vue +++ b/src/client/deck.vue @@ -136,7 +136,7 @@ export default defineComponent({ }, post() { - this.$root.post(); + os.post(); }, search() { diff --git a/src/client/pages/my-settings/index.vue b/src/client/pages/my-settings/index.vue index 57e5f90f08..fbc22f26a2 100644 --- a/src/client/pages/my-settings/index.vue +++ b/src/client/pages/my-settings/index.vue @@ -119,7 +119,9 @@ export default defineComponent({ os.modal(await import('@/components/notification-setting-window.vue').then(x => x.default), { includingTypes, showGlobalToggle: false, - }).then(async ({ includingTypes: value }: any) => { + }).then(async (res) => { + if (res == null) return; + const { includingTypes: value } = res; await os.api('i/update', { mutingNotificationTypes: notificationTypes.filter(x => !value.includes(x)), }).then(i => {