annotate client/src/application/Sidebar.vue @ 1143:846e336d8ee5

merge
author Thomas Junk <thomas.junk@intevation.de>
date Mon, 12 Nov 2018 15:00:45 +0100
parents dc3f0277628a 2fda33d55d81
children 74e180ad3d6b
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">
1123
d9e6a1f6f394 moved all collapse flags for UI elements to store
Markus Kottlaender <markus@intevation.de>
parents: 1093
diff changeset
4 <div class="menupoints" v-if="this.showSidebar">
629
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">
1142
dc3f0277628a feat: Importqueue listing (Proof of concept)
Thomas Junk <thomas.junk@intevation.de>
parents: 1123
diff changeset
6 <i class="fa fa-map-o align-self-center navicon"></i>Riverbed Morphology
dc3f0277628a feat: Importqueue listing (Proof of concept)
Thomas Junk <thomas.junk@intevation.de>
parents: 1123
diff changeset
7 </router-link>
dc3f0277628a feat: Importqueue listing (Proof of concept)
Thomas Junk <thomas.junk@intevation.de>
parents: 1123
diff changeset
8 <a
dc3f0277628a feat: Importqueue listing (Proof of concept)
Thomas Junk <thomas.junk@intevation.de>
parents: 1123
diff changeset
9 v-if="routeName == 'mainview'"
dc3f0277628a feat: Importqueue listing (Proof of concept)
Thomas Junk <thomas.junk@intevation.de>
parents: 1123
diff changeset
10 href="#"
dc3f0277628a feat: Importqueue listing (Proof of concept)
Thomas Junk <thomas.junk@intevation.de>
parents: 1123
diff changeset
11 class="text-body d-flex flex-row nav-link"
dc3f0277628a feat: Importqueue listing (Proof of concept)
Thomas Junk <thomas.junk@intevation.de>
parents: 1123
diff changeset
12 @click="$store.commit('application/showBottlenecks', !showBottlenecks);"
dc3f0277628a feat: Importqueue listing (Proof of concept)
Thomas Junk <thomas.junk@intevation.de>
parents: 1123
diff changeset
13 >Bottlenecks</a>
629
8278b2fb0c33 refac: UI refactorization
Thomas Junk <thomas.junk@intevation.de>
parents: 627
diff changeset
14 <div v-if="isSysAdmin">
1142
dc3f0277628a feat: Importqueue listing (Proof of concept)
Thomas Junk <thomas.junk@intevation.de>
parents: 1123
diff changeset
15 <hr>
629
8278b2fb0c33 refac: UI refactorization
Thomas Junk <thomas.junk@intevation.de>
parents: 627
diff changeset
16 <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
17 <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
18 <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
19 </router-link>
1142
dc3f0277628a feat: Importqueue listing (Proof of concept)
Thomas Junk <thomas.junk@intevation.de>
parents: 1123
diff changeset
20 <router-link class="text-body d-flex flex-row nav-link" to="imports">
dc3f0277628a feat: Importqueue listing (Proof of concept)
Thomas Junk <thomas.junk@intevation.de>
parents: 1123
diff changeset
21 <i class="fa fa-exchange align-self-center navicon"></i>Imports
dc3f0277628a feat: Importqueue listing (Proof of concept)
Thomas Junk <thomas.junk@intevation.de>
parents: 1123
diff changeset
22 </router-link>
dc3f0277628a feat: Importqueue listing (Proof of concept)
Thomas Junk <thomas.junk@intevation.de>
parents: 1123
diff changeset
23 <router-link
dc3f0277628a feat: Importqueue listing (Proof of concept)
Thomas Junk <thomas.junk@intevation.de>
parents: 1123
diff changeset
24 class="text-body d-flex flex-row nav-link"
dc3f0277628a feat: Importqueue listing (Proof of concept)
Thomas Junk <thomas.junk@intevation.de>
parents: 1123
diff changeset
25 to="systemconfiguration"
dc3f0277628a feat: Importqueue listing (Proof of concept)
Thomas Junk <thomas.junk@intevation.de>
parents: 1123
diff changeset
26 >
dc3f0277628a feat: Importqueue listing (Proof of concept)
Thomas Junk <thomas.junk@intevation.de>
parents: 1123
diff changeset
27 <i class="fa fa-wrench align-self-center navicon"></i>Systemconfiguration
853
fb39ec3b95a8 systemconfig WIP
Thomas Junk <thomas.junk@intevation.de>
parents: 713
diff changeset
28 </router-link>
713
badbc0207418 feat: systeminformation feature added
Thomas Junk <thomas.junk@intevation.de>
parents: 668
diff changeset
29 <router-link class="text-body d-flex flex-row nav-link" to="logs">
1142
dc3f0277628a feat: Importqueue listing (Proof of concept)
Thomas Junk <thomas.junk@intevation.de>
parents: 1123
diff changeset
30 <i class="fa fa-book align-self-center navicon"></i>Systeminformation
713
badbc0207418 feat: systeminformation feature added
Thomas Junk <thomas.junk@intevation.de>
parents: 668
diff changeset
31 </router-link>
629
8278b2fb0c33 refac: UI refactorization
Thomas Junk <thomas.junk@intevation.de>
parents: 627
diff changeset
32 </div>
621
b17a4482d07d feat: UI adaptation of 4 slots
Thomas Junk <thomas.junk@intevation.de>
parents: 585
diff changeset
33 </div>
b17a4482d07d feat: UI adaptation of 4 slots
Thomas Junk <thomas.junk@intevation.de>
parents: 585
diff changeset
34 </div>
585
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
35 </div>
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
36 </template>
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
37
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
38 <script>
1019
ca628dce90dd Licensing information added
Thomas Junk <thomas.junk@intevation.de>
parents: 888
diff changeset
39 /*
ca628dce90dd Licensing information added
Thomas Junk <thomas.junk@intevation.de>
parents: 888
diff changeset
40 * This is Free Software under GNU Affero General Public License v >= 3.0
ca628dce90dd Licensing information added
Thomas Junk <thomas.junk@intevation.de>
parents: 888
diff changeset
41 * without warranty, see README.md and license for details.
ca628dce90dd Licensing information added
Thomas Junk <thomas.junk@intevation.de>
parents: 888
diff changeset
42 *
ca628dce90dd Licensing information added
Thomas Junk <thomas.junk@intevation.de>
parents: 888
diff changeset
43 * SPDX-License-Identifier: AGPL-3.0-or-later
ca628dce90dd Licensing information added
Thomas Junk <thomas.junk@intevation.de>
parents: 888
diff changeset
44 * License-Filename: LICENSES/AGPL-3.0.txt
ca628dce90dd Licensing information added
Thomas Junk <thomas.junk@intevation.de>
parents: 888
diff changeset
45 *
ca628dce90dd Licensing information added
Thomas Junk <thomas.junk@intevation.de>
parents: 888
diff changeset
46 * Copyright (C) 2018 by via donau
ca628dce90dd Licensing information added
Thomas Junk <thomas.junk@intevation.de>
parents: 888
diff changeset
47 * – Österreichische Wasserstraßen-Gesellschaft mbH
ca628dce90dd Licensing information added
Thomas Junk <thomas.junk@intevation.de>
parents: 888
diff changeset
48 * Software engineering by Intevation GmbH
ca628dce90dd Licensing information added
Thomas Junk <thomas.junk@intevation.de>
parents: 888
diff changeset
49 *
ca628dce90dd Licensing information added
Thomas Junk <thomas.junk@intevation.de>
parents: 888
diff changeset
50 * Author(s):
ca628dce90dd Licensing information added
Thomas Junk <thomas.junk@intevation.de>
parents: 888
diff changeset
51 * Thomas Junk <thomas.junk@intevation.de>
1055
1ff8c072df18 WIP: Bottleneck list/table
Markus Kottlaender <markus@intevation.de>
parents: 1019
diff changeset
52 * Markus Kottländer <markus.kottlaender@intevation.de>
1019
ca628dce90dd Licensing information added
Thomas Junk <thomas.junk@intevation.de>
parents: 888
diff changeset
53 */
1123
d9e6a1f6f394 moved all collapse flags for UI elements to store
Markus Kottlaender <markus@intevation.de>
parents: 1093
diff changeset
54 import { mapGetters, mapState } from "vuex";
585
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 export default {
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
57 name: "sidebar",
1093
31b36ef00784 fix: bottleneck list and zoom buttons are now only displayed in main view
Markus Kottlaender <markus@intevation.de>
parents: 1079
diff changeset
58 props: ["routeName"],
585
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
59 computed: {
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
60 ...mapGetters("user", ["isSysAdmin"]),
1123
d9e6a1f6f394 moved all collapse flags for UI elements to store
Markus Kottlaender <markus@intevation.de>
parents: 1093
diff changeset
61 ...mapState("application", ["showSidebar", "showBottlenecks"]),
585
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
62 menuStyle() {
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
63 return {
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
64 menu: true,
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
65 nav: true,
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
66 "flex-column": true
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
67 };
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
68 },
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
69 sidebarStyle() {
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
70 return {
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
71 "ui-element": true,
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
72 sidebar: true,
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
73 overlay: true,
1123
d9e6a1f6f394 moved all collapse flags for UI elements to store
Markus Kottlaender <markus@intevation.de>
parents: 1093
diff changeset
74 sidebarcollapsed: !this.showSidebar,
d9e6a1f6f394 moved all collapse flags for UI elements to store
Markus Kottlaender <markus@intevation.de>
parents: 1093
diff changeset
75 sidebarextended: this.showSidebar,
888
2e2ac0b88af9 client: hide menu button and box for print
Bernhard Reiter <bernhard@intevation.de>
parents: 853
diff changeset
76 shadow: true,
2e2ac0b88af9 client: hide menu button and box for print
Bernhard Reiter <bernhard@intevation.de>
parents: 853
diff changeset
77 "d-print-none": true
585
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 }
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
80 }
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
81 };
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
82 </script>
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
83
1139
2fda33d55d81 scoped css
Markus Kottlaender <markus@intevation.de>
parents: 1123
diff changeset
84 <style lang="scss" scoped>
629
8278b2fb0c33 refac: UI refactorization
Thomas Junk <thomas.junk@intevation.de>
parents: 627
diff changeset
85 .menupoints {
8278b2fb0c33 refac: UI refactorization
Thomas Junk <thomas.junk@intevation.de>
parents: 627
diff changeset
86 text-align: left;
8278b2fb0c33 refac: UI refactorization
Thomas Junk <thomas.junk@intevation.de>
parents: 627
diff changeset
87 }
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 .router-link-exact-active {
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
90 background-color: #f2f2f2;
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
91 }
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
92
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
93 .navicon {
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
94 margin-right: $small-offset;
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
95 }
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
96
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
97 .menu {
630
855cca0142ec refac: Usermanagement now flexible sidebar layout
Thomas Junk <thomas.junk@intevation.de>
parents: 629
diff changeset
98 padding-top: $small-offset;
585
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
99 }
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
100
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
101 .sidebar {
639
5daee6e32c56 measures fixed
Thomas Junk <thomas.junk@intevation.de>
parents: 630
diff changeset
102 top: $offset;
5daee6e32c56 measures fixed
Thomas Junk <thomas.junk@intevation.de>
parents: 630
diff changeset
103 left: $offset;
585
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
104 background-color: #ffffff;
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
105 padding-top: $large-offset;
639
5daee6e32c56 measures fixed
Thomas Junk <thomas.junk@intevation.de>
parents: 630
diff changeset
106 opacity: $slight-transparent;
5daee6e32c56 measures fixed
Thomas Junk <thomas.junk@intevation.de>
parents: 630
diff changeset
107 border-radius: $border-radius;
585
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
108 }
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
109
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
110 .overlay {
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
111 position: absolute;
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
112 z-index: -1;
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
113 }
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
114
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
115 .sidebarcollapsed {
629
8278b2fb0c33 refac: UI refactorization
Thomas Junk <thomas.junk@intevation.de>
parents: 627
diff changeset
116 height: 30px;
8278b2fb0c33 refac: UI refactorization
Thomas Junk <thomas.junk@intevation.de>
parents: 627
diff changeset
117 width: 30px;
668
3e2eeb215d0e feat: searchbar collapsible
Thomas Junk <thomas.junk@intevation.de>
parents: 639
diff changeset
118 transition: $transition-fast;
585
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
119 }
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
120
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
121 .sidebarextended {
853
fb39ec3b95a8 systemconfig WIP
Thomas Junk <thomas.junk@intevation.de>
parents: 713
diff changeset
122 min-height: $sidebar-height;
630
855cca0142ec refac: Usermanagement now flexible sidebar layout
Thomas Junk <thomas.junk@intevation.de>
parents: 629
diff changeset
123 width: $sidebar-width;
585
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
124 }
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
125 </style>