Sharkey/src/client/app/desktop/views/pages/games/reversi.vue

28 lines
512 B
Vue
Raw Normal View History

2018-08-03 16:34:58 +03:00
<template>
<component :is="ui ? 'mk-ui' : 'div'">
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
</component>
</template>
<script lang="ts">
import Vue from 'vue';
export default Vue.extend({
props: {
ui: {
default: false
}
},
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>