Mercurial > gemma
annotate client/src/components/App.vue @ 2404:fd248ede0251
client: update staging area every 15s
Easy fix for issue220. More elaborated solution might come later with a complete notification system.
author | Markus Kottlaender <markus@intevation.de> |
---|---|
date | Thu, 28 Feb 2019 07:45:34 +0100 |
parents | c06b001dc26b |
children | e120631797f6 |
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> |
2384
c06b001dc26b
client: improved popup implementation
Markus Kottlaender <markus@intevation.de>
parents:
2378
diff
changeset
|
32 <Popup /> |
1361
ea3a89a1813a
remove trailing whitespace, add headers for Makefile, add the missed authors
Fadi Abbud <fadi.abbud@intevation.de>
parents:
1291
diff
changeset
|
33 </div> |
1272
bc55ffaeb639
cleaned up client/src directory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
34 </template> |
bc55ffaeb639
cleaned up client/src directory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
35 |
1449 | 36 <style lang="scss" scoped> |
2283
1169f18a0f11
make room for searchbar
Thomas Junk <thomas.junk@intevation.de>
parents:
1585
diff
changeset
|
37 .small { |
1169f18a0f11
make room for searchbar
Thomas Junk <thomas.junk@intevation.de>
parents:
1585
diff
changeset
|
38 width: $icon-width; |
1169f18a0f11
make room for searchbar
Thomas Junk <thomas.junk@intevation.de>
parents:
1585
diff
changeset
|
39 } |
1169f18a0f11
make room for searchbar
Thomas Junk <thomas.junk@intevation.de>
parents:
1585
diff
changeset
|
40 .wide { |
1169f18a0f11
make room for searchbar
Thomas Junk <thomas.junk@intevation.de>
parents:
1585
diff
changeset
|
41 width: 600px; |
1169f18a0f11
make room for searchbar
Thomas Junk <thomas.junk@intevation.de>
parents:
1585
diff
changeset
|
42 } |
1169f18a0f11
make room for searchbar
Thomas Junk <thomas.junk@intevation.de>
parents:
1585
diff
changeset
|
43 |
1449 | 44 .userinterface { |
45 position: absolute; | |
46 top: 0; | |
47 left: 0; | |
2322
a25b4988eb0c
client: fixed usermanagement styles
Markus Kottlaender <markus@intevation.de>
parents:
2285
diff
changeset
|
48 right: 0; |
a25b4988eb0c
client: fixed usermanagement styles
Markus Kottlaender <markus@intevation.de>
parents:
2285
diff
changeset
|
49 bottom: 0; |
1449 | 50 z-index: 4; |
51 pointer-events: none; | |
52 } | |
1272
bc55ffaeb639
cleaned up client/src directory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
53 |
1449 | 54 .topbar { |
55 position: relative; | |
56 z-index: 2; | |
57 } | |
1272
bc55ffaeb639
cleaned up client/src directory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
58 |
1449 | 59 #app { |
2322
a25b4988eb0c
client: fixed usermanagement styles
Markus Kottlaender <markus@intevation.de>
parents:
2285
diff
changeset
|
60 height: 100%; |
a25b4988eb0c
client: fixed usermanagement styles
Markus Kottlaender <markus@intevation.de>
parents:
2285
diff
changeset
|
61 width: 100%; |
1449 | 62 font-family: "Avenir", Helvetica, Arial, sans-serif; |
63 -webkit-font-smoothing: antialiased; | |
64 -moz-osx-font-smoothing: grayscale; | |
65 text-align: center; | |
66 color: #2c3e50; | |
67 } | |
1272
bc55ffaeb639
cleaned up client/src directory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
68 </style> |
bc55ffaeb639
cleaned up client/src directory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
69 |
bc55ffaeb639
cleaned up client/src directory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
70 <script> |
1362
ca33ad696594
remove the first empyty lines
Fadi Abbud <fadi.abbud@intevation.de>
parents:
1361
diff
changeset
|
71 /* 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
|
72 * 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
|
73 * |
1272
bc55ffaeb639
cleaned up client/src directory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
74 * SPDX-License-Identifier: AGPL-3.0-or-later |
bc55ffaeb639
cleaned up client/src directory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
75 * 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
|
76 * |
ea3a89a1813a
remove trailing whitespace, add headers for Makefile, add the missed authors
Fadi Abbud <fadi.abbud@intevation.de>
parents:
1291
diff
changeset
|
77 * Copyright (C) 2018 by via donau |
1272
bc55ffaeb639
cleaned up client/src directory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
78 * – Österreichische Wasserstraßen-Gesellschaft mbH |
bc55ffaeb639
cleaned up client/src directory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
79 * 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
|
80 * |
1272
bc55ffaeb639
cleaned up client/src directory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
81 * Author(s): |
bc55ffaeb639
cleaned up client/src directory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
82 * Thomas Junk <thomas.junk@intevation.de> |
bc55ffaeb639
cleaned up client/src directory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
83 * Markus Kottländer <markus.kottlaender@intevation.de> |
bc55ffaeb639
cleaned up client/src directory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
84 */ |
bc55ffaeb639
cleaned up client/src directory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
85 import { mapState } from "vuex"; |
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 export default { |
bc55ffaeb639
cleaned up client/src directory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
88 name: "app", |
bc55ffaeb639
cleaned up client/src directory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
89 computed: { |
bc55ffaeb639
cleaned up client/src directory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
90 ...mapState("user", ["isAuthenticated"]), |
2283
1169f18a0f11
make room for searchbar
Thomas Junk <thomas.junk@intevation.de>
parents:
1585
diff
changeset
|
91 ...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
|
92 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
|
93 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
|
94 }, |
1272
bc55ffaeb639
cleaned up client/src directory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
95 routeName() { |
bc55ffaeb639
cleaned up client/src directory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
96 const routeName = this.$route.name; |
bc55ffaeb639
cleaned up client/src directory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
97 return routeName; |
2283
1169f18a0f11
make room for searchbar
Thomas Junk <thomas.junk@intevation.de>
parents:
1585
diff
changeset
|
98 }, |
1169f18a0f11
make room for searchbar
Thomas Junk <thomas.junk@intevation.de>
parents:
1585
diff
changeset
|
99 searchContainer() { |
1169f18a0f11
make room for searchbar
Thomas Junk <thomas.junk@intevation.de>
parents:
1585
diff
changeset
|
100 return [ |
1169f18a0f11
make room for searchbar
Thomas Junk <thomas.junk@intevation.de>
parents:
1585
diff
changeset
|
101 "ml-3", |
1169f18a0f11
make room for searchbar
Thomas Junk <thomas.junk@intevation.de>
parents:
1585
diff
changeset
|
102 { |
1169f18a0f11
make room for searchbar
Thomas Junk <thomas.junk@intevation.de>
parents:
1585
diff
changeset
|
103 wide: this.showSearchbar |
1169f18a0f11
make room for searchbar
Thomas Junk <thomas.junk@intevation.de>
parents:
1585
diff
changeset
|
104 } |
1169f18a0f11
make room for searchbar
Thomas Junk <thomas.junk@intevation.de>
parents:
1585
diff
changeset
|
105 ]; |
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 }, |
bc55ffaeb639
cleaned up client/src directory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
108 components: { |
1558
0ded4c56978e
refac: component filestructure. remove admin/map hierarchy
Thomas Junk <thomas.junk@intevation.de>
parents:
1480
diff
changeset
|
109 Profiles: () => import("./fairway/Profiles"), |
0ded4c56978e
refac: component filestructure. remove admin/map hierarchy
Thomas Junk <thomas.junk@intevation.de>
parents:
1480
diff
changeset
|
110 Infobar: () => import("./fairway/Infobar"), |
0ded4c56978e
refac: component filestructure. remove admin/map hierarchy
Thomas Junk <thomas.junk@intevation.de>
parents:
1480
diff
changeset
|
111 Pdftool: () => import("./Pdftool"), |
0ded4c56978e
refac: component filestructure. remove admin/map hierarchy
Thomas Junk <thomas.junk@intevation.de>
parents:
1480
diff
changeset
|
112 Zoom: () => import("./Zoom"), |
2370
7fe2f5d334dc
client: improved identify tool readability
Markus Kottlaender <markus@intevation.de>
parents:
2322
diff
changeset
|
113 Identify: () => import("./identify/Identify"), |
1558
0ded4c56978e
refac: component filestructure. remove admin/map hierarchy
Thomas Junk <thomas.junk@intevation.de>
parents:
1480
diff
changeset
|
114 Layers: () => import("./layers/Layers"), |
1272
bc55ffaeb639
cleaned up client/src directory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
115 Sidebar: () => import("./Sidebar"), |
1558
0ded4c56978e
refac: component filestructure. remove admin/map hierarchy
Thomas Junk <thomas.junk@intevation.de>
parents:
1480
diff
changeset
|
116 Search: () => import("./Search"), |
0ded4c56978e
refac: component filestructure. remove admin/map hierarchy
Thomas Junk <thomas.junk@intevation.de>
parents:
1480
diff
changeset
|
117 Contextbox: () => import("./Contextbox"), |
2384
c06b001dc26b
client: improved popup implementation
Markus Kottlaender <markus@intevation.de>
parents:
2378
diff
changeset
|
118 Toolbar: () => import("./toolbar/Toolbar"), |
c06b001dc26b
client: improved popup implementation
Markus Kottlaender <markus@intevation.de>
parents:
2378
diff
changeset
|
119 Popup: () => import("./Popup") |
1272
bc55ffaeb639
cleaned up client/src directory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
120 } |
bc55ffaeb639
cleaned up client/src directory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
121 }; |
bc55ffaeb639
cleaned up client/src directory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
122 </script> |