From da3c183a76ce660c61115f878f6b34c8f55fc149 Mon Sep 17 00:00:00 2001 From: syuilo Date: Sat, 19 Sep 2020 14:35:07 +0900 Subject: [PATCH] wip --- src/client/pages/instance/settings.vue | 2 ++ src/client/pages/my-settings/api.vue | 4 +++- src/client/pages/my-settings/reaction.vue | 5 +---- src/client/pages/preferences/plugins.vue | 4 +++- 4 files changed, 9 insertions(+), 6 deletions(-) diff --git a/src/client/pages/instance/settings.vue b/src/client/pages/instance/settings.vue index b3cd6ed537..fd9ce3e790 100644 --- a/src/client/pages/instance/settings.vue +++ b/src/client/pages/instance/settings.vue @@ -453,6 +453,7 @@ export default defineComponent({ addPinUser() { os.modal(MkUserSelect, {}).then(user => { + if (user == null) return; this.pinnedUsers = this.pinnedUsers.trim(); this.pinnedUsers += '\n@' + getAcct(user); this.pinnedUsers = this.pinnedUsers.trim(); @@ -461,6 +462,7 @@ export default defineComponent({ chooseProxyAccount() { os.modal(MkUserSelect, {}).then(user => { + if (user == null) return; this.proxyAccount = user; this.proxyAccountId = user.id; this.save(true); diff --git a/src/client/pages/my-settings/api.vue b/src/client/pages/my-settings/api.vue index e3f37053c6..fb78cef14a 100644 --- a/src/client/pages/my-settings/api.vue +++ b/src/client/pages/my-settings/api.vue @@ -26,7 +26,9 @@ export default defineComponent({ }, methods: { async generateToken() { - os.modal(await import('@/components/token-generate-window.vue'), {}).then(async ({ name, permissions }) => { + os.modal(await import('@/components/token-generate-window.vue'), {}).then(async result => { + if (result == null) return; + const { name, permissions } = result; const { token } = await os.api('miauth/gen-token', { session: null, name: name, diff --git a/src/client/pages/my-settings/reaction.vue b/src/client/pages/my-settings/reaction.vue index e4f57c5123..857ad57eec 100644 --- a/src/client/pages/my-settings/reaction.vue +++ b/src/client/pages/my-settings/reaction.vue @@ -58,14 +58,11 @@ export default defineComponent({ }, preview(ev) { - const picker = os.modal(MkReactionPicker, { + os.modal(MkReactionPicker, { source: ev.currentTarget || ev.target, reactions: this.splited, showFocus: false, }); - picker.$once('chosen', reaction => { - picker.close(); - }); }, setDefault() { diff --git a/src/client/pages/preferences/plugins.vue b/src/client/pages/preferences/plugins.vue index d0d0197726..8d3f978aca 100644 --- a/src/client/pages/preferences/plugins.vue +++ b/src/client/pages/preferences/plugins.vue @@ -123,7 +123,9 @@ export default defineComponent({ information: this.$t('pluginTokenRequestedDescription'), initialName: name, initialPermissions: permissions - }).then(async ({ name, permissions }) => { + }).then(async result => { + if (result == null) return; + const { name, permissions } = result; const { token } = await os.api('miauth/gen-token', { session: null, name: name,