2017-07-23 18:42:08 +00:00
|
|
|
<template>
|
2017-08-03 17:08:12 +00:00
|
|
|
<div v-if="ready" class="app" :class="{'app--loading': loading}">
|
2017-07-23 18:42:08 +00:00
|
|
|
<layout></layout>
|
2017-08-03 17:08:12 +00:00
|
|
|
<modal v-if="showModal"></modal>
|
2017-07-23 18:42:08 +00:00
|
|
|
</div>
|
2017-08-03 17:08:12 +00:00
|
|
|
<div v-else class="app__spash-screen"></div>
|
2017-07-23 18:42:08 +00:00
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
2017-08-03 17:08:12 +00:00
|
|
|
import { mapState } from 'vuex';
|
2017-07-23 18:42:08 +00:00
|
|
|
import Layout from './Layout';
|
2017-08-03 17:08:12 +00:00
|
|
|
import Modal from './Modal';
|
2017-07-23 18:42:08 +00:00
|
|
|
|
|
|
|
export default {
|
|
|
|
components: {
|
|
|
|
Layout,
|
2017-08-03 17:08:12 +00:00
|
|
|
Modal,
|
2017-07-23 18:42:08 +00:00
|
|
|
},
|
2017-07-28 07:40:24 +00:00
|
|
|
computed: {
|
2017-08-03 17:08:12 +00:00
|
|
|
...mapState([
|
|
|
|
'ready',
|
|
|
|
]),
|
2017-07-28 07:40:24 +00:00
|
|
|
loading() {
|
2017-08-17 23:10:35 +00:00
|
|
|
return !this.$store.getters['content/current'].id;
|
2017-07-28 07:40:24 +00:00
|
|
|
},
|
2017-08-03 17:08:12 +00:00
|
|
|
showModal() {
|
|
|
|
return !!this.$store.state.modal.content;
|
|
|
|
},
|
2017-07-28 07:40:24 +00:00
|
|
|
},
|
2017-07-23 18:42:08 +00:00
|
|
|
};
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<style lang="scss">
|
2017-07-28 20:04:12 +00:00
|
|
|
@import 'common/app';
|
2017-08-03 17:08:12 +00:00
|
|
|
|
|
|
|
.app__spash-screen {
|
2017-08-06 00:58:39 +00:00
|
|
|
margin: 0 auto;
|
|
|
|
max-width: 600px;
|
2017-08-03 17:08:12 +00:00
|
|
|
height: 100%;
|
|
|
|
background: no-repeat center url('../assets/logo.svg');
|
2017-08-06 00:58:39 +00:00
|
|
|
background-size: contain;
|
2017-08-03 17:08:12 +00:00
|
|
|
}
|
2017-07-23 18:42:08 +00:00
|
|
|
</style>
|