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-09-23 19:01:50 +00:00
|
|
|
<notification></notification>
|
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-09-17 15:32:39 +00:00
|
|
|
import Vue from 'vue';
|
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-09-23 19:01:50 +00:00
|
|
|
import Notification from './Notification';
|
2017-07-23 18:42:08 +00:00
|
|
|
|
2017-09-17 15:32:39 +00:00
|
|
|
// Global directives
|
|
|
|
Vue.directive('focus', {
|
|
|
|
inserted(el) {
|
|
|
|
el.focus();
|
|
|
|
},
|
|
|
|
});
|
|
|
|
|
2017-07-23 18:42:08 +00:00
|
|
|
export default {
|
|
|
|
components: {
|
|
|
|
Layout,
|
2017-08-03 17:08:12 +00:00
|
|
|
Modal,
|
2017-09-23 19:01:50 +00:00
|
|
|
Notification,
|
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() {
|
2017-09-23 19:01:50 +00:00
|
|
|
return !!this.$store.getters['modal/config'];
|
2017-08-03 17:08:12 +00:00
|
|
|
},
|
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>
|