Line | |
---|
1 | <script>
|
---|
2 | import { mapState } from "vuex";
|
---|
3 | import MainPage from "./components/MainPage.vue"
|
---|
4 | import ModalDialog, { ModalController } from "./components/ModalDialog.vue"
|
---|
5 | import SnackBar, { SnackController } from "./components/SnackBar.vue"
|
---|
6 |
|
---|
7 | export default {
|
---|
8 | name: "App",
|
---|
9 | components: {
|
---|
10 | MainPage,
|
---|
11 | ModalDialog,
|
---|
12 | SnackBar
|
---|
13 | },
|
---|
14 | computed: {
|
---|
15 | ...mapState({
|
---|
16 | translations: state => state.translations
|
---|
17 | })
|
---|
18 | },
|
---|
19 | mounted() {
|
---|
20 | ModalController.setModal(this.$refs.modalDialog);
|
---|
21 | SnackController.setBar(this.$refs.snackBar);
|
---|
22 | }
|
---|
23 | }
|
---|
24 | </script>
|
---|
25 |
|
---|
26 | <template>
|
---|
27 | <div class="root">
|
---|
28 | <main-page class="content" />
|
---|
29 | </div>
|
---|
30 |
|
---|
31 | <SnackBar ref="snackBar" />
|
---|
32 | <modal-dialog ref="modalDialog" />
|
---|
33 | </template>
|
---|
34 |
|
---|
35 | <style lang="scss">
|
---|
36 | html, body, #app {
|
---|
37 | height: 100%;
|
---|
38 | width: 100%;
|
---|
39 | }
|
---|
40 |
|
---|
41 | .root {
|
---|
42 | display: flex;
|
---|
43 | flex-direction: column;
|
---|
44 | height: 100%;
|
---|
45 | }
|
---|
46 |
|
---|
47 | .content {
|
---|
48 | margin: 1em;
|
---|
49 | flex-grow: 1;
|
---|
50 | }
|
---|
51 | </style>
|
---|
Note:
See
TracBrowser
for help on using the repository browser.