summaryrefslogtreecommitdiff
path: root/src/web/app/common/views/components
diff options
context:
space:
mode:
authorsyuilo <syuilotan@yahoo.co.jp>2018-03-09 18:29:27 +0900
committersyuilo <syuilotan@yahoo.co.jp>2018-03-09 18:29:27 +0900
commite82268db7ee9863b2eaeea64f843afa091b024f8 (patch)
tree0f88d55d7f9bf3e1d3a4a91aafdd972af87117af /src/web/app/common/views/components
parentなんかもうめっちゃ変えた (diff)
downloadsharkey-e82268db7ee9863b2eaeea64f843afa091b024f8.tar.gz
sharkey-e82268db7ee9863b2eaeea64f843afa091b024f8.tar.bz2
sharkey-e82268db7ee9863b2eaeea64f843afa091b024f8.zip
:v:
Diffstat (limited to 'src/web/app/common/views/components')
-rw-r--r--src/web/app/common/views/components/othello.game.vue2
-rw-r--r--src/web/app/common/views/components/othello.vue11
2 files changed, 9 insertions, 4 deletions
diff --git a/src/web/app/common/views/components/othello.game.vue b/src/web/app/common/views/components/othello.game.vue
index 248528ed41..6daa7a810c 100644
--- a/src/web/app/common/views/components/othello.game.vue
+++ b/src/web/app/common/views/components/othello.game.vue
@@ -106,8 +106,6 @@ export default Vue.extend({
this.o.put(log.color, log.pos);
});
- console.log(this.o);
-
this.logs = this.game.logs;
this.logPos = this.logs.length;
},
diff --git a/src/web/app/common/views/components/othello.vue b/src/web/app/common/views/components/othello.vue
index 31858fca19..d4157eb761 100644
--- a/src/web/app/common/views/components/othello.vue
+++ b/src/web/app/common/views/components/othello.vue
@@ -39,7 +39,7 @@
</section>
<section v-if="myGames.length > 0">
<h2>自分の対局</h2>
- <div class="game" v-for="g in myGames" tabindex="-1" @click="game = g">
+ <div class="game" v-for="g in myGames" tabindex="-1" @click="go(g)">
<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>
@@ -48,7 +48,7 @@
</section>
<section v-if="games.length > 0">
<h2>みんなの対局</h2>
- <div class="game" v-for="g in games" tabindex="-1" @click="game = g">
+ <div class="game" v-for="g in games" tabindex="-1" @click="go(g)">
<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>
@@ -108,6 +108,13 @@ export default Vue.extend({
(this as any).os.streams.othelloStream.dispose(this.connectionId);
},
methods: {
+ go(game) {
+ (this as any).api('othello/games/show', {
+ game_id: game.id
+ }).then(game => {
+ this.game = game;
+ });
+ },
match() {
(this as any).apis.input({
title: 'ユーザー名を入力してください'