Mercurial > gemma
annotate client/src/components/App.vue @ 2549:9bf6b767a56a
client: refactored and improved splitscreen for diagrams
To make different diagrams possible, the splitscreen view needed to be decoupled from the cross profiles.
Also the style has changed to make it more consistent with the rest of the app. The standard box header
is now used and there are collapse and expand animations.
author | Markus Kottlaender <markus@intevation.de> |
---|---|
date | Fri, 08 Mar 2019 08:50:47 +0100 |
parents | bb5286acfee2 |
children | 2d2b7fdc0c01 |
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"> |
2534
bb5286acfee2
client: reduced spacings between and inside boxes and more compact main menu
Markus Kottlaender <markus@intevation.de>
parents:
2440
diff
changeset
|
4 <div class="topbar d-flex pt-2 mx-2"> |
1361
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> |
2549
9bf6b767a56a
client: refactored and improved splitscreen for diagrams
Markus Kottlaender <markus@intevation.de>
parents:
2534
diff
changeset
|
29 <Splitscreen /> |
1272
bc55ffaeb639
cleaned up client/src directory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
30 </div> |
1480 | 31 <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
|
32 <vue-snotify></vue-snotify> |
2384
c06b001dc26b
client: improved popup implementation
Markus Kottlaender <markus@intevation.de>
parents:
2378
diff
changeset
|
33 <Popup /> |
1361
ea3a89a1813a
remove trailing whitespace, add headers for Makefile, add the missed authors
Fadi Abbud <fadi.abbud@intevation.de>
parents:
1291
diff
changeset
|
34 </div> |
1272
bc55ffaeb639
cleaned up client/src directory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
35 </template> |
bc55ffaeb639
cleaned up client/src directory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
36 |
1449 | 37 <style lang="scss" scoped> |
38 .userinterface { | |
39 position: absolute; | |
40 top: 0; | |
41 left: 0; | |
2322
a25b4988eb0c
client: fixed usermanagement styles
Markus Kottlaender <markus@intevation.de>
parents:
2285
diff
changeset
|
42 right: 0; |
a25b4988eb0c
client: fixed usermanagement styles
Markus Kottlaender <markus@intevation.de>
parents:
2285
diff
changeset
|
43 bottom: 0; |
1449 | 44 z-index: 4; |
45 pointer-events: none; | |
46 } | |
1272
bc55ffaeb639
cleaned up client/src directory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
47 |
1449 | 48 .topbar { |
49 position: relative; | |
50 z-index: 2; | |
51 } | |
1272
bc55ffaeb639
cleaned up client/src directory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
52 |
1449 | 53 #app { |
2322
a25b4988eb0c
client: fixed usermanagement styles
Markus Kottlaender <markus@intevation.de>
parents:
2285
diff
changeset
|
54 height: 100%; |
a25b4988eb0c
client: fixed usermanagement styles
Markus Kottlaender <markus@intevation.de>
parents:
2285
diff
changeset
|
55 width: 100%; |
1449 | 56 font-family: "Avenir", Helvetica, Arial, sans-serif; |
57 -webkit-font-smoothing: antialiased; | |
58 -moz-osx-font-smoothing: grayscale; | |
59 text-align: center; | |
60 color: #2c3e50; | |
61 } | |
1272
bc55ffaeb639
cleaned up client/src directory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
62 </style> |
bc55ffaeb639
cleaned up client/src directory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
63 |
bc55ffaeb639
cleaned up client/src directory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
64 <script> |
1362
ca33ad696594
remove the first empyty lines
Fadi Abbud <fadi.abbud@intevation.de>
parents:
1361
diff
changeset
|
65 /* 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
|
66 * 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
|
67 * |
1272
bc55ffaeb639
cleaned up client/src directory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
68 * SPDX-License-Identifier: AGPL-3.0-or-later |
bc55ffaeb639
cleaned up client/src directory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
69 * 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
|
70 * |
ea3a89a1813a
remove trailing whitespace, add headers for Makefile, add the missed authors
Fadi Abbud <fadi.abbud@intevation.de>
parents:
1291
diff
changeset
|
71 * Copyright (C) 2018 by via donau |
1272
bc55ffaeb639
cleaned up client/src directory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
72 * – Österreichische Wasserstraßen-Gesellschaft mbH |
bc55ffaeb639
cleaned up client/src directory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
73 * 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
|
74 * |
1272
bc55ffaeb639
cleaned up client/src directory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
75 * Author(s): |
bc55ffaeb639
cleaned up client/src directory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
76 * Thomas Junk <thomas.junk@intevation.de> |
bc55ffaeb639
cleaned up client/src directory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
77 * Markus Kottländer <markus.kottlaender@intevation.de> |
bc55ffaeb639
cleaned up client/src directory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
78 */ |
bc55ffaeb639
cleaned up client/src directory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
79 import { mapState } from "vuex"; |
bc55ffaeb639
cleaned up client/src directory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
80 |
bc55ffaeb639
cleaned up client/src directory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
81 export default { |
bc55ffaeb639
cleaned up client/src directory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
82 name: "app", |
bc55ffaeb639
cleaned up client/src directory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
83 computed: { |
bc55ffaeb639
cleaned up client/src directory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
84 ...mapState("user", ["isAuthenticated"]), |
2283
1169f18a0f11
make room for searchbar
Thomas Junk <thomas.junk@intevation.de>
parents:
1585
diff
changeset
|
85 ...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
|
86 isMapVisible() { |
2399 | 87 return /importoverview|stretches|review|bottlenecks|mainview/.test( |
88 this.routeName | |
89 ); | |
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
|
90 }, |
1272
bc55ffaeb639
cleaned up client/src directory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
91 routeName() { |
bc55ffaeb639
cleaned up client/src directory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
92 const routeName = this.$route.name; |
bc55ffaeb639
cleaned up client/src directory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
93 return routeName; |
2283
1169f18a0f11
make room for searchbar
Thomas Junk <thomas.junk@intevation.de>
parents:
1585
diff
changeset
|
94 }, |
1169f18a0f11
make room for searchbar
Thomas Junk <thomas.junk@intevation.de>
parents:
1585
diff
changeset
|
95 searchContainer() { |
1169f18a0f11
make room for searchbar
Thomas Junk <thomas.junk@intevation.de>
parents:
1585
diff
changeset
|
96 return [ |
2534
bb5286acfee2
client: reduced spacings between and inside boxes and more compact main menu
Markus Kottlaender <markus@intevation.de>
parents:
2440
diff
changeset
|
97 "ml-2", |
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 wide: this.showSearchbar |
1169f18a0f11
make room for searchbar
Thomas Junk <thomas.junk@intevation.de>
parents:
1585
diff
changeset
|
100 } |
1169f18a0f11
make room for searchbar
Thomas Junk <thomas.junk@intevation.de>
parents:
1585
diff
changeset
|
101 ]; |
1272
bc55ffaeb639
cleaned up client/src directory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
102 } |
bc55ffaeb639
cleaned up client/src directory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
103 }, |
bc55ffaeb639
cleaned up client/src directory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
104 components: { |
1558
0ded4c56978e
refac: component filestructure. remove admin/map hierarchy
Thomas Junk <thomas.junk@intevation.de>
parents:
1480
diff
changeset
|
105 Profiles: () => import("./fairway/Profiles"), |
0ded4c56978e
refac: component filestructure. remove admin/map hierarchy
Thomas Junk <thomas.junk@intevation.de>
parents:
1480
diff
changeset
|
106 Infobar: () => import("./fairway/Infobar"), |
0ded4c56978e
refac: component filestructure. remove admin/map hierarchy
Thomas Junk <thomas.junk@intevation.de>
parents:
1480
diff
changeset
|
107 Pdftool: () => import("./Pdftool"), |
0ded4c56978e
refac: component filestructure. remove admin/map hierarchy
Thomas Junk <thomas.junk@intevation.de>
parents:
1480
diff
changeset
|
108 Zoom: () => import("./Zoom"), |
2370
7fe2f5d334dc
client: improved identify tool readability
Markus Kottlaender <markus@intevation.de>
parents:
2322
diff
changeset
|
109 Identify: () => import("./identify/Identify"), |
1558
0ded4c56978e
refac: component filestructure. remove admin/map hierarchy
Thomas Junk <thomas.junk@intevation.de>
parents:
1480
diff
changeset
|
110 Layers: () => import("./layers/Layers"), |
1272
bc55ffaeb639
cleaned up client/src directory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
111 Sidebar: () => import("./Sidebar"), |
1558
0ded4c56978e
refac: component filestructure. remove admin/map hierarchy
Thomas Junk <thomas.junk@intevation.de>
parents:
1480
diff
changeset
|
112 Search: () => import("./Search"), |
0ded4c56978e
refac: component filestructure. remove admin/map hierarchy
Thomas Junk <thomas.junk@intevation.de>
parents:
1480
diff
changeset
|
113 Contextbox: () => import("./Contextbox"), |
2384
c06b001dc26b
client: improved popup implementation
Markus Kottlaender <markus@intevation.de>
parents:
2378
diff
changeset
|
114 Toolbar: () => import("./toolbar/Toolbar"), |
2549
9bf6b767a56a
client: refactored and improved splitscreen for diagrams
Markus Kottlaender <markus@intevation.de>
parents:
2534
diff
changeset
|
115 Popup: () => import("./Popup"), |
9bf6b767a56a
client: refactored and improved splitscreen for diagrams
Markus Kottlaender <markus@intevation.de>
parents:
2534
diff
changeset
|
116 Splitscreen: () => import("./Splitscreen") |
1272
bc55ffaeb639
cleaned up client/src directory
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
117 } |
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 </script> |