Mercurial > gemma
diff 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 |
line wrap: on
line diff
--- a/client/src/components/App.vue Fri Feb 22 12:28:14 2019 +0100 +++ b/client/src/components/App.vue Fri Feb 22 12:38:47 2019 +0100 @@ -5,27 +5,27 @@ <div class="mr-auto d-flex"> <Sidebar :routeName="routeName"></Sidebar> <div :class="searchContainer"> - <Search v-if="routeName == 'mainview'"></Search> - <Contextbox v-if="routeName == 'mainview'"></Contextbox> + <Search v-if="isMapVisible"></Search> + <Contextbox v-if="isMapVisible"></Contextbox> </div> </div> <div class="ml-auto d-flex"> <div class="d-flex flex-column align-items-end"> - <Profiles v-if="routeName == 'mainview'"></Profiles> - <Pdftool v-if="routeName == 'mainview'"></Pdftool> + <Profiles v-if="isMapVisible"></Profiles> + <Pdftool v-if="isMapVisible"></Pdftool> </div> <div class="d-flex flex-column align-items-end"> - <Identify v-if="routeName == 'mainview'"></Identify> - <Layers v-if="routeName == 'mainview'"></Layers> + <Identify v-if="isMapVisible"></Identify> + <Layers v-if="isMapVisible"></Layers> </div> - <Toolbar v-if="routeName == 'mainview'"></Toolbar> + <Toolbar v-if="isMapVisible"></Toolbar> </div> </div> <div class="flex-fill"></div> <div class="d-flex flex-row align-items-end"> - <Infobar v-if="routeName == 'mainview'"></Infobar> + <Infobar v-if="isMapVisible"></Infobar> </div> - <Zoom v-if="routeName == 'mainview'"></Zoom> + <Zoom v-if="isMapVisible"></Zoom> </div> <div class="d-flex flex-column"><router-view /></div> <vue-snotify></vue-snotify> @@ -88,6 +88,9 @@ computed: { ...mapState("user", ["isAuthenticated"]), ...mapState("application", ["contextBoxContent", "showSearchbar"]), + isMapVisible() { + return /stretches|review|bottlenecks|mainview/.test(this.routeName); + }, routeName() { const routeName = this.$route.name; return routeName;