blob: 3dba4c3af4f2e6b7d126e3d4b2afc39589e1b027 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
|
<template>
<mk-window ref="window" width="500px" height="560px" :popout-url="popout" @closed="destroyDom">
<template #header><fa icon="gamepad"/> {{ $t('game') }}</template>
<x-reversi :class="$style.content" @gamed="g => game = g"/>
</mk-window>
</template>
<script lang="ts">
import Vue from 'vue';
import i18n from '../../../i18n';
import { url } from '../../../config';
export default Vue.extend({
i18n: i18n('desktop/views/components/game-window.vue'),
components: {
XReversi: () => import('../../../common/views/components/games/reversi/reversi.vue').then(m => m.default)
},
data() {
return {
game: null
};
},
computed: {
popout(): string {
return this.game
? `${url}/games/reversi/${this.game.id}`
: `${url}/games/reversi`;
}
}
});
</script>
<style lang="stylus" module>
.content
height 100%
overflow auto
</style>
|