comparison client/src/morphtool/Infobar.vue @ 1251:d1903250390b

splitted mophtool into two components one shows the survey results and the other the info bar when a bottleneck is selected (and no profile is shown)
author Markus Kottlaender <markus@intevation.de>
date Wed, 21 Nov 2018 12:10:12 +0100
parents
children
comparison
equal deleted inserted replaced
1249:104d41ea7c15 1251:d1903250390b
1 <template>
2 <div v-if="selectedSurvey && !showSplitscreen" class="ui-element shadow infobar rounded bg-white ml-auto mb-3 mr-3">
3 <div class="d-flex flex-row justify-content-between">
4 <h6 class="my-auto px-2">
5 {{ selectedBottleneck }}
6 ({{ selectedSurvey.date_info }})
7 </h6>
8 <i class="fa fa-angle-up py-2 px-2 border-left" @click="$store.commit('application/showSplitscreen', true)" v-if="Object.keys(currentProfile).length"></i>
9 <i class="fa fa-close text-danger py-2 px-2 border-left" @click="$store.dispatch('fairwayprofile/clearSelection');"></i>
10 </div>
11 </div>
12 </template>
13
14 <style lang="sass" scoped>
15 .infobar
16 height: $icon-width
17 z-index: 2
18 </style>
19
20 <script>
21 /*
22 * This is Free Software under GNU Affero General Public License v >= 3.0
23 * without warranty, see README.md and license for details.
24 *
25 * SPDX-License-Identifier: AGPL-3.0-or-later
26 * License-Filename: LICENSES/AGPL-3.0.txt
27 *
28 * Copyright (C) 2018 by via donau
29 * – Österreichische Wasserstraßen-Gesellschaft mbH
30 * Software engineering by Intevation GmbH
31 *
32 * Author(s):
33 * Markus Kottländer <markus.kottlaender@intevation.de>
34 */
35 import { mapState } from "vuex";
36
37 export default {
38 name: "infobar",
39 computed: {
40 ...mapState("application", ["showSplitscreen"]),
41 ...mapState("fairwayprofile", ["currentProfile"]),
42 ...mapState("bottlenecks", ["selectedBottleneck", "selectedSurvey"])
43 }
44 };
45 </script>