From fccbecf15994f23fc4fbe9627a8eb902b76b6bb7 Mon Sep 17 00:00:00 2001 From: syuilo Date: Fri, 9 Nov 2018 08:26:32 +0900 Subject: [Client] Fix bug --- src/client/app/common/scripts/note-mixin.ts | 4 ++-- src/client/app/common/views/components/api-settings.vue | 2 +- .../common/views/components/games/reversi/reversi.index.vue | 2 +- src/client/app/common/views/components/messaging-room.form.vue | 2 +- src/client/app/common/views/components/password-settings.vue | 10 +++++----- src/client/app/common/views/widgets/slideshow.vue | 2 +- 6 files changed, 11 insertions(+), 11 deletions(-) (limited to 'src/client/app/common') diff --git a/src/client/app/common/scripts/note-mixin.ts b/src/client/app/common/scripts/note-mixin.ts index 93debf81e8..6d86c70820 100644 --- a/src/client/app/common/scripts/note-mixin.ts +++ b/src/client/app/common/scripts/note-mixin.ts @@ -88,7 +88,7 @@ export default (opts: Opts = {}) => ({ methods: { reply(viaKeyboard = false) { - (this as any).apis.post({ + this.$root.apis.post({ reply: this.appearNote, animation: !viaKeyboard, cb: () => { @@ -98,7 +98,7 @@ export default (opts: Opts = {}) => ({ }, renote(viaKeyboard = false) { - (this as any).apis.post({ + this.$root.apis.post({ renote: this.appearNote, animation: !viaKeyboard, cb: () => { diff --git a/src/client/app/common/views/components/api-settings.vue b/src/client/app/common/views/components/api-settings.vue index 139aa44077..a6b74d7bb4 100644 --- a/src/client/app/common/views/components/api-settings.vue +++ b/src/client/app/common/views/components/api-settings.vue @@ -50,7 +50,7 @@ export default Vue.extend({ methods: { regenerateToken() { - (this as any).apis.input({ + this.$root.apis.input({ title: this.$t('enter-password'), type: 'password' }).then(password => { diff --git a/src/client/app/common/views/components/games/reversi/reversi.index.vue b/src/client/app/common/views/components/games/reversi/reversi.index.vue index eb657365ab..f020e82083 100644 --- a/src/client/app/common/views/components/games/reversi/reversi.index.vue +++ b/src/client/app/common/views/components/games/reversi/reversi.index.vue @@ -100,7 +100,7 @@ export default Vue.extend({ }, match() { - (this as any).apis.input({ + this.$root.apis.input({ title: this.$t('enter-username') }).then(username => { this.$root.api('users/show', { diff --git a/src/client/app/common/views/components/messaging-room.form.vue b/src/client/app/common/views/components/messaging-room.form.vue index 32cceb0c06..7c45df47d1 100644 --- a/src/client/app/common/views/components/messaging-room.form.vue +++ b/src/client/app/common/views/components/messaging-room.form.vue @@ -131,7 +131,7 @@ export default Vue.extend({ }, chooseFileFromDrive() { - (this as any).apis.chooseDriveFile({ + this.$root.apis.chooseDriveFile({ multiple: false }).then(file => { this.file = file; diff --git a/src/client/app/common/views/components/password-settings.vue b/src/client/app/common/views/components/password-settings.vue index 01396bf32b..048770401f 100644 --- a/src/client/app/common/views/components/password-settings.vue +++ b/src/client/app/common/views/components/password-settings.vue @@ -12,20 +12,20 @@ export default Vue.extend({ i18n: i18n('common/views/components/password-settings.vue'), methods: { reset() { - (this as any).apis.input({ + this.$root.apis.input({ title: this.$t('enter-current-password'), type: 'password' }).then(currentPassword => { - (this as any).apis.input({ + this.$root.apis.input({ title: this.$t('enter-new-password'), type: 'password' }).then(newPassword => { - (this as any).apis.input({ + this.$root.apis.input({ title: this.$t('enter-new-password-again'), type: 'password' }).then(newPassword2 => { if (newPassword !== newPassword2) { - (this as any).apis.dialog({ + this.$root.apis.dialog({ title: null, text: this.$t('not-match'), actions: [{ @@ -38,7 +38,7 @@ export default Vue.extend({ currentPasword: currentPassword, newPassword: newPassword }).then(() => { - (this as any).apis.notify(this.$t('changed')); + this.$root.apis.notify(this.$t('changed')); }); }); }); diff --git a/src/client/app/common/views/widgets/slideshow.vue b/src/client/app/common/views/widgets/slideshow.vue index 6890481724..58b19d0ab3 100644 --- a/src/client/app/common/views/widgets/slideshow.vue +++ b/src/client/app/common/views/widgets/slideshow.vue @@ -114,7 +114,7 @@ export default define({ }); }, choose() { - (this as any).apis.chooseDriveFolder().then(folder => { + this.$root.apis.chooseDriveFolder().then(folder => { this.props.folder = folder ? folder.id : null; this.save(); this.fetch(); -- cgit v1.2.3-freya