diff options
Diffstat (limited to 'src/server/web/app/desktop')
54 files changed, 221 insertions, 221 deletions
diff --git a/src/server/web/app/desktop/api/update-avatar.ts b/src/server/web/app/desktop/api/update-avatar.ts index 8f748d853c..36a2ffe914 100644 --- a/src/server/web/app/desktop/api/update-avatar.ts +++ b/src/server/web/app/desktop/api/update-avatar.ts @@ -49,7 +49,7 @@ export default (os: OS) => (cb, file = null) => { }).$mount(); document.body.appendChild(dialog.$el); - if (folder) data.append('folder_id', folder.id); + if (folder) data.append('folderId', folder.id); const xhr = new XMLHttpRequest(); xhr.open('POST', apiUrl + '/drive/files/create', true); @@ -68,10 +68,10 @@ export default (os: OS) => (cb, file = null) => { const set = file => { os.api('i/update', { - avatar_id: file.id + avatarId: file.id }).then(i => { - os.i.avatar_id = i.avatar_id; - os.i.avatar_url = i.avatar_url; + os.i.avatarId = i.avatarId; + os.i.avatarUrl = i.avatarUrl; os.apis.dialog({ title: '%fa:info-circle%アバターを更新しました', diff --git a/src/server/web/app/desktop/api/update-banner.ts b/src/server/web/app/desktop/api/update-banner.ts index 9ed48b2670..e66dbf016b 100644 --- a/src/server/web/app/desktop/api/update-banner.ts +++ b/src/server/web/app/desktop/api/update-banner.ts @@ -49,7 +49,7 @@ export default (os: OS) => (cb, file = null) => { }).$mount(); document.body.appendChild(dialog.$el); - if (folder) data.append('folder_id', folder.id); + if (folder) data.append('folderId', folder.id); const xhr = new XMLHttpRequest(); xhr.open('POST', apiUrl + '/drive/files/create', true); @@ -68,10 +68,10 @@ export default (os: OS) => (cb, file = null) => { const set = file => { os.api('i/update', { - banner_id: file.id + bannerId: file.id }).then(i => { - os.i.banner_id = i.banner_id; - os.i.banner_url = i.banner_url; + os.i.bannerId = i.bannerId; + os.i.bannerUrl = i.bannerUrl; os.apis.dialog({ title: '%fa:info-circle%バナーを更新しました', diff --git a/src/server/web/app/desktop/views/components/activity.vue b/src/server/web/app/desktop/views/components/activity.vue index 33b53eb700..480b956ecc 100644 --- a/src/server/web/app/desktop/views/components/activity.vue +++ b/src/server/web/app/desktop/views/components/activity.vue @@ -43,7 +43,7 @@ export default Vue.extend({ }, mounted() { (this as any).api('aggregation/users/activity', { - user_id: this.user.id, + userId: this.user.id, limit: 20 * 7 }).then(activity => { this.activity = activity; diff --git a/src/server/web/app/desktop/views/components/drive.file.vue b/src/server/web/app/desktop/views/components/drive.file.vue index 924ff7052d..85f8361c9f 100644 --- a/src/server/web/app/desktop/views/components/drive.file.vue +++ b/src/server/web/app/desktop/views/components/drive.file.vue @@ -9,10 +9,10 @@ @contextmenu.prevent.stop="onContextmenu" :title="title" > - <div class="label" v-if="os.i.avatar_id == file.id"><img src="/assets/label.svg"/> + <div class="label" v-if="os.i.avatarId == file.id"><img src="/assets/label.svg"/> <p>%i18n:desktop.tags.mk-drive-browser-file.avatar%</p> </div> - <div class="label" v-if="os.i.banner_id == file.id"><img src="/assets/label.svg"/> + <div class="label" v-if="os.i.bannerId == file.id"><img src="/assets/label.svg"/> <p>%i18n:desktop.tags.mk-drive-browser-file.banner%</p> </div> <div class="thumbnail" ref="thumbnail" :style="`background-color: ${ background }`"> @@ -50,8 +50,8 @@ export default Vue.extend({ return `${this.file.name}\n${this.file.type} ${Vue.filter('bytes')(this.file.datasize)}`; }, background(): string { - return this.file.properties.average_color - ? `rgb(${this.file.properties.average_color.join(',')})` + return this.file.properties.avgColor + ? `rgb(${this.file.properties.avgColor.join(',')})` : 'transparent'; } }, @@ -129,10 +129,10 @@ export default Vue.extend({ }, onThumbnailLoaded() { - if (this.file.properties.average_color) { + if (this.file.properties.avgColor) { anime({ targets: this.$refs.thumbnail, - backgroundColor: `rgba(${this.file.properties.average_color.join(',')}, 0)`, + backgroundColor: `rgba(${this.file.properties.avgColor.join(',')}, 0)`, duration: 100, easing: 'linear' }); @@ -147,7 +147,7 @@ export default Vue.extend({ allowEmpty: false }).then(name => { (this as any).api('drive/files/update', { - file_id: this.file.id, + fileId: this.file.id, name: name }) }); diff --git a/src/server/web/app/desktop/views/components/drive.folder.vue b/src/server/web/app/desktop/views/components/drive.folder.vue index a8a9a01370..a926bf47b2 100644 --- a/src/server/web/app/desktop/views/components/drive.folder.vue +++ b/src/server/web/app/desktop/views/components/drive.folder.vue @@ -135,8 +135,8 @@ export default Vue.extend({ const file = JSON.parse(driveFile); this.browser.removeFile(file.id); (this as any).api('drive/files/update', { - file_id: file.id, - folder_id: this.folder.id + fileId: file.id, + folderId: this.folder.id }); } //#endregion @@ -151,8 +151,8 @@ export default Vue.extend({ this.browser.removeFolder(folder.id); (this as any).api('drive/folders/update', { - folder_id: folder.id, - parent_id: this.folder.id + folderId: folder.id, + parentId: this.folder.id }).then(() => { // noop }).catch(err => { @@ -204,7 +204,7 @@ export default Vue.extend({ default: this.folder.name }).then(name => { (this as any).api('drive/folders/update', { - folder_id: this.folder.id, + folderId: this.folder.id, name: name }); }); diff --git a/src/server/web/app/desktop/views/components/drive.nav-folder.vue b/src/server/web/app/desktop/views/components/drive.nav-folder.vue index dfbf116bff..d885a72f7f 100644 --- a/src/server/web/app/desktop/views/components/drive.nav-folder.vue +++ b/src/server/web/app/desktop/views/components/drive.nav-folder.vue @@ -78,8 +78,8 @@ export default Vue.extend({ const file = JSON.parse(driveFile); this.browser.removeFile(file.id); (this as any).api('drive/files/update', { - file_id: file.id, - folder_id: this.folder ? this.folder.id : null + fileId: file.id, + folderId: this.folder ? this.folder.id : null }); } //#endregion @@ -92,8 +92,8 @@ export default Vue.extend({ if (this.folder && folder.id == this.folder.id) return; this.browser.removeFolder(folder.id); (this as any).api('drive/folders/update', { - folder_id: folder.id, - parent_id: this.folder ? this.folder.id : null + folderId: folder.id, + parentId: this.folder ? this.folder.id : null }); } //#endregion diff --git a/src/server/web/app/desktop/views/components/drive.vue b/src/server/web/app/desktop/views/components/drive.vue index 0fafa8cf23..c766dfec12 100644 --- a/src/server/web/app/desktop/views/components/drive.vue +++ b/src/server/web/app/desktop/views/components/drive.vue @@ -160,7 +160,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); @@ -173,7 +173,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); @@ -282,8 +282,8 @@ export default Vue.extend({ if (this.files.some(f => f.id == file.id)) return; this.removeFile(file.id); (this as any).api('drive/files/update', { - file_id: file.id, - folder_id: this.folder ? this.folder.id : null + fileId: file.id, + folderId: this.folder ? this.folder.id : null }); } //#endregion @@ -298,8 +298,8 @@ export default Vue.extend({ if (this.folders.some(f => f.id == folder.id)) return false; this.removeFolder(folder.id); (this as any).api('drive/folders/update', { - folder_id: folder.id, - parent_id: this.folder ? this.folder.id : null + folderId: folder.id, + parentId: this.folder ? this.folder.id : null }).then(() => { // noop }).catch(err => { @@ -332,7 +332,7 @@ export default Vue.extend({ }).then(url => { (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 }); (this as any).apis.dialog({ @@ -352,7 +352,7 @@ export default Vue.extend({ }).then(name => { (this as any).api('drive/folders/create', { name: name, - folder_id: this.folder ? this.folder.id : undefined + folderId: this.folder ? this.folder.id : undefined }).then(folder => { this.addFolder(folder, true); }); @@ -412,7 +412,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 = []; @@ -431,7 +431,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)) { const exist = this.folders.map(f => f.id).indexOf(folder.id); @@ -448,7 +448,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); @@ -514,7 +514,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) { @@ -527,7 +527,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) { @@ -557,7 +557,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: max + 1 }).then(files => { if (files.length == max + 1) { diff --git a/src/server/web/app/desktop/views/components/follow-button.vue b/src/server/web/app/desktop/views/components/follow-button.vue index fc4f871888..9eb22b0fb8 100644 --- a/src/server/web/app/desktop/views/components/follow-button.vue +++ b/src/server/web/app/desktop/views/components/follow-button.vue @@ -1,15 +1,15 @@ <template> <button class="mk-follow-button" - :class="{ wait, follow: !user.is_following, unfollow: user.is_following, big: size == 'big' }" + :class="{ wait, follow: !user.isFollowing, unfollow: user.isFollowing, big: size == 'big' }" @click="onClick" :disabled="wait" - :title="user.is_following ? 'フォロー解除' : 'フォローする'" + :title="user.isFollowing ? 'フォロー解除' : 'フォローする'" > - <template v-if="!wait && user.is_following"> + <template v-if="!wait && user.isFollowing"> <template v-if="size == 'compact'">%fa:minus%</template> <template v-if="size == 'big'">%fa:minus%フォロー解除</template> </template> - <template v-if="!wait && !user.is_following"> + <template v-if="!wait && !user.isFollowing"> <template v-if="size == 'compact'">%fa:plus%</template> <template v-if="size == 'big'">%fa:plus%フォロー</template> </template> @@ -53,23 +53,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(() => { @@ -77,9 +77,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/desktop/views/components/followers-window.vue b/src/server/web/app/desktop/views/components/followers-window.vue index d41d356f9b..623971fa33 100644 --- a/src/server/web/app/desktop/views/components/followers-window.vue +++ b/src/server/web/app/desktop/views/components/followers-window.vue @@ -1,7 +1,7 @@ <template> <mk-window width="400px" height="550px" @closed="$destroy"> <span slot="header" :class="$style.header"> - <img :src="`${user.avatar_url}?thumbnail&size=64`" alt=""/>{{ user.name }}のフォロワー + <img :src="`${user.avatarUrl}?thumbnail&size=64`" alt=""/>{{ user.name }}のフォロワー </span> <mk-followers :user="user"/> </mk-window> diff --git a/src/server/web/app/desktop/views/components/followers.vue b/src/server/web/app/desktop/views/components/followers.vue index 4541a00072..a1b98995d8 100644 --- a/src/server/web/app/desktop/views/components/followers.vue +++ b/src/server/web/app/desktop/views/components/followers.vue @@ -1,8 +1,8 @@ <template> <mk-users-list :fetch="fetch" - :count="user.followers_count" - :you-know-count="user.followers_you_know_count" + :count="user.followersCount" + :you-know-count="user.followersYouKnowCount" > フォロワーはいないようです。 </mk-users-list> @@ -15,7 +15,7 @@ export default Vue.extend({ methods: { fetch(iknow, limit, cursor, cb) { (this as any).api('users/followers', { - user_id: this.user.id, + userId: this.user.id, iknow: iknow, limit: limit, cursor: cursor ? cursor : undefined diff --git a/src/server/web/app/desktop/views/components/following-window.vue b/src/server/web/app/desktop/views/components/following-window.vue index c516b3b17b..612847b386 100644 --- a/src/server/web/app/desktop/views/components/following-window.vue +++ b/src/server/web/app/desktop/views/components/following-window.vue @@ -1,7 +1,7 @@ <template> <mk-window width="400px" height="550px" @closed="$destroy"> <span slot="header" :class="$style.header"> - <img :src="`${user.avatar_url}?thumbnail&size=64`" alt=""/>{{ user.name }}のフォロー + <img :src="`${user.avatarUrl}?thumbnail&size=64`" alt=""/>{{ user.name }}のフォロー </span> <mk-following :user="user"/> </mk-window> diff --git a/src/server/web/app/desktop/views/components/following.vue b/src/server/web/app/desktop/views/components/following.vue index e0b9f11695..b7aedda84f 100644 --- a/src/server/web/app/desktop/views/components/following.vue +++ b/src/server/web/app/desktop/views/components/following.vue @@ -1,8 +1,8 @@ <template> <mk-users-list :fetch="fetch" - :count="user.following_count" - :you-know-count="user.following_you_know_count" + :count="user.followingCount" + :you-know-count="user.followingYouKnowCount" > フォロー中のユーザーはいないようです。 </mk-users-list> @@ -15,7 +15,7 @@ export default Vue.extend({ methods: { fetch(iknow, limit, cursor, cb) { (this as any).api('users/following', { - user_id: this.user.id, + userId: this.user.id, iknow: iknow, limit: limit, cursor: cursor ? cursor : undefined diff --git a/src/server/web/app/desktop/views/components/friends-maker.vue b/src/server/web/app/desktop/views/components/friends-maker.vue index eed15e0773..fd9914b152 100644 --- a/src/server/web/app/desktop/views/components/friends-maker.vue +++ b/src/server/web/app/desktop/views/components/friends-maker.vue @@ -4,7 +4,7 @@ <div class="users" v-if="!fetching && users.length > 0"> <div class="user" v-for="user in users" :key="user.id"> <router-link class="avatar-anchor" :to="`/@${getAcct(user)}`"> - <img class="avatar" :src="`${user.avatar_url}?thumbnail&size=42`" alt="" v-user-preview="user.id"/> + <img class="avatar" :src="`${user.avatarUrl}?thumbnail&size=42`" alt="" v-user-preview="user.id"/> </router-link> <div class="body"> <router-link class="name" :to="`/@${getAcct(user)}`" v-user-preview="user.id">{{ user.name }}</router-link> diff --git a/src/server/web/app/desktop/views/components/home.vue b/src/server/web/app/desktop/views/components/home.vue index a4ce1ef94b..7145ddce03 100644 --- a/src/server/web/app/desktop/views/components/home.vue +++ b/src/server/web/app/desktop/views/components/home.vue @@ -53,7 +53,7 @@ <div class="main"> <a @click="hint">カスタマイズのヒント</a> <div> - <mk-post-form v-if="os.i.account.client_settings.showPostFormOnTopOfTl"/> + <mk-post-form v-if="os.i.account.clientSettings.showPostFormOnTopOfTl"/> <mk-timeline ref="tl" @loaded="onTlLoaded"/> </div> </div> @@ -63,7 +63,7 @@ <component v-for="widget in widgets[place]" :is="`mkw-${widget.name}`" :key="widget.id" :ref="widget.id" :widget="widget" @chosen="warp"/> </div> <div class="main"> - <mk-post-form v-if="os.i.account.client_settings.showPostFormOnTopOfTl"/> + <mk-post-form v-if="os.i.account.clientSettings.showPostFormOnTopOfTl"/> <mk-timeline ref="tl" @loaded="onTlLoaded" v-if="mode == 'timeline'"/> <mk-mentions @loaded="onTlLoaded" v-if="mode == 'mentions'"/> </div> @@ -104,16 +104,16 @@ export default Vue.extend({ home: { get(): any[] { //#region 互換性のため - (this as any).os.i.account.client_settings.home.forEach(w => { + (this as any).os.i.account.clientSettings.home.forEach(w => { if (w.name == 'rss-reader') w.name = 'rss'; if (w.name == 'user-recommendation') w.name = 'users'; if (w.name == 'recommended-polls') w.name = 'polls'; }); //#endregion - return (this as any).os.i.account.client_settings.home; + return (this as any).os.i.account.clientSettings.home; }, set(value) { - (this as any).os.i.account.client_settings.home = value; + (this as any).os.i.account.clientSettings.home = value; } }, left(): any[] { @@ -126,7 +126,7 @@ export default Vue.extend({ created() { this.widgets.left = this.left; this.widgets.right = this.right; - this.$watch('os.i.account.client_settings', i => { + this.$watch('os.i.account.clientSettings', i => { this.widgets.left = this.left; this.widgets.right = this.right; }, { @@ -161,17 +161,17 @@ export default Vue.extend({ }, onHomeUpdated(data) { if (data.home) { - (this as any).os.i.account.client_settings.home = data.home; + (this as any).os.i.account.clientSettings.home = data.home; this.widgets.left = data.home.filter(w => w.place == 'left'); this.widgets.right = data.home.filter(w => w.place == 'right'); } else { - const w = (this as any).os.i.account.client_settings.home.find(w => w.id == data.id); + const w = (this as any).os.i.account.clientSettings.home.find(w => w.id == data.id); if (w != null) { w.data = data.data; this.$refs[w.id][0].preventSave = true; this.$refs[w.id][0].props = w.data; - this.widgets.left = (this as any).os.i.account.client_settings.home.filter(w => w.place == 'left'); - this.widgets.right = (this as any).os.i.account.client_settings.home.filter(w => w.place == 'right'); + this.widgets.left = (this as any).os.i.account.clientSettings.home.filter(w => w.place == 'left'); + this.widgets.right = (this as any).os.i.account.clientSettings.home.filter(w => w.place == 'right'); } } }, diff --git a/src/server/web/app/desktop/views/components/media-image.vue b/src/server/web/app/desktop/views/components/media-image.vue index bc02d0f9be..51309a0578 100644 --- a/src/server/web/app/desktop/views/components/media-image.vue +++ b/src/server/web/app/desktop/views/components/media-image.vue @@ -18,7 +18,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/desktop/views/components/mentions.vue b/src/server/web/app/desktop/views/components/mentions.vue index 47066e813f..90a92495b7 100644 --- a/src/server/web/app/desktop/views/components/mentions.vue +++ b/src/server/web/app/desktop/views/components/mentions.vue @@ -70,7 +70,7 @@ export default Vue.extend({ this.moreFetching = true; (this as any).api('posts/mentions', { following: this.mode == 'following', - until_id: this.posts[this.posts.length - 1].id + untilId: this.posts[this.posts.length - 1].id }).then(posts => { this.posts = this.posts.concat(posts); this.moreFetching = false; diff --git a/src/server/web/app/desktop/views/components/notifications.vue b/src/server/web/app/desktop/views/components/notifications.vue index b48ffc1746..5e6db08c12 100644 --- a/src/server/web/app/desktop/views/components/notifications.vue +++ b/src/server/web/app/desktop/views/components/notifications.vue @@ -3,10 +3,10 @@ <div class="notifications" v-if="notifications.length != 0"> <template v-for="(notification, i) in _notifications"> <div class="notification" :class="notification.type" :key="notification.id"> - <mk-time :time="notification.created_at"/> + <mk-time :time="notification.createdAt"/> <template v-if="notification.type == 'reaction'"> <router-link class="avatar-anchor" :to="`/@${getAcct(notification.user)}`" v-user-preview="notification.user.id"> - <img class="avatar" :src="`${notification.user.avatar_url}?thumbnail&size=48`" alt="avatar"/> + <img class="avatar" :src="`${notification.user.avatarUrl}?thumbnail&size=48`" alt="avatar"/> </router-link> <div class="text"> <p> @@ -19,12 +19,12 @@ </div> </template> <template v-if="notification.type == 'repost'"> - <router-link class="avatar-anchor" :to="`/@${getAcct(notification.post.user)}`" v-user-preview="notification.post.user_id"> - <img class="avatar" :src="`${notification.post.user.avatar_url}?thumbnail&size=48`" alt="avatar"/> + <router-link class="avatar-anchor" :to="`/@${getAcct(notification.post.user)}`" v-user-preview="notification.post.userId"> + <img class="avatar" :src="`${notification.post.user.avatarUrl}?thumbnail&size=48`" alt="avatar"/> </router-link> <div class="text"> <p>%fa:retweet% - <router-link :to="`/@${getAcct(notification.post.user)}`" v-user-preview="notification.post.user_id">{{ notification.post.user.name }}</router-link> + <router-link :to="`/@${getAcct(notification.post.user)}`" v-user-preview="notification.post.userId">{{ notification.post.user.name }}</router-link> </p> <router-link class="post-ref" :to="`/@${getAcct(notification.post.user)}/${notification.post.id}`"> %fa:quote-left%{{ getPostSummary(notification.post.repost) }}%fa:quote-right% @@ -32,19 +32,19 @@ </div> </template> <template v-if="notification.type == 'quote'"> - <router-link class="avatar-anchor" :to="`/@${getAcct(notification.post.user)}`" v-user-preview="notification.post.user_id"> - <img class="avatar" :src="`${notification.post.user.avatar_url}?thumbnail&size=48`" alt="avatar"/> + <router-link class="avatar-anchor" :to="`/@${getAcct(notification.post.user)}`" v-user-preview="notification.post.userId"> + <img class="avatar" :src="`${notification.post.user.avatarUrl}?thumbnail&size=48`" alt="avatar"/> </router-link> <div class="text"> <p>%fa:quote-left% - <router-link :to="`/@${getAcct(notification.post.user)}`" v-user-preview="notification.post.user_id">{{ notification.post.user.name }}</router-link> + <router-link :to="`/@${getAcct(notification.post.user)}`" v-user-preview="notification.post.userId">{{ notification.post.user.name }}</router-link> </p> <router-link class="post-preview" :to="`/@${getAcct(notification.post.user)}/${notification.post.id}`">{{ getPostSummary(notification.post) }}</router-link> </div> </template> <template v-if="notification.type == 'follow'"> <router-link class="avatar-anchor" :to="`/@${getAcct(notification.user)}`" v-user-preview="notification.user.id"> - <img class="avatar" :src="`${notification.user.avatar_url}?thumbnail&size=48`" alt="avatar"/> + <img class="avatar" :src="`${notification.user.avatarUrl}?thumbnail&size=48`" alt="avatar"/> </router-link> <div class="text"> <p>%fa:user-plus% @@ -53,30 +53,30 @@ </div> </template> <template v-if="notification.type == 'reply'"> - <router-link class="avatar-anchor" :to="`/@${getAcct(notification.post.user)}`" v-user-preview="notification.post.user_id"> - <img class="avatar" :src="`${notification.post.user.avatar_url}?thumbnail&size=48`" alt="avatar"/> + <router-link class="avatar-anchor" :to="`/@${getAcct(notification.post.user)}`" v-user-preview="notification.post.userId"> + <img class="avatar" :src="`${notification.post.user.avatarUrl}?thumbnail&size=48`" alt="avatar"/> </router-link> <div class="text"> <p>%fa:reply% - <router-link :to="`/@${getAcct(notification.post.user)}`" v-user-preview="notification.post.user_id">{{ notification.post.user.name }}</router-link> + <router-link :to="`/@${getAcct(notification.post.user)}`" v-user-preview="notification.post.userId">{{ notification.post.user.name }}</router-link> </p> <router-link class="post-preview" :to="`/@${getAcct(notification.post.user)}/${notification.post.id}`">{{ getPostSummary(notification.post) }}</router-link> </div> </template> <template v-if="notification.type == 'mention'"> - <router-link class="avatar-anchor" :to="`/@${getAcct(notification.post.user)}`" v-user-preview="notification.post.user_id"> - <img class="avatar" :src="`${notification.post.user.avatar_url}?thumbnail&size=48`" alt="avatar"/> + <router-link class="avatar-anchor" :to="`/@${getAcct(notification.post.user)}`" v-user-preview="notification.post.userId"> + <img class="avatar" :src="`${notification.post.user.avatarUrl}?thumbnail&size=48`" alt="avatar"/> </router-link> <div class="text"> <p>%fa:at% - <router-link :to="`/@${getAcct(notification.post.user)}`" v-user-preview="notification.post.user_id">{{ notification.post.user.name }}</router-link> + <router-link :to="`/@${getAcct(notification.post.user)}`" v-user-preview="notification.post.userId">{{ notification.post.user.name }}</router-link> </p> <a class="post-preview" :href="`/@${getAcct(notification.post.user)}/${notification.post.id}`">{{ getPostSummary(notification.post) }}</a> </div> </template> <template v-if="notification.type == 'poll_vote'"> <router-link class="avatar-anchor" :to="`/@${getAcct(notification.user)}`" v-user-preview="notification.user.id"> - <img class="avatar" :src="`${notification.user.avatar_url}?thumbnail&size=48`" alt="avatar"/> + <img class="avatar" :src="`${notification.user.avatarUrl}?thumbnail&size=48`" alt="avatar"/> </router-link> <div class="text"> <p>%fa:chart-pie%<a :href="`/@${getAcct(notification.user)}`" v-user-preview="notification.user.id">{{ notification.user.name }}</a></p> @@ -120,8 +120,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; @@ -161,7 +161,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/desktop/views/components/post-detail.sub.vue b/src/server/web/app/desktop/views/components/post-detail.sub.vue index 59d8db04ce..35377e7c24 100644 --- a/src/server/web/app/desktop/views/components/post-detail.sub.vue +++ b/src/server/web/app/desktop/views/components/post-detail.sub.vue @@ -1,17 +1,17 @@ <template> <div class="sub" :title="title"> <router-link class="avatar-anchor" :to="`/@${acct}`"> - <img class="avatar" :src="`${post.user.avatar_url}?thumbnail&size=64`" alt="avatar" v-user-preview="post.user_id"/> + <img class="avatar" :src="`${post.user.avatarUrl}?thumbnail&size=64`" alt="avatar" v-user-preview="post.userId"/> </router-link> <div class="main"> <header> <div class="left"> - <router-link class="name" :to="`/@${acct}`" v-user-preview="post.user_id">{{ post.user.name }}</router-link> + <router-link class="name" :to="`/@${acct}`" v-user-preview="post.userId">{{ post.user.name }}</router-link> <span class="username">@{{ acct }}</span> </div> <div class="right"> <router-link class="time" :to="`/@${acct}/${post.id}`"> - <mk-time :time="post.created_at"/> + <mk-time :time="post.createdAt"/> </router-link> </div> </header> @@ -37,7 +37,7 @@ export default Vue.extend({ return getAcct(this.post.user); }, title(): string { - return dateStringify(this.post.created_at); + return dateStringify(this.post.createdAt); } } }); diff --git a/src/server/web/app/desktop/views/components/post-detail.vue b/src/server/web/app/desktop/views/components/post-detail.vue index f09bf4cbd5..7783ec62c7 100644 --- a/src/server/web/app/desktop/views/components/post-detail.vue +++ b/src/server/web/app/desktop/views/components/post-detail.vue @@ -2,7 +2,7 @@ <div class="mk-post-detail" :title="title"> <button class="read-more" - v-if="p.reply && p.reply.reply_id && context == null" + v-if="p.reply && p.reply.replyId && context == null" title="会話をもっと読み込む" @click="fetchContext" :disabled="contextFetching" @@ -18,8 +18,8 @@ </div> <div class="repost" v-if="isRepost"> <p> - <router-link class="avatar-anchor" :to="`/@${acct}`" v-user-preview="post.user_id"> - <img class="avatar" :src="`${post.user.avatar_url}?thumbnail&size=32`" alt="avatar"/> + <router-link class="avatar-anchor" :to="`/@${acct}`" v-user-preview="post.userId"> + <img class="avatar" :src="`${post.user.avatarUrl}?thumbnail&size=32`" alt="avatar"/> </router-link> %fa:retweet% <router-link class="name" :href="`/@${acct}`">{{ post.user.name }}</router-link> @@ -28,13 +28,13 @@ </div> <article> <router-link class="avatar-anchor" :to="`/@${acct}`"> - <img class="avatar" :src="`${p.user.avatar_url}?thumbnail&size=64`" alt="avatar" v-user-preview="p.user.id"/> + <img class="avatar" :src="`${p.user.avatarUrl}?thumbnail&size=64`" alt="avatar" v-user-preview="p.user.id"/> </router-link> <header> <router-link class="name" :to="`/@${acct}`" v-user-preview="p.user.id">{{ p.user.name }}</router-link> <span class="username">@{{ acct }}</span> <router-link class="time" :to="`/@${acct}/${p.id}`"> - <mk-time :time="p.created_at"/> + <mk-time :time="p.createdAt"/> </router-link> </header> <div class="body"> @@ -56,12 +56,12 @@ <footer> <mk-reactions-viewer :post="p"/> <button @click="reply" title="返信"> - %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="リアクション"> + <button :class="{ reacted: p.myReaction != null }" @click="react" ref="reactButton" title="リアクション"> %fa:plus%<p class="count" v-if="p.reactions_count > 0">{{ p.reactions_count }}</p> </button> <button @click="menu" ref="menuButton"> @@ -115,21 +115,21 @@ 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; }, title(): string { - return dateStringify(this.p.created_at); + return dateStringify(this.p.createdAt); }, urls(): string[] { if (this.p.ast) { @@ -145,7 +145,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; @@ -154,7 +154,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); @@ -176,7 +176,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/desktop/views/components/post-form.vue b/src/server/web/app/desktop/views/components/post-form.vue index 78f6d445af..11028ceb52 100644 --- a/src/server/web/app/desktop/views/components/post-form.vue +++ b/src/server/web/app/desktop/views/components/post-form.vue @@ -219,9 +219,9 @@ export default Vue.extend({ (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, - repost_id: this.repost ? this.repost.id : undefined, + mediaIds: this.files.length > 0 ? this.files.map(f => f.id) : undefined, + replyId: this.reply ? this.reply.id : undefined, + repostId: this.repost ? this.repost.id : undefined, poll: this.poll ? (this.$refs.poll as any).get() : undefined, geo: this.geo ? { latitude: this.geo.latitude, @@ -255,7 +255,7 @@ export default Vue.extend({ const data = JSON.parse(localStorage.getItem('drafts') || '{}'); data[this.draftId] = { - updated_at: new Date(), + updatedAt: new Date(), data: { text: this.text, files: this.files, diff --git a/src/server/web/app/desktop/views/components/post-preview.vue b/src/server/web/app/desktop/views/components/post-preview.vue index 808220c0e0..0ac3223be2 100644 --- a/src/server/web/app/desktop/views/components/post-preview.vue +++ b/src/server/web/app/desktop/views/components/post-preview.vue @@ -1,14 +1,14 @@ <template> <div class="mk-post-preview" :title="title"> <router-link class="avatar-anchor" :to="`/@${acct}`"> - <img class="avatar" :src="`${post.user.avatar_url}?thumbnail&size=64`" alt="avatar" v-user-preview="post.user_id"/> + <img class="avatar" :src="`${post.user.avatarUrl}?thumbnail&size=64`" alt="avatar" v-user-preview="post.userId"/> </router-link> <div class="main"> <header> - <router-link class="name" :to="`/@${acct}`" v-user-preview="post.user_id">{{ post.user.name }}</router-link> + <router-link class="name" :to="`/@${acct}`" v-user-preview="post.userId">{{ 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"> @@ -30,7 +30,7 @@ export default Vue.extend({ return getAcct(this.post.user); }, title(): string { - return dateStringify(this.post.created_at); + return dateStringify(this.post.createdAt); } } }); diff --git a/src/server/web/app/desktop/views/components/posts.post.sub.vue b/src/server/web/app/desktop/views/components/posts.post.sub.vue index 120700877c..65d3017d3d 100644 --- a/src/server/web/app/desktop/views/components/posts.post.sub.vue +++ b/src/server/web/app/desktop/views/components/posts.post.sub.vue @@ -1,14 +1,14 @@ <template> <div class="sub" :title="title"> <router-link class="avatar-anchor" :to="`/@${acct}`"> - <img class="avatar" :src="`${post.user.avatar_url}?thumbnail&size=64`" alt="avatar" v-user-preview="post.user_id"/> + <img class="avatar" :src="`${post.user.avatarUrl}?thumbnail&size=64`" alt="avatar" v-user-preview="post.userId"/> </router-link> <div class="main"> <header> - <router-link class="name" :to="`/@${acct}`" v-user-preview="post.user_id">{{ post.user.name }}</router-link> + <router-link class="name" :to="`/@${acct}`" v-user-preview="post.userId">{{ 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"> @@ -30,7 +30,7 @@ export default Vue.extend({ return getAcct(this.post.user); }, title(): string { - return dateStringify(this.post.created_at); + return dateStringify(this.post.createdAt); } } }); diff --git a/src/server/web/app/desktop/views/components/posts.post.vue b/src/server/web/app/desktop/views/components/posts.post.vue index 6b4d3d2789..c70e019115 100644 --- a/src/server/web/app/desktop/views/components/posts.post.vue +++ b/src/server/web/app/desktop/views/components/posts.post.vue @@ -5,30 +5,30 @@ </div> <div class="repost" v-if="isRepost"> <p> - <router-link class="avatar-anchor" :to="`/@${acct}`" v-user-preview="post.user_id"> - <img class="avatar" :src="`${post.user.avatar_url}?thumbnail&size=32`" alt="avatar"/> + <router-link class="avatar-anchor" :to="`/@${acct}`" v-user-preview="post.userId"> + <img class="avatar" :src="`${post.user.avatarUrl}?thumbnail&size=32`" alt="avatar"/> </router-link> %fa:retweet% <span>{{ '%i18n:desktop.tags.mk-timeline-post.reposted-by%'.substr(0, '%i18n:desktop.tags.mk-timeline-post.reposted-by%'.indexOf('{')) }}</span> - <a class="name" :href="`/@${acct}`" v-user-preview="post.user_id">{{ post.user.name }}</a> + <a class="name" :href="`/@${acct}`" v-user-preview="post.userId">{{ post.user.name }}</a> <span>{{ '%i18n:desktop.tags.mk-timeline-post.reposted-by%'.substr('%i18n:desktop.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="`/@${acct}`"> - <img class="avatar" :src="`${p.user.avatar_url}?thumbnail&size=64`" alt="avatar" v-user-preview="p.user.id"/> + <img class="avatar" :src="`${p.user.avatarUrl}?thumbnail&size=64`" alt="avatar" v-user-preview="p.user.id"/> </router-link> <div class="main"> <header> <router-link class="name" :to="`/@${acct}`" v-user-preview="p.user.id">{{ acct }}</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">@{{ acct }}</span> <div class="info"> <span class="app" v-if="p.app">via <b>{{ p.app.name }}</b></span> - <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" title="%i18n:desktop.tags.mk-timeline-post.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="%i18n:desktop.tags.mk-timeline-post.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:desktop.tags.mk-timeline-post.add-reaction%"> + <button :class="{ reacted: p.myReaction != null }" @click="react" ref="reactButton" title="%i18n:desktop.tags.mk-timeline-post.add-reaction%"> %fa:plus%<p class="count" v-if="p.reactions_count > 0">{{ p.reactions_count }}</p> </button> <button @click="menu" ref="menuButton"> @@ -122,21 +122,21 @@ 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; }, title(): string { - return dateStringify(this.p.created_at); + return dateStringify(this.p.createdAt); }, url(): string { return `/@${this.acct}/${this.p.id}`; @@ -166,7 +166,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); @@ -216,7 +216,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/desktop/views/components/posts.vue b/src/server/web/app/desktop/views/components/posts.vue index ffceff8762..5031667c7c 100644 --- a/src/server/web/app/desktop/views/components/posts.vue +++ b/src/server/web/app/desktop/views/components/posts.vue @@ -30,8 +30,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/desktop/views/components/repost-form.vue b/src/server/web/app/desktop/views/components/repost-form.vue index f2774b817c..3a5e3a7c56 100644 --- a/src/server/web/app/desktop/views/components/repost-form.vue +++ b/src/server/web/app/desktop/views/components/repost-form.vue @@ -29,7 +29,7 @@ export default Vue.extend({ ok() { this.wait = true; (this as any).api('posts/create', { - repost_id: this.post.id + repostId: this.post.id }).then(data => { this.$emit('posted'); (this as any).apis.notify('%i18n:desktop.tags.mk-repost-form.success%'); diff --git a/src/server/web/app/desktop/views/components/settings.2fa.vue b/src/server/web/app/desktop/views/components/settings.2fa.vue index 85f2d6ba5e..b8dd1dfd9b 100644 --- a/src/server/web/app/desktop/views/components/settings.2fa.vue +++ b/src/server/web/app/desktop/views/components/settings.2fa.vue @@ -2,8 +2,8 @@ <div class="2fa"> <p>%i18n:desktop.tags.mk-2fa-setting.intro%<a href="%i18n:desktop.tags.mk-2fa-setting.url%" target="_blank">%i18n:desktop.tags.mk-2fa-setting.detail%</a></p> <div class="ui info warn"><p>%fa:exclamation-triangle%%i18n:desktop.tags.mk-2fa-setting.caution%</p></div> - <p v-if="!data && !os.i.account.two_factor_enabled"><button @click="register" class="ui primary">%i18n:desktop.tags.mk-2fa-setting.register%</button></p> - <template v-if="os.i.account.two_factor_enabled"> + <p v-if="!data && !os.i.account.twoFactorEnabled"><button @click="register" class="ui primary">%i18n:desktop.tags.mk-2fa-setting.register%</button></p> + <template v-if="os.i.account.twoFactorEnabled"> <p>%i18n:desktop.tags.mk-2fa-setting.already-registered%</p> <button @click="unregister" class="ui">%i18n:desktop.tags.mk-2fa-setting.unregister%</button> </template> @@ -54,7 +54,7 @@ export default Vue.extend({ password: password }).then(() => { (this as any).apis.notify('%i18n:desktop.tags.mk-2fa-setting.unregistered%'); - (this as any).os.i.account.two_factor_enabled = false; + (this as any).os.i.account.twoFactorEnabled = false; }); }); }, @@ -64,7 +64,7 @@ export default Vue.extend({ token: this.token }).then(() => { (this as any).apis.notify('%i18n:desktop.tags.mk-2fa-setting.success%'); - (this as any).os.i.account.two_factor_enabled = true; + (this as any).os.i.account.twoFactorEnabled = true; }).catch(() => { (this as any).apis.notify('%i18n:desktop.tags.mk-2fa-setting.failed%'); }); diff --git a/src/server/web/app/desktop/views/components/settings.password.vue b/src/server/web/app/desktop/views/components/settings.password.vue index be3f0370d6..f883b54065 100644 --- a/src/server/web/app/desktop/views/components/settings.password.vue +++ b/src/server/web/app/desktop/views/components/settings.password.vue @@ -33,8 +33,8 @@ export default Vue.extend({ return; } (this as any).api('i/change_password', { - current_password: currentPassword, - new_password: newPassword + currentPasword: currentPassword, + newPassword: newPassword }).then(() => { (this as any).apis.notify('%i18n:desktop.tags.mk-password-setting.changed%'); }); diff --git a/src/server/web/app/desktop/views/components/settings.profile.vue b/src/server/web/app/desktop/views/components/settings.profile.vue index 67a211c792..ba86286f87 100644 --- a/src/server/web/app/desktop/views/components/settings.profile.vue +++ b/src/server/web/app/desktop/views/components/settings.profile.vue @@ -2,7 +2,7 @@ <div class="profile"> <label class="avatar ui from group"> <p>%i18n:desktop.tags.mk-profile-setting.avatar%</p> - <img class="avatar" :src="`${os.i.avatar_url}?thumbnail&size=64`" alt="avatar"/> + <img class="avatar" :src="`${os.i.avatarUrl}?thumbnail&size=64`" alt="avatar"/> <button class="ui" @click="updateAvatar">%i18n:desktop.tags.mk-profile-setting.choice-avatar%</button> </label> <label class="ui from group"> @@ -24,7 +24,7 @@ <button class="ui primary" @click="save">%i18n:desktop.tags.mk-profile-setting.save%</button> <section> <h2>その他</h2> - <mk-switch v-model="os.i.account.is_bot" @change="onChangeIsBot" text="このアカウントはbotです"/> + <mk-switch v-model="os.i.account.isBot" @change="onChangeIsBot" text="このアカウントはbotです"/> </section> </div> </template> @@ -63,7 +63,7 @@ export default Vue.extend({ }, onChangeIsBot() { (this as any).api('i/update', { - is_bot: (this as any).os.i.account.is_bot + isBot: (this as any).os.i.account.isBot }); } } diff --git a/src/server/web/app/desktop/views/components/settings.signins.vue b/src/server/web/app/desktop/views/components/settings.signins.vue index ddc567f06f..a414c95c27 100644 --- a/src/server/web/app/desktop/views/components/settings.signins.vue +++ b/src/server/web/app/desktop/views/components/settings.signins.vue @@ -6,7 +6,7 @@ <template v-if="signin.success">%fa:check%</template> <template v-else>%fa:times%</template> <span class="ip">{{ signin.ip }}</span> - <mk-time :time="signin.created_at"/> + <mk-time :time="signin.createdAt"/> </header> <div class="headers" v-show="signin._show"> <tree-view :data="signin.headers"/> diff --git a/src/server/web/app/desktop/views/components/settings.vue b/src/server/web/app/desktop/views/components/settings.vue index 3e6a477ced..fd82c171c1 100644 --- a/src/server/web/app/desktop/views/components/settings.vue +++ b/src/server/web/app/desktop/views/components/settings.vue @@ -20,7 +20,7 @@ <section class="web" v-show="page == 'web'"> <h1>動作</h1> - <mk-switch v-model="os.i.account.client_settings.fetchOnScroll" @change="onChangeFetchOnScroll" text="スクロールで自動読み込み"> + <mk-switch v-model="os.i.account.clientSettings.fetchOnScroll" @change="onChangeFetchOnScroll" text="スクロールで自動読み込み"> <span>ページを下までスクロールしたときに自動で追加のコンテンツを読み込みます。</span> </mk-switch> <mk-switch v-model="autoPopout" text="ウィンドウの自動ポップアウト"> @@ -33,11 +33,11 @@ <div class="div"> <button class="ui button" @click="customizeHome">ホームをカスタマイズ</button> </div> - <mk-switch v-model="os.i.account.client_settings.showPostFormOnTopOfTl" @change="onChangeShowPostFormOnTopOfTl" text="タイムライン上部に投稿フォームを表示する"/> - <mk-switch v-model="os.i.account.client_settings.showMaps" @change="onChangeShowMaps" text="マップの自動展開"> + <mk-switch v-model="os.i.account.clientSettings.showPostFormOnTopOfTl" @change="onChangeShowPostFormOnTopOfTl" text="タイムライン上部に投稿フォームを表示する"/> + <mk-switch v-model="os.i.account.clientSettings.showMaps" @change="onChangeShowMaps" text="マップの自動展開"> <span>位置情報が添付された投稿のマップを自動的に展開します。</span> </mk-switch> - <mk-switch v-model="os.i.account.client_settings.gradientWindowHeader" @change="onChangeGradientWindowHeader" text="ウィンドウのタイトルバーにグラデーションを使用"/> + <mk-switch v-model="os.i.account.clientSettings.gradientWindowHeader" @change="onChangeGradientWindowHeader" text="ウィンドウのタイトルバーにグラデーションを使用"/> </section> <section class="web" v-show="page == 'web'"> @@ -57,7 +57,7 @@ <section class="web" v-show="page == 'web'"> <h1>モバイル</h1> - <mk-switch v-model="os.i.account.client_settings.disableViaMobile" @change="onChangeDisableViaMobile" text="「モバイルからの投稿」フラグを付けない"/> + <mk-switch v-model="os.i.account.clientSettings.disableViaMobile" @change="onChangeDisableViaMobile" text="「モバイルからの投稿」フラグを付けない"/> </section> <section class="web" v-show="page == 'web'"> @@ -86,7 +86,7 @@ <section class="notification" v-show="page == 'notification'"> <h1>通知</h1> - <mk-switch v-model="os.i.account.settings.auto_watch" @change="onChangeAutoWatch" text="投稿の自動ウォッチ"> + <mk-switch v-model="os.i.account.settings.autoWatch" @change="onChangeAutoWatch" text="投稿の自動ウォッチ"> <span>リアクションしたり返信したりした投稿に関する通知を自動的に受け取るようにします。</span> </mk-switch> </section> @@ -283,7 +283,7 @@ export default Vue.extend({ }, onChangeAutoWatch(v) { (this as any).api('i/update', { - auto_watch: v + autoWatch: v }); }, onChangeShowPostFormOnTopOfTl(v) { diff --git a/src/server/web/app/desktop/views/components/sub-post-content.vue b/src/server/web/app/desktop/views/components/sub-post-content.vue index 8c8f42c801..f13822331b 100644 --- a/src/server/web/app/desktop/views/components/sub-post-content.vue +++ b/src/server/web/app/desktop/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 :ast="post.ast" :i="os.i"/> - <a class="rp" v-if="post.repost_id" :href="`/post:${post.repost_id}`">RP: ...</a> + <a class="rp" v-if="post.repostId" :href="`/post:${post.repostId}`">RP: ...</a> <mk-url-preview v-for="url in urls" :url="url" :key="url"/> </div> <details v-if="post.media"> diff --git a/src/server/web/app/desktop/views/components/timeline.vue b/src/server/web/app/desktop/views/components/timeline.vue index 47a9688b6d..65b4bd1c7a 100644 --- a/src/server/web/app/desktop/views/components/timeline.vue +++ b/src/server/web/app/desktop/views/components/timeline.vue @@ -34,7 +34,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 as any).api('posts/timeline', { limit: 11, - until_date: this.date ? this.date.getTime() : undefined + untilDate: this.date ? this.date.getTime() : undefined }).then(posts => { if (posts.length == 11) { posts.pop(); @@ -82,7 +82,7 @@ export default Vue.extend({ this.moreFetching = true; (this as any).api('posts/timeline', { limit: 11, - until_id: this.posts[this.posts.length - 1].id + untilId: this.posts[this.posts.length - 1].id }).then(posts => { if (posts.length == 11) { posts.pop(); @@ -107,7 +107,7 @@ export default Vue.extend({ this.fetch(); }, onScroll() { - if ((this as any).os.i.account.client_settings.fetchOnScroll !== false) { + if ((this as any).os.i.account.clientSettings.fetchOnScroll !== false) { const current = window.scrollY + window.innerHeight; if (current > document.body.offsetHeight - 8) this.more(); } diff --git a/src/server/web/app/desktop/views/components/ui.header.account.vue b/src/server/web/app/desktop/views/components/ui.header.account.vue index 19b9d77798..ec4635f338 100644 --- a/src/server/web/app/desktop/views/components/ui.header.account.vue +++ b/src/server/web/app/desktop/views/components/ui.header.account.vue @@ -2,7 +2,7 @@ <div class="account"> <button class="header" :data-active="isOpen" @click="toggle"> <span class="username">{{ os.i.username }}<template v-if="!isOpen">%fa:angle-down%</template><template v-if="isOpen">%fa:angle-up%</template></span> - <img class="avatar" :src="`${ os.i.avatar_url }?thumbnail&size=64`" alt="avatar"/> + <img class="avatar" :src="`${ os.i.avatarUrl }?thumbnail&size=64`" alt="avatar"/> </button> <transition name="zoom-in-top"> <div class="menu" v-if="isOpen"> diff --git a/src/server/web/app/desktop/views/components/ui.header.vue b/src/server/web/app/desktop/views/components/ui.header.vue index 8af0e2fbed..7e337d2ae5 100644 --- a/src/server/web/app/desktop/views/components/ui.header.vue +++ b/src/server/web/app/desktop/views/components/ui.header.vue @@ -44,9 +44,9 @@ export default Vue.extend({ }, mounted() { if ((this as any).os.isSignedIn) { - 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/desktop/views/components/user-preview.vue b/src/server/web/app/desktop/views/components/user-preview.vue index 24d613f120..8c86b2efe8 100644 --- a/src/server/web/app/desktop/views/components/user-preview.vue +++ b/src/server/web/app/desktop/views/components/user-preview.vue @@ -1,9 +1,9 @@ <template> <div class="mk-user-preview"> <template v-if="u != null"> - <div class="banner" :style="u.banner_url ? `background-image: url(${u.banner_url}?thumbnail&size=512)` : ''"></div> + <div class="banner" :style="u.bannerUrl ? `background-image: url(${u.bannerUrl}?thumbnail&size=512)` : ''"></div> <router-link class="avatar" :to="`/@${acct}`"> - <img :src="`${u.avatar_url}?thumbnail&size=64`" alt="avatar"/> + <img :src="`${u.avatarUrl}?thumbnail&size=64`" alt="avatar"/> </router-link> <div class="title"> <router-link class="name" :to="`/@${acct}`">{{ u.name }}</router-link> @@ -12,13 +12,13 @@ <div class="description">{{ u.description }}</div> <div class="status"> <div> - <p>投稿</p><a>{{ u.posts_count }}</a> + <p>投稿</p><a>{{ u.postsCount }}</a> </div> <div> - <p>フォロー</p><a>{{ u.following_count }}</a> + <p>フォロー</p><a>{{ u.followingCount }}</a> </div> <div> - <p>フォロワー</p><a>{{ u.followers_count }}</a> + <p>フォロワー</p><a>{{ u.followersCount }}</a> </div> </div> <mk-follow-button v-if="os.isSignedIn && user.id != os.i.id" :user="u"/> @@ -58,7 +58,7 @@ export default Vue.extend({ } else { const query = this.user[0] == '@' ? parseAcct(this.user[0].substr(1)) : - { user_id: this.user[0] }; + { userId: this.user[0] }; (this as any).api('users/show', query).then(user => { this.u = user; diff --git a/src/server/web/app/desktop/views/components/users-list.item.vue b/src/server/web/app/desktop/views/components/users-list.item.vue index e02d1311d2..d2bfc117da 100644 --- a/src/server/web/app/desktop/views/components/users-list.item.vue +++ b/src/server/web/app/desktop/views/components/users-list.item.vue @@ -1,7 +1,7 @@ <template> <div class="root item"> <router-link class="avatar-anchor" :to="`/@${acct}`" v-user-preview="user.id"> - <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> @@ -9,7 +9,7 @@ <span class="username">@{{ acct }}</span> </header> <div class="body"> - <p class="followed" v-if="user.is_followed">フォローされています</p> + <p class="followed" v-if="user.isFollowed">フォローされています</p> <div class="description">{{ user.description }}</div> </div> </div> diff --git a/src/server/web/app/desktop/views/components/widget-container.vue b/src/server/web/app/desktop/views/components/widget-container.vue index dd42be63bb..68c5bcb8dc 100644 --- a/src/server/web/app/desktop/views/components/widget-container.vue +++ b/src/server/web/app/desktop/views/components/widget-container.vue @@ -24,8 +24,8 @@ export default Vue.extend({ computed: { withGradient(): boolean { return (this as any).os.isSignedIn - ? (this as any).os.i.account.client_settings.gradientWindowHeader != null - ? (this as any).os.i.account.client_settings.gradientWindowHeader + ? (this as any).os.i.account.clientSettings.gradientWindowHeader != null + ? (this as any).os.i.account.clientSettings.gradientWindowHeader : false : false; } diff --git a/src/server/web/app/desktop/views/components/window.vue b/src/server/web/app/desktop/views/components/window.vue index 75f725d4b0..48dc46febd 100644 --- a/src/server/web/app/desktop/views/components/window.vue +++ b/src/server/web/app/desktop/views/components/window.vue @@ -92,8 +92,8 @@ export default Vue.extend({ }, withGradient(): boolean { return (this as any).os.isSignedIn - ? (this as any).os.i.account.client_settings.gradientWindowHeader != null - ? (this as any).os.i.account.client_settings.gradientWindowHeader + ? (this as any).os.i.account.clientSettings.gradientWindowHeader != null + ? (this as any).os.i.account.clientSettings.gradientWindowHeader : false : false; } diff --git a/src/server/web/app/desktop/views/pages/home.vue b/src/server/web/app/desktop/views/pages/home.vue index e1464bab1d..69e134f79f 100644 --- a/src/server/web/app/desktop/views/pages/home.vue +++ b/src/server/web/app/desktop/views/pages/home.vue @@ -45,7 +45,7 @@ export default Vue.extend({ }, onStreamPost(post) { - if (document.hidden && post.user_id != (this as any).os.i.id) { + if (document.hidden && post.userId != (this as any).os.i.id) { this.unreadCount++; document.title = `(${this.unreadCount}) ${getPostSummary(post)}`; } diff --git a/src/server/web/app/desktop/views/pages/othello.vue b/src/server/web/app/desktop/views/pages/othello.vue index 160dd9a354..0d8e987dd9 100644 --- a/src/server/web/app/desktop/views/pages/othello.vue +++ b/src/server/web/app/desktop/views/pages/othello.vue @@ -34,7 +34,7 @@ export default Vue.extend({ this.fetching = true; (this as any).api('othello/games/show', { - game_id: this.$route.params.game + gameId: this.$route.params.game }).then(game => { this.game = game; this.fetching = false; diff --git a/src/server/web/app/desktop/views/pages/post.vue b/src/server/web/app/desktop/views/pages/post.vue index c7b8729b72..dbd707e049 100644 --- a/src/server/web/app/desktop/views/pages/post.vue +++ b/src/server/web/app/desktop/views/pages/post.vue @@ -31,7 +31,7 @@ export default Vue.extend({ this.fetching = true; (this as any).api('posts/show', { - post_id: this.$route.params.post + postId: this.$route.params.post }).then(post => { this.post = post; this.fetching = false; diff --git a/src/server/web/app/desktop/views/pages/user/user.followers-you-know.vue b/src/server/web/app/desktop/views/pages/user/user.followers-you-know.vue index 80b38e8acc..d0dab6c3df 100644 --- a/src/server/web/app/desktop/views/pages/user/user.followers-you-know.vue +++ b/src/server/web/app/desktop/views/pages/user/user.followers-you-know.vue @@ -4,7 +4,7 @@ <p class="initializing" v-if="fetching">%fa:spinner .pulse .fw%%i18n:desktop.tags.mk-user.followers-you-know.loading%<mk-ellipsis/></p> <div v-if="!fetching && users.length > 0"> <router-link v-for="user in users" :to="`/@${getAcct(user)}`" :key="user.id"> - <img :src="`${user.avatar_url}?thumbnail&size=64`" :alt="user.name" v-user-preview="user.id"/> + <img :src="`${user.avatarUrl}?thumbnail&size=64`" :alt="user.name" v-user-preview="user.id"/> </router-link> </div> <p class="empty" v-if="!fetching && users.length == 0">%i18n:desktop.tags.mk-user.followers-you-know.no-users%</p> @@ -28,7 +28,7 @@ export default Vue.extend({ }, mounted() { (this as any).api('users/followers', { - user_id: this.user.id, + userId: this.user.id, iknow: true, limit: 16 }).then(x => { diff --git a/src/server/web/app/desktop/views/pages/user/user.friends.vue b/src/server/web/app/desktop/views/pages/user/user.friends.vue index 57e6def27b..3ec30fb438 100644 --- a/src/server/web/app/desktop/views/pages/user/user.friends.vue +++ b/src/server/web/app/desktop/views/pages/user/user.friends.vue @@ -5,7 +5,7 @@ <template v-if="!fetching && users.length != 0"> <div class="user" v-for="friend in users"> <router-link class="avatar-anchor" :to="`/@${getAcct(friend)}`"> - <img class="avatar" :src="`${friend.avatar_url}?thumbnail&size=42`" alt="" v-user-preview="friend.id"/> + <img class="avatar" :src="`${friend.avatarUrl}?thumbnail&size=42`" alt="" v-user-preview="friend.id"/> </router-link> <div class="body"> <router-link class="name" :to="`/@${getAcct(friend)}`" v-user-preview="friend.id">{{ friend.name }}</router-link> @@ -35,7 +35,7 @@ export default Vue.extend({ }, mounted() { (this as any).api('users/get_frequently_replied_users', { - user_id: this.user.id, + userId: this.user.id, limit: 4 }).then(docs => { this.users = docs.map(doc => doc.user); diff --git a/src/server/web/app/desktop/views/pages/user/user.header.vue b/src/server/web/app/desktop/views/pages/user/user.header.vue index 3522e76bdb..54f431fd2e 100644 --- a/src/server/web/app/desktop/views/pages/user/user.header.vue +++ b/src/server/web/app/desktop/views/pages/user/user.header.vue @@ -1,11 +1,11 @@ <template> -<div class="header" :data-is-dark-background="user.banner_url != null"> - <div class="banner-container" :style="user.banner_url ? `background-image: url(${user.banner_url}?thumbnail&size=2048)` : ''"> - <div class="banner" ref="banner" :style="user.banner_url ? `background-image: url(${user.banner_url}?thumbnail&size=2048)` : ''" @click="onBannerClick"></div> +<div class="header" :data-is-dark-background="user.bannerUrl != null"> + <div class="banner-container" :style="user.bannerUrl ? `background-image: url(${user.bannerUrl}?thumbnail&size=2048)` : ''"> + <div class="banner" ref="banner" :style="user.bannerUrl ? `background-image: url(${user.bannerUrl}?thumbnail&size=2048)` : ''" @click="onBannerClick"></div> </div> <div class="fade"></div> <div class="container"> - <img class="avatar" :src="`${user.avatar_url}?thumbnail&size=150`" alt="avatar"/> + <img class="avatar" :src="`${user.avatarUrl}?thumbnail&size=150`" alt="avatar"/> <div class="title"> <p class="name">{{ user.name }}</p> <p class="username">@{{ acct }}</p> @@ -59,7 +59,7 @@ export default Vue.extend({ if (!(this as any).os.isSignedIn || (this as any).os.i.id != this.user.id) return; (this as any).apis.updateBanner((this as any).os.i, i => { - this.user.banner_url = i.banner_url; + this.user.bannerUrl = i.bannerUrl; }); } } diff --git a/src/server/web/app/desktop/views/pages/user/user.home.vue b/src/server/web/app/desktop/views/pages/user/user.home.vue index 2483a6c726..071c9bb61c 100644 --- a/src/server/web/app/desktop/views/pages/user/user.home.vue +++ b/src/server/web/app/desktop/views/pages/user/user.home.vue @@ -5,16 +5,16 @@ <x-profile :user="user"/> <x-photos :user="user"/> <x-followers-you-know v-if="os.isSignedIn && os.i.id != user.id" :user="user"/> - <p v-if="user.host === null">%i18n:desktop.tags.mk-user.last-used-at%: <b><mk-time :time="user.account.last_used_at"/></b></p> + <p v-if="user.host === null">%i18n:desktop.tags.mk-user.last-used-at%: <b><mk-time :time="user.account.lastUsedAt"/></b></p> </div> </div> <main> - <mk-post-detail v-if="user.pinned_post" :post="user.pinned_post" :compact="true"/> + <mk-post-detail v-if="user.pinnedPost" :post="user.pinnedPost" :compact="true"/> <x-timeline class="timeline" ref="tl" :user="user"/> </main> <div> <div ref="right"> - <mk-calendar @chosen="warp" :start="new Date(user.created_at)"/> + <mk-calendar @chosen="warp" :start="new Date(user.createdAt)"/> <mk-activity :user="user"/> <x-friends :user="user"/> <div class="nav"><mk-nav/></div> diff --git a/src/server/web/app/desktop/views/pages/user/user.photos.vue b/src/server/web/app/desktop/views/pages/user/user.photos.vue index db29a9945a..1ff79b4aee 100644 --- a/src/server/web/app/desktop/views/pages/user/user.photos.vue +++ b/src/server/web/app/desktop/views/pages/user/user.photos.vue @@ -23,8 +23,8 @@ export default Vue.extend({ }, mounted() { (this as any).api('users/posts', { - user_id: this.user.id, - with_media: true, + userId: this.user.id, + withMedia: true, limit: 9 }).then(posts => { posts.forEach(post => { diff --git a/src/server/web/app/desktop/views/pages/user/user.profile.vue b/src/server/web/app/desktop/views/pages/user/user.profile.vue index b51aae18fa..f5562d0915 100644 --- a/src/server/web/app/desktop/views/pages/user/user.profile.vue +++ b/src/server/web/app/desktop/views/pages/user/user.profile.vue @@ -2,21 +2,21 @@ <div class="profile"> <div class="friend-form" v-if="os.isSignedIn && os.i.id != user.id"> <mk-follow-button :user="user" size="big"/> - <p class="followed" v-if="user.is_followed">%i18n:desktop.tags.mk-user.follows-you%</p> - <p v-if="user.is_muted">%i18n:desktop.tags.mk-user.muted% <a @click="unmute">%i18n:desktop.tags.mk-user.unmute%</a></p> - <p v-if="!user.is_muted"><a @click="mute">%i18n:desktop.tags.mk-user.mute%</a></p> + <p class="followed" v-if="user.isFollowed">%i18n:desktop.tags.mk-user.follows-you%</p> + <p v-if="user.isMuted">%i18n:desktop.tags.mk-user.muted% <a @click="unmute">%i18n:desktop.tags.mk-user.unmute%</a></p> + <p v-if="!user.isMuted"><a @click="mute">%i18n:desktop.tags.mk-user.mute%</a></p> </div> <div class="description" v-if="user.description">{{ user.description }}</div> <div class="birthday" v-if="user.host === null && user.account.profile.birthday"> <p>%fa:birthday-cake%{{ user.account.profile.birthday.replace('-', '年').replace('-', '月') + '日' }} ({{ age }}歳)</p> </div> <div class="twitter" v-if="user.host === null && user.account.twitter"> - <p>%fa:B twitter%<a :href="`https://twitter.com/${user.account.twitter.screen_name}`" target="_blank">@{{ user.account.twitter.screen_name }}</a></p> + <p>%fa:B twitter%<a :href="`https://twitter.com/${user.account.twitter.screenName}`" target="_blank">@{{ user.account.twitter.screenName }}</a></p> </div> <div class="status"> - <p class="posts-count">%fa:angle-right%<a>{{ user.posts_count }}</a><b>投稿</b></p> - <p class="following">%fa:angle-right%<a @click="showFollowing">{{ user.following_count }}</a>人を<b>フォロー</b></p> - <p class="followers">%fa:angle-right%<a @click="showFollowers">{{ user.followers_count }}</a>人の<b>フォロワー</b></p> + <p class="posts-count">%fa:angle-right%<a>{{ user.postsCount }}</a><b>投稿</b></p> + <p class="following">%fa:angle-right%<a @click="showFollowing">{{ user.followingCount }}</a>人を<b>フォロー</b></p> + <p class="followers">%fa:angle-right%<a @click="showFollowers">{{ user.followersCount }}</a>人の<b>フォロワー</b></p> </div> </div> </template> @@ -49,9 +49,9 @@ export default Vue.extend({ mute() { (this as any).api('mute/create', { - user_id: this.user.id + userId: this.user.id }).then(() => { - this.user.is_muted = true; + this.user.isMuted = true; }, () => { alert('error'); }); @@ -59,9 +59,9 @@ export default Vue.extend({ unmute() { (this as any).api('mute/delete', { - user_id: this.user.id + userId: this.user.id }).then(() => { - this.user.is_muted = false; + this.user.isMuted = false; }, () => { alert('error'); }); diff --git a/src/server/web/app/desktop/views/pages/user/user.timeline.vue b/src/server/web/app/desktop/views/pages/user/user.timeline.vue index 60eef8951b..134ad423ce 100644 --- a/src/server/web/app/desktop/views/pages/user/user.timeline.vue +++ b/src/server/web/app/desktop/views/pages/user/user.timeline.vue @@ -61,8 +61,8 @@ export default Vue.extend({ }, fetch(cb?) { (this as any).api('users/posts', { - user_id: this.user.id, - until_date: this.date ? this.date.getTime() : undefined, + userId: this.user.id, + untilDate: this.date ? this.date.getTime() : undefined, with_replies: this.mode == 'with-replies' }).then(posts => { this.posts = posts; @@ -74,9 +74,9 @@ export default Vue.extend({ if (this.moreFetching || this.fetching || this.posts.length == 0) return; this.moreFetching = true; (this as any).api('users/posts', { - user_id: this.user.id, + userId: this.user.id, with_replies: this.mode == 'with-replies', - until_id: this.posts[this.posts.length - 1].id + untilId: this.posts[this.posts.length - 1].id }).then(posts => { this.moreFetching = false; this.posts = this.posts.concat(posts); diff --git a/src/server/web/app/desktop/views/pages/welcome.vue b/src/server/web/app/desktop/views/pages/welcome.vue index 927ddf575b..34c28854b1 100644 --- a/src/server/web/app/desktop/views/pages/welcome.vue +++ b/src/server/web/app/desktop/views/pages/welcome.vue @@ -9,7 +9,7 @@ <p><button class="signup" @click="signup">はじめる</button><button class="signin" @click="signin">ログイン</button></p> <div class="users"> <router-link v-for="user in users" :key="user.id" class="avatar-anchor" :to="`/@${getAcct(user)}`" v-user-preview="user.id"> - <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> </div> diff --git a/src/server/web/app/desktop/views/widgets/channel.channel.form.vue b/src/server/web/app/desktop/views/widgets/channel.channel.form.vue index 392ba5924b..aaf327f1ef 100644 --- a/src/server/web/app/desktop/views/widgets/channel.channel.form.vue +++ b/src/server/web/app/desktop/views/widgets/channel.channel.form.vue @@ -30,8 +30,8 @@ export default Vue.extend({ (this as any).api('posts/create', { text: this.text, - reply_id: reply ? reply.id : undefined, - channel_id: (this.$parent as any).channel.id + replyId: reply ? reply.id : undefined, + channelId: (this.$parent as any).channel.id }).then(data => { this.text = ''; }).catch(err => { diff --git a/src/server/web/app/desktop/views/widgets/channel.channel.vue b/src/server/web/app/desktop/views/widgets/channel.channel.vue index de5885bfc1..e9fb9e3fd7 100644 --- a/src/server/web/app/desktop/views/widgets/channel.channel.vue +++ b/src/server/web/app/desktop/views/widgets/channel.channel.vue @@ -44,7 +44,7 @@ export default Vue.extend({ this.fetching = true; (this as any).api('channels/posts', { - channel_id: this.channel.id + channelId: this.channel.id }).then(posts => { this.posts = posts; this.fetching = false; diff --git a/src/server/web/app/desktop/views/widgets/channel.vue b/src/server/web/app/desktop/views/widgets/channel.vue index fc143bb1df..c9b62dfeab 100644 --- a/src/server/web/app/desktop/views/widgets/channel.vue +++ b/src/server/web/app/desktop/views/widgets/channel.vue @@ -48,7 +48,7 @@ export default define({ this.fetching = true; (this as any).api('channels/show', { - channel_id: this.props.channel + channelId: this.props.channel }).then(channel => { this.channel = channel; this.fetching = false; diff --git a/src/server/web/app/desktop/views/widgets/profile.vue b/src/server/web/app/desktop/views/widgets/profile.vue index 3940106197..83cd67b50c 100644 --- a/src/server/web/app/desktop/views/widgets/profile.vue +++ b/src/server/web/app/desktop/views/widgets/profile.vue @@ -4,12 +4,12 @@ :data-melt="props.design == 2" > <div class="banner" - :style="os.i.banner_url ? `background-image: url(${os.i.banner_url}?thumbnail&size=256)` : ''" + :style="os.i.bannerUrl ? `background-image: url(${os.i.bannerUrl}?thumbnail&size=256)` : ''" title="クリックでバナー編集" @click="os.apis.updateBanner" ></div> <img class="avatar" - :src="`${os.i.avatar_url}?thumbnail&size=96`" + :src="`${os.i.avatarUrl}?thumbnail&size=96`" @click="os.apis.updateAvatar" alt="avatar" title="クリックでアバター編集" diff --git a/src/server/web/app/desktop/views/widgets/users.vue b/src/server/web/app/desktop/views/widgets/users.vue index 10e3c529ee..7b89441126 100644 --- a/src/server/web/app/desktop/views/widgets/users.vue +++ b/src/server/web/app/desktop/views/widgets/users.vue @@ -8,7 +8,7 @@ <template v-else-if="users.length != 0"> <div class="user" v-for="_user in users"> <router-link class="avatar-anchor" :to="`/@${getAcct(_user)}`"> - <img class="avatar" :src="`${_user.avatar_url}?thumbnail&size=42`" alt="" v-user-preview="_user.id"/> + <img class="avatar" :src="`${_user.avatarUrl}?thumbnail&size=42`" alt="" v-user-preview="_user.id"/> </router-link> <div class="body"> <router-link class="name" :to="`/@${getAcct(_user)}`" v-user-preview="_user.id">{{ _user.name }}</router-link> |