%i18n:common.tags.mk-messaging.you%:{{ message.text }}
@@ -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/server/web/app/common/views/components/othello.game.vue b/src/server/web/app/common/views/components/othello.game.vue
index 414d819a5..f08742ad1 100644
--- a/src/server/web/app/common/views/components/othello.game.vue
+++ b/src/server/web/app/common/views/components/othello.game.vue
@@ -3,30 +3,30 @@
{{ blackUser.name }}(黒) vs {{ whiteUser.name }}(白)
-
{{ turnUser.name }}のターンです
+
{{ turnUser.name }}のターンです
{{ turnUser.name }}のターン
-
相手のターンです
-
あなたのターンです
-
- {{ game.winner.name }}の勝ち{{ game.settings.is_llotheo ? ' (ロセオ)' : '' }}
+
相手のターンです
+
あなたのターンです
+
+ {{ game.winner.name }}の勝ち{{ game.settings.isLlotheo ? ' (ロセオ)' : '' }}
引き分け
{{ logPos }}ターン目 黒:{{ o.blackCount }} 白:{{ o.whiteCount }} 合計:{{ o.blackCount + o.whiteCount }}
-
+
%fa:angle-double-left%
%fa:angle-left%
@@ -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/server/web/app/common/views/components/othello.gameroom.vue b/src/server/web/app/common/views/components/othello.gameroom.vue
index 38a25f668..dba9ccd16 100644
--- a/src/server/web/app/common/views/components/othello.gameroom.vue
+++ b/src/server/web/app/common/views/components/othello.gameroom.vue
@@ -1,6 +1,6 @@
-
+
diff --git a/src/server/web/app/common/views/components/othello.room.vue b/src/server/web/app/common/views/components/othello.room.vue
index 396541483..a32be6b74 100644
--- a/src/server/web/app/common/views/components/othello.room.vue
+++ b/src/server/web/app/common/views/components/othello.room.vue
@@ -41,9 +41,9 @@
ルール
-
-
-
+
+
+
@@ -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/server/web/app/common/views/components/othello.vue b/src/server/web/app/common/views/components/othello.vue
index d65032234..8f7d9dfd6 100644
--- a/src/server/web/app/common/views/components/othello.vue
+++ b/src/server/web/app/common/views/components/othello.vue
@@ -31,28 +31,28 @@
対局の招待があります!:
-
+
{{ i.parent.name }}
@{{ i.parent.username }}
-
+
@@ -133,7 +133,7 @@ export default Vue.extend({
methods: {
go(game) {
(this as any).api('othello/games/show', {
- game_id: game.id
+ gameId: game.id
}).then(game => {
this.matching = null;
this.game = game;
@@ -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/server/web/app/common/views/components/poll.vue b/src/server/web/app/common/views/components/poll.vue
index 8156c8bc5..711d89720 100644
--- a/src/server/web/app/common/views/components/poll.vue
+++ b/src/server/web/app/common/views/components/poll.vue
@@ -4,7 +4,7 @@
- %fa:check%
+ %fa:check%
{{ choice.text }}
({{ '%i18n:common.tags.mk-poll.vote-count%'.replace('{}', choice.votes) }})
@@ -36,7 +36,7 @@ export default Vue.extend({
return this.poll.choices.reduce((a, b) => a + b.votes, 0);
},
isVoted(): boolean {
- return this.poll.choices.some(c => c.is_voted);
+ return this.poll.choices.some(c => c.isVoted);
}
},
created() {
@@ -47,15 +47,15 @@ export default Vue.extend({
this.showResult = !this.showResult;
},
vote(id) {
- if (this.poll.choices.some(c => c.is_voted)) return;
+ if (this.poll.choices.some(c => c.isVoted)) 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 => {
if (c.id == id) {
c.votes++;
- Vue.set(c, 'is_voted', true);
+ Vue.set(c, 'isVoted', true);
}
});
this.showResult = true;
diff --git a/src/server/web/app/common/views/components/post-menu.vue b/src/server/web/app/common/views/components/post-menu.vue
index a53680e55..35116db7e 100644
--- a/src/server/web/app/common/views/components/post-menu.vue
+++ b/src/server/web/app/common/views/components/post-menu.vue
@@ -2,7 +2,7 @@
@@ -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/server/web/app/common/views/components/reaction-picker.vue b/src/server/web/app/common/views/components/reaction-picker.vue
index df8100f2f..bcb6b2b96 100644
--- a/src/server/web/app/common/views/components/reaction-picker.vue
+++ b/src/server/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/server/web/app/common/views/components/reactions-viewer.vue b/src/server/web/app/common/views/components/reactions-viewer.vue
index f6a27d913..246451008 100644
--- a/src/server/web/app/common/views/components/reactions-viewer.vue
+++ b/src/server/web/app/common/views/components/reactions-viewer.vue
@@ -20,7 +20,7 @@ export default Vue.extend({
props: ['post'],
computed: {
reactions(): number {
- return this.post.reaction_counts;
+ return this.post.reactionCounts;
}
}
});
diff --git a/src/server/web/app/common/views/components/signin.vue b/src/server/web/app/common/views/components/signin.vue
index 243468408..17154e6b3 100644
--- a/src/server/web/app/common/views/components/signin.vue
+++ b/src/server/web/app/common/views/components/signin.vue
@@ -1,12 +1,12 @@