summaryrefslogtreecommitdiff
path: root/src/web/app
diff options
context:
space:
mode:
Diffstat (limited to 'src/web/app')
-rw-r--r--src/web/app/common/views/components/othello.game.vue2
-rw-r--r--src/web/app/common/views/components/othello.vue11
-rw-r--r--src/web/app/desktop/views/components/input-dialog.vue1
3 files changed, 9 insertions, 5 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: 'ユーザー名を入力してください'
diff --git a/src/web/app/desktop/views/components/input-dialog.vue b/src/web/app/desktop/views/components/input-dialog.vue
index e27bc8da88..e939fc1903 100644
--- a/src/web/app/desktop/views/components/input-dialog.vue
+++ b/src/web/app/desktop/views/components/input-dialog.vue
@@ -43,7 +43,6 @@ export default Vue.extend({
mounted() {
if (this.default) this.text = this.default;
this.$nextTick(() => {
- console.log(this);
(this.$refs.text as any).focus();
});
},