forked from cardstack/snapshot
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathApp.vue
42 lines (40 loc) · 882 Bytes
/
App.vue
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
39
40
41
42
<template>
<div :class="space && space.skin" id="app" class="overflow-hidden">
<UiLoading v-if="app.loading || !app.init" class="overlay big" />
<div v-else>
<Topnav />
<div class="pb-6 overflow-hidden">
<router-view :key="$route.path" class="flex-auto" />
</div>
</div>
<div id="modal" />
<Notifications />
</div>
</template>
<script>
import { mapActions } from 'vuex';
export default {
watch: {
'app.modalOpen': function(val) {
const el = document.body;
el.classList[val ? 'add' : 'remove']('overflow-hidden');
}
},
computed: {
space() {
try {
const key = this.domain || this.$route.params.key;
return this.app.spaces[key];
} catch (e) {
return {};
}
}
},
mounted() {
this.init();
},
methods: {
...mapActions(['init'])
}
};
</script>