knowyt/client/src/pages/play.vue

33 lines
565 B
Vue
Raw Normal View History

2021-07-30 18:18:04 +00:00
<template>
<div>
<pre class="json">{{ userJson }}</pre>
<pre class="json">{{ engineJson }}</pre>
2021-07-30 18:18:04 +00:00
</div>
</template>
<script>
export default {
2021-08-05 00:22:28 +00:00
async mounted() {
await this.$engine.start()
2021-07-30 18:18:04 +00:00
},
2021-08-12 21:08:17 +00:00
async beforeDestroy() {
await this.$engine.stop()
},
2021-07-30 18:18:04 +00:00
computed: {
userJson() {
2021-08-05 00:22:28 +00:00
return JSON.stringify(this.$store.state.engine.user, null, 2)
},
2021-08-06 20:20:54 +00:00
engineJson() {
return JSON.stringify(this.$store.state.engine.json, null, 2)
},
2021-07-30 18:18:04 +00:00
}
}
</script>
<style lang="scss">
.json {
margin: 1em 2em;
color: #ffffff;
}
</style>