2018-08-03 16:34:58 +03:00
|
|
|
<template>
|
|
|
|
<mk-ui>
|
|
|
|
<span slot="header">%fa:gamepad%%i18n:@reversi%</span>
|
2018-08-05 07:40:26 +03:00
|
|
|
<mk-reversi :game-id="$route.params.game" @nav="nav" :self-nav="false"/>
|
2018-08-03 16:34:58 +03:00
|
|
|
</mk-ui>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script lang="ts">
|
|
|
|
import Vue from 'vue';
|
2018-08-07 07:25:50 +03:00
|
|
|
import * as config from '../../../../config';
|
2018-08-03 16:34:58 +03:00
|
|
|
|
|
|
|
export default Vue.extend({
|
|
|
|
mounted() {
|
2018-08-07 07:25:50 +03:00
|
|
|
document.title = `${config.name} %i18n:@reversi%`;
|
2018-08-03 16:34:58 +03:00
|
|
|
document.documentElement.style.background = '#fff';
|
|
|
|
},
|
|
|
|
methods: {
|
2018-08-05 07:40:26 +03:00
|
|
|
nav(game, actualNav) {
|
|
|
|
if (actualNav) {
|
|
|
|
this.$router.push('/reversi/' + game.id);
|
|
|
|
} else {
|
|
|
|
// TODO: https://github.com/vuejs/vue-router/issues/703
|
|
|
|
this.$router.push('/reversi/' + game.id);
|
|
|
|
}
|
2018-08-03 16:34:58 +03:00
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
</script>
|