2018-08-03 16:34:58 +03:00
|
|
|
<template>
|
|
|
|
<mk-ui>
|
2018-11-08 20:44:35 +02:00
|
|
|
<span slot="header"><span style="margin-right:4px;"><fa icon="gamepad"/></span>{{ $t('reversi') }}</span>
|
2018-11-06 08:37:41 +02:00
|
|
|
<x-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-11-08 20:44:35 +02:00
|
|
|
import i18n from '../../../../i18n';
|
2018-08-03 16:34:58 +03:00
|
|
|
|
|
|
|
export default Vue.extend({
|
2018-11-08 20:44:35 +02:00
|
|
|
i18n: i18n('mobile/views/pages/games/reversi.vue'),
|
2018-11-06 08:37:41 +02:00
|
|
|
components: {
|
|
|
|
XReversi: () => import('../../../../common/views/components/games/reversi/reversi.vue')
|
|
|
|
},
|
2018-08-03 16:34:58 +03:00
|
|
|
mounted() {
|
2018-11-09 01:13:34 +02:00
|
|
|
document.title = `${this.$root.os.instanceName} %i18n:@reversi%`;
|
2018-08-03 16:34:58 +03:00
|
|
|
},
|
|
|
|
methods: {
|
2018-08-05 07:40:26 +03:00
|
|
|
nav(game, actualNav) {
|
|
|
|
if (actualNav) {
|
2018-09-01 17:12:51 +03:00
|
|
|
this.$router.push(`/reversi/${game.id}`);
|
2018-08-05 07:40:26 +03:00
|
|
|
} else {
|
|
|
|
// TODO: https://github.com/vuejs/vue-router/issues/703
|
2018-09-01 17:12:51 +03:00
|
|
|
this.$router.push(`/reversi/${game.id}`);
|
2018-08-05 07:40:26 +03:00
|
|
|
}
|
2018-08-03 16:34:58 +03:00
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
</script>
|