Mercurial > gemma
comparison client/src/components/App.vue @ 2378:c69432c1c4ac
router: fixed frontend routing. renamed routes. changed display according to new route names
author | Thomas Junk <thomas.junk@intevation.de> |
---|---|
date | Fri, 22 Feb 2019 12:38:47 +0100 |
parents | 7fe2f5d334dc |
children | c06b001dc26b |
comparison
equal
deleted
inserted
replaced
2377:fdec7a652f34 | 2378:c69432c1c4ac |
---|---|
3 <div v-if="isAuthenticated" class="d-flex flex-column userinterface"> | 3 <div v-if="isAuthenticated" class="d-flex flex-column userinterface"> |
4 <div class="topbar d-flex pt-3 mx-3"> | 4 <div class="topbar d-flex pt-3 mx-3"> |
5 <div class="mr-auto d-flex"> | 5 <div class="mr-auto d-flex"> |
6 <Sidebar :routeName="routeName"></Sidebar> | 6 <Sidebar :routeName="routeName"></Sidebar> |
7 <div :class="searchContainer"> | 7 <div :class="searchContainer"> |
8 <Search v-if="routeName == 'mainview'"></Search> | 8 <Search v-if="isMapVisible"></Search> |
9 <Contextbox v-if="routeName == 'mainview'"></Contextbox> | 9 <Contextbox v-if="isMapVisible"></Contextbox> |
10 </div> | 10 </div> |
11 </div> | 11 </div> |
12 <div class="ml-auto d-flex"> | 12 <div class="ml-auto d-flex"> |
13 <div class="d-flex flex-column align-items-end"> | 13 <div class="d-flex flex-column align-items-end"> |
14 <Profiles v-if="routeName == 'mainview'"></Profiles> | 14 <Profiles v-if="isMapVisible"></Profiles> |
15 <Pdftool v-if="routeName == 'mainview'"></Pdftool> | 15 <Pdftool v-if="isMapVisible"></Pdftool> |
16 </div> | 16 </div> |
17 <div class="d-flex flex-column align-items-end"> | 17 <div class="d-flex flex-column align-items-end"> |
18 <Identify v-if="routeName == 'mainview'"></Identify> | 18 <Identify v-if="isMapVisible"></Identify> |
19 <Layers v-if="routeName == 'mainview'"></Layers> | 19 <Layers v-if="isMapVisible"></Layers> |
20 </div> | 20 </div> |
21 <Toolbar v-if="routeName == 'mainview'"></Toolbar> | 21 <Toolbar v-if="isMapVisible"></Toolbar> |
22 </div> | 22 </div> |
23 </div> | 23 </div> |
24 <div class="flex-fill"></div> | 24 <div class="flex-fill"></div> |
25 <div class="d-flex flex-row align-items-end"> | 25 <div class="d-flex flex-row align-items-end"> |
26 <Infobar v-if="routeName == 'mainview'"></Infobar> | 26 <Infobar v-if="isMapVisible"></Infobar> |
27 </div> | 27 </div> |
28 <Zoom v-if="routeName == 'mainview'"></Zoom> | 28 <Zoom v-if="isMapVisible"></Zoom> |
29 </div> | 29 </div> |
30 <div class="d-flex flex-column"><router-view /></div> | 30 <div class="d-flex flex-column"><router-view /></div> |
31 <vue-snotify></vue-snotify> | 31 <vue-snotify></vue-snotify> |
32 </div> | 32 </div> |
33 </template> | 33 </template> |
86 export default { | 86 export default { |
87 name: "app", | 87 name: "app", |
88 computed: { | 88 computed: { |
89 ...mapState("user", ["isAuthenticated"]), | 89 ...mapState("user", ["isAuthenticated"]), |
90 ...mapState("application", ["contextBoxContent", "showSearchbar"]), | 90 ...mapState("application", ["contextBoxContent", "showSearchbar"]), |
91 isMapVisible() { | |
92 return /stretches|review|bottlenecks|mainview/.test(this.routeName); | |
93 }, | |
91 routeName() { | 94 routeName() { |
92 const routeName = this.$route.name; | 95 const routeName = this.$route.name; |
93 return routeName; | 96 return routeName; |
94 }, | 97 }, |
95 searchContainer() { | 98 searchContainer() { |