annotate client/src/components/App.vue @ 2370:7fe2f5d334dc

client: improved identify tool readability There's now a formatter.js which can be used to format labels and values or to remove information that is not needed.
author Markus Kottlaender <markus@intevation.de>
date Thu, 21 Feb 2019 14:57:04 +0100
parents a25b4988eb0c
children c69432c1c4ac
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: 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">
1361
ea3a89a1813a remove trailing whitespace, add headers for Makefile, add the missed authors
Fadi Abbud <fadi.abbud@intevation.de>
parents: 1291
diff changeset
8 <Search v-if="routeName == 'mainview'"></Search>
ea3a89a1813a remove trailing whitespace, add headers for Makefile, add the missed authors
Fadi Abbud <fadi.abbud@intevation.de>
parents: 1291
diff changeset
9 <Contextbox v-if="routeName == 'mainview'"></Contextbox>
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">
1372
553aadd97087 new cross profile workflow (WIP)
Markus Kottlaender <markus@intevation.de>
parents: 1368
diff changeset
14 <Profiles v-if="routeName == 'mainview'"></Profiles>
553aadd97087 new cross profile workflow (WIP)
Markus Kottlaender <markus@intevation.de>
parents: 1368
diff changeset
15 <Pdftool v-if="routeName == 'mainview'"></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">
ea3a89a1813a remove trailing whitespace, add headers for Makefile, add the missed authors
Fadi Abbud <fadi.abbud@intevation.de>
parents: 1291
diff changeset
18 <Identify v-if="routeName == 'mainview'"></Identify>
1372
553aadd97087 new cross profile workflow (WIP)
Markus Kottlaender <markus@intevation.de>
parents: 1368
diff changeset
19 <Layers v-if="routeName == 'mainview'"></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>
ea3a89a1813a remove trailing whitespace, add headers for Makefile, add the missed authors
Fadi Abbud <fadi.abbud@intevation.de>
parents: 1291
diff changeset
21 <Toolbar v-if="routeName == 'mainview'"></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">
ea3a89a1813a remove trailing whitespace, add headers for Makefile, add the missed authors
Fadi Abbud <fadi.abbud@intevation.de>
parents: 1291
diff changeset
26 <Infobar v-if="routeName == 'mainview'"></Infobar>
ea3a89a1813a remove trailing whitespace, add headers for Makefile, add the missed authors
Fadi Abbud <fadi.abbud@intevation.de>
parents: 1291
diff changeset
27 </div>
ea3a89a1813a remove trailing whitespace, add headers for Makefile, add the missed authors
Fadi Abbud <fadi.abbud@intevation.de>
parents: 1291
diff changeset
28 <Zoom v-if="routeName == 'mainview'"></Zoom>
1272
bc55ffaeb639 cleaned up client/src directory
Markus Kottlaender <markus@intevation.de>
parents:
diff changeset
29 </div>
1480
9b81ac91a43e fix: linting
Thomas Junk <thomas.junk@intevation.de>
parents: 1449
diff changeset
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
bb47531bdd22 sass to scss
Thomas Junk <thomas.junk@intevation.de>
parents: 1372
diff changeset
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
bb47531bdd22 sass to scss
Thomas Junk <thomas.junk@intevation.de>
parents: 1372
diff changeset
43 .userinterface {
bb47531bdd22 sass to scss
Thomas Junk <thomas.junk@intevation.de>
parents: 1372
diff changeset
44 position: absolute;
bb47531bdd22 sass to scss
Thomas Junk <thomas.junk@intevation.de>
parents: 1372
diff changeset
45 top: 0;
bb47531bdd22 sass to scss
Thomas Junk <thomas.junk@intevation.de>
parents: 1372
diff changeset
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
bb47531bdd22 sass to scss
Thomas Junk <thomas.junk@intevation.de>
parents: 1372
diff changeset
49 z-index: 4;
bb47531bdd22 sass to scss
Thomas Junk <thomas.junk@intevation.de>
parents: 1372
diff changeset
50 pointer-events: none;
bb47531bdd22 sass to scss
Thomas Junk <thomas.junk@intevation.de>
parents: 1372
diff changeset
51 }
1272
bc55ffaeb639 cleaned up client/src directory
Markus Kottlaender <markus@intevation.de>
parents:
diff changeset
52
1449
bb47531bdd22 sass to scss
Thomas Junk <thomas.junk@intevation.de>
parents: 1372
diff changeset
53 .topbar {
bb47531bdd22 sass to scss
Thomas Junk <thomas.junk@intevation.de>
parents: 1372
diff changeset
54 position: relative;
bb47531bdd22 sass to scss
Thomas Junk <thomas.junk@intevation.de>
parents: 1372
diff changeset
55 z-index: 2;
bb47531bdd22 sass to scss
Thomas Junk <thomas.junk@intevation.de>
parents: 1372
diff changeset
56 }
1272
bc55ffaeb639 cleaned up client/src directory
Markus Kottlaender <markus@intevation.de>
parents:
diff changeset
57
1449
bb47531bdd22 sass to scss
Thomas Junk <thomas.junk@intevation.de>
parents: 1372
diff changeset
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
bb47531bdd22 sass to scss
Thomas Junk <thomas.junk@intevation.de>
parents: 1372
diff changeset
61 font-family: "Avenir", Helvetica, Arial, sans-serif;
bb47531bdd22 sass to scss
Thomas Junk <thomas.junk@intevation.de>
parents: 1372
diff changeset
62 -webkit-font-smoothing: antialiased;
bb47531bdd22 sass to scss
Thomas Junk <thomas.junk@intevation.de>
parents: 1372
diff changeset
63 -moz-osx-font-smoothing: grayscale;
bb47531bdd22 sass to scss
Thomas Junk <thomas.junk@intevation.de>
parents: 1372
diff changeset
64 text-align: center;
bb47531bdd22 sass to scss
Thomas Junk <thomas.junk@intevation.de>
parents: 1372
diff changeset
65 color: #2c3e50;
bb47531bdd22 sass to scss
Thomas Junk <thomas.junk@intevation.de>
parents: 1372
diff changeset
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"]),
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 [
1169f18a0f11 make room for searchbar
Thomas Junk <thomas.junk@intevation.de>
parents: 1585
diff changeset
97 "ml-3",
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"),
0ded4c56978e refac: component filestructure. remove admin/map hierarchy
Thomas Junk <thomas.junk@intevation.de>
parents: 1480
diff changeset
114 Toolbar: () => import("./toolbar/Toolbar")
1272
bc55ffaeb639 cleaned up client/src directory
Markus Kottlaender <markus@intevation.de>
parents:
diff changeset
115 }
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>