2019-03-11 19:48:18 +00:00
|
|
|
<template lang="html">
|
2019-03-09 02:04:31 +00:00
|
|
|
<div class="layout">
|
2019-03-12 16:41:30 +00:00
|
|
|
<welcome-screen v-if="!welcomed && !downloading.status"></welcome-screen>
|
|
|
|
<capture-screen v-if="welcomed && !downloading.status"></capture-screen>
|
2019-03-11 19:48:18 +00:00
|
|
|
<download-screen v-if="downloading.status"></download-screen>
|
2019-03-08 22:17:59 +00:00
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
|
2019-03-12 09:07:32 +00:00
|
|
|
import welcomeScreen from '/views/screens/welcome'
|
|
|
|
import captureScreen from '/views/screens/capture'
|
|
|
|
import downloadScreen from '/views/screens/download'
|
2019-03-09 21:54:07 +00:00
|
|
|
|
|
|
|
import { mapState } from 'vuex'
|
|
|
|
|
2019-03-08 22:17:59 +00:00
|
|
|
export default {
|
2019-03-09 02:04:31 +00:00
|
|
|
name: 'souvenir',
|
|
|
|
components: {
|
2019-03-09 21:54:07 +00:00
|
|
|
welcomeScreen,
|
2019-03-09 23:55:37 +00:00
|
|
|
captureScreen,
|
|
|
|
downloadScreen
|
2019-03-09 21:54:07 +00:00
|
|
|
},
|
|
|
|
computed: {
|
|
|
|
...mapState([
|
2019-03-12 16:41:30 +00:00
|
|
|
'welcomed',
|
2019-03-09 23:55:37 +00:00
|
|
|
'downloading'
|
2019-03-09 21:54:07 +00:00
|
|
|
])
|
2019-03-13 14:05:14 +00:00
|
|
|
},
|
|
|
|
methods: {
|
|
|
|
handleVisibilityChange (event) {
|
|
|
|
if (document.hidden) {
|
|
|
|
this.$store.commit('stopCamera')
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
mounted () {
|
|
|
|
document.addEventListener('visibilitychange', this.handleVisibilityChange)
|
|
|
|
},
|
|
|
|
destroyed () {
|
|
|
|
document.removeEventListener('visibilitychange', this.handleVisibilityChange)
|
2019-03-09 02:04:31 +00:00
|
|
|
}
|
2019-03-08 22:17:59 +00:00
|
|
|
}
|
|
|
|
</script>
|
|
|
|
|
2019-03-11 16:46:21 +00:00
|
|
|
<style lang="css">
|
|
|
|
@import '/assets/css/style.css';
|
|
|
|
</style>
|