summaryrefslogtreecommitdiff
path: root/src/server/web/app/mobile/views/components
diff options
context:
space:
mode:
authorsyuilo <syuilotan@yahoo.co.jp>2018-03-29 14:48:47 +0900
committersyuilo <syuilotan@yahoo.co.jp>2018-03-29 14:48:47 +0900
commitbfc193d8cd9aecdb82d585e8b4e101deac60a5bb (patch)
tree8b4dac3a56cf703650c8207f9279028a8560a96b /src/server/web/app/mobile/views/components
parentresolve conflict (diff)
downloadsharkey-bfc193d8cd9aecdb82d585e8b4e101deac60a5bb.tar.gz
sharkey-bfc193d8cd9aecdb82d585e8b4e101deac60a5bb.tar.bz2
sharkey-bfc193d8cd9aecdb82d585e8b4e101deac60a5bb.zip
Resolve conflicts
Diffstat (limited to 'src/server/web/app/mobile/views/components')
-rw-r--r--src/server/web/app/mobile/views/components/activity.vue2
-rw-r--r--src/server/web/app/mobile/views/components/drive.file-detail.vue14
-rw-r--r--src/server/web/app/mobile/views/components/drive.file.vue4
-rw-r--r--src/server/web/app/mobile/views/components/drive.vue38
-rw-r--r--src/server/web/app/mobile/views/components/follow-button.vue22
-rw-r--r--src/server/web/app/mobile/views/components/media-image.vue2
-rw-r--r--src/server/web/app/mobile/views/components/notification-preview.vue14
-rw-r--r--src/server/web/app/mobile/views/components/notification.vue16
-rw-r--r--src/server/web/app/mobile/views/components/notifications.vue6
-rw-r--r--src/server/web/app/mobile/views/components/post-card.vue2
-rw-r--r--src/server/web/app/mobile/views/components/post-detail.sub.vue4
-rw-r--r--src/server/web/app/mobile/views/components/post-detail.vue28
-rw-r--r--src/server/web/app/mobile/views/components/post-form.vue8
-rw-r--r--src/server/web/app/mobile/views/components/post-preview.vue4
-rw-r--r--src/server/web/app/mobile/views/components/post.sub.vue4
-rw-r--r--src/server/web/app/mobile/views/components/post.vue30
-rw-r--r--src/server/web/app/mobile/views/components/posts.vue4
-rw-r--r--src/server/web/app/mobile/views/components/sub-post-content.vue4
-rw-r--r--src/server/web/app/mobile/views/components/timeline.vue6
-rw-r--r--src/server/web/app/mobile/views/components/ui.header.vue4
-rw-r--r--src/server/web/app/mobile/views/components/ui.nav.vue2
-rw-r--r--src/server/web/app/mobile/views/components/user-card.vue4
-rw-r--r--src/server/web/app/mobile/views/components/user-preview.vue2
-rw-r--r--src/server/web/app/mobile/views/components/user-timeline.vue10
24 files changed, 117 insertions, 117 deletions
diff --git a/src/server/web/app/mobile/views/components/activity.vue b/src/server/web/app/mobile/views/components/activity.vue
index b50044b3de..2e44017e77 100644
--- a/src/server/web/app/mobile/views/components/activity.vue
+++ b/src/server/web/app/mobile/views/components/activity.vue
@@ -29,7 +29,7 @@ export default Vue.extend({
},
mounted() {
(this as any).api('aggregation/users/activity', {
- user_id: this.user.id,
+ userId: this.user.id,
limit: 30
}).then(data => {
data.forEach(d => d.total = d.posts + d.replies + d.reposts);
diff --git a/src/server/web/app/mobile/views/components/drive.file-detail.vue b/src/server/web/app/mobile/views/components/drive.file-detail.vue
index e41ebbb451..f3274f677f 100644
--- a/src/server/web/app/mobile/views/components/drive.file-detail.vue
+++ b/src/server/web/app/mobile/views/components/drive.file-detail.vue
@@ -29,7 +29,7 @@
<span class="separator"></span>
<span class="data-size">{{ file.datasize | bytes }}</span>
<span class="separator"></span>
- <span class="created-at" @click="showCreatedAt">%fa:R clock%<mk-time :time="file.created_at"/></span>
+ <span class="created-at" @click="showCreatedAt">%fa:R clock%<mk-time :time="file.createdAt"/></span>
</div>
</div>
<div class="menu">
@@ -86,8 +86,8 @@ export default Vue.extend({
return this.file.type.split('/')[0];
},
style(): any {
- return this.file.properties.average_color ? {
- 'background-color': `rgb(${ this.file.properties.average_color.join(',') })`
+ return this.file.properties.avgColor ? {
+ 'background-color': `rgb(${ this.file.properties.avgColor.join(',') })`
} : {};
}
},
@@ -96,7 +96,7 @@ export default Vue.extend({
const name = window.prompt('名前を変更', this.file.name);
if (name == null || name == '' || name == this.file.name) return;
(this as any).api('drive/files/update', {
- file_id: this.file.id,
+ fileId: this.file.id,
name: name
}).then(() => {
this.browser.cf(this.file, true);
@@ -105,15 +105,15 @@ export default Vue.extend({
move() {
(this as any).apis.chooseDriveFolder().then(folder => {
(this as any).api('drive/files/update', {
- file_id: this.file.id,
- folder_id: folder == null ? null : folder.id
+ fileId: this.file.id,
+ folderId: folder == null ? null : folder.id
}).then(() => {
this.browser.cf(this.file, true);
});
});
},
showCreatedAt() {
- alert(new Date(this.file.created_at).toLocaleString());
+ alert(new Date(this.file.createdAt).toLocaleString());
},
onImageLoaded() {
const self = this;
diff --git a/src/server/web/app/mobile/views/components/drive.file.vue b/src/server/web/app/mobile/views/components/drive.file.vue
index db73816282..7d1957042b 100644
--- a/src/server/web/app/mobile/views/components/drive.file.vue
+++ b/src/server/web/app/mobile/views/components/drive.file.vue
@@ -19,7 +19,7 @@
<p class="data-size">{{ file.datasize | bytes }}</p>
<p class="separator"></p>
<p class="created-at">
- %fa:R clock%<mk-time :time="file.created_at"/>
+ %fa:R clock%<mk-time :time="file.createdAt"/>
</p>
</footer>
</div>
@@ -42,7 +42,7 @@ export default Vue.extend({
},
thumbnail(): any {
return {
- 'background-color': this.file.properties.average_color ? `rgb(${this.file.properties.average_color.join(',')})` : 'transparent',
+ 'background-color': this.file.properties.avgColor ? `rgb(${this.file.properties.avgColor.join(',')})` : 'transparent',
'background-image': `url(${this.file.url}?thumbnail&size=128)`
};
}
diff --git a/src/server/web/app/mobile/views/components/drive.vue b/src/server/web/app/mobile/views/components/drive.vue
index 696c63e2a4..ff5366a0ad 100644
--- a/src/server/web/app/mobile/views/components/drive.vue
+++ b/src/server/web/app/mobile/views/components/drive.vue
@@ -19,10 +19,10 @@
<div class="browser" :class="{ fetching }" v-if="file == null">
<div class="info" v-if="info">
<p v-if="folder == null">{{ (info.usage / info.capacity * 100).toFixed(1) }}% %i18n:mobile.tags.mk-drive.used%</p>
- <p v-if="folder != null && (folder.folders_count > 0 || folder.files_count > 0)">
- <template v-if="folder.folders_count > 0">{{ folder.folders_count }} %i18n:mobile.tags.mk-drive.folder-count%</template>
- <template v-if="folder.folders_count > 0 && folder.files_count > 0">%i18n:mobile.tags.mk-drive.count-separator%</template>
- <template v-if="folder.files_count > 0">{{ folder.files_count }} %i18n:mobile.tags.mk-drive.file-count%</template>
+ <p v-if="folder != null && (folder.foldersCount > 0 || folder.filesCount > 0)">
+ <template v-if="folder.foldersCount > 0">{{ folder.foldersCount }} %i18n:mobile.tags.mk-drive.folder-count%</template>
+ <template v-if="folder.foldersCount > 0 && folder.filesCount > 0">%i18n:mobile.tags.mk-drive.count-separator%</template>
+ <template v-if="folder.filesCount > 0">{{ folder.filesCount }} %i18n:mobile.tags.mk-drive.file-count%</template>
</p>
</div>
<div class="folders" v-if="folders.length > 0">
@@ -129,7 +129,7 @@ export default Vue.extend({
onStreamDriveFileUpdated(file) {
const current = this.folder ? this.folder.id : null;
- if (current != file.folder_id) {
+ if (current != file.folderId) {
this.removeFile(file);
} else {
this.addFile(file, true);
@@ -142,7 +142,7 @@ export default Vue.extend({
onStreamDriveFolderUpdated(folder) {
const current = this.folder ? this.folder.id : null;
- if (current != folder.parent_id) {
+ if (current != folder.parentId) {
this.removeFolder(folder);
} else {
this.addFolder(folder, true);
@@ -167,7 +167,7 @@ export default Vue.extend({
this.fetching = true;
(this as any).api('drive/folders/show', {
- folder_id: target
+ folderId: target
}).then(folder => {
this.folder = folder;
this.hierarchyFolders = [];
@@ -182,7 +182,7 @@ export default Vue.extend({
addFolder(folder, unshift = false) {
const current = this.folder ? this.folder.id : null;
// 追加しようとしているフォルダが、今居る階層とは違う階層のものだったら中断
- if (current != folder.parent_id) return;
+ if (current != folder.parentId) return;
// 追加しようとしているフォルダを既に所有してたら中断
if (this.folders.some(f => f.id == folder.id)) return;
@@ -197,7 +197,7 @@ export default Vue.extend({
addFile(file, unshift = false) {
const current = this.folder ? this.folder.id : null;
// 追加しようとしているファイルが、今居る階層とは違う階層のものだったら中断
- if (current != file.folder_id) return;
+ if (current != file.folderId) return;
if (this.files.some(f => f.id == file.id)) {
const exist = this.files.map(f => f.id).indexOf(file.id);
@@ -262,7 +262,7 @@ export default Vue.extend({
// フォルダ一覧取得
(this as any).api('drive/folders', {
- folder_id: this.folder ? this.folder.id : null,
+ folderId: this.folder ? this.folder.id : null,
limit: foldersMax + 1
}).then(folders => {
if (folders.length == foldersMax + 1) {
@@ -275,7 +275,7 @@ export default Vue.extend({
// ファイル一覧取得
(this as any).api('drive/files', {
- folder_id: this.folder ? this.folder.id : null,
+ folderId: this.folder ? this.folder.id : null,
limit: filesMax + 1
}).then(files => {
if (files.length == filesMax + 1) {
@@ -318,9 +318,9 @@ export default Vue.extend({
// ファイル一覧取得
(this as any).api('drive/files', {
- folder_id: this.folder ? this.folder.id : null,
+ folderId: this.folder ? this.folder.id : null,
limit: max + 1,
- until_id: this.files[this.files.length - 1].id
+ untilId: this.files[this.files.length - 1].id
}).then(files => {
if (files.length == max + 1) {
this.moreFiles = true;
@@ -357,7 +357,7 @@ export default Vue.extend({
this.fetching = true;
(this as any).api('drive/files/show', {
- file_id: file
+ fileId: file
}).then(file => {
this.file = file;
this.folder = null;
@@ -405,7 +405,7 @@ export default Vue.extend({
if (name == null || name == '') return;
(this as any).api('drive/folders/create', {
name: name,
- parent_id: this.folder ? this.folder.id : undefined
+ parentId: this.folder ? this.folder.id : undefined
}).then(folder => {
this.addFolder(folder, true);
});
@@ -420,7 +420,7 @@ export default Vue.extend({
if (name == null || name == '') return;
(this as any).api('drive/folders/update', {
name: name,
- folder_id: this.folder.id
+ folderId: this.folder.id
}).then(folder => {
this.cd(folder);
});
@@ -433,8 +433,8 @@ export default Vue.extend({
}
(this as any).apis.chooseDriveFolder().then(folder => {
(this as any).api('drive/folders/update', {
- parent_id: folder ? folder.id : null,
- folder_id: this.folder.id
+ parentId: folder ? folder.id : null,
+ folderId: this.folder.id
}).then(folder => {
this.cd(folder);
});
@@ -446,7 +446,7 @@ export default Vue.extend({
if (url == null || url == '') return;
(this as any).api('drive/files/upload_from_url', {
url: url,
- folder_id: this.folder ? this.folder.id : undefined
+ folderId: this.folder ? this.folder.id : undefined
});
alert('アップロードをリクエストしました。アップロードが完了するまで時間がかかる場合があります。');
},
diff --git a/src/server/web/app/mobile/views/components/follow-button.vue b/src/server/web/app/mobile/views/components/follow-button.vue
index fb6eaa39c6..43c69d4e02 100644
--- a/src/server/web/app/mobile/views/components/follow-button.vue
+++ b/src/server/web/app/mobile/views/components/follow-button.vue
@@ -1,13 +1,13 @@
<template>
<button class="mk-follow-button"
- :class="{ wait: wait, follow: !user.is_following, unfollow: user.is_following }"
+ :class="{ wait: wait, follow: !user.isFollowing, unfollow: user.isFollowing }"
@click="onClick"
:disabled="wait"
>
- <template v-if="!wait && user.is_following">%fa:minus%</template>
- <template v-if="!wait && !user.is_following">%fa:plus%</template>
+ <template v-if="!wait && user.isFollowing">%fa:minus%</template>
+ <template v-if="!wait && !user.isFollowing">%fa:plus%</template>
<template v-if="wait">%fa:spinner .pulse .fw%</template>
- {{ user.is_following ? '%i18n:mobile.tags.mk-follow-button.unfollow%' : '%i18n:mobile.tags.mk-follow-button.follow%' }}
+ {{ user.isFollowing ? '%i18n:mobile.tags.mk-follow-button.unfollow%' : '%i18n:mobile.tags.mk-follow-button.follow%' }}
</button>
</template>
@@ -43,23 +43,23 @@ export default Vue.extend({
onFollow(user) {
if (user.id == this.user.id) {
- this.user.is_following = user.is_following;
+ this.user.isFollowing = user.isFollowing;
}
},
onUnfollow(user) {
if (user.id == this.user.id) {
- this.user.is_following = user.is_following;
+ this.user.isFollowing = user.isFollowing;
}
},
onClick() {
this.wait = true;
- if (this.user.is_following) {
+ if (this.user.isFollowing) {
(this as any).api('following/delete', {
- user_id: this.user.id
+ userId: this.user.id
}).then(() => {
- this.user.is_following = false;
+ this.user.isFollowing = false;
}).catch(err => {
console.error(err);
}).then(() => {
@@ -67,9 +67,9 @@ export default Vue.extend({
});
} else {
(this as any).api('following/create', {
- user_id: this.user.id
+ userId: this.user.id
}).then(() => {
- this.user.is_following = true;
+ this.user.isFollowing = true;
}).catch(err => {
console.error(err);
}).then(() => {
diff --git a/src/server/web/app/mobile/views/components/media-image.vue b/src/server/web/app/mobile/views/components/media-image.vue
index faf8bad48a..cfc2134988 100644
--- a/src/server/web/app/mobile/views/components/media-image.vue
+++ b/src/server/web/app/mobile/views/components/media-image.vue
@@ -10,7 +10,7 @@ export default Vue.extend({
computed: {
style(): any {
return {
- 'background-color': this.image.properties.average_color ? `rgb(${this.image.properties.average_color.join(',')})` : 'transparent',
+ 'background-color': this.image.properties.avgColor ? `rgb(${this.image.properties.avgColor.join(',')})` : 'transparent',
'background-image': `url(${this.image.url}?thumbnail&size=512)`
};
}
diff --git a/src/server/web/app/mobile/views/components/notification-preview.vue b/src/server/web/app/mobile/views/components/notification-preview.vue
index 47df626fa8..fce9ed82f9 100644
--- a/src/server/web/app/mobile/views/components/notification-preview.vue
+++ b/src/server/web/app/mobile/views/components/notification-preview.vue
@@ -1,7 +1,7 @@
<template>
<div class="mk-notification-preview" :class="notification.type">
<template v-if="notification.type == 'reaction'">
- <img class="avatar" :src="`${notification.user.avatar_url}?thumbnail&size=64`" alt="avatar"/>
+ <img class="avatar" :src="`${notification.user.avatarUrl}?thumbnail&size=64`" alt="avatar"/>
<div class="text">
<p><mk-reaction-icon :reaction="notification.reaction"/>{{ notification.user.name }}</p>
<p class="post-ref">%fa:quote-left%{{ getPostSummary(notification.post) }}%fa:quote-right%</p>
@@ -9,7 +9,7 @@
</template>
<template v-if="notification.type == 'repost'">
- <img class="avatar" :src="`${notification.post.user.avatar_url}?thumbnail&size=64`" alt="avatar"/>
+ <img class="avatar" :src="`${notification.post.user.avatarUrl}?thumbnail&size=64`" alt="avatar"/>
<div class="text">
<p>%fa:retweet%{{ notification.post.user.name }}</p>
<p class="post-ref">%fa:quote-left%{{ getPostSummary(notification.post.repost) }}%fa:quote-right%</p>
@@ -17,7 +17,7 @@
</template>
<template v-if="notification.type == 'quote'">
- <img class="avatar" :src="`${notification.post.user.avatar_url}?thumbnail&size=64`" alt="avatar"/>
+ <img class="avatar" :src="`${notification.post.user.avatarUrl}?thumbnail&size=64`" alt="avatar"/>
<div class="text">
<p>%fa:quote-left%{{ notification.post.user.name }}</p>
<p class="post-preview">{{ getPostSummary(notification.post) }}</p>
@@ -25,14 +25,14 @@
</template>
<template v-if="notification.type == 'follow'">
- <img class="avatar" :src="`${notification.user.avatar_url}?thumbnail&size=64`" alt="avatar"/>
+ <img class="avatar" :src="`${notification.user.avatarUrl}?thumbnail&size=64`" alt="avatar"/>
<div class="text">
<p>%fa:user-plus%{{ notification.user.name }}</p>
</div>
</template>
<template v-if="notification.type == 'reply'">
- <img class="avatar" :src="`${notification.post.user.avatar_url}?thumbnail&size=64`" alt="avatar"/>
+ <img class="avatar" :src="`${notification.post.user.avatarUrl}?thumbnail&size=64`" alt="avatar"/>
<div class="text">
<p>%fa:reply%{{ notification.post.user.name }}</p>
<p class="post-preview">{{ getPostSummary(notification.post) }}</p>
@@ -40,7 +40,7 @@
</template>
<template v-if="notification.type == 'mention'">
- <img class="avatar" :src="`${notification.post.user.avatar_url}?thumbnail&size=64`" alt="avatar"/>
+ <img class="avatar" :src="`${notification.post.user.avatarUrl}?thumbnail&size=64`" alt="avatar"/>
<div class="text">
<p>%fa:at%{{ notification.post.user.name }}</p>
<p class="post-preview">{{ getPostSummary(notification.post) }}</p>
@@ -48,7 +48,7 @@
</template>
<template v-if="notification.type == 'poll_vote'">
- <img class="avatar" :src="`${notification.user.avatar_url}?thumbnail&size=64`" alt="avatar"/>
+ <img class="avatar" :src="`${notification.user.avatarUrl}?thumbnail&size=64`" alt="avatar"/>
<div class="text">
<p>%fa:chart-pie%{{ notification.user.name }}</p>
<p class="post-ref">%fa:quote-left%{{ getPostSummary(notification.post) }}%fa:quote-right%</p>
diff --git a/src/server/web/app/mobile/views/components/notification.vue b/src/server/web/app/mobile/views/components/notification.vue
index 150ac0fd8b..e221fb3ac4 100644
--- a/src/server/web/app/mobile/views/components/notification.vue
+++ b/src/server/web/app/mobile/views/components/notification.vue
@@ -1,9 +1,9 @@
<template>
<div class="mk-notification">
<div class="notification reaction" v-if="notification.type == 'reaction'">
- <mk-time :time="notification.created_at"/>
+ <mk-time :time="notification.createdAt"/>
<router-link class="avatar-anchor" :to="`/@${acct}`">
- <img class="avatar" :src="`${notification.user.avatar_url}?thumbnail&size=64`" alt="avatar"/>
+ <img class="avatar" :src="`${notification.user.avatarUrl}?thumbnail&size=64`" alt="avatar"/>
</router-link>
<div class="text">
<p>
@@ -18,9 +18,9 @@
</div>
<div class="notification repost" v-if="notification.type == 'repost'">
- <mk-time :time="notification.created_at"/>
+ <mk-time :time="notification.createdAt"/>
<router-link class="avatar-anchor" :to="`/@${acct}`">
- <img class="avatar" :src="`${notification.post.user.avatar_url}?thumbnail&size=64`" alt="avatar"/>
+ <img class="avatar" :src="`${notification.post.user.avatarUrl}?thumbnail&size=64`" alt="avatar"/>
</router-link>
<div class="text">
<p>
@@ -38,9 +38,9 @@
</template>
<div class="notification follow" v-if="notification.type == 'follow'">
- <mk-time :time="notification.created_at"/>
+ <mk-time :time="notification.createdAt"/>
<router-link class="avatar-anchor" :to="`/@${acct}`">
- <img class="avatar" :src="`${notification.user.avatar_url}?thumbnail&size=64`" alt="avatar"/>
+ <img class="avatar" :src="`${notification.user.avatarUrl}?thumbnail&size=64`" alt="avatar"/>
</router-link>
<div class="text">
<p>
@@ -59,9 +59,9 @@
</template>
<div class="notification poll_vote" v-if="notification.type == 'poll_vote'">
- <mk-time :time="notification.created_at"/>
+ <mk-time :time="notification.createdAt"/>
<router-link class="avatar-anchor" :to="`/@${acct}`">
- <img class="avatar" :src="`${notification.user.avatar_url}?thumbnail&size=64`" alt="avatar"/>
+ <img class="avatar" :src="`${notification.user.avatarUrl}?thumbnail&size=64`" alt="avatar"/>
</router-link>
<div class="text">
<p>
diff --git a/src/server/web/app/mobile/views/components/notifications.vue b/src/server/web/app/mobile/views/components/notifications.vue
index 1cd6e2bc13..d68b990dfa 100644
--- a/src/server/web/app/mobile/views/components/notifications.vue
+++ b/src/server/web/app/mobile/views/components/notifications.vue
@@ -34,8 +34,8 @@ export default Vue.extend({
computed: {
_notifications(): any[] {
return (this.notifications as any).map(notification => {
- const date = new Date(notification.created_at).getDate();
- const month = new Date(notification.created_at).getMonth() + 1;
+ const date = new Date(notification.createdAt).getDate();
+ const month = new Date(notification.createdAt).getMonth() + 1;
notification._date = date;
notification._datetext = `${month}月 ${date}日`;
return notification;
@@ -75,7 +75,7 @@ export default Vue.extend({
(this as any).api('i/notifications', {
limit: max + 1,
- until_id: this.notifications[this.notifications.length - 1].id
+ untilId: this.notifications[this.notifications.length - 1].id
}).then(notifications => {
if (notifications.length == max + 1) {
this.moreNotifications = true;
diff --git a/src/server/web/app/mobile/views/components/post-card.vue b/src/server/web/app/mobile/views/components/post-card.vue
index 8ca7550c2e..10dfd92415 100644
--- a/src/server/web/app/mobile/views/components/post-card.vue
+++ b/src/server/web/app/mobile/views/components/post-card.vue
@@ -7,7 +7,7 @@
<div>
{{ text }}
</div>
- <mk-time :time="post.created_at"/>
+ <mk-time :time="post.createdAt"/>
</a>
</div>
</template>
diff --git a/src/server/web/app/mobile/views/components/post-detail.sub.vue b/src/server/web/app/mobile/views/components/post-detail.sub.vue
index 6906cf570e..db7567834a 100644
--- a/src/server/web/app/mobile/views/components/post-detail.sub.vue
+++ b/src/server/web/app/mobile/views/components/post-detail.sub.vue
@@ -1,14 +1,14 @@
<template>
<div class="root sub">
<router-link class="avatar-anchor" :to="`/@${acct}`">
- <img class="avatar" :src="`${post.user.avatar_url}?thumbnail&size=64`" alt="avatar"/>
+ <img class="avatar" :src="`${post.user.avatarUrl}?thumbnail&size=64`" alt="avatar"/>
</router-link>
<div class="main">
<header>
<router-link class="name" :to="`/@${acct}`">{{ post.user.name }}</router-link>
<span class="username">@{{ acct }}</span>
<router-link class="time" :to="`/@${acct}/${post.id}`">
- <mk-time :time="post.created_at"/>
+ <mk-time :time="post.createdAt"/>
</router-link>
</header>
<div class="body">
diff --git a/src/server/web/app/mobile/views/components/post-detail.vue b/src/server/web/app/mobile/views/components/post-detail.vue
index b5c9158300..29993c79ed 100644
--- a/src/server/web/app/mobile/views/components/post-detail.vue
+++ b/src/server/web/app/mobile/views/components/post-detail.vue
@@ -2,7 +2,7 @@
<div class="mk-post-detail">
<button
class="more"
- v-if="p.reply && p.reply.reply_id && context == null"
+ v-if="p.reply && p.reply.replyId && context == null"
@click="fetchContext"
:disabled="fetchingContext"
>
@@ -18,7 +18,7 @@
<div class="repost" v-if="isRepost">
<p>
<router-link class="avatar-anchor" :to="`/@${acct}`">
- <img class="avatar" :src="`${post.user.avatar_url}?thumbnail&size=32`" alt="avatar"/>
+ <img class="avatar" :src="`${post.user.avatarUrl}?thumbnail&size=32`" alt="avatar"/>
</router-link>
%fa:retweet%
<router-link class="name" :to="`/@${acct}`">
@@ -30,7 +30,7 @@
<article>
<header>
<router-link class="avatar-anchor" :to="`/@${pAcct}`">
- <img class="avatar" :src="`${p.user.avatar_url}?thumbnail&size=64`" alt="avatar"/>
+ <img class="avatar" :src="`${p.user.avatarUrl}?thumbnail&size=64`" alt="avatar"/>
</router-link>
<div>
<router-link class="name" :to="`/@${pAcct}`">{{ p.user.name }}</router-link>
@@ -54,17 +54,17 @@
</div>
</div>
<router-link class="time" :to="`/@${pAcct}/${p.id}`">
- <mk-time :time="p.created_at" mode="detail"/>
+ <mk-time :time="p.createdAt" mode="detail"/>
</router-link>
<footer>
<mk-reactions-viewer :post="p"/>
<button @click="reply" title="%i18n:mobile.tags.mk-post-detail.reply%">
- %fa:reply%<p class="count" v-if="p.replies_count > 0">{{ p.replies_count }}</p>
+ %fa:reply%<p class="count" v-if="p.repliesCount > 0">{{ p.repliesCount }}</p>
</button>
<button @click="repost" title="Repost">
- %fa:retweet%<p class="count" v-if="p.repost_count > 0">{{ p.repost_count }}</p>
+ %fa:retweet%<p class="count" v-if="p.repostCount > 0">{{ p.repostCount }}</p>
</button>
- <button :class="{ reacted: p.my_reaction != null }" @click="react" ref="reactButton" title="%i18n:mobile.tags.mk-post-detail.reaction%">
+ <button :class="{ reacted: p.myReaction != null }" @click="react" ref="reactButton" title="%i18n:mobile.tags.mk-post-detail.reaction%">
%fa:plus%<p class="count" v-if="p.reactions_count > 0">{{ p.reactions_count }}</p>
</button>
<button @click="menu" ref="menuButton">
@@ -115,16 +115,16 @@ export default Vue.extend({
isRepost(): boolean {
return (this.post.repost &&
this.post.text == null &&
- this.post.media_ids == null &&
+ this.post.mediaIds == null &&
this.post.poll == null);
},
p(): any {
return this.isRepost ? this.post.repost : this.post;
},
reactionsCount(): number {
- return this.p.reaction_counts
- ? Object.keys(this.p.reaction_counts)
- .map(key => this.p.reaction_counts[key])
+ return this.p.reactionCounts
+ ? Object.keys(this.p.reactionCounts)
+ .map(key => this.p.reactionCounts[key])
.reduce((a, b) => a + b)
: 0;
},
@@ -142,7 +142,7 @@ export default Vue.extend({
// Get replies
if (!this.compact) {
(this as any).api('posts/replies', {
- post_id: this.p.id,
+ postId: this.p.id,
limit: 8
}).then(replies => {
this.replies = replies;
@@ -151,7 +151,7 @@ export default Vue.extend({
// Draw map
if (this.p.geo) {
- const shouldShowMap = (this as any).os.isSignedIn ? (this as any).os.i.account.client_settings.showMaps : true;
+ const shouldShowMap = (this as any).os.isSignedIn ? (this as any).os.i.account.clientSettings.showMaps : true;
if (shouldShowMap) {
(this as any).os.getGoogleMaps().then(maps => {
const uluru = new maps.LatLng(this.p.geo.latitude, this.p.geo.longitude);
@@ -173,7 +173,7 @@ export default Vue.extend({
// Fetch context
(this as any).api('posts/context', {
- post_id: this.p.reply_id
+ postId: this.p.replyId
}).then(context => {
this.contextFetching = false;
this.context = context.reverse();
diff --git a/src/server/web/app/mobile/views/components/post-form.vue b/src/server/web/app/mobile/views/components/post-form.vue
index 2aa3c6f6c0..929dc5933b 100644
--- a/src/server/web/app/mobile/views/components/post-form.vue
+++ b/src/server/web/app/mobile/views/components/post-form.vue
@@ -111,11 +111,11 @@ export default Vue.extend({
},
post() {
this.posting = true;
- const viaMobile = (this as any).os.i.account.client_settings.disableViaMobile !== true;
+ const viaMobile = (this as any).os.i.account.clientSettings.disableViaMobile !== true;
(this as any).api('posts/create', {
text: this.text == '' ? undefined : this.text,
- media_ids: this.files.length > 0 ? this.files.map(f => f.id) : undefined,
- reply_id: this.reply ? this.reply.id : undefined,
+ mediaIds: this.files.length > 0 ? this.files.map(f => f.id) : undefined,
+ replyId: this.reply ? this.reply.id : undefined,
poll: this.poll ? (this.$refs.poll as any).get() : undefined,
geo: this.geo ? {
latitude: this.geo.latitude,
@@ -126,7 +126,7 @@ export default Vue.extend({
heading: isNaN(this.geo.heading) ? null : this.geo.heading,
speed: this.geo.speed,
} : null,
- via_mobile: viaMobile
+ viaMobile: viaMobile
}).then(data => {
this.$emit('post');
this.$destroy();
diff --git a/src/server/web/app/mobile/views/components/post-preview.vue b/src/server/web/app/mobile/views/components/post-preview.vue
index 0bd0a355b3..a6141dc8e3 100644
--- a/src/server/web/app/mobile/views/components/post-preview.vue
+++ b/src/server/web/app/mobile/views/components/post-preview.vue
@@ -1,14 +1,14 @@
<template>
<div class="mk-post-preview">
<router-link class="avatar-anchor" :to="`/@${acct}`">
- <img class="avatar" :src="`${post.user.avatar_url}?thumbnail&size=64`" alt="avatar"/>
+ <img class="avatar" :src="`${post.user.avatarUrl}?thumbnail&size=64`" alt="avatar"/>
</router-link>
<div class="main">
<header>
<router-link class="name" :to="`/@${acct}`">{{ post.user.name }}</router-link>
<span class="username">@{{ acct }}</span>
<router-link class="time" :to="`/@${acct}/${post.id}`">
- <mk-time :time="post.created_at"/>
+ <mk-time :time="post.createdAt"/>
</router-link>
</header>
<div class="body">
diff --git a/src/server/web/app/mobile/views/components/post.sub.vue b/src/server/web/app/mobile/views/components/post.sub.vue
index b6ee7c1e08..adf444a2d6 100644
--- a/src/server/web/app/mobile/views/components/post.sub.vue
+++ b/src/server/web/app/mobile/views/components/post.sub.vue
@@ -1,14 +1,14 @@
<template>
<div class="sub">
<router-link class="avatar-anchor" :to="`/@${acct}`">
- <img class="avatar" :src="`${post.user.avatar_url}?thumbnail&size=96`" alt="avatar"/>
+ <img class="avatar" :src="`${post.user.avatarUrl}?thumbnail&size=96`" alt="avatar"/>
</router-link>
<div class="main">
<header>
<router-link class="name" :to="`/@${acct}`">{{ post.user.name }}</router-link>
<span class="username">@{{ acct }}</span>
<router-link class="created-at" :to="`/@${acct}/${post.id}`">
- <mk-time :time="post.created_at"/>
+ <mk-time :time="post.createdAt"/>
</router-link>
</header>
<div class="body">
diff --git a/src/server/web/app/mobile/views/components/post.vue b/src/server/web/app/mobile/views/components/post.vue
index e5bc964792..66c595f4e9 100644
--- a/src/server/web/app/mobile/views/components/post.vue
+++ b/src/server/web/app/mobile/views/components/post.vue
@@ -6,28 +6,28 @@
<div class="repost" v-if="isRepost">
<p>
<router-link class="avatar-anchor" :to="`/@${acct}`">
- <img class="avatar" :src="`${post.user.avatar_url}?thumbnail&size=64`" alt="avatar"/>
+ <img class="avatar" :src="`${post.user.avatarUrl}?thumbnail&size=64`" alt="avatar"/>
</router-link>
%fa:retweet%
<span>{{ '%i18n:mobile.tags.mk-timeline-post.reposted-by%'.substr(0, '%i18n:mobile.tags.mk-timeline-post.reposted-by%'.indexOf('{')) }}</span>
<router-link class="name" :to="`/@${acct}`">{{ post.user.name }}</router-link>
<span>{{ '%i18n:mobile.tags.mk-timeline-post.reposted-by%'.substr('%i18n:mobile.tags.mk-timeline-post.reposted-by%'.indexOf('}') + 1) }}</span>
</p>
- <mk-time :time="post.created_at"/>
+ <mk-time :time="post.createdAt"/>
</div>
<article>
<router-link class="avatar-anchor" :to="`/@${pAcct}`">
- <img class="avatar" :src="`${p.user.avatar_url}?thumbnail&size=96`" alt="avatar"/>
+ <img class="avatar" :src="`${p.user.avatarUrl}?thumbnail&size=96`" alt="avatar"/>
</router-link>
<div class="main">
<header>
<router-link class="name" :to="`/@${pAcct}`">{{ p.user.name }}</router-link>
- <span class="is-bot" v-if="p.user.host === null && p.user.account.is_bot">bot</span>
+ <span class="is-bot" v-if="p.user.host === null && p.user.account.isBot">bot</span>
<span class="username">@{{ pAcct }}</span>
<div class="info">
- <span class="mobile" v-if="p.via_mobile">%fa:mobile-alt%</span>
+ <span class="mobile" v-if="p.viaMobile">%fa:mobile-alt%</span>
<router-link class="created-at" :to="url">
- <mk-time :time="p.created_at"/>
+ <mk-time :time="p.createdAt"/>
</router-link>
</div>
</header>
@@ -58,12 +58,12 @@
<footer>
<mk-reactions-viewer :post="p" ref="reactionsViewer"/>
<button @click="reply">
- %fa:reply%<p class="count" v-if="p.replies_count > 0">{{ p.replies_count }}</p>
+ %fa:reply%<p class="count" v-if="p.repliesCount > 0">{{ p.repliesCount }}</p>
</button>
<button @click="repost" title="Repost">
- %fa:retweet%<p class="count" v-if="p.repost_count > 0">{{ p.repost_count }}</p>
+ %fa:retweet%<p class="count" v-if="p.repostCount > 0">{{ p.repostCount }}</p>
</button>
- <button :class="{ reacted: p.my_reaction != null }" @click="react" ref="reactButton">
+ <button :class="{ reacted: p.myReaction != null }" @click="react" ref="reactButton">
%fa:plus%<p class="count" v-if="p.reactions_count > 0">{{ p.reactions_count }}</p>
</button>
<button class="menu" @click="menu" ref="menuButton">
@@ -103,16 +103,16 @@ export default Vue.extend({
isRepost(): boolean {
return (this.post.repost &&
this.post.text == null &&
- this.post.media_ids == null &&
+ this.post.mediaIds == null &&
this.post.poll == null);
},
p(): any {
return this.isRepost ? this.post.repost : this.post;
},
reactionsCount(): number {
- return this.p.reaction_counts
- ? Object.keys(this.p.reaction_counts)
- .map(key => this.p.reaction_counts[key])
+ return this.p.reactionCounts
+ ? Object.keys(this.p.reactionCounts)
+ .map(key => this.p.reactionCounts[key])
.reduce((a, b) => a + b)
: 0;
},
@@ -144,7 +144,7 @@ export default Vue.extend({
// Draw map
if (this.p.geo) {
- const shouldShowMap = (this as any).os.isSignedIn ? (this as any).os.i.account.client_settings.showMaps : true;
+ const shouldShowMap = (this as any).os.isSignedIn ? (this as any).os.i.account.clientSettings.showMaps : true;
if (shouldShowMap) {
(this as any).os.getGoogleMaps().then(maps => {
const uluru = new maps.LatLng(this.p.geo.latitude, this.p.geo.longitude);
@@ -194,7 +194,7 @@ export default Vue.extend({
const post = data.post;
if (post.id == this.post.id) {
this.$emit('update:post', post);
- } else if (post.id == this.post.repost_id) {
+ } else if (post.id == this.post.repostId) {
this.post.repost = post;
}
},
diff --git a/src/server/web/app/mobile/views/components/posts.vue b/src/server/web/app/mobile/views/components/posts.vue
index 7e71fa0982..4695f1beaa 100644
--- a/src/server/web/app/mobile/views/components/posts.vue
+++ b/src/server/web/app/mobile/views/components/posts.vue
@@ -28,8 +28,8 @@ export default Vue.extend({
computed: {
_posts(): any[] {
return (this.posts as any).map(post => {
- const date = new Date(post.created_at).getDate();
- const month = new Date(post.created_at).getMonth() + 1;
+ const date = new Date(post.createdAt).getDate();
+ const month = new Date(post.createdAt).getMonth() + 1;
post._date = date;
post._datetext = `${month}月 ${date}日`;
return post;
diff --git a/src/server/web/app/mobile/views/components/sub-post-content.vue b/src/server/web/app/mobile/views/components/sub-post-content.vue
index 389fc420ea..b95883de77 100644
--- a/src/server/web/app/mobile/views/components/sub-post-content.vue
+++ b/src/server/web/app/mobile/views/components/sub-post-content.vue
@@ -1,9 +1,9 @@
<template>
<div class="mk-sub-post-content">
<div class="body">
- <a class="reply" v-if="post.reply_id">%fa:reply%</a>
+ <a class="reply" v-if="post.replyId">%fa:reply%</a>
<mk-post-html v-if="post.ast" :ast="post.ast" :i="os.i"/>
- <a class="rp" v-if="post.repost_id">RP: ...</a>
+ <a class="rp" v-if="post.repostId">RP: ...</a>
</div>
<details v-if="post.media">
<summary>({{ post.media.length }}個のメディア)</summary>
diff --git a/src/server/web/app/mobile/views/components/timeline.vue b/src/server/web/app/mobile/views/components/timeline.vue
index c0e766523f..7b5948faf1 100644
--- a/src/server/web/app/mobile/views/components/timeline.vue
+++ b/src/server/web/app/mobile/views/components/timeline.vue
@@ -41,7 +41,7 @@ export default Vue.extend({
},
computed: {
alone(): boolean {
- return (this as any).os.i.following_count == 0;
+ return (this as any).os.i.followingCount == 0;
}
},
mounted() {
@@ -65,7 +65,7 @@ export default Vue.extend({
this.fetching = true;
(this as any).api('posts/timeline', {
limit: limit + 1,
- until_date: this.date ? (this.date as any).getTime() : undefined
+ untilDate: this.date ? (this.date as any).getTime() : undefined
}).then(posts => {
if (posts.length == limit + 1) {
posts.pop();
@@ -81,7 +81,7 @@ export default Vue.extend({
this.moreFetching = true;
(this as any).api('posts/timeline', {
limit: limit + 1,
- until_id: this.posts[this.posts.length - 1].id
+ untilId: this.posts[this.posts.length - 1].id
}).then(posts => {
if (posts.length == limit + 1) {
posts.pop();
diff --git a/src/server/web/app/mobile/views/components/ui.header.vue b/src/server/web/app/mobile/views/components/ui.header.vue
index 66e10a0f8a..2bf47a90a9 100644
--- a/src/server/web/app/mobile/views/components/ui.header.vue
+++ b/src/server/web/app/mobile/views/components/ui.header.vue
@@ -57,9 +57,9 @@ export default Vue.extend({
}
});
- const ago = (new Date().getTime() - new Date((this as any).os.i.account.last_used_at).getTime()) / 1000
+ const ago = (new Date().getTime() - new Date((this as any).os.i.account.lastUsedAt).getTime()) / 1000
const isHisasiburi = ago >= 3600;
- (this as any).os.i.account.last_used_at = new Date();
+ (this as any).os.i.account.lastUsedAt = new Date();
if (isHisasiburi) {
(this.$refs.welcomeback as any).style.display = 'block';
(this.$refs.main as any).style.overflow = 'hidden';
diff --git a/src/server/web/app/mobile/views/components/ui.nav.vue b/src/server/web/app/mobile/views/components/ui.nav.vue
index 760a5b5184..a923774a73 100644
--- a/src/server/web/app/mobile/views/components/ui.nav.vue
+++ b/src/server/web/app/mobile/views/components/ui.nav.vue
@@ -10,7 +10,7 @@
<transition name="nav">
<div class="body" v-if="isOpen">
<router-link class="me" v-if="os.isSignedIn" :to="`/@${os.i.username}`">
- <img class="avatar" :src="`${os.i.avatar_url}?thumbnail&size=128`" alt="avatar"/>
+ <img class="avatar" :src="`${os.i.avatarUrl}?thumbnail&size=128`" alt="avatar"/>
<p class="name">{{ os.i.name }}</p>
</router-link>
<div class="links">
diff --git a/src/server/web/app/mobile/views/components/user-card.vue b/src/server/web/app/mobile/views/components/user-card.vue
index 5a7309cfd3..ffa1100519 100644
--- a/src/server/web/app/mobile/views/components/user-card.vue
+++ b/src/server/web/app/mobile/views/components/user-card.vue
@@ -1,8 +1,8 @@
<template>
<div class="mk-user-card">
- <header :style="user.banner_url ? `background-image: url(${user.banner_url}?thumbnail&size=1024)` : ''">
+ <header :style="user.bannerUrl ? `background-image: url(${user.bannerUrl}?thumbnail&size=1024)` : ''">
<a :href="`/@${acct}`">
- <img :src="`${user.avatar_url}?thumbnail&size=200`" alt="avatar"/>
+ <img :src="`${user.avatarUrl}?thumbnail&size=200`" alt="avatar"/>
</a>
</header>
<a class="name" :href="`/@${acct}`" target="_blank">{{ user.name }}</a>
diff --git a/src/server/web/app/mobile/views/components/user-preview.vue b/src/server/web/app/mobile/views/components/user-preview.vue
index be80582cac..e51e4353d3 100644
--- a/src/server/web/app/mobile/views/components/user-preview.vue
+++ b/src/server/web/app/mobile/views/components/user-preview.vue
@@ -1,7 +1,7 @@
<template>
<div class="mk-user-preview">
<router-link class="avatar-anchor" :to="`/@${acct}`">
- <img class="avatar" :src="`${user.avatar_url}?thumbnail&size=64`" alt="avatar"/>
+ <img class="avatar" :src="`${user.avatarUrl}?thumbnail&size=64`" alt="avatar"/>
</router-link>
<div class="main">
<header>
diff --git a/src/server/web/app/mobile/views/components/user-timeline.vue b/src/server/web/app/mobile/views/components/user-timeline.vue
index 39f959187c..bd3e3d0c87 100644
--- a/src/server/web/app/mobile/views/components/user-timeline.vue
+++ b/src/server/web/app/mobile/views/components/user-timeline.vue
@@ -33,8 +33,8 @@ export default Vue.extend({
},
mounted() {
(this as any).api('users/posts', {
- user_id: this.user.id,
- with_media: this.withMedia,
+ userId: this.user.id,
+ withMedia: this.withMedia,
limit: limit + 1
}).then(posts => {
if (posts.length == limit + 1) {
@@ -50,10 +50,10 @@ export default Vue.extend({
more() {
this.moreFetching = true;
(this as any).api('users/posts', {
- user_id: this.user.id,
- with_media: this.withMedia,
+ userId: this.user.id,
+ withMedia: this.withMedia,
limit: limit + 1,
- until_id: this.posts[this.posts.length - 1].id
+ untilId: this.posts[this.posts.length - 1].id
}).then(posts => {
if (posts.length == limit + 1) {
posts.pop();