diff options
| author | syuilo <syuilotan@yahoo.co.jp> | 2018-11-09 08:26:32 +0900 |
|---|---|---|
| committer | syuilo <syuilotan@yahoo.co.jp> | 2018-11-09 08:26:32 +0900 |
| commit | fccbecf15994f23fc4fbe9627a8eb902b76b6bb7 (patch) | |
| tree | 6bdd7f1e5c6b72929afd41ef042b9e866465fb47 /src/client/app/mobile | |
| parent | Refactor & Clean up (diff) | |
| download | misskey-fccbecf15994f23fc4fbe9627a8eb902b76b6bb7.tar.gz misskey-fccbecf15994f23fc4fbe9627a8eb902b76b6bb7.tar.bz2 misskey-fccbecf15994f23fc4fbe9627a8eb902b76b6bb7.zip | |
[Client] Fix bug
Diffstat (limited to 'src/client/app/mobile')
18 files changed, 25 insertions, 25 deletions
diff --git a/src/client/app/mobile/views/components/drive.file-detail.vue b/src/client/app/mobile/views/components/drive.file-detail.vue index 83ee03d1ea..68a16a8350 100644 --- a/src/client/app/mobile/views/components/drive.file-detail.vue +++ b/src/client/app/mobile/views/components/drive.file-detail.vue @@ -101,7 +101,7 @@ export default Vue.extend({ }, move() { - (this as any).apis.chooseDriveFolder().then(folder => { + this.$root.apis.chooseDriveFolder().then(folder => { this.$root.api('drive/files/update', { fileId: this.file.id, folderId: folder == null ? null : folder.id diff --git a/src/client/app/mobile/views/components/drive.vue b/src/client/app/mobile/views/components/drive.vue index 7c0a2cd74a..90e2a325ca 100644 --- a/src/client/app/mobile/views/components/drive.vue +++ b/src/client/app/mobile/views/components/drive.vue @@ -439,7 +439,7 @@ export default Vue.extend({ alert(this.$t('root-move-alert')); return; } - (this as any).apis.chooseDriveFolder().then(folder => { + this.$root.apis.chooseDriveFolder().then(folder => { this.$root.api('drive/folders/update', { parentId: folder ? folder.id : null, folderId: this.folder.id diff --git a/src/client/app/mobile/views/components/note-detail.vue b/src/client/app/mobile/views/components/note-detail.vue index f6cbc82dd8..bd9bc0a4d0 100644 --- a/src/client/app/mobile/views/components/note-detail.vue +++ b/src/client/app/mobile/views/components/note-detail.vue @@ -196,13 +196,13 @@ export default Vue.extend({ }, reply() { - (this as any).apis.post({ + this.$root.apis.post({ reply: this.p }); }, renote() { - (this as any).apis.post({ + this.$root.apis.post({ renote: this.p }); }, diff --git a/src/client/app/mobile/views/components/post-form.vue b/src/client/app/mobile/views/components/post-form.vue index a6e50934a9..832914357f 100644 --- a/src/client/app/mobile/views/components/post-form.vue +++ b/src/client/app/mobile/views/components/post-form.vue @@ -220,7 +220,7 @@ export default Vue.extend({ }, chooseFileFromDrive() { - (this as any).apis.chooseDriveFile({ + this.$root.apis.chooseDriveFile({ multiple: true }).then(files => { files.forEach(this.attachMedia); @@ -279,7 +279,7 @@ export default Vue.extend({ }, addVisibleUser() { - (this as any).apis.input({ + this.$root.apis.input({ title: this.$t('username-prompt') }).then(acct => { if (acct.startsWith('@')) acct = acct.substr(1); diff --git a/src/client/app/mobile/views/pages/drive.vue b/src/client/app/mobile/views/pages/drive.vue index ac207f1d51..e5085d2aa1 100644 --- a/src/client/app/mobile/views/pages/drive.vue +++ b/src/client/app/mobile/views/pages/drive.vue @@ -45,7 +45,7 @@ export default Vue.extend({ window.addEventListener('popstate', this.onPopState); }, mounted() { - document.title = `${this.$root.os.instanceName} Drive`; + document.title = `${this.$root.instanceName} Drive`; }, beforeDestroy() { window.removeEventListener('popstate', this.onPopState); @@ -64,7 +64,7 @@ export default Vue.extend({ (this.$refs as any).browser.openContextMenu(); }, onMoveRoot(silent) { - const title = `${this.$root.os.instanceName} Drive`; + const title = `${this.$root.instanceName} Drive`; if (!silent) { // Rewrite URL @@ -77,7 +77,7 @@ export default Vue.extend({ this.folder = null; }, onOpenFolder(folder, silent) { - const title = `${folder.name} | ${this.$root.os.instanceName} Drive`; + const title = `${folder.name} | ${this.$root.instanceName} Drive`; if (!silent) { // Rewrite URL @@ -90,7 +90,7 @@ export default Vue.extend({ this.folder = folder; }, onOpenFile(file, silent) { - const title = `${file.name} | ${this.$root.os.instanceName} Drive`; + const title = `${file.name} | ${this.$root.instanceName} Drive`; if (!silent) { // Rewrite URL diff --git a/src/client/app/mobile/views/pages/favorites.vue b/src/client/app/mobile/views/pages/favorites.vue index 35f639ec05..ed6095bd7a 100644 --- a/src/client/app/mobile/views/pages/favorites.vue +++ b/src/client/app/mobile/views/pages/favorites.vue @@ -30,7 +30,7 @@ export default Vue.extend({ this.fetch(); }, mounted() { - document.title = `${this.$root.os.instanceName} | %i18n:@notifications%`; + document.title = `${this.$root.instanceName} | %i18n:@notifications%`; }, methods: { fetch() { diff --git a/src/client/app/mobile/views/pages/followers.vue b/src/client/app/mobile/views/pages/followers.vue index 4d69d2cf5c..e5efe185c8 100644 --- a/src/client/app/mobile/views/pages/followers.vue +++ b/src/client/app/mobile/views/pages/followers.vue @@ -50,7 +50,7 @@ export default Vue.extend({ this.user = user; this.fetching = false; - document.title = `${this.$t('followers-of').replace('{}', this.name)} | ${this.$root.os.instanceName}`; + document.title = `${this.$t('followers-of').replace('{}', this.name)} | ${this.$root.instanceName}`; }); }, onLoaded() { diff --git a/src/client/app/mobile/views/pages/following.vue b/src/client/app/mobile/views/pages/following.vue index 52f74eff29..e55a3b4cd6 100644 --- a/src/client/app/mobile/views/pages/following.vue +++ b/src/client/app/mobile/views/pages/following.vue @@ -49,7 +49,7 @@ export default Vue.extend({ this.user = user; this.fetching = false; - document.title = `${this.$t('followers-of').replace('{}', this.name)} | ${this.$root.os.instanceName}`; + document.title = `${this.$t('followers-of').replace('{}', this.name)} | ${this.$root.instanceName}`; }); }, onLoaded() { diff --git a/src/client/app/mobile/views/pages/games/reversi.vue b/src/client/app/mobile/views/pages/games/reversi.vue index 4663ec7f19..470f5cb163 100644 --- a/src/client/app/mobile/views/pages/games/reversi.vue +++ b/src/client/app/mobile/views/pages/games/reversi.vue @@ -15,7 +15,7 @@ export default Vue.extend({ XReversi: () => import('../../../../common/views/components/games/reversi/reversi.vue') }, mounted() { - document.title = `${this.$root.os.instanceName} %i18n:@reversi%`; + document.title = `${this.$root.instanceName} %i18n:@reversi%`; }, methods: { nav(game, actualNav) { diff --git a/src/client/app/mobile/views/pages/home.vue b/src/client/app/mobile/views/pages/home.vue index 8849397df1..dd4785e0ad 100644 --- a/src/client/app/mobile/views/pages/home.vue +++ b/src/client/app/mobile/views/pages/home.vue @@ -128,7 +128,7 @@ export default Vue.extend({ }, mounted() { - document.title = this.$root.os.instanceName; + document.title = this.$root.instanceName; Progress.start(); @@ -139,7 +139,7 @@ export default Vue.extend({ methods: { fn() { - (this as any).apis.post(); + this.$root.apis.post(); }, saveSrc() { diff --git a/src/client/app/mobile/views/pages/messaging-room.vue b/src/client/app/mobile/views/pages/messaging-room.vue index 784c1fcaa5..2bd506b6a6 100644 --- a/src/client/app/mobile/views/pages/messaging-room.vue +++ b/src/client/app/mobile/views/pages/messaging-room.vue @@ -49,7 +49,7 @@ export default Vue.extend({ this.user = user; this.fetching = false; - document.title = `${this.$t('@.messaging')}: ${Vue.filter('userName')(this.user)} | ${this.$root.os.instanceName}`; + document.title = `${this.$t('@.messaging')}: ${Vue.filter('userName')(this.user)} | ${this.$root.instanceName}`; }); } } diff --git a/src/client/app/mobile/views/pages/messaging.vue b/src/client/app/mobile/views/pages/messaging.vue index 59b5410286..9af5d1cd1e 100644 --- a/src/client/app/mobile/views/pages/messaging.vue +++ b/src/client/app/mobile/views/pages/messaging.vue @@ -13,7 +13,7 @@ import getAcct from '../../../../../misc/acct/render'; export default Vue.extend({ i18n: i18n(), mounted() { - document.title = `${this.$root.os.instanceName} ${this.$t('@.messaging')}`; + document.title = `${this.$root.instanceName} ${this.$t('@.messaging')}`; }, methods: { navigate(user) { diff --git a/src/client/app/mobile/views/pages/note.vue b/src/client/app/mobile/views/pages/note.vue index a0449298eb..79757ea374 100644 --- a/src/client/app/mobile/views/pages/note.vue +++ b/src/client/app/mobile/views/pages/note.vue @@ -33,7 +33,7 @@ export default Vue.extend({ this.fetch(); }, mounted() { - document.title = this.$root.os.instanceName; + document.title = this.$root.instanceName; }, methods: { fetch() { diff --git a/src/client/app/mobile/views/pages/search.vue b/src/client/app/mobile/views/pages/search.vue index 00723c26fd..fbabfdf6a0 100644 --- a/src/client/app/mobile/views/pages/search.vue +++ b/src/client/app/mobile/views/pages/search.vue @@ -36,7 +36,7 @@ export default Vue.extend({ } }, mounted() { - document.title = `%i18n:@search%: ${this.q} | ${this.$root.os.instanceName}`; + document.title = `%i18n:@search%: ${this.q} | ${this.$root.instanceName}`; this.fetch(); }, diff --git a/src/client/app/mobile/views/pages/settings.vue b/src/client/app/mobile/views/pages/settings.vue index bc1af8c57d..68dd9bfbbb 100644 --- a/src/client/app/mobile/views/pages/settings.vue +++ b/src/client/app/mobile/views/pages/settings.vue @@ -343,12 +343,12 @@ export default Vue.extend({ this.checkingForUpdate = false; this.latestVersion = newer; if (newer == null) { - (this as any).apis.dialog({ + this.$root.apis.dialog({ title: this.$t('no-updates'), text: this.$t('no-updates-desc') }); } else { - (this as any).apis.dialog({ + this.$root.apis.dialog({ title: this.$t('update-available'), text: this.$t('update-available-desc') }); diff --git a/src/client/app/mobile/views/pages/user-lists.vue b/src/client/app/mobile/views/pages/user-lists.vue index 5cd9d144db..2f0c25b4a8 100644 --- a/src/client/app/mobile/views/pages/user-lists.vue +++ b/src/client/app/mobile/views/pages/user-lists.vue @@ -38,7 +38,7 @@ export default Vue.extend({ }, methods: { fn() { - (this as any).apis.input({ + this.$root.apis.input({ title: this.$t('enter-list-name'), }).then(async title => { const list = await this.$root.api('users/lists/create', { diff --git a/src/client/app/mobile/views/pages/user.vue b/src/client/app/mobile/views/pages/user.vue index 5b915bc1e1..7ac6e17723 100644 --- a/src/client/app/mobile/views/pages/user.vue +++ b/src/client/app/mobile/views/pages/user.vue @@ -110,7 +110,7 @@ export default Vue.extend({ this.fetching = false; Progress.done(); - document.title = `${Vue.filter('userName')(this.user)} | ${this.$root.os.instanceName}`; + document.title = `${Vue.filter('userName')(this.user)} | ${this.$root.instanceName}`; }); }, diff --git a/src/client/app/mobile/views/pages/widgets.vue b/src/client/app/mobile/views/pages/widgets.vue index 739d6ecadd..8db5399cfd 100644 --- a/src/client/app/mobile/views/pages/widgets.vue +++ b/src/client/app/mobile/views/pages/widgets.vue @@ -104,7 +104,7 @@ export default Vue.extend({ }, mounted() { - document.title = this.$root.os.instanceName; + document.title = this.$root.instanceName; }, methods: { |