Mercurial > gemma
annotate client/src/components/App.vue @ 2442:9b7138751f5b
staging: layout logs
author | Thomas Junk <thomas.junk@intevation.de> |
---|---|
date | Fri, 01 Mar 2019 12:07:34 +0100 |
parents | 999bb511ef67 |
children | bb5286acfee2 |
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 |
1449 | 41 .userinterface { |
42 position: absolute; | |
43 top: 0; | |
44 left: 0; | |
2322
a25b4988eb0c
client: fixed usermanagement styles
Markus Kottlaender <markus@intevation.de>
parents:
2285
diff
changeset
|
45 right: 0; |
a25b4988eb0c
client: fixed usermanagement styles
Markus Kottlaender <markus@intevation.de>
parents:
2285
diff
changeset
|
46 bottom: 0; |
1449 | 47 z-index: 4; |
48 pointer-events: none; | |
49 } | |
1272
bc55ffaeb639
cleaned up client/src directory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
50 |
1449 | 51 .topbar { |
52 position: relative; | |
53 z-index: 2; | |
54 } | |
1272
bc55ffaeb639
cleaned up client/src directory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
55 |
1449 | 56 #app { |
2322
a25b4988eb0c
client: fixed usermanagement styles
Markus Kottlaender <markus@intevation.de>
parents:
2285
diff
changeset
|
57 height: 100%; |
a25b4988eb0c
client: fixed usermanagement styles
Markus Kottlaender <markus@intevation.de>
parents:
2285
diff
changeset
|
58 width: 100%; |
1449 | 59 font-family: "Avenir", Helvetica, Arial, sans-serif; |
60 -webkit-font-smoothing: antialiased; | |
61 -moz-osx-font-smoothing: grayscale; | |
62 text-align: center; | |
63 color: #2c3e50; | |
64 } | |
1272
bc55ffaeb639
cleaned up client/src directory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
65 </style> |
bc55ffaeb639
cleaned up client/src directory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
66 |
bc55ffaeb639
cleaned up client/src directory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
67 <script> |
1362
ca33ad696594
remove the first empyty lines
Fadi Abbud <fadi.abbud@intevation.de>
parents:
1361
diff
changeset
|
68 /* 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
|
69 * 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
|
70 * |
1272
bc55ffaeb639
cleaned up client/src directory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
71 * SPDX-License-Identifier: AGPL-3.0-or-later |
bc55ffaeb639
cleaned up client/src directory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
72 * 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
|
73 * |
ea3a89a1813a
remove trailing whitespace, add headers for Makefile, add the missed authors
Fadi Abbud <fadi.abbud@intevation.de>
parents:
1291
diff
changeset
|
74 * Copyright (C) 2018 by via donau |
1272
bc55ffaeb639
cleaned up client/src directory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
75 * – Österreichische Wasserstraßen-Gesellschaft mbH |
bc55ffaeb639
cleaned up client/src directory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
76 * 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
|
77 * |
1272
bc55ffaeb639
cleaned up client/src directory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
78 * Author(s): |
bc55ffaeb639
cleaned up client/src directory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
79 * Thomas Junk <thomas.junk@intevation.de> |
bc55ffaeb639
cleaned up client/src directory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
80 * Markus Kottländer <markus.kottlaender@intevation.de> |
bc55ffaeb639
cleaned up client/src directory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
81 */ |
bc55ffaeb639
cleaned up client/src directory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
82 import { mapState } from "vuex"; |
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 export default { |
bc55ffaeb639
cleaned up client/src directory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
85 name: "app", |
bc55ffaeb639
cleaned up client/src directory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
86 computed: { |
bc55ffaeb639
cleaned up client/src directory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
87 ...mapState("user", ["isAuthenticated"]), |
2283
1169f18a0f11
make room for searchbar
Thomas Junk <thomas.junk@intevation.de>
parents:
1585
diff
changeset
|
88 ...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
|
89 isMapVisible() { |
2399 | 90 return /importoverview|stretches|review|bottlenecks|mainview/.test( |
91 this.routeName | |
92 ); | |
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
|
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"), |
2384
c06b001dc26b
client: improved popup implementation
Markus Kottlaender <markus@intevation.de>
parents:
2378
diff
changeset
|
117 Toolbar: () => import("./toolbar/Toolbar"), |
c06b001dc26b
client: improved popup implementation
Markus Kottlaender <markus@intevation.de>
parents:
2378
diff
changeset
|
118 Popup: () => import("./Popup") |
1272
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 }; |
bc55ffaeb639
cleaned up client/src directory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
121 </script> |