annotate client/src/components/Sidebar.vue @ 1542:31c6c7bd6190

layout issues
author Thomas Junk <thomas.junk@intevation.de>
date Mon, 10 Dec 2018 12:48:37 +0100
parents 6eec1c324a64
children a0833dc8b1c1
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>
1361
ea3a89a1813a remove trailing whitespace, add headers for Makefile, add the missed authors
Fadi Abbud <fadi.abbud@intevation.de>
parents: 1299
diff changeset
2 <div :class="sidebarStyle">
ea3a89a1813a remove trailing whitespace, add headers for Makefile, add the missed authors
Fadi Abbud <fadi.abbud@intevation.de>
parents: 1299
diff changeset
3 <div
ea3a89a1813a remove trailing whitespace, add headers for Makefile, add the missed authors
Fadi Abbud <fadi.abbud@intevation.de>
parents: 1299
diff changeset
4 @click="$store.commit('application/showSidebar', !showSidebar)"
ea3a89a1813a remove trailing whitespace, add headers for Makefile, add the missed authors
Fadi Abbud <fadi.abbud@intevation.de>
parents: 1299
diff changeset
5 class="menubutton ui-element d-print-none p-2 bg-white rounded position-absolute d-flex justify-content-center"
ea3a89a1813a remove trailing whitespace, add headers for Makefile, add the missed authors
Fadi Abbud <fadi.abbud@intevation.de>
parents: 1299
diff changeset
6 >
1517
6eec1c324a64 font-awesome fixed width icons
Thomas Junk <thomas.junk@intevation.de>
parents: 1505
diff changeset
7 <font-awesome-icon class="fa-fw" icon="bars"></font-awesome-icon>
1361
ea3a89a1813a remove trailing whitespace, add headers for Makefile, add the missed authors
Fadi Abbud <fadi.abbud@intevation.de>
parents: 1299
diff changeset
8 </div>
ea3a89a1813a remove trailing whitespace, add headers for Makefile, add the missed authors
Fadi Abbud <fadi.abbud@intevation.de>
parents: 1299
diff changeset
9 <div class="menu text-nowrap text-left">
ea3a89a1813a remove trailing whitespace, add headers for Makefile, add the missed authors
Fadi Abbud <fadi.abbud@intevation.de>
parents: 1299
diff changeset
10 <router-link to="/">
1463
a6dd2a8183a4 sidebar: added spacer class to import schedule
Thomas Junk <thomas.junk@intevation.de>
parents: 1455
diff changeset
11 <font-awesome-icon
1542
31c6c7bd6190 layout issues
Thomas Junk <thomas.junk@intevation.de>
parents: 1517
diff changeset
12 class="fa-fw mr-2"
1505
a6c2d4252bae refresh clears notifications
Thomas Junk <thomas.junk@intevation.de>
parents: 1463
diff changeset
13 fixed-width
1463
a6dd2a8183a4 sidebar: added spacer class to import schedule
Thomas Junk <thomas.junk@intevation.de>
parents: 1455
diff changeset
14 icon="map-marked-alt"
a6dd2a8183a4 sidebar: added spacer class to import schedule
Thomas Junk <thomas.junk@intevation.de>
parents: 1455
diff changeset
15 ></font-awesome-icon>
1505
a6c2d4252bae refresh clears notifications
Thomas Junk <thomas.junk@intevation.de>
parents: 1463
diff changeset
16 <span class="fix-trans-space" v-translate>Map</span>
1361
ea3a89a1813a remove trailing whitespace, add headers for Makefile, add the missed authors
Fadi Abbud <fadi.abbud@intevation.de>
parents: 1299
diff changeset
17 </router-link>
ea3a89a1813a remove trailing whitespace, add headers for Makefile, add the missed authors
Fadi Abbud <fadi.abbud@intevation.de>
parents: 1299
diff changeset
18 <a
1505
a6c2d4252bae refresh clears notifications
Thomas Junk <thomas.junk@intevation.de>
parents: 1463
diff changeset
19 :class="['secondary', { active: isActive('bottlenecks') }]"
1361
ea3a89a1813a remove trailing whitespace, add headers for Makefile, add the missed authors
Fadi Abbud <fadi.abbud@intevation.de>
parents: 1299
diff changeset
20 @click="toggleContextBox('bottlenecks')"
1505
a6c2d4252bae refresh clears notifications
Thomas Junk <thomas.junk@intevation.de>
parents: 1463
diff changeset
21 href="#"
1361
ea3a89a1813a remove trailing whitespace, add headers for Makefile, add the missed authors
Fadi Abbud <fadi.abbud@intevation.de>
parents: 1299
diff changeset
22 >
1517
6eec1c324a64 font-awesome fixed width icons
Thomas Junk <thomas.junk@intevation.de>
parents: 1505
diff changeset
23 <font-awesome-icon
1542
31c6c7bd6190 layout issues
Thomas Junk <thomas.junk@intevation.de>
parents: 1517
diff changeset
24 class="fa-fw mr-2"
1517
6eec1c324a64 font-awesome fixed width icons
Thomas Junk <thomas.junk@intevation.de>
parents: 1505
diff changeset
25 fixed-width
6eec1c324a64 font-awesome fixed width icons
Thomas Junk <thomas.junk@intevation.de>
parents: 1505
diff changeset
26 icon="ship"
6eec1c324a64 font-awesome fixed width icons
Thomas Junk <thomas.junk@intevation.de>
parents: 1505
diff changeset
27 ></font-awesome-icon>
1505
a6c2d4252bae refresh clears notifications
Thomas Junk <thomas.junk@intevation.de>
parents: 1463
diff changeset
28 <span class="fix-trans-space" v-translate>Bottlenecks</span>
1361
ea3a89a1813a remove trailing whitespace, add headers for Makefile, add the missed authors
Fadi Abbud <fadi.abbud@intevation.de>
parents: 1299
diff changeset
29 </a>
ea3a89a1813a remove trailing whitespace, add headers for Makefile, add the missed authors
Fadi Abbud <fadi.abbud@intevation.de>
parents: 1299
diff changeset
30 <div v-if="isWaterwayAdmin">
ea3a89a1813a remove trailing whitespace, add headers for Makefile, add the missed authors
Fadi Abbud <fadi.abbud@intevation.de>
parents: 1299
diff changeset
31 <a
1505
a6c2d4252bae refresh clears notifications
Thomas Junk <thomas.junk@intevation.de>
parents: 1463
diff changeset
32 :class="['secondary', { active: isActive('imports') }]"
1361
ea3a89a1813a remove trailing whitespace, add headers for Makefile, add the missed authors
Fadi Abbud <fadi.abbud@intevation.de>
parents: 1299
diff changeset
33 @click="toggleContextBox('imports')"
1505
a6c2d4252bae refresh clears notifications
Thomas Junk <thomas.junk@intevation.de>
parents: 1463
diff changeset
34 href="#"
1272
bc55ffaeb639 cleaned up client/src directory
Markus Kottlaender <markus@intevation.de>
parents:
diff changeset
35 >
1517
6eec1c324a64 font-awesome fixed width icons
Thomas Junk <thomas.junk@intevation.de>
parents: 1505
diff changeset
36 <font-awesome-icon
1542
31c6c7bd6190 layout issues
Thomas Junk <thomas.junk@intevation.de>
parents: 1517
diff changeset
37 class="fa-fw mr-2"
1517
6eec1c324a64 font-awesome fixed width icons
Thomas Junk <thomas.junk@intevation.de>
parents: 1505
diff changeset
38 fixed-width
6eec1c324a64 font-awesome fixed width icons
Thomas Junk <thomas.junk@intevation.de>
parents: 1505
diff changeset
39 icon="upload"
6eec1c324a64 font-awesome fixed width icons
Thomas Junk <thomas.junk@intevation.de>
parents: 1505
diff changeset
40 ></font-awesome-icon>
1505
a6c2d4252bae refresh clears notifications
Thomas Junk <thomas.junk@intevation.de>
parents: 1463
diff changeset
41 <span class="fix-trans-space" v-translate
1463
a6dd2a8183a4 sidebar: added spacer class to import schedule
Thomas Junk <thomas.junk@intevation.de>
parents: 1455
diff changeset
42 >Import soundingresults</span
a6dd2a8183a4 sidebar: added spacer class to import schedule
Thomas Junk <thomas.junk@intevation.de>
parents: 1455
diff changeset
43 >
1361
ea3a89a1813a remove trailing whitespace, add headers for Makefile, add the missed authors
Fadi Abbud <fadi.abbud@intevation.de>
parents: 1299
diff changeset
44 </a>
ea3a89a1813a remove trailing whitespace, add headers for Makefile, add the missed authors
Fadi Abbud <fadi.abbud@intevation.de>
parents: 1299
diff changeset
45 <a
1505
a6c2d4252bae refresh clears notifications
Thomas Junk <thomas.junk@intevation.de>
parents: 1463
diff changeset
46 :class="['secondary', { active: isActive('staging') }]"
1361
ea3a89a1813a remove trailing whitespace, add headers for Makefile, add the missed authors
Fadi Abbud <fadi.abbud@intevation.de>
parents: 1299
diff changeset
47 @click="toggleContextBox('staging')"
1505
a6c2d4252bae refresh clears notifications
Thomas Junk <thomas.junk@intevation.de>
parents: 1463
diff changeset
48 href="#"
1361
ea3a89a1813a remove trailing whitespace, add headers for Makefile, add the missed authors
Fadi Abbud <fadi.abbud@intevation.de>
parents: 1299
diff changeset
49 >
1463
a6dd2a8183a4 sidebar: added spacer class to import schedule
Thomas Junk <thomas.junk@intevation.de>
parents: 1455
diff changeset
50 <font-awesome-icon
1542
31c6c7bd6190 layout issues
Thomas Junk <thomas.junk@intevation.de>
parents: 1517
diff changeset
51 class="fa-fw mr-2"
1505
a6c2d4252bae refresh clears notifications
Thomas Junk <thomas.junk@intevation.de>
parents: 1463
diff changeset
52 fixed-width
1463
a6dd2a8183a4 sidebar: added spacer class to import schedule
Thomas Junk <thomas.junk@intevation.de>
parents: 1455
diff changeset
53 icon="clipboard-check"
a6dd2a8183a4 sidebar: added spacer class to import schedule
Thomas Junk <thomas.junk@intevation.de>
parents: 1455
diff changeset
54 ></font-awesome-icon>
1505
a6c2d4252bae refresh clears notifications
Thomas Junk <thomas.junk@intevation.de>
parents: 1463
diff changeset
55 <span class="fix-trans-space" v-translate>Staging area</span>
1361
ea3a89a1813a remove trailing whitespace, add headers for Makefile, add the missed authors
Fadi Abbud <fadi.abbud@intevation.de>
parents: 1299
diff changeset
56 </a>
1416
3af7ad9717e2 Client: add a set fo marked translation
Fadi Abbud <fadi.abbud@intevation.de>
parents: 1413
diff changeset
57 <small class="text-muted pl-3">
3af7ad9717e2 Client: add a set fo marked translation
Fadi Abbud <fadi.abbud@intevation.de>
parents: 1413
diff changeset
58 <translate>Systemadministration</translate>
3af7ad9717e2 Client: add a set fo marked translation
Fadi Abbud <fadi.abbud@intevation.de>
parents: 1413
diff changeset
59 </small>
1463
a6dd2a8183a4 sidebar: added spacer class to import schedule
Thomas Junk <thomas.junk@intevation.de>
parents: 1455
diff changeset
60 <hr class="m-0" />
1361
ea3a89a1813a remove trailing whitespace, add headers for Makefile, add the missed authors
Fadi Abbud <fadi.abbud@intevation.de>
parents: 1299
diff changeset
61 <router-link to="usermanagement">
1517
6eec1c324a64 font-awesome fixed width icons
Thomas Junk <thomas.junk@intevation.de>
parents: 1505
diff changeset
62 <font-awesome-icon
1542
31c6c7bd6190 layout issues
Thomas Junk <thomas.junk@intevation.de>
parents: 1517
diff changeset
63 class="fa-fw mr-2"
1517
6eec1c324a64 font-awesome fixed width icons
Thomas Junk <thomas.junk@intevation.de>
parents: 1505
diff changeset
64 fixed-width
6eec1c324a64 font-awesome fixed width icons
Thomas Junk <thomas.junk@intevation.de>
parents: 1505
diff changeset
65 icon="users-cog"
6eec1c324a64 font-awesome fixed width icons
Thomas Junk <thomas.junk@intevation.de>
parents: 1505
diff changeset
66 ></font-awesome-icon>
1505
a6c2d4252bae refresh clears notifications
Thomas Junk <thomas.junk@intevation.de>
parents: 1463
diff changeset
67 <span class="fix-trans-space" v-translate>Users</span>
1361
ea3a89a1813a remove trailing whitespace, add headers for Makefile, add the missed authors
Fadi Abbud <fadi.abbud@intevation.de>
parents: 1299
diff changeset
68 </router-link>
ea3a89a1813a remove trailing whitespace, add headers for Makefile, add the missed authors
Fadi Abbud <fadi.abbud@intevation.de>
parents: 1299
diff changeset
69 </div>
ea3a89a1813a remove trailing whitespace, add headers for Makefile, add the missed authors
Fadi Abbud <fadi.abbud@intevation.de>
parents: 1299
diff changeset
70 <div v-if="isSysAdmin">
ea3a89a1813a remove trailing whitespace, add headers for Makefile, add the missed authors
Fadi Abbud <fadi.abbud@intevation.de>
parents: 1299
diff changeset
71 <router-link to="systemconfiguration">
1517
6eec1c324a64 font-awesome fixed width icons
Thomas Junk <thomas.junk@intevation.de>
parents: 1505
diff changeset
72 <font-awesome-icon
1542
31c6c7bd6190 layout issues
Thomas Junk <thomas.junk@intevation.de>
parents: 1517
diff changeset
73 class="fa-fw mr-2"
1517
6eec1c324a64 font-awesome fixed width icons
Thomas Junk <thomas.junk@intevation.de>
parents: 1505
diff changeset
74 fixed-width
6eec1c324a64 font-awesome fixed width icons
Thomas Junk <thomas.junk@intevation.de>
parents: 1505
diff changeset
75 icon="wrench"
6eec1c324a64 font-awesome fixed width icons
Thomas Junk <thomas.junk@intevation.de>
parents: 1505
diff changeset
76 ></font-awesome-icon>
1505
a6c2d4252bae refresh clears notifications
Thomas Junk <thomas.junk@intevation.de>
parents: 1463
diff changeset
77 <span class="fix-trans-space" v-translate>Configuration</span>
1361
ea3a89a1813a remove trailing whitespace, add headers for Makefile, add the missed authors
Fadi Abbud <fadi.abbud@intevation.de>
parents: 1299
diff changeset
78 </router-link>
ea3a89a1813a remove trailing whitespace, add headers for Makefile, add the missed authors
Fadi Abbud <fadi.abbud@intevation.de>
parents: 1299
diff changeset
79 <router-link to="logs">
1517
6eec1c324a64 font-awesome fixed width icons
Thomas Junk <thomas.junk@intevation.de>
parents: 1505
diff changeset
80 <font-awesome-icon
1542
31c6c7bd6190 layout issues
Thomas Junk <thomas.junk@intevation.de>
parents: 1517
diff changeset
81 class="fa-fw mr-2"
1517
6eec1c324a64 font-awesome fixed width icons
Thomas Junk <thomas.junk@intevation.de>
parents: 1505
diff changeset
82 fixed-width
6eec1c324a64 font-awesome fixed width icons
Thomas Junk <thomas.junk@intevation.de>
parents: 1505
diff changeset
83 icon="book"
6eec1c324a64 font-awesome fixed width icons
Thomas Junk <thomas.junk@intevation.de>
parents: 1505
diff changeset
84 ></font-awesome-icon>
1505
a6c2d4252bae refresh clears notifications
Thomas Junk <thomas.junk@intevation.de>
parents: 1463
diff changeset
85 <span class="fix-trans-space" v-translate>Logs</span>
1361
ea3a89a1813a remove trailing whitespace, add headers for Makefile, add the missed authors
Fadi Abbud <fadi.abbud@intevation.de>
parents: 1299
diff changeset
86 </router-link>
ea3a89a1813a remove trailing whitespace, add headers for Makefile, add the missed authors
Fadi Abbud <fadi.abbud@intevation.de>
parents: 1299
diff changeset
87 <router-link to="importqueue">
1517
6eec1c324a64 font-awesome fixed width icons
Thomas Junk <thomas.junk@intevation.de>
parents: 1505
diff changeset
88 <font-awesome-icon
1542
31c6c7bd6190 layout issues
Thomas Junk <thomas.junk@intevation.de>
parents: 1517
diff changeset
89 class="fa-fw mr-2"
1517
6eec1c324a64 font-awesome fixed width icons
Thomas Junk <thomas.junk@intevation.de>
parents: 1505
diff changeset
90 fixed-width
6eec1c324a64 font-awesome fixed width icons
Thomas Junk <thomas.junk@intevation.de>
parents: 1505
diff changeset
91 icon="tasks"
6eec1c324a64 font-awesome fixed width icons
Thomas Junk <thomas.junk@intevation.de>
parents: 1505
diff changeset
92 ></font-awesome-icon>
1505
a6c2d4252bae refresh clears notifications
Thomas Junk <thomas.junk@intevation.de>
parents: 1463
diff changeset
93 <span class="fix-trans-space" v-translate>Importqueue</span>
1361
ea3a89a1813a remove trailing whitespace, add headers for Makefile, add the missed authors
Fadi Abbud <fadi.abbud@intevation.de>
parents: 1299
diff changeset
94 </router-link>
1505
a6c2d4252bae refresh clears notifications
Thomas Junk <thomas.junk@intevation.de>
parents: 1463
diff changeset
95 <router-link to="importschedule" v-if="this.$options.IMPORTSCHEDULE">
1517
6eec1c324a64 font-awesome fixed width icons
Thomas Junk <thomas.junk@intevation.de>
parents: 1505
diff changeset
96 <font-awesome-icon
1542
31c6c7bd6190 layout issues
Thomas Junk <thomas.junk@intevation.de>
parents: 1517
diff changeset
97 class="fa-fw mr-2"
1517
6eec1c324a64 font-awesome fixed width icons
Thomas Junk <thomas.junk@intevation.de>
parents: 1505
diff changeset
98 fixed-width
6eec1c324a64 font-awesome fixed width icons
Thomas Junk <thomas.junk@intevation.de>
parents: 1505
diff changeset
99 icon="clock"
6eec1c324a64 font-awesome fixed width icons
Thomas Junk <thomas.junk@intevation.de>
parents: 1505
diff changeset
100 ></font-awesome-icon>
1463
a6dd2a8183a4 sidebar: added spacer class to import schedule
Thomas Junk <thomas.junk@intevation.de>
parents: 1455
diff changeset
101 <translate class="fix-trans-space">Importschedule</translate>
1429
f4b3fb43b311 automatic imports WIP added
Thomas Junk <thomas.junk@intevation.de>
parents: 1427
diff changeset
102 </router-link>
1361
ea3a89a1813a remove trailing whitespace, add headers for Makefile, add the missed authors
Fadi Abbud <fadi.abbud@intevation.de>
parents: 1299
diff changeset
103 </div>
1463
a6dd2a8183a4 sidebar: added spacer class to import schedule
Thomas Junk <thomas.junk@intevation.de>
parents: 1455
diff changeset
104 <hr class="m-0" />
1505
a6c2d4252bae refresh clears notifications
Thomas Junk <thomas.junk@intevation.de>
parents: 1463
diff changeset
105 <a @click="logoff" href="#">
1517
6eec1c324a64 font-awesome fixed width icons
Thomas Junk <thomas.junk@intevation.de>
parents: 1505
diff changeset
106 <font-awesome-icon
1542
31c6c7bd6190 layout issues
Thomas Junk <thomas.junk@intevation.de>
parents: 1517
diff changeset
107 class="fa-fw mr-2"
1517
6eec1c324a64 font-awesome fixed width icons
Thomas Junk <thomas.junk@intevation.de>
parents: 1505
diff changeset
108 fixed-width
6eec1c324a64 font-awesome fixed width icons
Thomas Junk <thomas.junk@intevation.de>
parents: 1505
diff changeset
109 icon="power-off"
6eec1c324a64 font-awesome fixed width icons
Thomas Junk <thomas.junk@intevation.de>
parents: 1505
diff changeset
110 ></font-awesome-icon>
1505
a6c2d4252bae refresh clears notifications
Thomas Junk <thomas.junk@intevation.de>
parents: 1463
diff changeset
111 <span class="fix-trans-space" v-translate>Logout</span> {{ user }}
1361
ea3a89a1813a remove trailing whitespace, add headers for Makefile, add the missed authors
Fadi Abbud <fadi.abbud@intevation.de>
parents: 1299
diff changeset
112 </a>
1272
bc55ffaeb639 cleaned up client/src directory
Markus Kottlaender <markus@intevation.de>
parents:
diff changeset
113 </div>
1361
ea3a89a1813a remove trailing whitespace, add headers for Makefile, add the missed authors
Fadi Abbud <fadi.abbud@intevation.de>
parents: 1299
diff changeset
114 </div>
1272
bc55ffaeb639 cleaned up client/src directory
Markus Kottlaender <markus@intevation.de>
parents:
diff changeset
115 </template>
bc55ffaeb639 cleaned up client/src directory
Markus Kottlaender <markus@intevation.de>
parents:
diff changeset
116
bc55ffaeb639 cleaned up client/src directory
Markus Kottlaender <markus@intevation.de>
parents:
diff changeset
117 <script>
1362
ca33ad696594 remove the first empyty lines
Fadi Abbud <fadi.abbud@intevation.de>
parents: 1361
diff changeset
118 /* 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
119 * 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
120 *
1272
bc55ffaeb639 cleaned up client/src directory
Markus Kottlaender <markus@intevation.de>
parents:
diff changeset
121 * SPDX-License-Identifier: AGPL-3.0-or-later
bc55ffaeb639 cleaned up client/src directory
Markus Kottlaender <markus@intevation.de>
parents:
diff changeset
122 * 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
123 *
ea3a89a1813a remove trailing whitespace, add headers for Makefile, add the missed authors
Fadi Abbud <fadi.abbud@intevation.de>
parents: 1299
diff changeset
124 * Copyright (C) 2018 by via donau
1272
bc55ffaeb639 cleaned up client/src directory
Markus Kottlaender <markus@intevation.de>
parents:
diff changeset
125 * – Österreichische Wasserstraßen-Gesellschaft mbH
bc55ffaeb639 cleaned up client/src directory
Markus Kottlaender <markus@intevation.de>
parents:
diff changeset
126 * 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
127 *
1272
bc55ffaeb639 cleaned up client/src directory
Markus Kottlaender <markus@intevation.de>
parents:
diff changeset
128 * Author(s):
bc55ffaeb639 cleaned up client/src directory
Markus Kottlaender <markus@intevation.de>
parents:
diff changeset
129 * Thomas Junk <thomas.junk@intevation.de>
bc55ffaeb639 cleaned up client/src directory
Markus Kottlaender <markus@intevation.de>
parents:
diff changeset
130 * Markus Kottländer <markus.kottlaender@intevation.de>
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 import { mapGetters, mapState } from "vuex";
1505
a6c2d4252bae refresh clears notifications
Thomas Junk <thomas.junk@intevation.de>
parents: 1463
diff changeset
133 import app from "../main";
1272
bc55ffaeb639 cleaned up client/src directory
Markus Kottlaender <markus@intevation.de>
parents:
diff changeset
134
bc55ffaeb639 cleaned up client/src directory
Markus Kottlaender <markus@intevation.de>
parents:
diff changeset
135 export default {
bc55ffaeb639 cleaned up client/src directory
Markus Kottlaender <markus@intevation.de>
parents:
diff changeset
136 name: "sidebar",
bc55ffaeb639 cleaned up client/src directory
Markus Kottlaender <markus@intevation.de>
parents:
diff changeset
137 props: ["routeName"],
bc55ffaeb639 cleaned up client/src directory
Markus Kottlaender <markus@intevation.de>
parents:
diff changeset
138 computed: {
bc55ffaeb639 cleaned up client/src directory
Markus Kottlaender <markus@intevation.de>
parents:
diff changeset
139 ...mapGetters("user", ["isSysAdmin", "isWaterwayAdmin"]),
bc55ffaeb639 cleaned up client/src directory
Markus Kottlaender <markus@intevation.de>
parents:
diff changeset
140 ...mapState("user", ["user"]),
bc55ffaeb639 cleaned up client/src directory
Markus Kottlaender <markus@intevation.de>
parents:
diff changeset
141 ...mapState("application", [
bc55ffaeb639 cleaned up client/src directory
Markus Kottlaender <markus@intevation.de>
parents:
diff changeset
142 "showSidebar",
bc55ffaeb639 cleaned up client/src directory
Markus Kottlaender <markus@intevation.de>
parents:
diff changeset
143 "showSearchbarLastState",
1289
e1480ad4b6b0 improved menu style
Markus Kottlaender <markus@intevation.de>
parents: 1282
diff changeset
144 "contextBoxContent",
e1480ad4b6b0 improved menu style
Markus Kottlaender <markus@intevation.de>
parents: 1282
diff changeset
145 "showContextBox"
1272
bc55ffaeb639 cleaned up client/src directory
Markus Kottlaender <markus@intevation.de>
parents:
diff changeset
146 ]),
bc55ffaeb639 cleaned up client/src directory
Markus Kottlaender <markus@intevation.de>
parents:
diff changeset
147 sidebarStyle() {
bc55ffaeb639 cleaned up client/src directory
Markus Kottlaender <markus@intevation.de>
parents:
diff changeset
148 return [
bc55ffaeb639 cleaned up client/src directory
Markus Kottlaender <markus@intevation.de>
parents:
diff changeset
149 "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
150 {
bc55ffaeb639 cleaned up client/src directory
Markus Kottlaender <markus@intevation.de>
parents:
diff changeset
151 sidebarcollapsed: !this.showSidebar,
bc55ffaeb639 cleaned up client/src directory
Markus Kottlaender <markus@intevation.de>
parents:
diff changeset
152 sidebarextended: this.showSidebar
bc55ffaeb639 cleaned up client/src directory
Markus Kottlaender <markus@intevation.de>
parents:
diff changeset
153 }
bc55ffaeb639 cleaned up client/src directory
Markus Kottlaender <markus@intevation.de>
parents:
diff changeset
154 ];
bc55ffaeb639 cleaned up client/src directory
Markus Kottlaender <markus@intevation.de>
parents:
diff changeset
155 }
bc55ffaeb639 cleaned up client/src directory
Markus Kottlaender <markus@intevation.de>
parents:
diff changeset
156 },
1429
f4b3fb43b311 automatic imports WIP added
Thomas Junk <thomas.junk@intevation.de>
parents: 1427
diff changeset
157 IMPORTSCHEDULE: process.env.VUE_APP_FEATURE_IMPORTSCHEDULE,
1272
bc55ffaeb639 cleaned up client/src directory
Markus Kottlaender <markus@intevation.de>
parents:
diff changeset
158 methods: {
bc55ffaeb639 cleaned up client/src directory
Markus Kottlaender <markus@intevation.de>
parents:
diff changeset
159 logoff() {
1505
a6c2d4252bae refresh clears notifications
Thomas Junk <thomas.junk@intevation.de>
parents: 1463
diff changeset
160 app.$snotify.clear();
1296
99c039e86624 replaced manual store cleanup on logout with central store reset
Markus Kottlaender <markus@intevation.de>
parents: 1294
diff changeset
161 this.$store.commit("reset");
1272
bc55ffaeb639 cleaned up client/src directory
Markus Kottlaender <markus@intevation.de>
parents:
diff changeset
162 this.$store.commit("user/clearAuth");
bc55ffaeb639 cleaned up client/src directory
Markus Kottlaender <markus@intevation.de>
parents:
diff changeset
163 this.$router.push("/login");
bc55ffaeb639 cleaned up client/src directory
Markus Kottlaender <markus@intevation.de>
parents:
diff changeset
164 },
bc55ffaeb639 cleaned up client/src directory
Markus Kottlaender <markus@intevation.de>
parents:
diff changeset
165 toggleContextBox(context) {
bc55ffaeb639 cleaned up client/src directory
Markus Kottlaender <markus@intevation.de>
parents:
diff changeset
166 this.$router.push("/");
1282
a7dd8a3356fc fixed contextBox animations
Markus Kottlaender <markus@intevation.de>
parents: 1272
diff changeset
167 this.$store.commit("application/showContextBox", true);
a7dd8a3356fc fixed contextBox animations
Markus Kottlaender <markus@intevation.de>
parents: 1272
diff changeset
168 this.$store.commit("application/contextBoxContent", context);
a7dd8a3356fc fixed contextBox animations
Markus Kottlaender <markus@intevation.de>
parents: 1272
diff changeset
169 this.$store.commit("application/showSearchbar", true);
1289
e1480ad4b6b0 improved menu style
Markus Kottlaender <markus@intevation.de>
parents: 1282
diff changeset
170 },
e1480ad4b6b0 improved menu style
Markus Kottlaender <markus@intevation.de>
parents: 1282
diff changeset
171 isActive(item) {
e1480ad4b6b0 improved menu style
Markus Kottlaender <markus@intevation.de>
parents: 1282
diff changeset
172 return (
e1480ad4b6b0 improved menu style
Markus Kottlaender <markus@intevation.de>
parents: 1282
diff changeset
173 this.showContextBox &&
e1480ad4b6b0 improved menu style
Markus Kottlaender <markus@intevation.de>
parents: 1282
diff changeset
174 this.contextBoxContent === item &&
e1480ad4b6b0 improved menu style
Markus Kottlaender <markus@intevation.de>
parents: 1282
diff changeset
175 this.routeName == "mainview"
e1480ad4b6b0 improved menu style
Markus Kottlaender <markus@intevation.de>
parents: 1282
diff changeset
176 );
1272
bc55ffaeb639 cleaned up client/src directory
Markus Kottlaender <markus@intevation.de>
parents:
diff changeset
177 }
bc55ffaeb639 cleaned up client/src directory
Markus Kottlaender <markus@intevation.de>
parents:
diff changeset
178 }
bc55ffaeb639 cleaned up client/src directory
Markus Kottlaender <markus@intevation.de>
parents:
diff changeset
179 };
bc55ffaeb639 cleaned up client/src directory
Markus Kottlaender <markus@intevation.de>
parents:
diff changeset
180 </script>
bc55ffaeb639 cleaned up client/src directory
Markus Kottlaender <markus@intevation.de>
parents:
diff changeset
181
1449
bb47531bdd22 sass to scss
Thomas Junk <thomas.junk@intevation.de>
parents: 1429
diff changeset
182 <style lang="scss" scoped>
bb47531bdd22 sass to scss
Thomas Junk <thomas.junk@intevation.de>
parents: 1429
diff changeset
183 .menubutton {
bb47531bdd22 sass to scss
Thomas Junk <thomas.junk@intevation.de>
parents: 1429
diff changeset
184 height: 2rem;
bb47531bdd22 sass to scss
Thomas Junk <thomas.junk@intevation.de>
parents: 1429
diff changeset
185 width: 2rem;
bb47531bdd22 sass to scss
Thomas Junk <thomas.junk@intevation.de>
parents: 1429
diff changeset
186 top: 0;
bb47531bdd22 sass to scss
Thomas Junk <thomas.junk@intevation.de>
parents: 1429
diff changeset
187 left: 0;
bb47531bdd22 sass to scss
Thomas Junk <thomas.junk@intevation.de>
parents: 1429
diff changeset
188 color: #666;
bb47531bdd22 sass to scss
Thomas Junk <thomas.junk@intevation.de>
parents: 1429
diff changeset
189 }
bb47531bdd22 sass to scss
Thomas Junk <thomas.junk@intevation.de>
parents: 1429
diff changeset
190
bb47531bdd22 sass to scss
Thomas Junk <thomas.junk@intevation.de>
parents: 1429
diff changeset
191 .menu a {
bb47531bdd22 sass to scss
Thomas Junk <thomas.junk@intevation.de>
parents: 1429
diff changeset
192 display: block;
bb47531bdd22 sass to scss
Thomas Junk <thomas.junk@intevation.de>
parents: 1429
diff changeset
193 text-align: left;
bb47531bdd22 sass to scss
Thomas Junk <thomas.junk@intevation.de>
parents: 1429
diff changeset
194 padding: 0.5rem 1rem;
bb47531bdd22 sass to scss
Thomas Junk <thomas.junk@intevation.de>
parents: 1429
diff changeset
195 color: #333;
bb47531bdd22 sass to scss
Thomas Junk <thomas.junk@intevation.de>
parents: 1429
diff changeset
196 text-decoration: none;
bb47531bdd22 sass to scss
Thomas Junk <thomas.junk@intevation.de>
parents: 1429
diff changeset
197 }
bb47531bdd22 sass to scss
Thomas Junk <thomas.junk@intevation.de>
parents: 1429
diff changeset
198
bb47531bdd22 sass to scss
Thomas Junk <thomas.junk@intevation.de>
parents: 1429
diff changeset
199 .menu a svg path {
bb47531bdd22 sass to scss
Thomas Junk <thomas.junk@intevation.de>
parents: 1429
diff changeset
200 fill: #666;
bb47531bdd22 sass to scss
Thomas Junk <thomas.junk@intevation.de>
parents: 1429
diff changeset
201 }
bb47531bdd22 sass to scss
Thomas Junk <thomas.junk@intevation.de>
parents: 1429
diff changeset
202
bb47531bdd22 sass to scss
Thomas Junk <thomas.junk@intevation.de>
parents: 1429
diff changeset
203 .menu a:hover {
bb47531bdd22 sass to scss
Thomas Junk <thomas.junk@intevation.de>
parents: 1429
diff changeset
204 background-color: #f8f8f8;
bb47531bdd22 sass to scss
Thomas Junk <thomas.junk@intevation.de>
parents: 1429
diff changeset
205 }
bb47531bdd22 sass to scss
Thomas Junk <thomas.junk@intevation.de>
parents: 1429
diff changeset
206
bb47531bdd22 sass to scss
Thomas Junk <thomas.junk@intevation.de>
parents: 1429
diff changeset
207 .menu a.router-link-exact-active {
bb47531bdd22 sass to scss
Thomas Junk <thomas.junk@intevation.de>
parents: 1429
diff changeset
208 background-color: #17a2b8;
bb47531bdd22 sass to scss
Thomas Junk <thomas.junk@intevation.de>
parents: 1429
diff changeset
209 color: #fff;
bb47531bdd22 sass to scss
Thomas Junk <thomas.junk@intevation.de>
parents: 1429
diff changeset
210 }
1272
bc55ffaeb639 cleaned up client/src directory
Markus Kottlaender <markus@intevation.de>
parents:
diff changeset
211
1449
bb47531bdd22 sass to scss
Thomas Junk <thomas.junk@intevation.de>
parents: 1429
diff changeset
212 .menu a.router-link-exact-active svg path {
bb47531bdd22 sass to scss
Thomas Junk <thomas.junk@intevation.de>
parents: 1429
diff changeset
213 fill: #fff;
bb47531bdd22 sass to scss
Thomas Junk <thomas.junk@intevation.de>
parents: 1429
diff changeset
214 }
bb47531bdd22 sass to scss
Thomas Junk <thomas.junk@intevation.de>
parents: 1429
diff changeset
215
bb47531bdd22 sass to scss
Thomas Junk <thomas.junk@intevation.de>
parents: 1429
diff changeset
216 .menu a.secondary.active {
bb47531bdd22 sass to scss
Thomas Junk <thomas.junk@intevation.de>
parents: 1429
diff changeset
217 background: #ebfafd;
bb47531bdd22 sass to scss
Thomas Junk <thomas.junk@intevation.de>
parents: 1429
diff changeset
218 color: #0f6674;
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.secondary.active svg path {
bb47531bdd22 sass to scss
Thomas Junk <thomas.junk@intevation.de>
parents: 1429
diff changeset
222 fill: #0f6674;
bb47531bdd22 sass to scss
Thomas Junk <thomas.junk@intevation.de>
parents: 1429
diff changeset
223 }
1272
bc55ffaeb639 cleaned up client/src directory
Markus Kottlaender <markus@intevation.de>
parents:
diff changeset
224
1449
bb47531bdd22 sass to scss
Thomas Junk <thomas.junk@intevation.de>
parents: 1429
diff changeset
225 .sidebar {
bb47531bdd22 sass to scss
Thomas Junk <thomas.junk@intevation.de>
parents: 1429
diff changeset
226 background-color: #ffffff;
bb47531bdd22 sass to scss
Thomas Junk <thomas.junk@intevation.de>
parents: 1429
diff changeset
227 padding-top: $large-offset;
bb47531bdd22 sass to scss
Thomas Junk <thomas.junk@intevation.de>
parents: 1429
diff changeset
228 opacity: $slight-transparent;
bb47531bdd22 sass to scss
Thomas Junk <thomas.junk@intevation.de>
parents: 1429
diff changeset
229 transition: $transition-fast;
bb47531bdd22 sass to scss
Thomas Junk <thomas.junk@intevation.de>
parents: 1429
diff changeset
230 overflow: hidden;
bb47531bdd22 sass to scss
Thomas Junk <thomas.junk@intevation.de>
parents: 1429
diff changeset
231 }
1272
bc55ffaeb639 cleaned up client/src directory
Markus Kottlaender <markus@intevation.de>
parents:
diff changeset
232
1449
bb47531bdd22 sass to scss
Thomas Junk <thomas.junk@intevation.de>
parents: 1429
diff changeset
233 .sidebarcollapsed {
bb47531bdd22 sass to scss
Thomas Junk <thomas.junk@intevation.de>
parents: 1429
diff changeset
234 max-height: $icon-height;
bb47531bdd22 sass to scss
Thomas Junk <thomas.junk@intevation.de>
parents: 1429
diff changeset
235 max-width: $icon-width;
bb47531bdd22 sass to scss
Thomas Junk <thomas.junk@intevation.de>
parents: 1429
diff changeset
236 }
1272
bc55ffaeb639 cleaned up client/src directory
Markus Kottlaender <markus@intevation.de>
parents:
diff changeset
237
1449
bb47531bdd22 sass to scss
Thomas Junk <thomas.junk@intevation.de>
parents: 1429
diff changeset
238 .sidebarextended {
bb47531bdd22 sass to scss
Thomas Junk <thomas.junk@intevation.de>
parents: 1429
diff changeset
239 max-height: 35rem;
bb47531bdd22 sass to scss
Thomas Junk <thomas.junk@intevation.de>
parents: 1429
diff changeset
240 max-width: $sidebar-width;
1455
33dda08d67be unified layout for adminsection
Thomas Junk <thomas.junk@intevation.de>
parents: 1449
diff changeset
241 min-width: $sidebar-width;
1449
bb47531bdd22 sass to scss
Thomas Junk <thomas.junk@intevation.de>
parents: 1429
diff changeset
242 }
1272
bc55ffaeb639 cleaned up client/src directory
Markus Kottlaender <markus@intevation.de>
parents:
diff changeset
243 </style>