Mercurial > gemma
annotate client/src/components/App.vue @ 2382:c28971cd70ce
client: indicator for imports waiting for review
The main menu button and the staging area menu item now show an indicator for open imports
author | Markus Kottlaender <markus@intevation.de> |
---|---|
date | Mon, 25 Feb 2019 08:35:47 +0100 |
parents | c69432c1c4ac |
children | c06b001dc26b |
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:
1291
diff
changeset
|
2 <div id="app" class="main"> |
ea3a89a1813a
remove trailing whitespace, add headers for Makefile, add the missed authors
Fadi Abbud <fadi.abbud@intevation.de>
parents:
1291
diff
changeset
|
3 <div v-if="isAuthenticated" class="d-flex flex-column userinterface"> |
ea3a89a1813a
remove trailing whitespace, add headers for Makefile, add the missed authors
Fadi Abbud <fadi.abbud@intevation.de>
parents:
1291
diff
changeset
|
4 <div class="topbar d-flex pt-3 mx-3"> |
ea3a89a1813a
remove trailing whitespace, add headers for Makefile, add the missed authors
Fadi Abbud <fadi.abbud@intevation.de>
parents:
1291
diff
changeset
|
5 <div class="mr-auto d-flex"> |
ea3a89a1813a
remove trailing whitespace, add headers for Makefile, add the missed authors
Fadi Abbud <fadi.abbud@intevation.de>
parents:
1291
diff
changeset
|
6 <Sidebar :routeName="routeName"></Sidebar> |
2283
1169f18a0f11
make room for searchbar
Thomas Junk <thomas.junk@intevation.de>
parents:
1585
diff
changeset
|
7 <div :class="searchContainer"> |
2378
c69432c1c4ac
router: fixed frontend routing. renamed routes. changed display according to new route names
Thomas Junk <thomas.junk@intevation.de>
parents:
2370
diff
changeset
|
8 <Search v-if="isMapVisible"></Search> |
c69432c1c4ac
router: fixed frontend routing. renamed routes. changed display according to new route names
Thomas Junk <thomas.junk@intevation.de>
parents:
2370
diff
changeset
|
9 <Contextbox v-if="isMapVisible"></Contextbox> |
1361
ea3a89a1813a
remove trailing whitespace, add headers for Makefile, add the missed authors
Fadi Abbud <fadi.abbud@intevation.de>
parents:
1291
diff
changeset
|
10 </div> |
1272
bc55ffaeb639
cleaned up client/src directory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
11 </div> |
1361
ea3a89a1813a
remove trailing whitespace, add headers for Makefile, add the missed authors
Fadi Abbud <fadi.abbud@intevation.de>
parents:
1291
diff
changeset
|
12 <div class="ml-auto d-flex"> |
ea3a89a1813a
remove trailing whitespace, add headers for Makefile, add the missed authors
Fadi Abbud <fadi.abbud@intevation.de>
parents:
1291
diff
changeset
|
13 <div class="d-flex flex-column align-items-end"> |
2378
c69432c1c4ac
router: fixed frontend routing. renamed routes. changed display according to new route names
Thomas Junk <thomas.junk@intevation.de>
parents:
2370
diff
changeset
|
14 <Profiles v-if="isMapVisible"></Profiles> |
c69432c1c4ac
router: fixed frontend routing. renamed routes. changed display according to new route names
Thomas Junk <thomas.junk@intevation.de>
parents:
2370
diff
changeset
|
15 <Pdftool v-if="isMapVisible"></Pdftool> |
1361
ea3a89a1813a
remove trailing whitespace, add headers for Makefile, add the missed authors
Fadi Abbud <fadi.abbud@intevation.de>
parents:
1291
diff
changeset
|
16 </div> |
ea3a89a1813a
remove trailing whitespace, add headers for Makefile, add the missed authors
Fadi Abbud <fadi.abbud@intevation.de>
parents:
1291
diff
changeset
|
17 <div class="d-flex flex-column align-items-end"> |
2378
c69432c1c4ac
router: fixed frontend routing. renamed routes. changed display according to new route names
Thomas Junk <thomas.junk@intevation.de>
parents:
2370
diff
changeset
|
18 <Identify v-if="isMapVisible"></Identify> |
c69432c1c4ac
router: fixed frontend routing. renamed routes. changed display according to new route names
Thomas Junk <thomas.junk@intevation.de>
parents:
2370
diff
changeset
|
19 <Layers v-if="isMapVisible"></Layers> |
1361
ea3a89a1813a
remove trailing whitespace, add headers for Makefile, add the missed authors
Fadi Abbud <fadi.abbud@intevation.de>
parents:
1291
diff
changeset
|
20 </div> |
2378
c69432c1c4ac
router: fixed frontend routing. renamed routes. changed display according to new route names
Thomas Junk <thomas.junk@intevation.de>
parents:
2370
diff
changeset
|
21 <Toolbar v-if="isMapVisible"></Toolbar> |
1272
bc55ffaeb639
cleaned up client/src directory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
22 </div> |
1361
ea3a89a1813a
remove trailing whitespace, add headers for Makefile, add the missed authors
Fadi Abbud <fadi.abbud@intevation.de>
parents:
1291
diff
changeset
|
23 </div> |
ea3a89a1813a
remove trailing whitespace, add headers for Makefile, add the missed authors
Fadi Abbud <fadi.abbud@intevation.de>
parents:
1291
diff
changeset
|
24 <div class="flex-fill"></div> |
ea3a89a1813a
remove trailing whitespace, add headers for Makefile, add the missed authors
Fadi Abbud <fadi.abbud@intevation.de>
parents:
1291
diff
changeset
|
25 <div class="d-flex flex-row align-items-end"> |
2378
c69432c1c4ac
router: fixed frontend routing. renamed routes. changed display according to new route names
Thomas Junk <thomas.junk@intevation.de>
parents:
2370
diff
changeset
|
26 <Infobar v-if="isMapVisible"></Infobar> |
1361
ea3a89a1813a
remove trailing whitespace, add headers for Makefile, add the missed authors
Fadi Abbud <fadi.abbud@intevation.de>
parents:
1291
diff
changeset
|
27 </div> |
2378
c69432c1c4ac
router: fixed frontend routing. renamed routes. changed display according to new route names
Thomas Junk <thomas.junk@intevation.de>
parents:
2370
diff
changeset
|
28 <Zoom v-if="isMapVisible"></Zoom> |
1272
bc55ffaeb639
cleaned up client/src directory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
29 </div> |
1480 | 30 <div class="d-flex flex-column"><router-view /></div> |
1368
d1d8c7bd16a1
switched from vue2-toastr to vue-snotify
Thomas Junk <thomas.junk@intevation.de>
parents:
1362
diff
changeset
|
31 <vue-snotify></vue-snotify> |
1361
ea3a89a1813a
remove trailing whitespace, add headers for Makefile, add the missed authors
Fadi Abbud <fadi.abbud@intevation.de>
parents:
1291
diff
changeset
|
32 </div> |
1272
bc55ffaeb639
cleaned up client/src directory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
33 </template> |
bc55ffaeb639
cleaned up client/src directory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
34 |
1449 | 35 <style lang="scss" scoped> |
2283
1169f18a0f11
make room for searchbar
Thomas Junk <thomas.junk@intevation.de>
parents:
1585
diff
changeset
|
36 .small { |
1169f18a0f11
make room for searchbar
Thomas Junk <thomas.junk@intevation.de>
parents:
1585
diff
changeset
|
37 width: $icon-width; |
1169f18a0f11
make room for searchbar
Thomas Junk <thomas.junk@intevation.de>
parents:
1585
diff
changeset
|
38 } |
1169f18a0f11
make room for searchbar
Thomas Junk <thomas.junk@intevation.de>
parents:
1585
diff
changeset
|
39 .wide { |
1169f18a0f11
make room for searchbar
Thomas Junk <thomas.junk@intevation.de>
parents:
1585
diff
changeset
|
40 width: 600px; |
1169f18a0f11
make room for searchbar
Thomas Junk <thomas.junk@intevation.de>
parents:
1585
diff
changeset
|
41 } |
1169f18a0f11
make room for searchbar
Thomas Junk <thomas.junk@intevation.de>
parents:
1585
diff
changeset
|
42 |
1449 | 43 .userinterface { |
44 position: absolute; | |
45 top: 0; | |
46 left: 0; | |
2322
a25b4988eb0c
client: fixed usermanagement styles
Markus Kottlaender <markus@intevation.de>
parents:
2285
diff
changeset
|
47 right: 0; |
a25b4988eb0c
client: fixed usermanagement styles
Markus Kottlaender <markus@intevation.de>
parents:
2285
diff
changeset
|
48 bottom: 0; |
1449 | 49 z-index: 4; |
50 pointer-events: none; | |
51 } | |
1272
bc55ffaeb639
cleaned up client/src directory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
52 |
1449 | 53 .topbar { |
54 position: relative; | |
55 z-index: 2; | |
56 } | |
1272
bc55ffaeb639
cleaned up client/src directory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
57 |
1449 | 58 #app { |
2322
a25b4988eb0c
client: fixed usermanagement styles
Markus Kottlaender <markus@intevation.de>
parents:
2285
diff
changeset
|
59 height: 100%; |
a25b4988eb0c
client: fixed usermanagement styles
Markus Kottlaender <markus@intevation.de>
parents:
2285
diff
changeset
|
60 width: 100%; |
1449 | 61 font-family: "Avenir", Helvetica, Arial, sans-serif; |
62 -webkit-font-smoothing: antialiased; | |
63 -moz-osx-font-smoothing: grayscale; | |
64 text-align: center; | |
65 color: #2c3e50; | |
66 } | |
1272
bc55ffaeb639
cleaned up client/src directory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
67 </style> |
bc55ffaeb639
cleaned up client/src directory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
68 |
bc55ffaeb639
cleaned up client/src directory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
69 <script> |
1362
ca33ad696594
remove the first empyty lines
Fadi Abbud <fadi.abbud@intevation.de>
parents:
1361
diff
changeset
|
70 /* 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
|
71 * 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:
1291
diff
changeset
|
72 * |
1272
bc55ffaeb639
cleaned up client/src directory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
73 * SPDX-License-Identifier: AGPL-3.0-or-later |
bc55ffaeb639
cleaned up client/src directory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
74 * 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:
1291
diff
changeset
|
75 * |
ea3a89a1813a
remove trailing whitespace, add headers for Makefile, add the missed authors
Fadi Abbud <fadi.abbud@intevation.de>
parents:
1291
diff
changeset
|
76 * Copyright (C) 2018 by via donau |
1272
bc55ffaeb639
cleaned up client/src directory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
77 * – Österreichische Wasserstraßen-Gesellschaft mbH |
bc55ffaeb639
cleaned up client/src directory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
78 * 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:
1291
diff
changeset
|
79 * |
1272
bc55ffaeb639
cleaned up client/src directory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
80 * Author(s): |
bc55ffaeb639
cleaned up client/src directory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
81 * Thomas Junk <thomas.junk@intevation.de> |
bc55ffaeb639
cleaned up client/src directory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
82 * Markus Kottländer <markus.kottlaender@intevation.de> |
bc55ffaeb639
cleaned up client/src directory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
83 */ |
bc55ffaeb639
cleaned up client/src directory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
84 import { mapState } from "vuex"; |
bc55ffaeb639
cleaned up client/src directory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
85 |
bc55ffaeb639
cleaned up client/src directory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
86 export default { |
bc55ffaeb639
cleaned up client/src directory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
87 name: "app", |
bc55ffaeb639
cleaned up client/src directory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
88 computed: { |
bc55ffaeb639
cleaned up client/src directory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
89 ...mapState("user", ["isAuthenticated"]), |
2283
1169f18a0f11
make room for searchbar
Thomas Junk <thomas.junk@intevation.de>
parents:
1585
diff
changeset
|
90 ...mapState("application", ["contextBoxContent", "showSearchbar"]), |
2378
c69432c1c4ac
router: fixed frontend routing. renamed routes. changed display according to new route names
Thomas Junk <thomas.junk@intevation.de>
parents:
2370
diff
changeset
|
91 isMapVisible() { |
c69432c1c4ac
router: fixed frontend routing. renamed routes. changed display according to new route names
Thomas Junk <thomas.junk@intevation.de>
parents:
2370
diff
changeset
|
92 return /stretches|review|bottlenecks|mainview/.test(this.routeName); |
c69432c1c4ac
router: fixed frontend routing. renamed routes. changed display according to new route names
Thomas Junk <thomas.junk@intevation.de>
parents:
2370
diff
changeset
|
93 }, |
1272
bc55ffaeb639
cleaned up client/src directory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
94 routeName() { |
bc55ffaeb639
cleaned up client/src directory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
95 const routeName = this.$route.name; |
bc55ffaeb639
cleaned up client/src directory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
96 return routeName; |
2283
1169f18a0f11
make room for searchbar
Thomas Junk <thomas.junk@intevation.de>
parents:
1585
diff
changeset
|
97 }, |
1169f18a0f11
make room for searchbar
Thomas Junk <thomas.junk@intevation.de>
parents:
1585
diff
changeset
|
98 searchContainer() { |
1169f18a0f11
make room for searchbar
Thomas Junk <thomas.junk@intevation.de>
parents:
1585
diff
changeset
|
99 return [ |
1169f18a0f11
make room for searchbar
Thomas Junk <thomas.junk@intevation.de>
parents:
1585
diff
changeset
|
100 "ml-3", |
1169f18a0f11
make room for searchbar
Thomas Junk <thomas.junk@intevation.de>
parents:
1585
diff
changeset
|
101 { |
1169f18a0f11
make room for searchbar
Thomas Junk <thomas.junk@intevation.de>
parents:
1585
diff
changeset
|
102 wide: this.showSearchbar |
1169f18a0f11
make room for searchbar
Thomas Junk <thomas.junk@intevation.de>
parents:
1585
diff
changeset
|
103 } |
1169f18a0f11
make room for searchbar
Thomas Junk <thomas.junk@intevation.de>
parents:
1585
diff
changeset
|
104 ]; |
1272
bc55ffaeb639
cleaned up client/src directory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
105 } |
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 components: { |
1558
0ded4c56978e
refac: component filestructure. remove admin/map hierarchy
Thomas Junk <thomas.junk@intevation.de>
parents:
1480
diff
changeset
|
108 Profiles: () => import("./fairway/Profiles"), |
0ded4c56978e
refac: component filestructure. remove admin/map hierarchy
Thomas Junk <thomas.junk@intevation.de>
parents:
1480
diff
changeset
|
109 Infobar: () => import("./fairway/Infobar"), |
0ded4c56978e
refac: component filestructure. remove admin/map hierarchy
Thomas Junk <thomas.junk@intevation.de>
parents:
1480
diff
changeset
|
110 Pdftool: () => import("./Pdftool"), |
0ded4c56978e
refac: component filestructure. remove admin/map hierarchy
Thomas Junk <thomas.junk@intevation.de>
parents:
1480
diff
changeset
|
111 Zoom: () => import("./Zoom"), |
2370
7fe2f5d334dc
client: improved identify tool readability
Markus Kottlaender <markus@intevation.de>
parents:
2322
diff
changeset
|
112 Identify: () => import("./identify/Identify"), |
1558
0ded4c56978e
refac: component filestructure. remove admin/map hierarchy
Thomas Junk <thomas.junk@intevation.de>
parents:
1480
diff
changeset
|
113 Layers: () => import("./layers/Layers"), |
1272
bc55ffaeb639
cleaned up client/src directory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
114 Sidebar: () => import("./Sidebar"), |
1558
0ded4c56978e
refac: component filestructure. remove admin/map hierarchy
Thomas Junk <thomas.junk@intevation.de>
parents:
1480
diff
changeset
|
115 Search: () => import("./Search"), |
0ded4c56978e
refac: component filestructure. remove admin/map hierarchy
Thomas Junk <thomas.junk@intevation.de>
parents:
1480
diff
changeset
|
116 Contextbox: () => import("./Contextbox"), |
0ded4c56978e
refac: component filestructure. remove admin/map hierarchy
Thomas Junk <thomas.junk@intevation.de>
parents:
1480
diff
changeset
|
117 Toolbar: () => import("./toolbar/Toolbar") |
1272
bc55ffaeb639
cleaned up client/src directory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
118 } |
bc55ffaeb639
cleaned up client/src directory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
119 }; |
bc55ffaeb639
cleaned up client/src directory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
120 </script> |