2018-08-03 15:34:58 +02:00
|
|
|
<template>
|
|
|
|
<mk-ui>
|
2019-02-18 01:48:00 +01:00
|
|
|
<template v-slot:header><span style="margin-right:4px;"><fa icon="gamepad"/></span>{{ $t('reversi') }}</template>
|
2018-11-06 07:37:41 +01:00
|
|
|
<x-reversi :game-id="$route.params.game" @nav="nav" :self-nav="false"/>
|
2018-08-03 15:34:58 +02:00
|
|
|
</mk-ui>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script lang="ts">
|
|
|
|
import Vue from 'vue';
|
2018-11-08 19:44:35 +01:00
|
|
|
import i18n from '../../../../i18n';
|
2018-08-03 15:34:58 +02:00
|
|
|
|
|
|
|
export default Vue.extend({
|
2018-11-08 19:44:35 +01:00
|
|
|
i18n: i18n('mobile/views/pages/games/reversi.vue'),
|
2018-11-06 07:37:41 +01:00
|
|
|
components: {
|
2018-11-11 20:09:02 +01:00
|
|
|
XReversi: () => import('../../../../common/views/components/games/reversi/reversi.vue').then(m => m.default)
|
2018-11-06 07:37:41 +01:00
|
|
|
},
|
2018-08-03 15:34:58 +02:00
|
|
|
mounted() {
|
2018-11-09 00:26:32 +01:00
|
|
|
document.title = `${this.$root.instanceName} %i18n:@reversi%`;
|
2018-08-03 15:34:58 +02:00
|
|
|
},
|
|
|
|
methods: {
|
2018-08-05 06:40:26 +02:00
|
|
|
nav(game, actualNav) {
|
|
|
|
if (actualNav) {
|
2019-01-21 09:20:41 +01:00
|
|
|
this.$router.push(`/games/reversi/${game.id}`);
|
2018-08-05 06:40:26 +02:00
|
|
|
} else {
|
|
|
|
// TODO: https://github.com/vuejs/vue-router/issues/703
|
2019-01-21 09:20:41 +01:00
|
|
|
this.$router.push(`/games/reversi/${game.id}`);
|
2018-08-05 06:40:26 +02:00
|
|
|
}
|
2018-08-03 15:34:58 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
</script>
|