diff options
| author | syuilo <syuilotan@yahoo.co.jp> | 2018-03-28 16:39:14 +0900 |
|---|---|---|
| committer | syuilo <syuilotan@yahoo.co.jp> | 2018-03-28 16:39:14 +0900 |
| commit | 3d5cdb8d2d60932caf1d29b0581c7d6243e06e37 (patch) | |
| tree | 9c29d1062b08378d4c4cafe5976793616d45bc01 /src/web | |
| parent | wip (diff) | |
| download | sharkey-3d5cdb8d2d60932caf1d29b0581c7d6243e06e37.tar.gz sharkey-3d5cdb8d2d60932caf1d29b0581c7d6243e06e37.tar.bz2 sharkey-3d5cdb8d2d60932caf1d29b0581c7d6243e06e37.zip | |
wip
Diffstat (limited to 'src/web')
103 files changed, 363 insertions, 363 deletions
diff --git a/src/web/app/auth/views/form.vue b/src/web/app/auth/views/form.vue index d86ed58b38..9d9e8cdb1b 100644 --- a/src/web/app/auth/views/form.vue +++ b/src/web/app/auth/views/form.vue @@ -7,7 +7,7 @@ <div class="app"> <section> <h2>{{ app.name }}</h2> - <p class="nid">{{ app.name_id }}</p> + <p class="nid">{{ app.nameId }}</p> <p class="description">{{ app.description }}</p> </section> <section> diff --git a/src/web/app/ch/tags/channel.tag b/src/web/app/ch/tags/channel.tag index dc4b8e1426..225129088d 100644 --- a/src/web/app/ch/tags/channel.tag +++ b/src/web/app/ch/tags/channel.tag @@ -77,7 +77,7 @@ // チャンネル概要読み込み this.$root.$data.os.api('channels/show', { - channel_id: this.id + channelId: this.id }).then(channel => { if (fetched) { Progress.done(); @@ -96,7 +96,7 @@ // 投稿読み込み this.$root.$data.os.api('channels/posts', { - channel_id: this.id + channelId: this.id }).then(posts => { if (fetched) { Progress.done(); @@ -125,7 +125,7 @@ this.posts.unshift(post); this.update(); - if (document.hidden && this.$root.$data.os.isSignedIn && post.user_id !== this.$root.$data.os.i.id) { + if (document.hidden && this.$root.$data.os.isSignedIn && post.userId !== this.$root.$data.os.i.id) { this.unreadCount++; document.title = `(${this.unreadCount}) ${this.channel.title} | Misskey`; } @@ -140,7 +140,7 @@ this.watch = () => { this.$root.$data.os.api('channels/watch', { - channel_id: this.id + channelId: this.id }).then(() => { this.channel.is_watching = true; this.update(); @@ -151,7 +151,7 @@ this.unwatch = () => { this.$root.$data.os.api('channels/unwatch', { - channel_id: this.id + channelId: this.id }).then(() => { this.channel.is_watching = false; this.update(); @@ -166,8 +166,8 @@ <header> <a class="index" @click="reply">{ post.index }:</a> <a class="name" href={ _URL_ + '/@' + acct }><b>{ post.user.name }</b></a> - <mk-time time={ post.created_at }/> - <mk-time time={ post.created_at } mode="detail"/> + <mk-time time={ post.createdAt }/> + <mk-time time={ post.createdAt } mode="detail"/> <span>ID:<i>{ acct }</i></span> </header> <div> @@ -328,9 +328,9 @@ this.$root.$data.os.api('posts/create', { text: this.$refs.text.value == '' ? undefined : this.$refs.text.value, - media_ids: files, - reply_id: this.reply ? this.reply.id : undefined, - channel_id: this.channel.id + mediaIds: files, + replyId: this.reply ? this.reply.id : undefined, + channelId: this.channel.id }).then(data => { this.clear(); }).catch(err => { diff --git a/src/web/app/common/define-widget.ts b/src/web/app/common/define-widget.ts index d8d29873a4..27db59b5ee 100644 --- a/src/web/app/common/define-widget.ts +++ b/src/web/app/common/define-widget.ts @@ -56,14 +56,14 @@ export default function<T extends object>(data: { id: this.id, data: newProps }).then(() => { - (this as any).os.i.account.client_settings.mobile_home.find(w => w.id == this.id).data = newProps; + (this as any).os.i.account.clientSettings.mobile_home.find(w => w.id == this.id).data = newProps; }); } else { (this as any).api('i/update_home', { id: this.id, data: newProps }).then(() => { - (this as any).os.i.account.client_settings.home.find(w => w.id == this.id).data = newProps; + (this as any).os.i.account.clientSettings.home.find(w => w.id == this.id).data = newProps; }); } }, { diff --git a/src/web/app/common/mios.ts b/src/web/app/common/mios.ts index 2c6c9988e7..bcb8b60678 100644 --- a/src/web/app/common/mios.ts +++ b/src/web/app/common/mios.ts @@ -294,12 +294,12 @@ export default class MiOS extends EventEmitter { const fetched = me => { if (me) { // デフォルトの設定をマージ - me.account.client_settings = Object.assign({ + me.account.clientSettings = Object.assign({ fetchOnScroll: true, showMaps: true, showPostFormOnTopOfTl: false, gradientWindowHeader: false - }, me.account.client_settings); + }, me.account.clientSettings); // ローカルストレージにキャッシュ localStorage.setItem('me', JSON.stringify(me)); diff --git a/src/web/app/common/scripts/streaming/home.ts b/src/web/app/common/scripts/streaming/home.ts index ffcf6e5360..c198619400 100644 --- a/src/web/app/common/scripts/streaming/home.ts +++ b/src/web/app/common/scripts/streaming/home.ts @@ -16,7 +16,7 @@ export class HomeStream extends Stream { // 最終利用日時を更新するため定期的にaliveメッセージを送信 setInterval(() => { this.send({ type: 'alive' }); - me.account.last_used_at = new Date(); + me.account.lastUsedAt = new Date(); }, 1000 * 60); // 自分の情報が更新されたとき diff --git a/src/web/app/common/views/components/messaging-room.form.vue b/src/web/app/common/views/components/messaging-room.form.vue index 01886b19c8..704f2016d8 100644 --- a/src/web/app/common/views/components/messaging-room.form.vue +++ b/src/web/app/common/views/components/messaging-room.form.vue @@ -151,9 +151,9 @@ export default Vue.extend({ send() { this.sending = true; (this as any).api('messaging/messages/create', { - user_id: this.user.id, + userId: this.user.id, text: this.text ? this.text : undefined, - file_id: this.file ? this.file.id : undefined + fileId: this.file ? this.file.id : undefined }).then(message => { this.clear(); }).catch(err => { @@ -173,7 +173,7 @@ export default Vue.extend({ const data = JSON.parse(localStorage.getItem('message_drafts') || '{}'); data[this.draftId] = { - updated_at: new Date(), + updatedAt: new Date(), data: { text: this.text, file: this.file diff --git a/src/web/app/common/views/components/messaging-room.message.vue b/src/web/app/common/views/components/messaging-room.message.vue index 5f2eb1ba86..d21cce1a0a 100644 --- a/src/web/app/common/views/components/messaging-room.message.vue +++ b/src/web/app/common/views/components/messaging-room.message.vue @@ -5,7 +5,7 @@ </router-link> <div class="content"> <div class="balloon" :data-no-text="message.text == null"> - <p class="read" v-if="isMe && message.is_read">%i18n:common.tags.mk-messaging-message.is-read%</p> + <p class="read" v-if="isMe && message.isRead">%i18n:common.tags.mk-messaging-message.is-read%</p> <button class="delete-button" v-if="isMe" title="%i18n:common.delete%"> <img src="/assets/desktop/messaging/delete.png" alt="Delete"/> </button> @@ -25,7 +25,7 @@ <div></div> <mk-url-preview v-for="url in urls" :url="url" :key="url"/> <footer> - <mk-time :time="message.created_at"/> + <mk-time :time="message.createdAt"/> <template v-if="message.is_edited">%fa:pencil-alt%</template> </footer> </div> @@ -43,7 +43,7 @@ export default Vue.extend({ return getAcct(this.message.user); }, isMe(): boolean { - return this.message.user_id == (this as any).os.i.id; + return this.message.userId == (this as any).os.i.id; }, urls(): string[] { if (this.message.ast) { diff --git a/src/web/app/common/views/components/messaging-room.vue b/src/web/app/common/views/components/messaging-room.vue index 6ff808b617..36c53fd3fe 100644 --- a/src/web/app/common/views/components/messaging-room.vue +++ b/src/web/app/common/views/components/messaging-room.vue @@ -52,8 +52,8 @@ export default Vue.extend({ computed: { _messages(): any[] { return (this.messages as any).map(message => { - const date = new Date(message.created_at).getDate(); - const month = new Date(message.created_at).getMonth() + 1; + const date = new Date(message.createdAt).getDate(); + const month = new Date(message.createdAt).getMonth() + 1; message._date = date; message._datetext = `${month}月 ${date}日`; return message; @@ -123,7 +123,7 @@ export default Vue.extend({ const max = this.existMoreMessages ? 20 : 10; (this as any).api('messaging/messages', { - user_id: this.user.id, + userId: this.user.id, limit: max + 1, until_id: this.existMoreMessages ? this.messages[0].id : undefined }).then(messages => { @@ -158,7 +158,7 @@ export default Vue.extend({ const isBottom = this.isBottom(); this.messages.push(message); - if (message.user_id != (this as any).os.i.id && !document.hidden) { + if (message.userId != (this as any).os.i.id && !document.hidden) { this.connection.send({ type: 'read', id: message.id @@ -170,7 +170,7 @@ export default Vue.extend({ this.$nextTick(() => { this.scrollToBottom(); }); - } else if (message.user_id != (this as any).os.i.id) { + } else if (message.userId != (this as any).os.i.id) { // Notify this.notify('%i18n:common.tags.mk-messaging-room.new-message%'); } @@ -181,7 +181,7 @@ export default Vue.extend({ ids.forEach(id => { if (this.messages.some(x => x.id == id)) { const exist = this.messages.map(x => x.id).indexOf(id); - this.messages[exist].is_read = true; + this.messages[exist].isRead = true; } }); }, @@ -223,7 +223,7 @@ export default Vue.extend({ onVisibilitychange() { if (document.hidden) return; this.messages.forEach(message => { - if (message.user_id !== (this as any).os.i.id && !message.is_read) { + if (message.userId !== (this as any).os.i.id && !message.isRead) { this.connection.send({ type: 'read', id: message.id diff --git a/src/web/app/common/views/components/messaging.vue b/src/web/app/common/views/components/messaging.vue index 88574b94d1..0272c67073 100644 --- a/src/web/app/common/views/components/messaging.vue +++ b/src/web/app/common/views/components/messaging.vue @@ -26,7 +26,7 @@ class="user" :href="`/i/messaging/${getAcct(isMe(message) ? message.recipient : message.user)}`" :data-is-me="isMe(message)" - :data-is-read="message.is_read" + :data-is-read="message.isRead" @click.prevent="navigate(isMe(message) ? message.recipient : message.user)" :key="message.id" > @@ -35,7 +35,7 @@ <header> <span class="name">{{ isMe(message) ? message.recipient.name : message.user.name }}</span> <span class="username">@{{ getAcct(isMe(message) ? message.recipient : message.user) }}</span> - <mk-time :time="message.created_at"/> + <mk-time :time="message.createdAt"/> </header> <div class="body"> <p class="text"><span class="me" v-if="isMe(message)">%i18n:common.tags.mk-messaging.you%:</span>{{ message.text }}</p> @@ -95,19 +95,19 @@ export default Vue.extend({ methods: { getAcct, isMe(message) { - return message.user_id == (this as any).os.i.id; + return message.userId == (this as any).os.i.id; }, onMessage(message) { this.messages = this.messages.filter(m => !( - (m.recipient_id == message.recipient_id && m.user_id == message.user_id) || - (m.recipient_id == message.user_id && m.user_id == message.recipient_id))); + (m.recipientId == message.recipientId && m.userId == message.userId) || + (m.recipientId == message.userId && m.userId == message.recipientId))); this.messages.unshift(message); }, onRead(ids) { ids.forEach(id => { const found = this.messages.find(m => m.id == id); - if (found) found.is_read = true; + if (found) found.isRead = true; }); }, search() { diff --git a/src/web/app/common/views/components/othello.game.vue b/src/web/app/common/views/components/othello.game.vue index 414d819a55..8150fe07f0 100644 --- a/src/web/app/common/views/components/othello.game.vue +++ b/src/web/app/common/views/components/othello.game.vue @@ -3,19 +3,19 @@ <header><b>{{ blackUser.name }}</b>(黒) vs <b>{{ whiteUser.name }}</b>(白)</header> <div style="overflow: hidden"> - <p class="turn" v-if="!iAmPlayer && !game.is_ended">{{ turnUser.name }}のターンです<mk-ellipsis/></p> + <p class="turn" v-if="!iAmPlayer && !game.isEnded">{{ turnUser.name }}のターンです<mk-ellipsis/></p> <p class="turn" v-if="logPos != logs.length">{{ turnUser.name }}のターン</p> - <p class="turn1" v-if="iAmPlayer && !game.is_ended && !isMyTurn">相手のターンです<mk-ellipsis/></p> - <p class="turn2" v-if="iAmPlayer && !game.is_ended && isMyTurn" v-animate-css="{ classes: 'tada', iteration: 'infinite' }">あなたのターンです</p> - <p class="result" v-if="game.is_ended && logPos == logs.length"> - <template v-if="game.winner"><b>{{ game.winner.name }}</b>の勝ち{{ game.settings.is_llotheo ? ' (ロセオ)' : '' }}</template> + <p class="turn1" v-if="iAmPlayer && !game.isEnded && !isMyTurn">相手のターンです<mk-ellipsis/></p> + <p class="turn2" v-if="iAmPlayer && !game.isEnded && isMyTurn" v-animate-css="{ classes: 'tada', iteration: 'infinite' }">あなたのターンです</p> + <p class="result" v-if="game.isEnded && logPos == logs.length"> + <template v-if="game.winner"><b>{{ game.winner.name }}</b>の勝ち{{ game.settings.isLlotheo ? ' (ロセオ)' : '' }}</template> <template v-else>引き分け</template> </p> </div> <div class="board" :style="{ 'grid-template-rows': `repeat(${ game.settings.map.length }, 1fr)`, 'grid-template-columns': `repeat(${ game.settings.map[0].length }, 1fr)` }"> <div v-for="(stone, i) in o.board" - :class="{ empty: stone == null, none: o.map[i] == 'null', isEnded: game.is_ended, myTurn: !game.is_ended && isMyTurn, can: turnUser ? o.canPut(turnUser.id == blackUser.id, i) : null, prev: o.prevPos == i }" + :class="{ empty: stone == null, none: o.map[i] == 'null', isEnded: game.isEnded, myTurn: !game.isEnded && isMyTurn, can: turnUser ? o.canPut(turnUser.id == blackUser.id, i) : null, prev: o.prevPos == i }" @click="set(i)" :title="'[' + (o.transformPosToXy(i)[0] + 1) + ', ' + (o.transformPosToXy(i)[1] + 1) + '] (' + i + ')'" > @@ -26,7 +26,7 @@ <p class="status"><b>{{ logPos }}ターン目</b> 黒:{{ o.blackCount }} 白:{{ o.whiteCount }} 合計:{{ o.blackCount + o.whiteCount }}</p> - <div class="player" v-if="game.is_ended"> + <div class="player" v-if="game.isEnded"> <el-button-group> <el-button type="primary" @click="logPos = 0" :disabled="logPos == 0">%fa:angle-double-left%</el-button> <el-button type="primary" @click="logPos--" :disabled="logPos == 0">%fa:angle-left%</el-button> @@ -62,12 +62,12 @@ export default Vue.extend({ computed: { iAmPlayer(): boolean { if (!(this as any).os.isSignedIn) return false; - return this.game.user1_id == (this as any).os.i.id || this.game.user2_id == (this as any).os.i.id; + return this.game.user1Id == (this as any).os.i.id || this.game.user2Id == (this as any).os.i.id; }, myColor(): Color { if (!this.iAmPlayer) return null; - if (this.game.user1_id == (this as any).os.i.id && this.game.black == 1) return true; - if (this.game.user2_id == (this as any).os.i.id && this.game.black == 2) return true; + if (this.game.user1Id == (this as any).os.i.id && this.game.black == 1) return true; + if (this.game.user2Id == (this as any).os.i.id && this.game.black == 2) return true; return false; }, opColor(): Color { @@ -97,11 +97,11 @@ export default Vue.extend({ watch: { logPos(v) { - if (!this.game.is_ended) return; + if (!this.game.isEnded) return; this.o = new Othello(this.game.settings.map, { - isLlotheo: this.game.settings.is_llotheo, - canPutEverywhere: this.game.settings.can_put_everywhere, - loopedBoard: this.game.settings.looped_board + isLlotheo: this.game.settings.isLlotheo, + canPutEverywhere: this.game.settings.canPutEverywhere, + loopedBoard: this.game.settings.loopedBoard }); this.logs.forEach((log, i) => { if (i < v) { @@ -116,9 +116,9 @@ export default Vue.extend({ this.game = this.initGame; this.o = new Othello(this.game.settings.map, { - isLlotheo: this.game.settings.is_llotheo, - canPutEverywhere: this.game.settings.can_put_everywhere, - loopedBoard: this.game.settings.looped_board + isLlotheo: this.game.settings.isLlotheo, + canPutEverywhere: this.game.settings.canPutEverywhere, + loopedBoard: this.game.settings.loopedBoard }); this.game.logs.forEach(log => { @@ -129,7 +129,7 @@ export default Vue.extend({ this.logPos = this.logs.length; // 通信を取りこぼしてもいいように定期的にポーリングさせる - if (this.game.is_started && !this.game.is_ended) { + if (this.game.isStarted && !this.game.isEnded) { this.pollingClock = setInterval(() => { const crc32 = CRC32.str(this.logs.map(x => x.pos.toString()).join('')); this.connection.send({ @@ -154,7 +154,7 @@ export default Vue.extend({ methods: { set(pos) { - if (this.game.is_ended) return; + if (this.game.isEnded) return; if (!this.iAmPlayer) return; if (!this.isMyTurn) return; if (!this.o.canPut(this.myColor, pos)) return; @@ -194,16 +194,16 @@ export default Vue.extend({ }, checkEnd() { - this.game.is_ended = this.o.isEnded; - if (this.game.is_ended) { + this.game.isEnded = this.o.isEnded; + if (this.game.isEnded) { if (this.o.winner === true) { - this.game.winner_id = this.game.black == 1 ? this.game.user1_id : this.game.user2_id; + this.game.winnerId = this.game.black == 1 ? this.game.user1Id : this.game.user2Id; this.game.winner = this.game.black == 1 ? this.game.user1 : this.game.user2; } else if (this.o.winner === false) { - this.game.winner_id = this.game.black == 1 ? this.game.user2_id : this.game.user1_id; + this.game.winnerId = this.game.black == 1 ? this.game.user2Id : this.game.user1Id; this.game.winner = this.game.black == 1 ? this.game.user2 : this.game.user1; } else { - this.game.winner_id = null; + this.game.winnerId = null; this.game.winner = null; } } @@ -214,9 +214,9 @@ export default Vue.extend({ this.game = game; this.o = new Othello(this.game.settings.map, { - isLlotheo: this.game.settings.is_llotheo, - canPutEverywhere: this.game.settings.can_put_everywhere, - loopedBoard: this.game.settings.looped_board + isLlotheo: this.game.settings.isLlotheo, + canPutEverywhere: this.game.settings.canPutEverywhere, + loopedBoard: this.game.settings.loopedBoard }); this.game.logs.forEach(log => { diff --git a/src/web/app/common/views/components/othello.gameroom.vue b/src/web/app/common/views/components/othello.gameroom.vue index 38a25f6686..dba9ccd16d 100644 --- a/src/web/app/common/views/components/othello.gameroom.vue +++ b/src/web/app/common/views/components/othello.gameroom.vue @@ -1,6 +1,6 @@ <template> <div> - <x-room v-if="!g.is_started" :game="g" :connection="connection"/> + <x-room v-if="!g.isStarted" :game="g" :connection="connection"/> <x-game v-else :init-game="g" :connection="connection"/> </div> </template> diff --git a/src/web/app/common/views/components/othello.room.vue b/src/web/app/common/views/components/othello.room.vue index 3965414836..a32be6b74f 100644 --- a/src/web/app/common/views/components/othello.room.vue +++ b/src/web/app/common/views/components/othello.room.vue @@ -41,9 +41,9 @@ <div slot="header"> <span>ルール</span> </div> - <mk-switch v-model="game.settings.is_llotheo" @change="updateSettings" text="石の少ない方が勝ち(ロセオ)"/> - <mk-switch v-model="game.settings.looped_board" @change="updateSettings" text="ループマップ"/> - <mk-switch v-model="game.settings.can_put_everywhere" @change="updateSettings" text="どこでも置けるモード"/> + <mk-switch v-model="game.settings.isLlotheo" @change="updateSettings" text="石の少ない方が勝ち(ロセオ)"/> + <mk-switch v-model="game.settings.loopedBoard" @change="updateSettings" text="ループマップ"/> + <mk-switch v-model="game.settings.canPutEverywhere" @change="updateSettings" text="どこでも置けるモード"/> </el-card> <el-card class="bot-form" v-if="form"> @@ -116,13 +116,13 @@ export default Vue.extend({ return categories.filter((item, pos) => categories.indexOf(item) == pos); }, isAccepted(): boolean { - if (this.game.user1_id == (this as any).os.i.id && this.game.user1_accepted) return true; - if (this.game.user2_id == (this as any).os.i.id && this.game.user2_accepted) return true; + if (this.game.user1Id == (this as any).os.i.id && this.game.user1Accepted) return true; + if (this.game.user2Id == (this as any).os.i.id && this.game.user2Accepted) return true; return false; }, isOpAccepted(): boolean { - if (this.game.user1_id != (this as any).os.i.id && this.game.user1_accepted) return true; - if (this.game.user2_id != (this as any).os.i.id && this.game.user2_accepted) return true; + if (this.game.user1Id != (this as any).os.i.id && this.game.user1Accepted) return true; + if (this.game.user2Id != (this as any).os.i.id && this.game.user2Accepted) return true; return false; } }, @@ -133,8 +133,8 @@ export default Vue.extend({ this.connection.on('init-form', this.onInitForm); this.connection.on('message', this.onMessage); - if (this.game.user1_id != (this as any).os.i.id && this.game.settings.form1) this.form = this.game.settings.form1; - if (this.game.user2_id != (this as any).os.i.id && this.game.settings.form2) this.form = this.game.settings.form2; + if (this.game.user1Id != (this as any).os.i.id && this.game.settings.form1) this.form = this.game.settings.form1; + if (this.game.user2Id != (this as any).os.i.id && this.game.settings.form2) this.form = this.game.settings.form2; }, beforeDestroy() { @@ -162,8 +162,8 @@ export default Vue.extend({ }, onChangeAccepts(accepts) { - this.game.user1_accepted = accepts.user1; - this.game.user2_accepted = accepts.user2; + this.game.user1Accepted = accepts.user1; + this.game.user2Accepted = accepts.user2; this.$forceUpdate(); }, @@ -185,12 +185,12 @@ export default Vue.extend({ }, onInitForm(x) { - if (x.user_id == (this as any).os.i.id) return; + if (x.userId == (this as any).os.i.id) return; this.form = x.form; }, onMessage(x) { - if (x.user_id == (this as any).os.i.id) return; + if (x.userId == (this as any).os.i.id) return; this.messages.unshift(x.message); }, diff --git a/src/web/app/common/views/components/othello.vue b/src/web/app/common/views/components/othello.vue index d650322341..7bdb471005 100644 --- a/src/web/app/common/views/components/othello.vue +++ b/src/web/app/common/views/components/othello.vue @@ -34,7 +34,7 @@ <img :src="`${i.parent.avatar_url}?thumbnail&size=32`" alt=""> <span class="name"><b>{{ i.parent.name }}</b></span> <span class="username">@{{ i.parent.username }}</span> - <mk-time :time="i.created_at"/> + <mk-time :time="i.createdAt"/> </div> </section> <section v-if="myGames.length > 0"> @@ -43,7 +43,7 @@ <img :src="`${g.user1.avatar_url}?thumbnail&size=32`" alt=""> <img :src="`${g.user2.avatar_url}?thumbnail&size=32`" alt=""> <span><b>{{ g.user1.name }}</b> vs <b>{{ g.user2.name }}</b></span> - <span class="state">{{ g.is_ended ? '終了' : '進行中' }}</span> + <span class="state">{{ g.isEnded ? '終了' : '進行中' }}</span> </a> </section> <section v-if="games.length > 0"> @@ -52,7 +52,7 @@ <img :src="`${g.user1.avatar_url}?thumbnail&size=32`" alt=""> <img :src="`${g.user2.avatar_url}?thumbnail&size=32`" alt=""> <span><b>{{ g.user1.name }}</b> vs <b>{{ g.user2.name }}</b></span> - <span class="state">{{ g.is_ended ? '終了' : '進行中' }}</span> + <span class="state">{{ g.isEnded ? '終了' : '進行中' }}</span> </a> </section> </div> @@ -147,7 +147,7 @@ export default Vue.extend({ username }).then(user => { (this as any).api('othello/match', { - user_id: user.id + userId: user.id }).then(res => { if (res == null) { this.matching = user; @@ -164,7 +164,7 @@ export default Vue.extend({ }, accept(invitation) { (this as any).api('othello/match', { - user_id: invitation.parent.id + userId: invitation.parent.id }).then(game => { if (game) { this.matching = null; diff --git a/src/web/app/common/views/components/poll.vue b/src/web/app/common/views/components/poll.vue index 8156c8bc58..e46e89f55d 100644 --- a/src/web/app/common/views/components/poll.vue +++ b/src/web/app/common/views/components/poll.vue @@ -49,7 +49,7 @@ export default Vue.extend({ vote(id) { if (this.poll.choices.some(c => c.is_voted)) return; (this as any).api('posts/polls/vote', { - post_id: this.post.id, + postId: this.post.id, choice: id }).then(() => { this.poll.choices.forEach(c => { diff --git a/src/web/app/common/views/components/post-menu.vue b/src/web/app/common/views/components/post-menu.vue index a53680e55a..35116db7e2 100644 --- a/src/web/app/common/views/components/post-menu.vue +++ b/src/web/app/common/views/components/post-menu.vue @@ -2,7 +2,7 @@ <div class="mk-post-menu"> <div class="backdrop" ref="backdrop" @click="close"></div> <div class="popover" :class="{ compact }" ref="popover"> - <button v-if="post.user_id == os.i.id" @click="pin">%i18n:common.tags.mk-post-menu.pin%</button> + <button v-if="post.userId == os.i.id" @click="pin">%i18n:common.tags.mk-post-menu.pin%</button> </div> </div> </template> @@ -51,7 +51,7 @@ export default Vue.extend({ methods: { pin() { (this as any).api('i/pin', { - post_id: this.post.id + postId: this.post.id }).then(() => { this.$destroy(); }); diff --git a/src/web/app/common/views/components/reaction-picker.vue b/src/web/app/common/views/components/reaction-picker.vue index df8100f2fc..bcb6b2b965 100644 --- a/src/web/app/common/views/components/reaction-picker.vue +++ b/src/web/app/common/views/components/reaction-picker.vue @@ -69,7 +69,7 @@ export default Vue.extend({ methods: { react(reaction) { (this as any).api('posts/reactions/create', { - post_id: this.post.id, + postId: this.post.id, reaction: reaction }).then(() => { if (this.cb) this.cb(); diff --git a/src/web/app/common/views/components/signin.vue b/src/web/app/common/views/components/signin.vue index 273143262b..17154e6b31 100644 --- a/src/web/app/common/views/components/signin.vue +++ b/src/web/app/common/views/components/signin.vue @@ -6,7 +6,7 @@ <label class="password"> <input v-model="password" type="password" placeholder="%i18n:common.tags.mk-signin.password%" required/>%fa:lock% </label> - <label class="token" v-if="user && user.account.two_factor_enabled"> + <label class="token" v-if="user && user.account.twoFactorEnabled"> <input v-model="token" type="number" placeholder="%i18n:common.tags.mk-signin.token%" required/>%fa:lock% </label> <button type="submit" :disabled="signing">{{ signing ? '%i18n:common.tags.mk-signin.signing-in%' : '%i18n:common.tags.mk-signin.signin%' }}</button> @@ -43,7 +43,7 @@ export default Vue.extend({ (this as any).api('signin', { username: this.username, password: this.password, - token: this.user && this.user.account.two_factor_enabled ? this.token : undefined + token: this.user && this.user.account.twoFactorEnabled ? this.token : undefined }).then(() => { location.reload(); }).catch(() => { diff --git a/src/web/app/common/views/components/twitter-setting.vue b/src/web/app/common/views/components/twitter-setting.vue index 15968d20a6..082d2b435d 100644 --- a/src/web/app/common/views/components/twitter-setting.vue +++ b/src/web/app/common/views/components/twitter-setting.vue @@ -1,13 +1,13 @@ <template> <div class="mk-twitter-setting"> <p>%i18n:common.tags.mk-twitter-setting.description%<a :href="`${docsUrl}/link-to-twitter`" target="_blank">%i18n:common.tags.mk-twitter-setting.detail%</a></p> - <p class="account" v-if="os.i.account.twitter" :title="`Twitter ID: ${os.i.account.twitter.user_id}`">%i18n:common.tags.mk-twitter-setting.connected-to%: <a :href="`https://twitter.com/${os.i.account.twitter.screen_name}`" target="_blank">@{{ os.i.account.twitter.screen_name }}</a></p> + <p class="account" v-if="os.i.account.twitter" :title="`Twitter ID: ${os.i.account.twitter.userId}`">%i18n:common.tags.mk-twitter-setting.connected-to%: <a :href="`https://twitter.com/${os.i.account.twitter.screenName}`" target="_blank">@{{ os.i.account.twitter.screenName }}</a></p> <p> <a :href="`${apiUrl}/connect/twitter`" target="_blank" @click.prevent="connect">{{ os.i.account.twitter ? '%i18n:common.tags.mk-twitter-setting.reconnect%' : '%i18n:common.tags.mk-twitter-setting.connect%' }}</a> <span v-if="os.i.account.twitter"> or </span> <a :href="`${apiUrl}/disconnect/twitter`" target="_blank" v-if="os.i.account.twitter" @click.prevent="disconnect">%i18n:common.tags.mk-twitter-setting.disconnect%</a> </p> - <p class="id" v-if="os.i.account.twitter">Twitter ID: {{ os.i.account.twitter.user_id }}</p> + <p class="id" v-if="os.i.account.twitter">Twitter ID: {{ os.i.account.twitter.userId }}</p> </div> </template> diff --git a/src/web/app/common/views/components/uploader.vue b/src/web/app/common/views/components/uploader.vue index 73006b16e9..c74a1edb41 100644 --- a/src/web/app/common/views/components/uploader.vue +++ b/src/web/app/common/views/components/uploader.vue @@ -53,7 +53,7 @@ export default Vue.extend({ data.append('i', (this as any).os.i.account.token); data.append('file', file); - if (folder) data.append('folder_id', folder); + if (folder) data.append('folderId', folder); const xhr = new XMLHttpRequest(); xhr.open('POST', apiUrl + '/drive/files/create', true); diff --git a/src/web/app/common/views/components/welcome-timeline.vue b/src/web/app/common/views/components/welcome-timeline.vue index 7586e9264e..c61cae0f76 100644 --- a/src/web/app/common/views/components/welcome-timeline.vue +++ b/src/web/app/common/views/components/welcome-timeline.vue @@ -10,7 +10,7 @@ <span class="username">@{{ getAcct(post.user) }}</span> <div class="info"> <router-link class="created-at" :to="`/@${getAcct(post.user)}/${post.id}`"> - <mk-time :time="post.created_at"/> + <mk-time :time="post.createdAt"/> </router-link> </div> </header> diff --git a/src/web/app/common/views/widgets/slideshow.vue b/src/web/app/common/views/widgets/slideshow.vue index e9451663e2..ad32299f37 100644 --- a/src/web/app/common/views/widgets/slideshow.vue +++ b/src/web/app/common/views/widgets/slideshow.vue @@ -97,7 +97,7 @@ export default define({ this.fetching = true; (this as any).api('drive/files', { - folder_id: this.props.folder, + folderId: this.props.folder, type: 'image/*', limit: 100 }).then(images => { diff --git a/src/web/app/desktop/api/update-avatar.ts b/src/web/app/desktop/api/update-avatar.ts index 8f748d853c..445ef7d745 100644 --- a/src/web/app/desktop/api/update-avatar.ts +++ b/src/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,9 +68,9 @@ 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.avatarId = i.avatarId; os.i.avatar_url = i.avatar_url; os.apis.dialog({ diff --git a/src/web/app/desktop/api/update-banner.ts b/src/web/app/desktop/api/update-banner.ts index 9ed48b2670..002efce8ce 100644 --- a/src/web/app/desktop/api/update-banner.ts +++ b/src/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,9 +68,9 @@ 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.bannerId = i.bannerId; os.i.banner_url = i.banner_url; os.apis.dialog({ diff --git a/src/web/app/desktop/views/components/activity.vue b/src/web/app/desktop/views/components/activity.vue index 33b53eb700..480b956ecc 100644 --- a/src/web/app/desktop/views/components/activity.vue +++ b/src/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/web/app/desktop/views/components/drive.file.vue b/src/web/app/desktop/views/components/drive.file.vue index 924ff7052d..85f8361c9f 100644 --- a/src/web/app/desktop/views/components/drive.file.vue +++ b/src/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/web/app/desktop/views/components/drive.folder.vue b/src/web/app/desktop/views/components/drive.folder.vue index a8a9a01370..a926bf47b2 100644 --- a/src/web/app/desktop/views/components/drive.folder.vue +++ b/src/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/web/app/desktop/views/components/drive.nav-folder.vue b/src/web/app/desktop/views/components/drive.nav-folder.vue index dfbf116bff..d885a72f7f 100644 --- a/src/web/app/desktop/views/components/drive.nav-folder.vue +++ b/src/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/web/app/desktop/views/components/drive.vue b/src/web/app/desktop/views/components/drive.vue index 0fafa8cf23..c766dfec12 100644 --- a/src/web/app/desktop/views/components/drive.vue +++ b/src/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/web/app/desktop/views/components/follow-button.vue b/src/web/app/desktop/views/components/follow-button.vue index fc4f871888..01b7e2aefd 100644 --- a/src/web/app/desktop/views/components/follow-button.vue +++ b/src/web/app/desktop/views/components/follow-button.vue @@ -67,7 +67,7 @@ export default Vue.extend({ this.wait = true; if (this.user.is_following) { (this as any).api('following/delete', { - user_id: this.user.id + userId: this.user.id }).then(() => { this.user.is_following = false; }).catch(err => { @@ -77,7 +77,7 @@ 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; }).catch(err => { diff --git a/src/web/app/desktop/views/components/followers.vue b/src/web/app/desktop/views/components/followers.vue index 4541a00072..e8330289ca 100644 --- a/src/web/app/desktop/views/components/followers.vue +++ b/src/web/app/desktop/views/components/followers.vue @@ -1,7 +1,7 @@ <template> <mk-users-list :fetch="fetch" - :count="user.followers_count" + :count="user.followersCount" :you-know-count="user.followers_you_know_count" > フォロワーはいないようです。 @@ -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/web/app/desktop/views/components/following.vue b/src/web/app/desktop/views/components/following.vue index e0b9f11695..0dab6ac7b3 100644 --- a/src/web/app/desktop/views/components/following.vue +++ b/src/web/app/desktop/views/components/following.vue @@ -1,7 +1,7 @@ <template> <mk-users-list :fetch="fetch" - :count="user.following_count" + :count="user.followingCount" :you-know-count="user.following_you_know_count" > フォロー中のユーザーはいないようです。 @@ -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/web/app/desktop/views/components/home.vue b/src/web/app/desktop/views/components/home.vue index a4ce1ef94b..7145ddce03 100644 --- a/src/web/app/desktop/views/components/home.vue +++ b/src/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/web/app/desktop/views/components/media-image.vue b/src/web/app/desktop/views/components/media-image.vue index bc02d0f9be..51309a0578 100644 --- a/src/web/app/desktop/views/components/media-image.vue +++ b/src/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/web/app/desktop/views/components/notifications.vue b/src/web/app/desktop/views/components/notifications.vue index b48ffc1746..62593cf97e 100644 --- a/src/web/app/desktop/views/components/notifications.vue +++ b/src/web/app/desktop/views/components/notifications.vue @@ -3,7 +3,7 @@ <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"/> @@ -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"> + <router-link class="avatar-anchor" :to="`/@${getAcct(notification.post.user)}`" v-user-preview="notification.post.userId"> <img class="avatar" :src="`${notification.post.user.avatar_url}?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,12 +32,12 @@ </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"> + <router-link class="avatar-anchor" :to="`/@${getAcct(notification.post.user)}`" v-user-preview="notification.post.userId"> <img class="avatar" :src="`${notification.post.user.avatar_url}?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> @@ -53,23 +53,23 @@ </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"> + <router-link class="avatar-anchor" :to="`/@${getAcct(notification.post.user)}`" v-user-preview="notification.post.userId"> <img class="avatar" :src="`${notification.post.user.avatar_url}?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"> + <router-link class="avatar-anchor" :to="`/@${getAcct(notification.post.user)}`" v-user-preview="notification.post.userId"> <img class="avatar" :src="`${notification.post.user.avatar_url}?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> @@ -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; diff --git a/src/web/app/desktop/views/components/post-detail.sub.vue b/src/web/app/desktop/views/components/post-detail.sub.vue index 59d8db04ce..7453a8bfcf 100644 --- a/src/web/app/desktop/views/components/post-detail.sub.vue +++ b/src/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.avatar_url}?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/web/app/desktop/views/components/post-detail.vue b/src/web/app/desktop/views/components/post-detail.vue index f09bf4cbd5..1ab751aaf8 100644 --- a/src/web/app/desktop/views/components/post-detail.vue +++ b/src/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,7 +18,7 @@ </div> <div class="repost" v-if="isRepost"> <p> - <router-link class="avatar-anchor" :to="`/@${acct}`" v-user-preview="post.user_id"> + <router-link class="avatar-anchor" :to="`/@${acct}`" v-user-preview="post.userId"> <img class="avatar" :src="`${post.user.avatar_url}?thumbnail&size=32`" alt="avatar"/> </router-link> %fa:retweet% @@ -34,7 +34,7 @@ <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"> @@ -115,7 +115,7 @@ 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 { @@ -129,7 +129,7 @@ export default Vue.extend({ : 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/web/app/desktop/views/components/post-form.vue b/src/web/app/desktop/views/components/post-form.vue index 78f6d445af..11028ceb52 100644 --- a/src/web/app/desktop/views/components/post-form.vue +++ b/src/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/web/app/desktop/views/components/post-preview.vue b/src/web/app/desktop/views/components/post-preview.vue index 808220c0e0..450632656d 100644 --- a/src/web/app/desktop/views/components/post-preview.vue +++ b/src/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.avatar_url}?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/web/app/desktop/views/components/posts.post.sub.vue b/src/web/app/desktop/views/components/posts.post.sub.vue index 120700877c..7d2695d6b9 100644 --- a/src/web/app/desktop/views/components/posts.post.sub.vue +++ b/src/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.avatar_url}?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/web/app/desktop/views/components/posts.post.vue b/src/web/app/desktop/views/components/posts.post.vue index 6b4d3d2789..185a621aae 100644 --- a/src/web/app/desktop/views/components/posts.post.vue +++ b/src/web/app/desktop/views/components/posts.post.vue @@ -5,15 +5,15 @@ </div> <div class="repost" v-if="isRepost"> <p> - <router-link class="avatar-anchor" :to="`/@${acct}`" v-user-preview="post.user_id"> + <router-link class="avatar-anchor" :to="`/@${acct}`" v-user-preview="post.userId"> <img class="avatar" :src="`${post.user.avatar_url}?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}`"> @@ -22,13 +22,13 @@ <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> @@ -122,7 +122,7 @@ 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 { @@ -136,7 +136,7 @@ export default Vue.extend({ : 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/web/app/desktop/views/components/posts.vue b/src/web/app/desktop/views/components/posts.vue index ffceff8762..5031667c7c 100644 --- a/src/web/app/desktop/views/components/posts.vue +++ b/src/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/web/app/desktop/views/components/repost-form.vue b/src/web/app/desktop/views/components/repost-form.vue index f2774b817c..3a5e3a7c56 100644 --- a/src/web/app/desktop/views/components/repost-form.vue +++ b/src/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/web/app/desktop/views/components/settings.2fa.vue b/src/web/app/desktop/views/components/settings.2fa.vue index 85f2d6ba5e..b8dd1dfd9b 100644 --- a/src/web/app/desktop/views/components/settings.2fa.vue +++ b/src/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/web/app/desktop/views/components/settings.profile.vue b/src/web/app/desktop/views/components/settings.profile.vue index 67a211c792..f34d8ff00d 100644 --- a/src/web/app/desktop/views/components/settings.profile.vue +++ b/src/web/app/desktop/views/components/settings.profile.vue @@ -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/web/app/desktop/views/components/settings.signins.vue b/src/web/app/desktop/views/components/settings.signins.vue index ddc567f06f..a414c95c27 100644 --- a/src/web/app/desktop/views/components/settings.signins.vue +++ b/src/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/web/app/desktop/views/components/settings.vue b/src/web/app/desktop/views/components/settings.vue index 3e6a477ced..cf75e52be2 100644 --- a/src/web/app/desktop/views/components/settings.vue +++ b/src/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'"> diff --git a/src/web/app/desktop/views/components/sub-post-content.vue b/src/web/app/desktop/views/components/sub-post-content.vue index 8c8f42c801..f13822331b 100644 --- a/src/web/app/desktop/views/components/sub-post-content.vue +++ b/src/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/web/app/desktop/views/components/timeline.vue b/src/web/app/desktop/views/components/timeline.vue index 47a9688b6d..c0eae2cd9e 100644 --- a/src/web/app/desktop/views/components/timeline.vue +++ b/src/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() { @@ -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/web/app/desktop/views/components/ui.header.vue b/src/web/app/desktop/views/components/ui.header.vue index 8af0e2fbed..7e337d2ae5 100644 --- a/src/web/app/desktop/views/components/ui.header.vue +++ b/src/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/web/app/desktop/views/components/user-preview.vue b/src/web/app/desktop/views/components/user-preview.vue index 24d613f120..4535ad8902 100644 --- a/src/web/app/desktop/views/components/user-preview.vue +++ b/src/web/app/desktop/views/components/user-preview.vue @@ -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/web/app/desktop/views/components/widget-container.vue b/src/web/app/desktop/views/components/widget-container.vue index dd42be63bb..68c5bcb8dc 100644 --- a/src/web/app/desktop/views/components/widget-container.vue +++ b/src/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/web/app/desktop/views/components/window.vue b/src/web/app/desktop/views/components/window.vue index 75f725d4b0..48dc46febd 100644 --- a/src/web/app/desktop/views/components/window.vue +++ b/src/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/web/app/desktop/views/pages/home.vue b/src/web/app/desktop/views/pages/home.vue index e1464bab1d..69e134f79f 100644 --- a/src/web/app/desktop/views/pages/home.vue +++ b/src/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/web/app/desktop/views/pages/post.vue b/src/web/app/desktop/views/pages/post.vue index c7b8729b72..dbd707e049 100644 --- a/src/web/app/desktop/views/pages/post.vue +++ b/src/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/web/app/desktop/views/pages/user/user.followers-you-know.vue b/src/web/app/desktop/views/pages/user/user.followers-you-know.vue index 80b38e8acc..9f67f5cf76 100644 --- a/src/web/app/desktop/views/pages/user/user.followers-you-know.vue +++ b/src/web/app/desktop/views/pages/user/user.followers-you-know.vue @@ -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/web/app/desktop/views/pages/user/user.friends.vue b/src/web/app/desktop/views/pages/user/user.friends.vue index 57e6def27b..cc0bcef257 100644 --- a/src/web/app/desktop/views/pages/user/user.friends.vue +++ b/src/web/app/desktop/views/pages/user/user.friends.vue @@ -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/web/app/desktop/views/pages/user/user.home.vue b/src/web/app/desktop/views/pages/user/user.home.vue index 2483a6c726..071c9bb61c 100644 --- a/src/web/app/desktop/views/pages/user/user.home.vue +++ b/src/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/web/app/desktop/views/pages/user/user.photos.vue b/src/web/app/desktop/views/pages/user/user.photos.vue index db29a9945a..2baf042bc0 100644 --- a/src/web/app/desktop/views/pages/user/user.photos.vue +++ b/src/web/app/desktop/views/pages/user/user.photos.vue @@ -23,7 +23,7 @@ export default Vue.extend({ }, mounted() { (this as any).api('users/posts', { - user_id: this.user.id, + userId: this.user.id, with_media: true, limit: 9 }).then(posts => { diff --git a/src/web/app/desktop/views/pages/user/user.profile.vue b/src/web/app/desktop/views/pages/user/user.profile.vue index b51aae18fa..0d91df2a59 100644 --- a/src/web/app/desktop/views/pages/user/user.profile.vue +++ b/src/web/app/desktop/views/pages/user/user.profile.vue @@ -11,12 +11,12 @@ <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,7 +49,7 @@ 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; }, () => { @@ -59,7 +59,7 @@ 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; }, () => { diff --git a/src/web/app/desktop/views/pages/user/user.timeline.vue b/src/web/app/desktop/views/pages/user/user.timeline.vue index 60eef8951b..1f0d0b1985 100644 --- a/src/web/app/desktop/views/pages/user/user.timeline.vue +++ b/src/web/app/desktop/views/pages/user/user.timeline.vue @@ -61,7 +61,7 @@ export default Vue.extend({ }, fetch(cb?) { (this as any).api('users/posts', { - user_id: this.user.id, + userId: this.user.id, until_date: this.date ? this.date.getTime() : undefined, with_replies: this.mode == 'with-replies' }).then(posts => { @@ -74,7 +74,7 @@ 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 }).then(posts => { diff --git a/src/web/app/desktop/views/widgets/channel.channel.form.vue b/src/web/app/desktop/views/widgets/channel.channel.form.vue index 392ba5924b..aaf327f1ef 100644 --- a/src/web/app/desktop/views/widgets/channel.channel.form.vue +++ b/src/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/web/app/desktop/views/widgets/channel.channel.vue b/src/web/app/desktop/views/widgets/channel.channel.vue index de5885bfc1..e9fb9e3fd7 100644 --- a/src/web/app/desktop/views/widgets/channel.channel.vue +++ b/src/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/web/app/desktop/views/widgets/channel.vue b/src/web/app/desktop/views/widgets/channel.vue index fc143bb1df..c9b62dfeab 100644 --- a/src/web/app/desktop/views/widgets/channel.vue +++ b/src/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/web/app/dev/views/app.vue b/src/web/app/dev/views/app.vue index 2c2a3c83ce..a35b032b73 100644 --- a/src/web/app/dev/views/app.vue +++ b/src/web/app/dev/views/app.vue @@ -28,7 +28,7 @@ export default Vue.extend({ fetch() { this.fetching = true; (this as any).api('app/show', { - app_id: this.$route.params.id + appId: this.$route.params.id }).then(app => { this.app = app; this.fetching = false; diff --git a/src/web/app/dev/views/new-app.vue b/src/web/app/dev/views/new-app.vue index 1a796299cb..cd07cc4d49 100644 --- a/src/web/app/dev/views/new-app.vue +++ b/src/web/app/dev/views/new-app.vue @@ -77,8 +77,8 @@ export default Vue.extend({ this.nidState = 'wait'; - (this as any).api('app/name_id/available', { - name_id: this.nid + (this as any).api('app/nameId/available', { + nameId: this.nid }).then(result => { this.nidState = result.available ? 'ok' : 'unavailable'; }).catch(err => { @@ -90,7 +90,7 @@ export default Vue.extend({ onSubmit() { (this as any).api('app/create', { name: this.name, - name_id: this.nid, + nameId: this.nid, description: this.description, callback_url: this.cb, permission: this.permission diff --git a/src/web/app/mobile/api/post.ts b/src/web/app/mobile/api/post.ts index 9b78ce10c2..841103fee1 100644 --- a/src/web/app/mobile/api/post.ts +++ b/src/web/app/mobile/api/post.ts @@ -18,7 +18,7 @@ export default (os) => (opts) => { const text = window.prompt(`「${getPostSummary(o.repost)}」をRepost`); if (text == null) return; os.api('posts/create', { - repost_id: o.repost.id, + repostId: o.repost.id, text: text == '' ? undefined : text }); } else { diff --git a/src/web/app/mobile/views/components/activity.vue b/src/web/app/mobile/views/components/activity.vue index b50044b3de..2e44017e77 100644 --- a/src/web/app/mobile/views/components/activity.vue +++ b/src/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/web/app/mobile/views/components/drive.file-detail.vue b/src/web/app/mobile/views/components/drive.file-detail.vue index e41ebbb451..f3274f677f 100644 --- a/src/web/app/mobile/views/components/drive.file-detail.vue +++ b/src/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/web/app/mobile/views/components/drive.file.vue b/src/web/app/mobile/views/components/drive.file.vue index db73816282..7d1957042b 100644 --- a/src/web/app/mobile/views/components/drive.file.vue +++ b/src/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/web/app/mobile/views/components/drive.vue b/src/web/app/mobile/views/components/drive.vue index 696c63e2a4..dd4d97e960 100644 --- a/src/web/app/mobile/views/components/drive.vue +++ b/src/web/app/mobile/views/components/drive.vue @@ -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,7 +318,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, until_id: this.files[this.files.length - 1].id }).then(files => { @@ -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/web/app/mobile/views/components/follow-button.vue b/src/web/app/mobile/views/components/follow-button.vue index fb6eaa39c6..838ea404eb 100644 --- a/src/web/app/mobile/views/components/follow-button.vue +++ b/src/web/app/mobile/views/components/follow-button.vue @@ -57,7 +57,7 @@ export default Vue.extend({ this.wait = true; if (this.user.is_following) { (this as any).api('following/delete', { - user_id: this.user.id + userId: this.user.id }).then(() => { this.user.is_following = false; }).catch(err => { @@ -67,7 +67,7 @@ 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; }).catch(err => { diff --git a/src/web/app/mobile/views/components/media-image.vue b/src/web/app/mobile/views/components/media-image.vue index faf8bad48a..cfc2134988 100644 --- a/src/web/app/mobile/views/components/media-image.vue +++ b/src/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/web/app/mobile/views/components/notification.vue b/src/web/app/mobile/views/components/notification.vue index 150ac0fd8b..aac8f82900 100644 --- a/src/web/app/mobile/views/components/notification.vue +++ b/src/web/app/mobile/views/components/notification.vue @@ -1,7 +1,7 @@ <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"/> </router-link> @@ -18,7 +18,7 @@ </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"/> </router-link> @@ -38,7 +38,7 @@ </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"/> </router-link> @@ -59,7 +59,7 @@ </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"/> </router-link> diff --git a/src/web/app/mobile/views/components/notifications.vue b/src/web/app/mobile/views/components/notifications.vue index 1cd6e2bc13..4365198f16 100644 --- a/src/web/app/mobile/views/components/notifications.vue +++ b/src/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; diff --git a/src/web/app/mobile/views/components/post-card.vue b/src/web/app/mobile/views/components/post-card.vue index 8ca7550c2e..10dfd92415 100644 --- a/src/web/app/mobile/views/components/post-card.vue +++ b/src/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/web/app/mobile/views/components/post-detail.sub.vue b/src/web/app/mobile/views/components/post-detail.sub.vue index 6906cf570e..427e054fd6 100644 --- a/src/web/app/mobile/views/components/post-detail.sub.vue +++ b/src/web/app/mobile/views/components/post-detail.sub.vue @@ -8,7 +8,7 @@ <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/web/app/mobile/views/components/post-detail.vue b/src/web/app/mobile/views/components/post-detail.vue index b5c9158300..9a8c33a80d 100644 --- a/src/web/app/mobile/views/components/post-detail.vue +++ b/src/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" > @@ -54,7 +54,7 @@ </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"/> @@ -115,7 +115,7 @@ 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 { @@ -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/web/app/mobile/views/components/post-form.vue b/src/web/app/mobile/views/components/post-form.vue index 2aa3c6f6c0..929dc5933b 100644 --- a/src/web/app/mobile/views/components/post-form.vue +++ b/src/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/web/app/mobile/views/components/post-preview.vue b/src/web/app/mobile/views/components/post-preview.vue index 0bd0a355b3..e640843419 100644 --- a/src/web/app/mobile/views/components/post-preview.vue +++ b/src/web/app/mobile/views/components/post-preview.vue @@ -8,7 +8,7 @@ <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/web/app/mobile/views/components/post.sub.vue b/src/web/app/mobile/views/components/post.sub.vue index b6ee7c1e08..8a11239da7 100644 --- a/src/web/app/mobile/views/components/post.sub.vue +++ b/src/web/app/mobile/views/components/post.sub.vue @@ -8,7 +8,7 @@ <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/web/app/mobile/views/components/post.vue b/src/web/app/mobile/views/components/post.vue index e5bc964792..243e7d9c2e 100644 --- a/src/web/app/mobile/views/components/post.vue +++ b/src/web/app/mobile/views/components/post.vue @@ -13,7 +13,7 @@ <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}`"> @@ -22,12 +22,12 @@ <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> @@ -103,7 +103,7 @@ 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 { @@ -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/web/app/mobile/views/components/posts.vue b/src/web/app/mobile/views/components/posts.vue index 7e71fa0982..4695f1beaa 100644 --- a/src/web/app/mobile/views/components/posts.vue +++ b/src/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/web/app/mobile/views/components/sub-post-content.vue b/src/web/app/mobile/views/components/sub-post-content.vue index 389fc420ea..b95883de77 100644 --- a/src/web/app/mobile/views/components/sub-post-content.vue +++ b/src/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/web/app/mobile/views/components/timeline.vue b/src/web/app/mobile/views/components/timeline.vue index c0e766523f..999f4a1f1e 100644 --- a/src/web/app/mobile/views/components/timeline.vue +++ b/src/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() { diff --git a/src/web/app/mobile/views/components/ui.header.vue b/src/web/app/mobile/views/components/ui.header.vue index 66e10a0f8a..2bf47a90a9 100644 --- a/src/web/app/mobile/views/components/ui.header.vue +++ b/src/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/web/app/mobile/views/components/user-timeline.vue b/src/web/app/mobile/views/components/user-timeline.vue index 39f959187c..73ff440dc2 100644 --- a/src/web/app/mobile/views/components/user-timeline.vue +++ b/src/web/app/mobile/views/components/user-timeline.vue @@ -33,7 +33,7 @@ export default Vue.extend({ }, mounted() { (this as any).api('users/posts', { - user_id: this.user.id, + userId: this.user.id, with_media: this.withMedia, limit: limit + 1 }).then(posts => { @@ -50,7 +50,7 @@ export default Vue.extend({ more() { this.moreFetching = true; (this as any).api('users/posts', { - user_id: this.user.id, + userId: this.user.id, with_media: this.withMedia, limit: limit + 1, until_id: this.posts[this.posts.length - 1].id diff --git a/src/web/app/mobile/views/pages/followers.vue b/src/web/app/mobile/views/pages/followers.vue index 1edf4e38ad..b5267bebf4 100644 --- a/src/web/app/mobile/views/pages/followers.vue +++ b/src/web/app/mobile/views/pages/followers.vue @@ -7,7 +7,7 @@ <mk-users-list v-if="!fetching" :fetch="fetchUsers" - :count="user.followers_count" + :count="user.followersCount" :you-know-count="user.followers_you_know_count" @loaded="onLoaded" > @@ -54,7 +54,7 @@ export default Vue.extend({ }, fetchUsers(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/web/app/mobile/views/pages/following.vue b/src/web/app/mobile/views/pages/following.vue index 0dd171cce1..d8c31c9f01 100644 --- a/src/web/app/mobile/views/pages/following.vue +++ b/src/web/app/mobile/views/pages/following.vue @@ -7,7 +7,7 @@ <mk-users-list v-if="!fetching" :fetch="fetchUsers" - :count="user.following_count" + :count="user.followingCount" :you-know-count="user.following_you_know_count" @loaded="onLoaded" > @@ -54,7 +54,7 @@ export default Vue.extend({ }, fetchUsers(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/web/app/mobile/views/pages/home.vue b/src/web/app/mobile/views/pages/home.vue index b110fc4091..be9101aa7f 100644 --- a/src/web/app/mobile/views/pages/home.vue +++ b/src/web/app/mobile/views/pages/home.vue @@ -82,8 +82,8 @@ export default Vue.extend({ }; }, created() { - if ((this as any).os.i.account.client_settings.mobile_home == null) { - Vue.set((this as any).os.i.account.client_settings, 'mobile_home', [{ + if ((this as any).os.i.account.clientSettings.mobile_home == null) { + Vue.set((this as any).os.i.account.clientSettings, 'mobile_home', [{ name: 'calendar', id: 'a', data: {} }, { @@ -105,14 +105,14 @@ export default Vue.extend({ name: 'version', id: 'g', data: {} }]); - this.widgets = (this as any).os.i.account.client_settings.mobile_home; + this.widgets = (this as any).os.i.account.clientSettings.mobile_home; this.saveHome(); } else { - this.widgets = (this as any).os.i.account.client_settings.mobile_home; + this.widgets = (this as any).os.i.account.clientSettings.mobile_home; } - this.$watch('os.i.account.client_settings', i => { - this.widgets = (this as any).os.i.account.client_settings.mobile_home; + this.$watch('os.i.account.clientSettings', i => { + this.widgets = (this as any).os.i.account.clientSettings.mobile_home; }, { deep: true }); @@ -144,7 +144,7 @@ export default Vue.extend({ Progress.done(); }, 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)}`; } @@ -157,15 +157,15 @@ export default Vue.extend({ }, onHomeUpdated(data) { if (data.home) { - (this as any).os.i.account.client_settings.mobile_home = data.home; + (this as any).os.i.account.clientSettings.mobile_home = data.home; this.widgets = data.home; } else { - const w = (this as any).os.i.account.client_settings.mobile_home.find(w => w.id == data.id); + const w = (this as any).os.i.account.clientSettings.mobile_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 = (this as any).os.i.account.client_settings.mobile_home; + this.widgets = (this as any).os.i.account.clientSettings.mobile_home; } } }, @@ -194,7 +194,7 @@ export default Vue.extend({ this.saveHome(); }, saveHome() { - (this as any).os.i.account.client_settings.mobile_home = this.widgets; + (this as any).os.i.account.clientSettings.mobile_home = this.widgets; (this as any).api('i/update_mobile_home', { home: this.widgets }); diff --git a/src/web/app/mobile/views/pages/post.vue b/src/web/app/mobile/views/pages/post.vue index 2ed2ebfcfd..49a4bfd9dc 100644 --- a/src/web/app/mobile/views/pages/post.vue +++ b/src/web/app/mobile/views/pages/post.vue @@ -38,7 +38,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/web/app/mobile/views/pages/profile-setting.vue b/src/web/app/mobile/views/pages/profile-setting.vue index 941165c99e..d4bb254877 100644 --- a/src/web/app/mobile/views/pages/profile-setting.vue +++ b/src/web/app/mobile/views/pages/profile-setting.vue @@ -69,7 +69,7 @@ export default Vue.extend({ this.avatarSaving = true; (this as any).api('i/update', { - avatar_id: file.id + avatarId: file.id }).then(() => { this.avatarSaving = false; alert('%i18n:mobile.tags.mk-profile-setting.avatar-saved%'); @@ -83,7 +83,7 @@ export default Vue.extend({ this.bannerSaving = true; (this as any).api('i/update', { - banner_id: file.id + bannerId: file.id }).then(() => { this.bannerSaving = false; alert('%i18n:mobile.tags.mk-profile-setting.banner-saved%'); diff --git a/src/web/app/mobile/views/pages/user.vue b/src/web/app/mobile/views/pages/user.vue index 7ff897e42d..c4d6b67e6c 100644 --- a/src/web/app/mobile/views/pages/user.vue +++ b/src/web/app/mobile/views/pages/user.vue @@ -27,15 +27,15 @@ </div> <div class="status"> <a> - <b>{{ user.posts_count | number }}</b> + <b>{{ user.postsCount | number }}</b> <i>%i18n:mobile.tags.mk-user.posts%</i> </a> <a :href="`@${acct}/following`"> - <b>{{ user.following_count | number }}</b> + <b>{{ user.followingCount | number }}</b> <i>%i18n:mobile.tags.mk-user.following%</i> </a> <a :href="`@${acct}/followers`"> - <b>{{ user.followers_count | number }}</b> + <b>{{ user.followersCount | number }}</b> <i>%i18n:mobile.tags.mk-user.followers%</i> </a> </div> diff --git a/src/web/app/mobile/views/pages/user/home.followers-you-know.vue b/src/web/app/mobile/views/pages/user/home.followers-you-know.vue index 1a2b8f7083..508ab4b4a7 100644 --- a/src/web/app/mobile/views/pages/user/home.followers-you-know.vue +++ b/src/web/app/mobile/views/pages/user/home.followers-you-know.vue @@ -27,7 +27,7 @@ export default Vue.extend({ }, mounted() { (this as any).api('users/followers', { - user_id: this.user.id, + userId: this.user.id, iknow: true, limit: 30 }).then(res => { diff --git a/src/web/app/mobile/views/pages/user/home.friends.vue b/src/web/app/mobile/views/pages/user/home.friends.vue index b37f1a2fe8..469781abb9 100644 --- a/src/web/app/mobile/views/pages/user/home.friends.vue +++ b/src/web/app/mobile/views/pages/user/home.friends.vue @@ -20,7 +20,7 @@ export default Vue.extend({ }, mounted() { (this as any).api('users/get_frequently_replied_users', { - user_id: this.user.id + userId: this.user.id }).then(res => { this.users = res.map(x => x.user); this.fetching = false; diff --git a/src/web/app/mobile/views/pages/user/home.photos.vue b/src/web/app/mobile/views/pages/user/home.photos.vue index f12f59a407..94b5af5531 100644 --- a/src/web/app/mobile/views/pages/user/home.photos.vue +++ b/src/web/app/mobile/views/pages/user/home.photos.vue @@ -29,7 +29,7 @@ export default Vue.extend({ }, mounted() { (this as any).api('users/posts', { - user_id: this.user.id, + userId: this.user.id, with_media: true, limit: 6 }).then(posts => { diff --git a/src/web/app/mobile/views/pages/user/home.posts.vue b/src/web/app/mobile/views/pages/user/home.posts.vue index 70b20ce943..654f7f63e0 100644 --- a/src/web/app/mobile/views/pages/user/home.posts.vue +++ b/src/web/app/mobile/views/pages/user/home.posts.vue @@ -20,7 +20,7 @@ export default Vue.extend({ }, mounted() { (this as any).api('users/posts', { - user_id: this.user.id + userId: this.user.id }).then(posts => { this.posts = posts; this.fetching = false; diff --git a/src/web/app/mobile/views/pages/user/home.vue b/src/web/app/mobile/views/pages/user/home.vue index e3def61512..1afcd1f5ba 100644 --- a/src/web/app/mobile/views/pages/user/home.vue +++ b/src/web/app/mobile/views/pages/user/home.vue @@ -1,6 +1,6 @@ <template> <div class="root home"> - <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"/> <section class="recent-posts"> <h2>%fa:R comments%%i18n:mobile.tags.mk-user-overview.recent-posts%</h2> <div> @@ -31,7 +31,7 @@ <x-followers-you-know :user="user"/> </div> </section> - <p v-if="user.host === null">%i18n:mobile.tags.mk-user-overview.last-used-at%: <b><mk-time :time="user.account.last_used_at"/></b></p> + <p v-if="user.host === null">%i18n:mobile.tags.mk-user-overview.last-used-at%: <b><mk-time :time="user.account.lastUsedAt"/></b></p> </div> </template> diff --git a/src/web/app/mobile/views/pages/welcome.vue b/src/web/app/mobile/views/pages/welcome.vue index 8557448346..7a809702c5 100644 --- a/src/web/app/mobile/views/pages/welcome.vue +++ b/src/web/app/mobile/views/pages/welcome.vue @@ -8,7 +8,7 @@ <form @submit.prevent="onSubmit"> <input v-model="username" type="text" pattern="^[a-zA-Z0-9_]+$" placeholder="ユーザー名" autofocus required @change="onUsernameChange"/> <input v-model="password" type="password" placeholder="パスワード" required/> - <input v-if="user && user.account.two_factor_enabled" v-model="token" type="number" placeholder="トークン" required/> + <input v-if="user && user.account.twoFactorEnabled" v-model="token" type="number" placeholder="トークン" required/> <button type="submit" :disabled="signing">{{ signing ? 'ログインしています' : 'ログイン' }}</button> </form> <div> @@ -70,7 +70,7 @@ export default Vue.extend({ (this as any).api('signin', { username: this.username, password: this.password, - token: this.user && this.user.account.two_factor_enabled ? this.token : undefined + token: this.user && this.user.account.twoFactorEnabled ? this.token : undefined }).then(() => { location.reload(); }).catch(() => { diff --git a/src/web/app/stats/tags/index.tag b/src/web/app/stats/tags/index.tag index 4b167ccbc8..bf08c38c3a 100644 --- a/src/web/app/stats/tags/index.tag +++ b/src/web/app/stats/tags/index.tag @@ -57,7 +57,7 @@ </mk-index> <mk-posts> - <h2>%i18n:stats.posts-count% <b>{ stats.posts_count }</b></h2> + <h2>%i18n:stats.posts-count% <b>{ stats.postsCount }</b></h2> <mk-posts-chart v-if="!initializing" data={ data }/> <style lang="stylus" scoped> :scope diff --git a/src/web/docs/api/endpoints/posts/create.yaml b/src/web/docs/api/endpoints/posts/create.yaml index 5e2307dab4..70d35008c0 100644 --- a/src/web/docs/api/endpoints/posts/create.yaml +++ b/src/web/docs/api/endpoints/posts/create.yaml @@ -11,19 +11,19 @@ params: desc: ja: "投稿の本文" en: "The text of your post" - - name: "media_ids" + - name: "mediaIds" type: "id(DriveFile)[]" optional: true desc: ja: "添付するメディア(1~4つ)" en: "Media you want to attach (1~4)" - - name: "reply_id" + - name: "replyId" type: "id(Post)" optional: true desc: ja: "返信する投稿" en: "The post you want to reply" - - name: "repost_id" + - name: "repostId" type: "id(Post)" optional: true desc: diff --git a/src/web/docs/api/entities/drive-file.yaml b/src/web/docs/api/entities/drive-file.yaml index 2ebbb089ab..02ab0d608e 100644 --- a/src/web/docs/api/entities/drive-file.yaml +++ b/src/web/docs/api/entities/drive-file.yaml @@ -11,13 +11,13 @@ props: desc: ja: "ファイルID" en: "The ID of this file" - - name: "created_at" + - name: "createdAt" type: "date" optional: false desc: ja: "アップロード日時" en: "The upload date of this file" - - name: "user_id" + - name: "userId" type: "id(User)" optional: false desc: @@ -59,7 +59,7 @@ props: desc: ja: "ファイルのURL" en: "The URL of this file" - - name: "folder_id" + - name: "folderId" type: "id(DriveFolder)" optional: true desc: diff --git a/src/web/docs/api/entities/post.yaml b/src/web/docs/api/entities/post.yaml index f780263144..8a616f088b 100644 --- a/src/web/docs/api/entities/post.yaml +++ b/src/web/docs/api/entities/post.yaml @@ -11,13 +11,13 @@ props: desc: ja: "投稿ID" en: "The ID of this post" - - name: "created_at" + - name: "createdAt" type: "date" optional: false desc: ja: "投稿日時" en: "The posted date of this post" - - name: "via_mobile" + - name: "viaMobile" type: "boolean" optional: true desc: @@ -29,7 +29,7 @@ props: desc: ja: "投稿の本文" en: "The text of this post" - - name: "media_ids" + - name: "mediaIds" type: "id(DriveFile)[]" optional: true desc: @@ -41,7 +41,7 @@ props: desc: ja: "添付されているメディア" en: "The attached media" - - name: "user_id" + - name: "userId" type: "id(User)" optional: false desc: @@ -64,7 +64,7 @@ props: optional: false desc: ja: "<a href='/docs/api/reactions'>リアクション</a>をキーとし、この投稿に対するそのリアクションの数を値としたオブジェクト" - - name: "reply_id" + - name: "replyId" type: "id(Post)" optional: true desc: @@ -76,7 +76,7 @@ props: desc: ja: "返信した投稿" en: "The replyed post" - - name: "repost_id" + - name: "repostId" type: "id(Post)" optional: true desc: diff --git a/src/web/docs/api/entities/user.yaml b/src/web/docs/api/entities/user.yaml index a451a40807..60f2c86084 100644 --- a/src/web/docs/api/entities/user.yaml +++ b/src/web/docs/api/entities/user.yaml @@ -11,7 +11,7 @@ props: desc: ja: "ユーザーID" en: "The ID of this user" - - name: "created_at" + - name: "createdAt" type: "date" optional: false desc: @@ -29,7 +29,7 @@ props: desc: ja: "アカウントの説明(自己紹介)" en: "The description of this user" - - name: "avatar_id" + - name: "avatarId" type: "id(DriveFile)" optional: true desc: @@ -41,7 +41,7 @@ props: desc: ja: "アバターのURL" en: "The URL of the avatar of this user" - - name: "banner_id" + - name: "bannerId" type: "id(DriveFile)" optional: true desc: @@ -53,13 +53,13 @@ props: desc: ja: "バナーのURL" en: "The URL of the banner of this user" - - name: "followers_count" + - name: "followersCount" type: "number" optional: false desc: ja: "フォロワーの数" en: "The number of the followers for this user" - - name: "following_count" + - name: "followingCount" type: "number" optional: false desc: @@ -81,25 +81,25 @@ props: desc: ja: "自分がこのユーザーをミュートしているか" en: "Whether you muted this user" - - name: "posts_count" + - name: "postsCount" type: "number" optional: false desc: ja: "投稿の数" en: "The number of the posts of this user" - - name: "pinned_post" + - name: "pinnedPost" type: "entity(Post)" optional: true desc: ja: "ピン留めされた投稿" en: "The pinned post of this user" - - name: "pinned_post_id" + - name: "pinnedPostId" type: "id(Post)" optional: true desc: ja: "ピン留めされた投稿のID" en: "The ID of the pinned post of this user" - - name: "drive_capacity" + - name: "driveCapacity" type: "number" optional: false desc: @@ -119,13 +119,13 @@ props: en: "The account of this user on this server" defName: "account" def: - - name: "last_used_at" + - name: "lastUsedAt" type: "date" optional: false desc: ja: "最終利用日時" en: "The last used date of this user" - - name: "is_bot" + - name: "isBot" type: "boolean" optional: true desc: @@ -139,13 +139,13 @@ props: en: "The info of the connected twitter account of this user" defName: "twitter" def: - - name: "user_id" + - name: "userId" type: "string" optional: false desc: ja: "ユーザーID" en: "The user ID" - - name: "screen_name" + - name: "screenName" type: "string" optional: false desc: |