summaryrefslogtreecommitdiff
path: root/src/client/app/mobile/views
diff options
context:
space:
mode:
authorsyuilo <Syuilotan@yahoo.co.jp>2018-11-09 16:00:29 +0900
committerGitHub <noreply@github.com>2018-11-09 16:00:29 +0900
commit3f79c9ae4927d4186c708e130ecbb1ea4f72d9fa (patch)
tree3af53c7b8d5ecc5f0c21cbc5abec3ec5254606b0 /src/client/app/mobile/views
parent[Client] Fix bug (diff)
downloadmisskey-3f79c9ae4927d4186c708e130ecbb1ea4f72d9fa.tar.gz
misskey-3f79c9ae4927d4186c708e130ecbb1ea4f72d9fa.tar.bz2
misskey-3f79c9ae4927d4186c708e130ecbb1ea4f72d9fa.zip
Refactor client (#3178)
* wip * wip * wip * wip * wip * wip * wip * wip * wip * wip
Diffstat (limited to 'src/client/app/mobile/views')
-rw-r--r--src/client/app/mobile/views/components/drive.file-detail.vue2
-rw-r--r--src/client/app/mobile/views/components/drive.vue2
-rw-r--r--src/client/app/mobile/views/components/note-detail.vue4
-rw-r--r--src/client/app/mobile/views/components/post-form.vue4
-rw-r--r--src/client/app/mobile/views/components/ui.header.vue2
-rw-r--r--src/client/app/mobile/views/pages/home.vue2
-rw-r--r--src/client/app/mobile/views/pages/settings.vue6
-rw-r--r--src/client/app/mobile/views/pages/user-lists.vue2
8 files changed, 12 insertions, 12 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 68a16a8350..3aa04d045c 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.$root.apis.chooseDriveFolder().then(folder => {
+ this.$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 90e2a325ca..e7a5d99832 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.$root.apis.chooseDriveFolder().then(folder => {
+ this.$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 bd9bc0a4d0..4f5d160542 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.$root.apis.post({
+ this.$post({
reply: this.p
});
},
renote() {
- this.$root.apis.post({
+ this.$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 b1914d4afb..ca6c0b41fa 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.$root.apis.chooseDriveFile({
+ this.$chooseDriveFile({
multiple: true
}).then(files => {
files.forEach(this.attachMedia);
@@ -279,7 +279,7 @@ export default Vue.extend({
},
addVisibleUser() {
- this.$root.apis.input({
+ this.$input({
title: this.$t('username-prompt')
}).then(acct => {
if (acct.startsWith('@')) acct = acct.substr(1);
diff --git a/src/client/app/mobile/views/components/ui.header.vue b/src/client/app/mobile/views/components/ui.header.vue
index f5b9161286..2bd472f38e 100644
--- a/src/client/app/mobile/views/components/ui.header.vue
+++ b/src/client/app/mobile/views/components/ui.header.vue
@@ -7,7 +7,7 @@
<button class="nav" @click="$parent.isDrawerOpening = true"><fa icon="bars"/></button>
<i v-if="hasUnreadNotification || hasUnreadMessagingMessage || hasGameInvitation" class="circle"><fa icon="circle"/></i>
<h1>
- <slot>{{ os.instanceName }}</slot>
+ <slot>{{ $root.instanceName }}</slot>
</h1>
<slot name="func"></slot>
</div>
diff --git a/src/client/app/mobile/views/pages/home.vue b/src/client/app/mobile/views/pages/home.vue
index dd4785e0ad..ed057c2207 100644
--- a/src/client/app/mobile/views/pages/home.vue
+++ b/src/client/app/mobile/views/pages/home.vue
@@ -139,7 +139,7 @@ export default Vue.extend({
methods: {
fn() {
- this.$root.apis.post();
+ this.$post();
},
saveSrc() {
diff --git a/src/client/app/mobile/views/pages/settings.vue b/src/client/app/mobile/views/pages/settings.vue
index 1158e45094..445471200a 100644
--- a/src/client/app/mobile/views/pages/settings.vue
+++ b/src/client/app/mobile/views/pages/settings.vue
@@ -339,16 +339,16 @@ export default Vue.extend({
checkForUpdate() {
this.checkingForUpdate = true;
- checkForUpdate((this as any).os, true, true).then(newer => {
+ checkForUpdate(this.$root, true, true).then(newer => {
this.checkingForUpdate = false;
this.latestVersion = newer;
if (newer == null) {
- this.$root.apis.dialog({
+ this.$dialog({
title: this.$t('no-updates'),
text: this.$t('no-updates-desc')
});
} else {
- this.$root.apis.dialog({
+ this.$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 2f0c25b4a8..2222a22487 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.$root.apis.input({
+ this.$input({
title: this.$t('enter-list-name'),
}).then(async title => {
const list = await this.$root.api('users/lists/create', {