annotate client/src/application/Sidebar.vue @ 666:4c36b0e39d78

feat: prepareProfile converts geoJSON to diagram data. PrepareProfile assumes data given in geoJSON format. It extracts heigth and width information for the diagram and transposes every coordinate given relative to the first coordinate in the first set.
author Thomas Junk <thomas.junk@intevation.de>
date Tue, 18 Sep 2018 13:43:24 +0200
parents 5daee6e32c56
children 3e2eeb215d0e
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
585
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
1 <template>
621
b17a4482d07d feat: UI adaptation of 4 slots
Thomas Junk <thomas.junk@intevation.de>
parents: 585
diff changeset
2 <div :class="sidebarStyle">
b17a4482d07d feat: UI adaptation of 4 slots
Thomas Junk <thomas.junk@intevation.de>
parents: 585
diff changeset
3 <div :class="menuStyle">
629
8278b2fb0c33 refac: UI refactorization
Thomas Junk <thomas.junk@intevation.de>
parents: 627
diff changeset
4 <div class="menupoints" v-if="!this.sidebarCollapsed">
8278b2fb0c33 refac: UI refactorization
Thomas Junk <thomas.junk@intevation.de>
parents: 627
diff changeset
5 <router-link to="/" class="text-body d-flex flex-row nav-link">
8278b2fb0c33 refac: UI refactorization
Thomas Junk <thomas.junk@intevation.de>
parents: 627
diff changeset
6 <i class="fa fa-map-o align-self-center navicon"></i>Riverbed Morphology</router-link>
8278b2fb0c33 refac: UI refactorization
Thomas Junk <thomas.junk@intevation.de>
parents: 627
diff changeset
7 <div v-if="isSysAdmin">
8278b2fb0c33 refac: UI refactorization
Thomas Junk <thomas.junk@intevation.de>
parents: 627
diff changeset
8 <hr/>
8278b2fb0c33 refac: UI refactorization
Thomas Junk <thomas.junk@intevation.de>
parents: 627
diff changeset
9 <div class="nav-link d-flex menupadding text-muted">Administration</div>
8278b2fb0c33 refac: UI refactorization
Thomas Junk <thomas.junk@intevation.de>
parents: 627
diff changeset
10 <router-link class="text-body d-flex flex-row nav-link" to="usermanagement">
8278b2fb0c33 refac: UI refactorization
Thomas Junk <thomas.junk@intevation.de>
parents: 627
diff changeset
11 <i class="fa fa-address-card-o align-self-center navicon"></i>Users
8278b2fb0c33 refac: UI refactorization
Thomas Junk <thomas.junk@intevation.de>
parents: 627
diff changeset
12 </router-link>
8278b2fb0c33 refac: UI refactorization
Thomas Junk <thomas.junk@intevation.de>
parents: 627
diff changeset
13 </div>
621
b17a4482d07d feat: UI adaptation of 4 slots
Thomas Junk <thomas.junk@intevation.de>
parents: 585
diff changeset
14 </div>
b17a4482d07d feat: UI adaptation of 4 slots
Thomas Junk <thomas.junk@intevation.de>
parents: 585
diff changeset
15 </div>
585
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
16 </div>
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
17 </template>
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
18
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
19 <script>
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
20 import { mapGetters } from "vuex";
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
21
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
22 export default {
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
23 name: "sidebar",
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
24 computed: {
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
25 ...mapGetters("user", ["isSysAdmin"]),
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
26 ...mapGetters("application", ["sidebarCollapsed"]),
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
27 menuStyle() {
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
28 return {
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
29 menu: true,
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
30 nav: true,
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
31 "flex-column": true
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
32 };
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
33 },
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
34 sidebarStyle() {
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
35 return {
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
36 "ui-element": true,
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
37 sidebar: true,
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
38 overlay: true,
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
39 sidebarcollapsed: this.sidebarCollapsed,
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
40 sidebarextended: !this.sidebarCollapsed,
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
41 shadow: true
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
42 };
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
43 }
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
44 }
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
45 };
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
46 </script>
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
47
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
48 <style lang="scss">
629
8278b2fb0c33 refac: UI refactorization
Thomas Junk <thomas.junk@intevation.de>
parents: 627
diff changeset
49 .menupoints {
8278b2fb0c33 refac: UI refactorization
Thomas Junk <thomas.junk@intevation.de>
parents: 627
diff changeset
50 text-align: left;
8278b2fb0c33 refac: UI refactorization
Thomas Junk <thomas.junk@intevation.de>
parents: 627
diff changeset
51 }
585
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
52
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
53 .router-link-exact-active {
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
54 background-color: #f2f2f2;
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
55 }
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
56
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
57 .navicon {
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
58 margin-right: $small-offset;
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
59 }
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
60
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
61 .menu {
630
855cca0142ec refac: Usermanagement now flexible sidebar layout
Thomas Junk <thomas.junk@intevation.de>
parents: 629
diff changeset
62 padding-top: $small-offset;
585
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
63 }
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
64
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
65 .sidebar {
639
5daee6e32c56 measures fixed
Thomas Junk <thomas.junk@intevation.de>
parents: 630
diff changeset
66 top: $offset;
5daee6e32c56 measures fixed
Thomas Junk <thomas.junk@intevation.de>
parents: 630
diff changeset
67 left: $offset;
585
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
68 background-color: #ffffff;
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
69 padding-top: $large-offset;
639
5daee6e32c56 measures fixed
Thomas Junk <thomas.junk@intevation.de>
parents: 630
diff changeset
70 opacity: $slight-transparent;
5daee6e32c56 measures fixed
Thomas Junk <thomas.junk@intevation.de>
parents: 630
diff changeset
71 border-radius: $border-radius;
585
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
72 }
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
73
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
74 .overlay {
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
75 position: absolute;
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
76 z-index: -1;
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
77 }
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
78
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
79 .sidebarcollapsed {
629
8278b2fb0c33 refac: UI refactorization
Thomas Junk <thomas.junk@intevation.de>
parents: 627
diff changeset
80 height: 30px;
8278b2fb0c33 refac: UI refactorization
Thomas Junk <thomas.junk@intevation.de>
parents: 627
diff changeset
81 width: 30px;
639
5daee6e32c56 measures fixed
Thomas Junk <thomas.junk@intevation.de>
parents: 630
diff changeset
82 transition: $slight-transparent;
585
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
83 }
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
84
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
85 .sidebarextended {
630
855cca0142ec refac: Usermanagement now flexible sidebar layout
Thomas Junk <thomas.junk@intevation.de>
parents: 629
diff changeset
86 height: $sidebar-height;
855cca0142ec refac: Usermanagement now flexible sidebar layout
Thomas Junk <thomas.junk@intevation.de>
parents: 629
diff changeset
87 width: $sidebar-width;
585
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
88 }
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
89 </style>