summaryrefslogtreecommitdiff
path: root/src/client/app
diff options
context:
space:
mode:
authorsyuilo <syuilotan@yahoo.co.jp>2018-08-04 01:03:48 +0900
committersyuilo <syuilotan@yahoo.co.jp>2018-08-04 01:03:48 +0900
commitb13f42645be527d19d4cfc6d2fc4d5644d4f24ed (patch)
tree810832ffcef2817250e456fa96328702dc97b01b /src/client/app
parent5.11.0 (diff)
downloadmisskey-b13f42645be527d19d4cfc6d2fc4d5644d4f24ed.tar.gz
misskey-b13f42645be527d19d4cfc6d2fc4d5644d4f24ed.tar.bz2
misskey-b13f42645be527d19d4cfc6d2fc4d5644d4f24ed.zip
Fix bug
Diffstat (limited to 'src/client/app')
-rw-r--r--src/client/app/common/views/components/games/reversi/reversi.vue33
1 files changed, 21 insertions, 12 deletions
diff --git a/src/client/app/common/views/components/games/reversi/reversi.vue b/src/client/app/common/views/components/games/reversi/reversi.vue
index 94431845b0..4b84e4562f 100644
--- a/src/client/app/common/views/components/games/reversi/reversi.vue
+++ b/src/client/app/common/views/components/games/reversi/reversi.vue
@@ -9,6 +9,9 @@
<form-button round @click="cancel">%i18n:@matching.cancel%</form-button>
</div>
</div>
+ <div v-if="gameId">
+ ...
+ </div>
<div class="index" v-else>
<x-index @go="nav" @matching="onMatching"/>
</div>
@@ -45,22 +48,14 @@ export default Vue.extend({
},
watch: {
- gameId(id) {
- if (id == null) {
- this.game = null;
- } else {
- Progress.start();
- (this as any).api('games/reversi/games/show', {
- gameId: id
- }).then(game => {
- this.nav(game, true);
- Progress.done();
- });
- }
+ gameId() {
+ this.fetch();
}
},
mounted() {
+ this.fetch();
+
if (this.$store.getters.isSignedIn) {
this.connection = (this as any).os.streams.reversiStream.getConnection();
this.connectionId = (this as any).os.streams.reversiStream.use();
@@ -88,6 +83,20 @@ export default Vue.extend({
},
methods: {
+ fetch() {
+ if (this.gameId == null) {
+ this.game = null;
+ } else {
+ Progress.start();
+ (this as any).api('games/reversi/games/show', {
+ gameId: this.gameId
+ }).then(game => {
+ this.nav(game, true);
+ Progress.done();
+ });
+ }
+ },
+
nav(game, silent) {
this.matching = null;
this.game = game;