annotate client/src/components/Sidebar.vue @ 2983:2e7c0f9cff24

client: removed unnecessary component property
author Markus Kottlaender <markus@intevation.de>
date Tue, 09 Apr 2019 16:42:58 +0200
parents 8f266dc8b4e3
children 1b8bb4f89227
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1272
bc55ffaeb639 cleaned up client/src directory
Markus Kottlaender <markus@intevation.de>
parents:
diff changeset
1 <template>
2382
c28971cd70ce client: indicator for imports waiting for review
Markus Kottlaender <markus@intevation.de>
parents: 2354
diff changeset
2 <div class="position-relative">
2651
9f3856337f55 import_overview: new unified interface as default
Thomas Junk <thomas.junk@intevation.de>
parents: 2637
diff changeset
3 <span class="indicator" v-if="!showSidebar && stagingNotifications">
9f3856337f55 import_overview: new unified interface as default
Thomas Junk <thomas.junk@intevation.de>
parents: 2637
diff changeset
4 {{ stagingNotifications }}
2382
c28971cd70ce client: indicator for imports waiting for review
Markus Kottlaender <markus@intevation.de>
parents: 2354
diff changeset
5 </span>
c28971cd70ce client: indicator for imports waiting for review
Markus Kottlaender <markus@intevation.de>
parents: 2354
diff changeset
6 <div :class="sidebarStyle">
c28971cd70ce client: indicator for imports waiting for review
Markus Kottlaender <markus@intevation.de>
parents: 2354
diff changeset
7 <div
c28971cd70ce client: indicator for imports waiting for review
Markus Kottlaender <markus@intevation.de>
parents: 2354
diff changeset
8 @click="$store.commit('application/showSidebar', !showSidebar)"
c28971cd70ce client: indicator for imports waiting for review
Markus Kottlaender <markus@intevation.de>
parents: 2354
diff changeset
9 class="menubutton ui-element d-print-none p-2 bg-white rounded position-absolute d-flex justify-content-center"
c28971cd70ce client: indicator for imports waiting for review
Markus Kottlaender <markus@intevation.de>
parents: 2354
diff changeset
10 >
2919
6c5364ff0abb client: removed a lot of unnecessary closing tags
Markus Kottlaender <markus@intevation.de>
parents: 2774
diff changeset
11 <font-awesome-icon class="fa-fw" icon="bars" />
2382
c28971cd70ce client: indicator for imports waiting for review
Markus Kottlaender <markus@intevation.de>
parents: 2354
diff changeset
12 </div>
c28971cd70ce client: indicator for imports waiting for review
Markus Kottlaender <markus@intevation.de>
parents: 2354
diff changeset
13 <div class="menu text-nowrap text-left">
c28971cd70ce client: indicator for imports waiting for review
Markus Kottlaender <markus@intevation.de>
parents: 2354
diff changeset
14 <router-link to="/">
1463
a6dd2a8183a4 sidebar: added spacer class to import schedule
Thomas Junk <thomas.junk@intevation.de>
parents: 1455
diff changeset
15 <font-awesome-icon
1542
31c6c7bd6190 layout issues
Thomas Junk <thomas.junk@intevation.de>
parents: 1517
diff changeset
16 class="fa-fw mr-2"
1505
a6c2d4252bae refresh clears notifications
Thomas Junk <thomas.junk@intevation.de>
parents: 1463
diff changeset
17 fixed-width
2382
c28971cd70ce client: indicator for imports waiting for review
Markus Kottlaender <markus@intevation.de>
parents: 2354
diff changeset
18 icon="map-marked-alt"
2919
6c5364ff0abb client: removed a lot of unnecessary closing tags
Markus Kottlaender <markus@intevation.de>
parents: 2774
diff changeset
19 />
2382
c28971cd70ce client: indicator for imports waiting for review
Markus Kottlaender <markus@intevation.de>
parents: 2354
diff changeset
20 <span class="fix-trans-space" v-translate>Map</span>
2329
514193fd0120 refac: improve routing structure. We now have /bottlenecks, /stretches, /review routes
Thomas Junk <thomas.junk@intevation.de>
parents: 2282
diff changeset
21 </router-link>
2382
c28971cd70ce client: indicator for imports waiting for review
Markus Kottlaender <markus@intevation.de>
parents: 2354
diff changeset
22 <router-link to="/bottlenecks">
2919
6c5364ff0abb client: removed a lot of unnecessary closing tags
Markus Kottlaender <markus@intevation.de>
parents: 2774
diff changeset
23 <font-awesome-icon class="fa-fw mr-2" fixed-width icon="ship" />
2382
c28971cd70ce client: indicator for imports waiting for review
Markus Kottlaender <markus@intevation.de>
parents: 2354
diff changeset
24 <span class="fix-trans-space" v-translate>Bottlenecks</span>
1753
68bd990dd8e5 feat: added import dialogs for approved gauge meas. and waterway profiles
Thomas Junk <thomas.junk@intevation.de>
parents: 1725
diff changeset
25 </router-link>
2382
c28971cd70ce client: indicator for imports waiting for review
Markus Kottlaender <markus@intevation.de>
parents: 2354
diff changeset
26 <div v-if="isWaterwayAdmin">
2416
Thomas Junk <thomas.junk@intevation.de>
parents: 2413
diff changeset
27 <router-link to="/imports/overview" class="position-relative">
2382
c28971cd70ce client: indicator for imports waiting for review
Markus Kottlaender <markus@intevation.de>
parents: 2354
diff changeset
28 <font-awesome-icon
c28971cd70ce client: indicator for imports waiting for review
Markus Kottlaender <markus@intevation.de>
parents: 2354
diff changeset
29 class="fa-fw mr-2"
c28971cd70ce client: indicator for imports waiting for review
Markus Kottlaender <markus@intevation.de>
parents: 2354
diff changeset
30 fixed-width
c28971cd70ce client: indicator for imports waiting for review
Markus Kottlaender <markus@intevation.de>
parents: 2354
diff changeset
31 icon="clipboard-check"
2919
6c5364ff0abb client: removed a lot of unnecessary closing tags
Markus Kottlaender <markus@intevation.de>
parents: 2774
diff changeset
32 />
2717
5b990f612420 import_review: rename overview to review. More space for logs
Thomas Junk <thomas.junk@intevation.de>
parents: 2709
diff changeset
33 <span class="fix-trans-space" v-translate>Import review</span>
2651
9f3856337f55 import_overview: new unified interface as default
Thomas Junk <thomas.junk@intevation.de>
parents: 2637
diff changeset
34 <span class="indicator" v-if="showSidebar && stagingNotifications">
9f3856337f55 import_overview: new unified interface as default
Thomas Junk <thomas.junk@intevation.de>
parents: 2637
diff changeset
35 {{ stagingNotifications }}
2382
c28971cd70ce client: indicator for imports waiting for review
Markus Kottlaender <markus@intevation.de>
parents: 2354
diff changeset
36 </span>
c28971cd70ce client: indicator for imports waiting for review
Markus Kottlaender <markus@intevation.de>
parents: 2354
diff changeset
37 </router-link>
c28971cd70ce client: indicator for imports waiting for review
Markus Kottlaender <markus@intevation.de>
parents: 2354
diff changeset
38 </div>
c28971cd70ce client: indicator for imports waiting for review
Markus Kottlaender <markus@intevation.de>
parents: 2354
diff changeset
39 <div v-if="isSysAdmin">
c28971cd70ce client: indicator for imports waiting for review
Markus Kottlaender <markus@intevation.de>
parents: 2354
diff changeset
40 <router-link to="/stretches">
2919
6c5364ff0abb client: removed a lot of unnecessary closing tags
Markus Kottlaender <markus@intevation.de>
parents: 2774
diff changeset
41 <font-awesome-icon class="fa-fw mr-2" fixed-width icon="road" />
2382
c28971cd70ce client: indicator for imports waiting for review
Markus Kottlaender <markus@intevation.de>
parents: 2354
diff changeset
42 <span class="fix-trans-space" v-translate>Define stretches</span>
c28971cd70ce client: indicator for imports waiting for review
Markus Kottlaender <markus@intevation.de>
parents: 2354
diff changeset
43 </router-link>
c28971cd70ce client: indicator for imports waiting for review
Markus Kottlaender <markus@intevation.de>
parents: 2354
diff changeset
44 </div>
c28971cd70ce client: indicator for imports waiting for review
Markus Kottlaender <markus@intevation.de>
parents: 2354
diff changeset
45 <div v-if="isWaterwayAdmin">
2979
8f266dc8b4e3 unified_imports: moved imports partially to new UI
Thomas Junk <thomas.junk@intevation.de>
parents: 2977
diff changeset
46 <router-link to="/imports/configuration">
2919
6c5364ff0abb client: removed a lot of unnecessary closing tags
Markus Kottlaender <markus@intevation.de>
parents: 2774
diff changeset
47 <font-awesome-icon class="fa-fw mr-2" fixed-width icon="clock" />
2591
eb69c6d27ae5 client: renamed menu item
Markus Kottlaender <markus@intevation.de>
parents: 2534
diff changeset
48 <translate class="fix-trans-space">Imports</translate>
2382
c28971cd70ce client: indicator for imports waiting for review
Markus Kottlaender <markus@intevation.de>
parents: 2354
diff changeset
49 </router-link>
c28971cd70ce client: indicator for imports waiting for review
Markus Kottlaender <markus@intevation.de>
parents: 2354
diff changeset
50 <small class="text-muted pl-3">
c28971cd70ce client: indicator for imports waiting for review
Markus Kottlaender <markus@intevation.de>
parents: 2354
diff changeset
51 <translate>Systemadministration</translate>
c28971cd70ce client: indicator for imports waiting for review
Markus Kottlaender <markus@intevation.de>
parents: 2354
diff changeset
52 </small>
c28971cd70ce client: indicator for imports waiting for review
Markus Kottlaender <markus@intevation.de>
parents: 2354
diff changeset
53 <hr class="m-0" />
c28971cd70ce client: indicator for imports waiting for review
Markus Kottlaender <markus@intevation.de>
parents: 2354
diff changeset
54 </div>
c28971cd70ce client: indicator for imports waiting for review
Markus Kottlaender <markus@intevation.de>
parents: 2354
diff changeset
55 <div v-if="isSysAdmin">
c28971cd70ce client: indicator for imports waiting for review
Markus Kottlaender <markus@intevation.de>
parents: 2354
diff changeset
56 <router-link to="/usermanagement">
c28971cd70ce client: indicator for imports waiting for review
Markus Kottlaender <markus@intevation.de>
parents: 2354
diff changeset
57 <font-awesome-icon
c28971cd70ce client: indicator for imports waiting for review
Markus Kottlaender <markus@intevation.de>
parents: 2354
diff changeset
58 class="fa-fw mr-2"
c28971cd70ce client: indicator for imports waiting for review
Markus Kottlaender <markus@intevation.de>
parents: 2354
diff changeset
59 fixed-width
c28971cd70ce client: indicator for imports waiting for review
Markus Kottlaender <markus@intevation.de>
parents: 2354
diff changeset
60 icon="users-cog"
2919
6c5364ff0abb client: removed a lot of unnecessary closing tags
Markus Kottlaender <markus@intevation.de>
parents: 2774
diff changeset
61 />
2382
c28971cd70ce client: indicator for imports waiting for review
Markus Kottlaender <markus@intevation.de>
parents: 2354
diff changeset
62 <span class="fix-trans-space" v-translate>Users</span>
c28971cd70ce client: indicator for imports waiting for review
Markus Kottlaender <markus@intevation.de>
parents: 2354
diff changeset
63 </router-link>
c28971cd70ce client: indicator for imports waiting for review
Markus Kottlaender <markus@intevation.de>
parents: 2354
diff changeset
64 </div>
c28971cd70ce client: indicator for imports waiting for review
Markus Kottlaender <markus@intevation.de>
parents: 2354
diff changeset
65 <div v-if="isWaterwayAdmin">
c28971cd70ce client: indicator for imports waiting for review
Markus Kottlaender <markus@intevation.de>
parents: 2354
diff changeset
66 <router-link to="/systemconfiguration">
2919
6c5364ff0abb client: removed a lot of unnecessary closing tags
Markus Kottlaender <markus@intevation.de>
parents: 2774
diff changeset
67 <font-awesome-icon class="fa-fw mr-2" fixed-width icon="wrench" />
2382
c28971cd70ce client: indicator for imports waiting for review
Markus Kottlaender <markus@intevation.de>
parents: 2354
diff changeset
68 <span class="fix-trans-space" v-translate>Configuration</span>
c28971cd70ce client: indicator for imports waiting for review
Markus Kottlaender <markus@intevation.de>
parents: 2354
diff changeset
69 </router-link>
c28971cd70ce client: indicator for imports waiting for review
Markus Kottlaender <markus@intevation.de>
parents: 2354
diff changeset
70 </div>
c28971cd70ce client: indicator for imports waiting for review
Markus Kottlaender <markus@intevation.de>
parents: 2354
diff changeset
71 <div v-if="isSysAdmin">
c28971cd70ce client: indicator for imports waiting for review
Markus Kottlaender <markus@intevation.de>
parents: 2354
diff changeset
72 <router-link to="/logs">
2919
6c5364ff0abb client: removed a lot of unnecessary closing tags
Markus Kottlaender <markus@intevation.de>
parents: 2774
diff changeset
73 <font-awesome-icon class="fa-fw mr-2" fixed-width icon="book" />
2382
c28971cd70ce client: indicator for imports waiting for review
Markus Kottlaender <markus@intevation.de>
parents: 2354
diff changeset
74 <span class="fix-trans-space" v-translate>Logs</span>
c28971cd70ce client: indicator for imports waiting for review
Markus Kottlaender <markus@intevation.de>
parents: 2354
diff changeset
75 </router-link>
c28971cd70ce client: indicator for imports waiting for review
Markus Kottlaender <markus@intevation.de>
parents: 2354
diff changeset
76 </div>
1463
a6dd2a8183a4 sidebar: added spacer class to import schedule
Thomas Junk <thomas.junk@intevation.de>
parents: 1455
diff changeset
77 <hr class="m-0" />
2382
c28971cd70ce client: indicator for imports waiting for review
Markus Kottlaender <markus@intevation.de>
parents: 2354
diff changeset
78 <a @click="logoff" href="#" class="logout">
2919
6c5364ff0abb client: removed a lot of unnecessary closing tags
Markus Kottlaender <markus@intevation.de>
parents: 2774
diff changeset
79 <font-awesome-icon class="fa-fw mr-2" fixed-width icon="power-off" />
2382
c28971cd70ce client: indicator for imports waiting for review
Markus Kottlaender <markus@intevation.de>
parents: 2354
diff changeset
80 <span class="fix-trans-space" v-translate>Logout</span> {{ user }}
c28971cd70ce client: indicator for imports waiting for review
Markus Kottlaender <markus@intevation.de>
parents: 2354
diff changeset
81 </a>
1777
e70b7b8e7b74 wrong rights rigthed, so they are right now right
Thomas Junk <thomas.junk@intevation.de>
parents: 1757
diff changeset
82 </div>
1272
bc55ffaeb639 cleaned up client/src directory
Markus Kottlaender <markus@intevation.de>
parents:
diff changeset
83 </div>
1361
ea3a89a1813a remove trailing whitespace, add headers for Makefile, add the missed authors
Fadi Abbud <fadi.abbud@intevation.de>
parents: 1299
diff changeset
84 </div>
1272
bc55ffaeb639 cleaned up client/src directory
Markus Kottlaender <markus@intevation.de>
parents:
diff changeset
85 </template>
bc55ffaeb639 cleaned up client/src directory
Markus Kottlaender <markus@intevation.de>
parents:
diff changeset
86
bc55ffaeb639 cleaned up client/src directory
Markus Kottlaender <markus@intevation.de>
parents:
diff changeset
87 <script>
1362
ca33ad696594 remove the first empyty lines
Fadi Abbud <fadi.abbud@intevation.de>
parents: 1361
diff changeset
88 /* This is Free Software under GNU Affero General Public License v >= 3.0
1272
bc55ffaeb639 cleaned up client/src directory
Markus Kottlaender <markus@intevation.de>
parents:
diff changeset
89 * without warranty, see README.md and license for details.
1361
ea3a89a1813a remove trailing whitespace, add headers for Makefile, add the missed authors
Fadi Abbud <fadi.abbud@intevation.de>
parents: 1299
diff changeset
90 *
1272
bc55ffaeb639 cleaned up client/src directory
Markus Kottlaender <markus@intevation.de>
parents:
diff changeset
91 * SPDX-License-Identifier: AGPL-3.0-or-later
bc55ffaeb639 cleaned up client/src directory
Markus Kottlaender <markus@intevation.de>
parents:
diff changeset
92 * License-Filename: LICENSES/AGPL-3.0.txt
1361
ea3a89a1813a remove trailing whitespace, add headers for Makefile, add the missed authors
Fadi Abbud <fadi.abbud@intevation.de>
parents: 1299
diff changeset
93 *
ea3a89a1813a remove trailing whitespace, add headers for Makefile, add the missed authors
Fadi Abbud <fadi.abbud@intevation.de>
parents: 1299
diff changeset
94 * Copyright (C) 2018 by via donau
1272
bc55ffaeb639 cleaned up client/src directory
Markus Kottlaender <markus@intevation.de>
parents:
diff changeset
95 * – Österreichische Wasserstraßen-Gesellschaft mbH
bc55ffaeb639 cleaned up client/src directory
Markus Kottlaender <markus@intevation.de>
parents:
diff changeset
96 * Software engineering by Intevation GmbH
1361
ea3a89a1813a remove trailing whitespace, add headers for Makefile, add the missed authors
Fadi Abbud <fadi.abbud@intevation.de>
parents: 1299
diff changeset
97 *
1272
bc55ffaeb639 cleaned up client/src directory
Markus Kottlaender <markus@intevation.de>
parents:
diff changeset
98 * Author(s):
bc55ffaeb639 cleaned up client/src directory
Markus Kottlaender <markus@intevation.de>
parents:
diff changeset
99 * Thomas Junk <thomas.junk@intevation.de>
bc55ffaeb639 cleaned up client/src directory
Markus Kottlaender <markus@intevation.de>
parents:
diff changeset
100 * Markus Kottländer <markus.kottlaender@intevation.de>
bc55ffaeb639 cleaned up client/src directory
Markus Kottlaender <markus@intevation.de>
parents:
diff changeset
101 */
bc55ffaeb639 cleaned up client/src directory
Markus Kottlaender <markus@intevation.de>
parents:
diff changeset
102 import { mapGetters, mapState } from "vuex";
1701
f4bd67daaaff feat: force login on invalid session
Thomas Junk <thomas.junk@intevation.de>
parents: 1650
diff changeset
103 import { logOff } from "@/lib/session.js";
2383
8d025f85a3fe client: made indicator for open imports show up immediatly
Markus Kottlaender <markus@intevation.de>
parents: 2382
diff changeset
104 import { displayError } from "@/lib/errors";
2651
9f3856337f55 import_overview: new unified interface as default
Thomas Junk <thomas.junk@intevation.de>
parents: 2637
diff changeset
105 import { HTTP } from "@/lib/http";
1272
bc55ffaeb639 cleaned up client/src directory
Markus Kottlaender <markus@intevation.de>
parents:
diff changeset
106
bc55ffaeb639 cleaned up client/src directory
Markus Kottlaender <markus@intevation.de>
parents:
diff changeset
107 export default {
bc55ffaeb639 cleaned up client/src directory
Markus Kottlaender <markus@intevation.de>
parents:
diff changeset
108 name: "sidebar",
2651
9f3856337f55 import_overview: new unified interface as default
Thomas Junk <thomas.junk@intevation.de>
parents: 2637
diff changeset
109 data() {
9f3856337f55 import_overview: new unified interface as default
Thomas Junk <thomas.junk@intevation.de>
parents: 2637
diff changeset
110 return {
9f3856337f55 import_overview: new unified interface as default
Thomas Junk <thomas.junk@intevation.de>
parents: 2637
diff changeset
111 stagingNotifications: null
9f3856337f55 import_overview: new unified interface as default
Thomas Junk <thomas.junk@intevation.de>
parents: 2637
diff changeset
112 };
9f3856337f55 import_overview: new unified interface as default
Thomas Junk <thomas.junk@intevation.de>
parents: 2637
diff changeset
113 },
1272
bc55ffaeb639 cleaned up client/src directory
Markus Kottlaender <markus@intevation.de>
parents:
diff changeset
114 computed: {
bc55ffaeb639 cleaned up client/src directory
Markus Kottlaender <markus@intevation.de>
parents:
diff changeset
115 ...mapGetters("user", ["isSysAdmin", "isWaterwayAdmin"]),
2774
6c1c4f55d99b sidebar: only update when user is logged in
Thomas Junk <thomas.junk@intevation.de>
parents: 2717
diff changeset
116 ...mapState("user", ["user", "roles", "isAuthenticated"]),
1272
bc55ffaeb639 cleaned up client/src directory
Markus Kottlaender <markus@intevation.de>
parents:
diff changeset
117 ...mapState("application", [
bc55ffaeb639 cleaned up client/src directory
Markus Kottlaender <markus@intevation.de>
parents:
diff changeset
118 "showSidebar",
bc55ffaeb639 cleaned up client/src directory
Markus Kottlaender <markus@intevation.de>
parents:
diff changeset
119 "showSearchbarLastState",
1289
e1480ad4b6b0 improved menu style
Markus Kottlaender <markus@intevation.de>
parents: 1282
diff changeset
120 "contextBoxContent",
e1480ad4b6b0 improved menu style
Markus Kottlaender <markus@intevation.de>
parents: 1282
diff changeset
121 "showContextBox"
1272
bc55ffaeb639 cleaned up client/src directory
Markus Kottlaender <markus@intevation.de>
parents:
diff changeset
122 ]),
bc55ffaeb639 cleaned up client/src directory
Markus Kottlaender <markus@intevation.de>
parents:
diff changeset
123 sidebarStyle() {
bc55ffaeb639 cleaned up client/src directory
Markus Kottlaender <markus@intevation.de>
parents:
diff changeset
124 return [
bc55ffaeb639 cleaned up client/src directory
Markus Kottlaender <markus@intevation.de>
parents:
diff changeset
125 "ui-element position-relative sidebar rounded shadow-xs d-print-none mb-auto",
bc55ffaeb639 cleaned up client/src directory
Markus Kottlaender <markus@intevation.de>
parents:
diff changeset
126 {
bc55ffaeb639 cleaned up client/src directory
Markus Kottlaender <markus@intevation.de>
parents:
diff changeset
127 sidebarcollapsed: !this.showSidebar,
bc55ffaeb639 cleaned up client/src directory
Markus Kottlaender <markus@intevation.de>
parents:
diff changeset
128 sidebarextended: this.showSidebar
bc55ffaeb639 cleaned up client/src directory
Markus Kottlaender <markus@intevation.de>
parents:
diff changeset
129 }
bc55ffaeb639 cleaned up client/src directory
Markus Kottlaender <markus@intevation.de>
parents:
diff changeset
130 ];
bc55ffaeb639 cleaned up client/src directory
Markus Kottlaender <markus@intevation.de>
parents:
diff changeset
131 }
bc55ffaeb639 cleaned up client/src directory
Markus Kottlaender <markus@intevation.de>
parents:
diff changeset
132 },
bc55ffaeb639 cleaned up client/src directory
Markus Kottlaender <markus@intevation.de>
parents:
diff changeset
133 methods: {
bc55ffaeb639 cleaned up client/src directory
Markus Kottlaender <markus@intevation.de>
parents:
diff changeset
134 logoff() {
1701
f4bd67daaaff feat: force login on invalid session
Thomas Junk <thomas.junk@intevation.de>
parents: 1650
diff changeset
135 logOff();
1272
bc55ffaeb639 cleaned up client/src directory
Markus Kottlaender <markus@intevation.de>
parents:
diff changeset
136 },
bc55ffaeb639 cleaned up client/src directory
Markus Kottlaender <markus@intevation.de>
parents:
diff changeset
137 toggleContextBox(context) {
1650
90211725e4a9 highlighing feature for staging area
Thomas Junk <thomas.junk@intevation.de>
parents: 1613
diff changeset
138 if (this.$route.path !== "/") this.$router.push("/");
2282
2e40909a975d clean searchbar when context is changed
Thomas Junk <thomas.junk@intevation.de>
parents: 2277
diff changeset
139 this.$store.commit("application/searchQuery", "");
1282
a7dd8a3356fc fixed contextBox animations
Markus Kottlaender <markus@intevation.de>
parents: 1272
diff changeset
140 this.$store.commit("application/showContextBox", true);
a7dd8a3356fc fixed contextBox animations
Markus Kottlaender <markus@intevation.de>
parents: 1272
diff changeset
141 this.$store.commit("application/contextBoxContent", context);
a7dd8a3356fc fixed contextBox animations
Markus Kottlaender <markus@intevation.de>
parents: 1272
diff changeset
142 this.$store.commit("application/showSearchbar", true);
1289
e1480ad4b6b0 improved menu style
Markus Kottlaender <markus@intevation.de>
parents: 1282
diff changeset
143 },
e1480ad4b6b0 improved menu style
Markus Kottlaender <markus@intevation.de>
parents: 1282
diff changeset
144 isActive(item) {
e1480ad4b6b0 improved menu style
Markus Kottlaender <markus@intevation.de>
parents: 1282
diff changeset
145 return (
e1480ad4b6b0 improved menu style
Markus Kottlaender <markus@intevation.de>
parents: 1282
diff changeset
146 this.showContextBox &&
e1480ad4b6b0 improved menu style
Markus Kottlaender <markus@intevation.de>
parents: 1282
diff changeset
147 this.contextBoxContent === item &&
2983
2e7c0f9cff24 client: removed unnecessary component property
Markus Kottlaender <markus@intevation.de>
parents: 2979
diff changeset
148 this.$route.name == "mainview"
1289
e1480ad4b6b0 improved menu style
Markus Kottlaender <markus@intevation.de>
parents: 1282
diff changeset
149 );
2774
6c1c4f55d99b sidebar: only update when user is logged in
Thomas Junk <thomas.junk@intevation.de>
parents: 2717
diff changeset
150 }
6c1c4f55d99b sidebar: only update when user is logged in
Thomas Junk <thomas.junk@intevation.de>
parents: 2717
diff changeset
151 },
6c1c4f55d99b sidebar: only update when user is logged in
Thomas Junk <thomas.junk@intevation.de>
parents: 2717
diff changeset
152 mounted() {
6c1c4f55d99b sidebar: only update when user is logged in
Thomas Junk <thomas.junk@intevation.de>
parents: 2717
diff changeset
153 const updateIndicators = () => {
2676
906e9a13592f sidebar: only update staging info for appropriate usergroups
Thomas Junk <thomas.junk@intevation.de>
parents: 2651
diff changeset
154 if (this.isWaterwayAdmin) {
906e9a13592f sidebar: only update staging info for appropriate usergroups
Thomas Junk <thomas.junk@intevation.de>
parents: 2651
diff changeset
155 this.$store;
2680
bd615f978164 sidebar: adding count as query parameter
Thomas Junk <thomas.junk@intevation.de>
parents: 2676
diff changeset
156 HTTP.get("/imports?states=pending&count=true", {
2676
906e9a13592f sidebar: only update staging info for appropriate usergroups
Thomas Junk <thomas.junk@intevation.de>
parents: 2651
diff changeset
157 headers: { "X-Gemma-Auth": localStorage.getItem("token") }
2651
9f3856337f55 import_overview: new unified interface as default
Thomas Junk <thomas.junk@intevation.de>
parents: 2637
diff changeset
158 })
2676
906e9a13592f sidebar: only update staging info for appropriate usergroups
Thomas Junk <thomas.junk@intevation.de>
parents: 2651
diff changeset
159 .then(response => {
2698
472f4c6a1ec0 Sidebar: set count of pending imports correctly
Thomas Junk <thomas.junk@intevation.de>
parents: 2680
diff changeset
160 this.stagingNotifications = response.data;
2774
6c1c4f55d99b sidebar: only update when user is logged in
Thomas Junk <thomas.junk@intevation.de>
parents: 2717
diff changeset
161 if (this.isAuthenticated) {
6c1c4f55d99b sidebar: only update when user is logged in
Thomas Junk <thomas.junk@intevation.de>
parents: 2717
diff changeset
162 setTimeout(updateIndicators, 15000);
6c1c4f55d99b sidebar: only update when user is logged in
Thomas Junk <thomas.junk@intevation.de>
parents: 2717
diff changeset
163 }
2676
906e9a13592f sidebar: only update staging info for appropriate usergroups
Thomas Junk <thomas.junk@intevation.de>
parents: 2651
diff changeset
164 })
906e9a13592f sidebar: only update staging info for appropriate usergroups
Thomas Junk <thomas.junk@intevation.de>
parents: 2651
diff changeset
165 .catch(error => {
906e9a13592f sidebar: only update staging info for appropriate usergroups
Thomas Junk <thomas.junk@intevation.de>
parents: 2651
diff changeset
166 const { status, data } = error.response;
906e9a13592f sidebar: only update staging info for appropriate usergroups
Thomas Junk <thomas.junk@intevation.de>
parents: 2651
diff changeset
167 displayError({
906e9a13592f sidebar: only update staging info for appropriate usergroups
Thomas Junk <thomas.junk@intevation.de>
parents: 2651
diff changeset
168 title: "Backend Error",
906e9a13592f sidebar: only update staging info for appropriate usergroups
Thomas Junk <thomas.junk@intevation.de>
parents: 2651
diff changeset
169 message: `${status}: ${data.message || data}`
906e9a13592f sidebar: only update staging info for appropriate usergroups
Thomas Junk <thomas.junk@intevation.de>
parents: 2651
diff changeset
170 });
2651
9f3856337f55 import_overview: new unified interface as default
Thomas Junk <thomas.junk@intevation.de>
parents: 2637
diff changeset
171 });
2676
906e9a13592f sidebar: only update staging info for appropriate usergroups
Thomas Junk <thomas.junk@intevation.de>
parents: 2651
diff changeset
172 }
2774
6c1c4f55d99b sidebar: only update when user is logged in
Thomas Junk <thomas.junk@intevation.de>
parents: 2717
diff changeset
173 };
6c1c4f55d99b sidebar: only update when user is logged in
Thomas Junk <thomas.junk@intevation.de>
parents: 2717
diff changeset
174 setTimeout(updateIndicators, 15000);
1272
bc55ffaeb639 cleaned up client/src directory
Markus Kottlaender <markus@intevation.de>
parents:
diff changeset
175 }
bc55ffaeb639 cleaned up client/src directory
Markus Kottlaender <markus@intevation.de>
parents:
diff changeset
176 };
bc55ffaeb639 cleaned up client/src directory
Markus Kottlaender <markus@intevation.de>
parents:
diff changeset
177 </script>
bc55ffaeb639 cleaned up client/src directory
Markus Kottlaender <markus@intevation.de>
parents:
diff changeset
178
1449
bb47531bdd22 sass to scss
Thomas Junk <thomas.junk@intevation.de>
parents: 1429
diff changeset
179 <style lang="scss" scoped>
bb47531bdd22 sass to scss
Thomas Junk <thomas.junk@intevation.de>
parents: 1429
diff changeset
180 .menubutton {
bb47531bdd22 sass to scss
Thomas Junk <thomas.junk@intevation.de>
parents: 1429
diff changeset
181 height: 2rem;
bb47531bdd22 sass to scss
Thomas Junk <thomas.junk@intevation.de>
parents: 1429
diff changeset
182 width: 2rem;
bb47531bdd22 sass to scss
Thomas Junk <thomas.junk@intevation.de>
parents: 1429
diff changeset
183 top: 0;
bb47531bdd22 sass to scss
Thomas Junk <thomas.junk@intevation.de>
parents: 1429
diff changeset
184 left: 0;
bb47531bdd22 sass to scss
Thomas Junk <thomas.junk@intevation.de>
parents: 1429
diff changeset
185 color: #666;
bb47531bdd22 sass to scss
Thomas Junk <thomas.junk@intevation.de>
parents: 1429
diff changeset
186 }
bb47531bdd22 sass to scss
Thomas Junk <thomas.junk@intevation.de>
parents: 1429
diff changeset
187
2382
c28971cd70ce client: indicator for imports waiting for review
Markus Kottlaender <markus@intevation.de>
parents: 2354
diff changeset
188 .indicator {
c28971cd70ce client: indicator for imports waiting for review
Markus Kottlaender <markus@intevation.de>
parents: 2354
diff changeset
189 font-size: 11px;
c28971cd70ce client: indicator for imports waiting for review
Markus Kottlaender <markus@intevation.de>
parents: 2354
diff changeset
190 line-height: 11px;
c28971cd70ce client: indicator for imports waiting for review
Markus Kottlaender <markus@intevation.de>
parents: 2354
diff changeset
191 padding: 2px 4px 1px;
c28971cd70ce client: indicator for imports waiting for review
Markus Kottlaender <markus@intevation.de>
parents: 2354
diff changeset
192 position: absolute;
c28971cd70ce client: indicator for imports waiting for review
Markus Kottlaender <markus@intevation.de>
parents: 2354
diff changeset
193 top: 18px;
c28971cd70ce client: indicator for imports waiting for review
Markus Kottlaender <markus@intevation.de>
parents: 2354
diff changeset
194 left: 0px;
c28971cd70ce client: indicator for imports waiting for review
Markus Kottlaender <markus@intevation.de>
parents: 2354
diff changeset
195 z-index: 10;
c28971cd70ce client: indicator for imports waiting for review
Markus Kottlaender <markus@intevation.de>
parents: 2354
diff changeset
196 color: #fff;
c28971cd70ce client: indicator for imports waiting for review
Markus Kottlaender <markus@intevation.de>
parents: 2354
diff changeset
197 background: #17a2b8;
c28971cd70ce client: indicator for imports waiting for review
Markus Kottlaender <markus@intevation.de>
parents: 2354
diff changeset
198 border-top-right-radius: 0.25rem;
c28971cd70ce client: indicator for imports waiting for review
Markus Kottlaender <markus@intevation.de>
parents: 2354
diff changeset
199 border-bottom-left-radius: 0.25rem;
c28971cd70ce client: indicator for imports waiting for review
Markus Kottlaender <markus@intevation.de>
parents: 2354
diff changeset
200 }
c28971cd70ce client: indicator for imports waiting for review
Markus Kottlaender <markus@intevation.de>
parents: 2354
diff changeset
201
1449
bb47531bdd22 sass to scss
Thomas Junk <thomas.junk@intevation.de>
parents: 1429
diff changeset
202 .menu a {
bb47531bdd22 sass to scss
Thomas Junk <thomas.junk@intevation.de>
parents: 1429
diff changeset
203 display: block;
bb47531bdd22 sass to scss
Thomas Junk <thomas.junk@intevation.de>
parents: 1429
diff changeset
204 text-align: left;
2534
bb5286acfee2 client: reduced spacings between and inside boxes and more compact main menu
Markus Kottlaender <markus@intevation.de>
parents: 2457
diff changeset
205 padding: 0.25rem 0.5rem;
1449
bb47531bdd22 sass to scss
Thomas Junk <thomas.junk@intevation.de>
parents: 1429
diff changeset
206 color: #333;
bb47531bdd22 sass to scss
Thomas Junk <thomas.junk@intevation.de>
parents: 1429
diff changeset
207 text-decoration: none;
2534
bb5286acfee2 client: reduced spacings between and inside boxes and more compact main menu
Markus Kottlaender <markus@intevation.de>
parents: 2457
diff changeset
208 font-size: 90%;
2382
c28971cd70ce client: indicator for imports waiting for review
Markus Kottlaender <markus@intevation.de>
parents: 2354
diff changeset
209 .indicator {
c28971cd70ce client: indicator for imports waiting for review
Markus Kottlaender <markus@intevation.de>
parents: 2354
diff changeset
210 left: auto;
c28971cd70ce client: indicator for imports waiting for review
Markus Kottlaender <markus@intevation.de>
parents: 2354
diff changeset
211 right: 10px;
2630
30df2d12d37f client: sidebar: fix indicator positioning
Markus Kottlaender <markus@intevation.de>
parents: 2591
diff changeset
212 top: 8px;
2382
c28971cd70ce client: indicator for imports waiting for review
Markus Kottlaender <markus@intevation.de>
parents: 2354
diff changeset
213 border-radius: 0.25rem;
c28971cd70ce client: indicator for imports waiting for review
Markus Kottlaender <markus@intevation.de>
parents: 2354
diff changeset
214 }
2406
b72d3da6409c client: fixed indicator style in sidebar menu when menu item is active
Markus Kottlaender <markus@intevation.de>
parents: 2404
diff changeset
215 &.router-link-exact-active .indicator {
b72d3da6409c client: fixed indicator style in sidebar menu when menu item is active
Markus Kottlaender <markus@intevation.de>
parents: 2404
diff changeset
216 background: #fff;
b72d3da6409c client: fixed indicator style in sidebar menu when menu item is active
Markus Kottlaender <markus@intevation.de>
parents: 2404
diff changeset
217 color: #333;
b72d3da6409c client: fixed indicator style in sidebar menu when menu item is active
Markus Kottlaender <markus@intevation.de>
parents: 2404
diff changeset
218 }
1449
bb47531bdd22 sass to scss
Thomas Junk <thomas.junk@intevation.de>
parents: 1429
diff changeset
219 }
bb47531bdd22 sass to scss
Thomas Junk <thomas.junk@intevation.de>
parents: 1429
diff changeset
220
bb47531bdd22 sass to scss
Thomas Junk <thomas.junk@intevation.de>
parents: 1429
diff changeset
221 .menu a svg path {
bb47531bdd22 sass to scss
Thomas Junk <thomas.junk@intevation.de>
parents: 1429
diff changeset
222 fill: #666;
bb47531bdd22 sass to scss
Thomas Junk <thomas.junk@intevation.de>
parents: 1429
diff changeset
223 }
bb47531bdd22 sass to scss
Thomas Junk <thomas.junk@intevation.de>
parents: 1429
diff changeset
224
bb47531bdd22 sass to scss
Thomas Junk <thomas.junk@intevation.de>
parents: 1429
diff changeset
225 .menu a:hover {
bb47531bdd22 sass to scss
Thomas Junk <thomas.junk@intevation.de>
parents: 1429
diff changeset
226 background-color: #f8f8f8;
bb47531bdd22 sass to scss
Thomas Junk <thomas.junk@intevation.de>
parents: 1429
diff changeset
227 }
bb47531bdd22 sass to scss
Thomas Junk <thomas.junk@intevation.de>
parents: 1429
diff changeset
228
bb47531bdd22 sass to scss
Thomas Junk <thomas.junk@intevation.de>
parents: 1429
diff changeset
229 .menu a.router-link-exact-active {
bb47531bdd22 sass to scss
Thomas Junk <thomas.junk@intevation.de>
parents: 1429
diff changeset
230 background-color: #17a2b8;
bb47531bdd22 sass to scss
Thomas Junk <thomas.junk@intevation.de>
parents: 1429
diff changeset
231 color: #fff;
bb47531bdd22 sass to scss
Thomas Junk <thomas.junk@intevation.de>
parents: 1429
diff changeset
232 }
1272
bc55ffaeb639 cleaned up client/src directory
Markus Kottlaender <markus@intevation.de>
parents:
diff changeset
233
1449
bb47531bdd22 sass to scss
Thomas Junk <thomas.junk@intevation.de>
parents: 1429
diff changeset
234 .menu a.router-link-exact-active svg path {
bb47531bdd22 sass to scss
Thomas Junk <thomas.junk@intevation.de>
parents: 1429
diff changeset
235 fill: #fff;
bb47531bdd22 sass to scss
Thomas Junk <thomas.junk@intevation.de>
parents: 1429
diff changeset
236 }
bb47531bdd22 sass to scss
Thomas Junk <thomas.junk@intevation.de>
parents: 1429
diff changeset
237
bb47531bdd22 sass to scss
Thomas Junk <thomas.junk@intevation.de>
parents: 1429
diff changeset
238 .menu a.secondary.active {
bb47531bdd22 sass to scss
Thomas Junk <thomas.junk@intevation.de>
parents: 1429
diff changeset
239 background: #ebfafd;
bb47531bdd22 sass to scss
Thomas Junk <thomas.junk@intevation.de>
parents: 1429
diff changeset
240 color: #0f6674;
bb47531bdd22 sass to scss
Thomas Junk <thomas.junk@intevation.de>
parents: 1429
diff changeset
241 }
bb47531bdd22 sass to scss
Thomas Junk <thomas.junk@intevation.de>
parents: 1429
diff changeset
242
bb47531bdd22 sass to scss
Thomas Junk <thomas.junk@intevation.de>
parents: 1429
diff changeset
243 .menu a.secondary.active svg path {
bb47531bdd22 sass to scss
Thomas Junk <thomas.junk@intevation.de>
parents: 1429
diff changeset
244 fill: #0f6674;
bb47531bdd22 sass to scss
Thomas Junk <thomas.junk@intevation.de>
parents: 1429
diff changeset
245 }
1272
bc55ffaeb639 cleaned up client/src directory
Markus Kottlaender <markus@intevation.de>
parents:
diff changeset
246
1449
bb47531bdd22 sass to scss
Thomas Junk <thomas.junk@intevation.de>
parents: 1429
diff changeset
247 .sidebar {
bb47531bdd22 sass to scss
Thomas Junk <thomas.junk@intevation.de>
parents: 1429
diff changeset
248 background-color: #ffffff;
bb47531bdd22 sass to scss
Thomas Junk <thomas.junk@intevation.de>
parents: 1429
diff changeset
249 padding-top: $large-offset;
bb47531bdd22 sass to scss
Thomas Junk <thomas.junk@intevation.de>
parents: 1429
diff changeset
250 opacity: $slight-transparent;
bb47531bdd22 sass to scss
Thomas Junk <thomas.junk@intevation.de>
parents: 1429
diff changeset
251 transition: $transition-fast;
bb47531bdd22 sass to scss
Thomas Junk <thomas.junk@intevation.de>
parents: 1429
diff changeset
252 overflow: hidden;
bb47531bdd22 sass to scss
Thomas Junk <thomas.junk@intevation.de>
parents: 1429
diff changeset
253 }
1272
bc55ffaeb639 cleaned up client/src directory
Markus Kottlaender <markus@intevation.de>
parents:
diff changeset
254
1449
bb47531bdd22 sass to scss
Thomas Junk <thomas.junk@intevation.de>
parents: 1429
diff changeset
255 .sidebarcollapsed {
bb47531bdd22 sass to scss
Thomas Junk <thomas.junk@intevation.de>
parents: 1429
diff changeset
256 max-height: $icon-height;
bb47531bdd22 sass to scss
Thomas Junk <thomas.junk@intevation.de>
parents: 1429
diff changeset
257 max-width: $icon-width;
bb47531bdd22 sass to scss
Thomas Junk <thomas.junk@intevation.de>
parents: 1429
diff changeset
258 }
1272
bc55ffaeb639 cleaned up client/src directory
Markus Kottlaender <markus@intevation.de>
parents:
diff changeset
259
1449
bb47531bdd22 sass to scss
Thomas Junk <thomas.junk@intevation.de>
parents: 1429
diff changeset
260 .sidebarextended {
bb47531bdd22 sass to scss
Thomas Junk <thomas.junk@intevation.de>
parents: 1429
diff changeset
261 max-width: $sidebar-width;
1455
33dda08d67be unified layout for adminsection
Thomas Junk <thomas.junk@intevation.de>
parents: 1449
diff changeset
262 min-width: $sidebar-width;
1449
bb47531bdd22 sass to scss
Thomas Junk <thomas.junk@intevation.de>
parents: 1429
diff changeset
263 }
1272
bc55ffaeb639 cleaned up client/src directory
Markus Kottlaender <markus@intevation.de>
parents:
diff changeset
264 </style>