annotate client/src/components/Contextbox.vue @ 1701:f4bd67daaaff

feat: force login on invalid session Redirect user to login when session becomes invalid. Prototypical implementation for importqueue.
author Thomas Junk <thomas.junk@intevation.de>
date Mon, 07 Jan 2019 12:13:52 +0100
parents de4e4dcb8f87
children 67340ceecc5f
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1276
aec9ed491dad more cleanup in client/src
Markus Kottlaender <markus@intevation.de>
parents:
diff changeset
1 <template>
1362
ca33ad696594 remove the first empyty lines
Fadi Abbud <fadi.abbud@intevation.de>
parents: 1299
diff changeset
2 <div :class="style">
ca33ad696594 remove the first empyty lines
Fadi Abbud <fadi.abbud@intevation.de>
parents: 1299
diff changeset
3 <div @click="close" class="ui-element close-contextbox text-muted">
ca33ad696594 remove the first empyty lines
Fadi Abbud <fadi.abbud@intevation.de>
parents: 1299
diff changeset
4 <font-awesome-icon icon="times"></font-awesome-icon>
1276
aec9ed491dad more cleanup in client/src
Markus Kottlaender <markus@intevation.de>
parents:
diff changeset
5 </div>
1362
ca33ad696594 remove the first empyty lines
Fadi Abbud <fadi.abbud@intevation.de>
parents: 1299
diff changeset
6 <Bottlenecks v-if="contextBoxContent === 'bottlenecks'"></Bottlenecks>
ca33ad696594 remove the first empyty lines
Fadi Abbud <fadi.abbud@intevation.de>
parents: 1299
diff changeset
7 <Staging v-if="contextBoxContent === 'staging'"></Staging>
ca33ad696594 remove the first empyty lines
Fadi Abbud <fadi.abbud@intevation.de>
parents: 1299
diff changeset
8 </div>
1276
aec9ed491dad more cleanup in client/src
Markus Kottlaender <markus@intevation.de>
parents:
diff changeset
9 </template>
aec9ed491dad more cleanup in client/src
Markus Kottlaender <markus@intevation.de>
parents:
diff changeset
10
aec9ed491dad more cleanup in client/src
Markus Kottlaender <markus@intevation.de>
parents:
diff changeset
11 <script>
1362
ca33ad696594 remove the first empyty lines
Fadi Abbud <fadi.abbud@intevation.de>
parents: 1299
diff changeset
12 /* This is Free Software under GNU Affero General Public License v >= 3.0
1276
aec9ed491dad more cleanup in client/src
Markus Kottlaender <markus@intevation.de>
parents:
diff changeset
13 * without warranty, see README.md and license for details.
aec9ed491dad more cleanup in client/src
Markus Kottlaender <markus@intevation.de>
parents:
diff changeset
14 *
aec9ed491dad more cleanup in client/src
Markus Kottlaender <markus@intevation.de>
parents:
diff changeset
15 * SPDX-License-Identifier: AGPL-3.0-or-later
aec9ed491dad more cleanup in client/src
Markus Kottlaender <markus@intevation.de>
parents:
diff changeset
16 * License-Filename: LICENSES/AGPL-3.0.txt
aec9ed491dad more cleanup in client/src
Markus Kottlaender <markus@intevation.de>
parents:
diff changeset
17 *
aec9ed491dad more cleanup in client/src
Markus Kottlaender <markus@intevation.de>
parents:
diff changeset
18 * Copyright (C) 2018 by via donau
aec9ed491dad more cleanup in client/src
Markus Kottlaender <markus@intevation.de>
parents:
diff changeset
19 * – Österreichische Wasserstraßen-Gesellschaft mbH
aec9ed491dad more cleanup in client/src
Markus Kottlaender <markus@intevation.de>
parents:
diff changeset
20 * Software engineering by Intevation GmbH
aec9ed491dad more cleanup in client/src
Markus Kottlaender <markus@intevation.de>
parents:
diff changeset
21 *
aec9ed491dad more cleanup in client/src
Markus Kottlaender <markus@intevation.de>
parents:
diff changeset
22 * Author(s):
aec9ed491dad more cleanup in client/src
Markus Kottlaender <markus@intevation.de>
parents:
diff changeset
23 * Markus Kottländer <markus.kottlaender@intevation.de>
aec9ed491dad more cleanup in client/src
Markus Kottlaender <markus@intevation.de>
parents:
diff changeset
24 */
aec9ed491dad more cleanup in client/src
Markus Kottlaender <markus@intevation.de>
parents:
diff changeset
25 import { mapState } from "vuex";
aec9ed491dad more cleanup in client/src
Markus Kottlaender <markus@intevation.de>
parents:
diff changeset
26
aec9ed491dad more cleanup in client/src
Markus Kottlaender <markus@intevation.de>
parents:
diff changeset
27 export default {
aec9ed491dad more cleanup in client/src
Markus Kottlaender <markus@intevation.de>
parents:
diff changeset
28 name: "contextbox",
aec9ed491dad more cleanup in client/src
Markus Kottlaender <markus@intevation.de>
parents:
diff changeset
29 components: {
aec9ed491dad more cleanup in client/src
Markus Kottlaender <markus@intevation.de>
parents:
diff changeset
30 Bottlenecks: () => import("./Bottlenecks"),
1612
b5061deb9ab9 refac: move staging area to separate folder
Thomas Junk <thomas.junk@intevation.de>
parents: 1607
diff changeset
31 Staging: () => import("./staging/Staging.vue")
1276
aec9ed491dad more cleanup in client/src
Markus Kottlaender <markus@intevation.de>
parents:
diff changeset
32 },
aec9ed491dad more cleanup in client/src
Markus Kottlaender <markus@intevation.de>
parents:
diff changeset
33 computed: {
1282
a7dd8a3356fc fixed contextBox animations
Markus Kottlaender <markus@intevation.de>
parents: 1278
diff changeset
34 ...mapState("application", [
a7dd8a3356fc fixed contextBox animations
Markus Kottlaender <markus@intevation.de>
parents: 1278
diff changeset
35 "showSearchbarLastState",
a7dd8a3356fc fixed contextBox animations
Markus Kottlaender <markus@intevation.de>
parents: 1278
diff changeset
36 "contextBoxContent",
a7dd8a3356fc fixed contextBox animations
Markus Kottlaender <markus@intevation.de>
parents: 1278
diff changeset
37 "showContextBox"
a7dd8a3356fc fixed contextBox animations
Markus Kottlaender <markus@intevation.de>
parents: 1278
diff changeset
38 ]),
1276
aec9ed491dad more cleanup in client/src
Markus Kottlaender <markus@intevation.de>
parents:
diff changeset
39 style() {
aec9ed491dad more cleanup in client/src
Markus Kottlaender <markus@intevation.de>
parents:
diff changeset
40 return [
1282
a7dd8a3356fc fixed contextBox animations
Markus Kottlaender <markus@intevation.de>
parents: 1278
diff changeset
41 "ui-element shadow-xs contextbox",
1276
aec9ed491dad more cleanup in client/src
Markus Kottlaender <markus@intevation.de>
parents:
diff changeset
42 {
1282
a7dd8a3356fc fixed contextBox animations
Markus Kottlaender <markus@intevation.de>
parents: 1278
diff changeset
43 contextboxcollapsed: !this.showContextBox,
a7dd8a3356fc fixed contextBox animations
Markus Kottlaender <markus@intevation.de>
parents: 1278
diff changeset
44 contextboxextended: this.showContextBox,
a7dd8a3356fc fixed contextBox animations
Markus Kottlaender <markus@intevation.de>
parents: 1278
diff changeset
45 "rounded-bottom": this.contextBoxContent !== "imports",
a7dd8a3356fc fixed contextBox animations
Markus Kottlaender <markus@intevation.de>
parents: 1278
diff changeset
46 rounded: this.contextBoxContent === "imports"
1276
aec9ed491dad more cleanup in client/src
Markus Kottlaender <markus@intevation.de>
parents:
diff changeset
47 }
aec9ed491dad more cleanup in client/src
Markus Kottlaender <markus@intevation.de>
parents:
diff changeset
48 ];
aec9ed491dad more cleanup in client/src
Markus Kottlaender <markus@intevation.de>
parents:
diff changeset
49 }
aec9ed491dad more cleanup in client/src
Markus Kottlaender <markus@intevation.de>
parents:
diff changeset
50 },
aec9ed491dad more cleanup in client/src
Markus Kottlaender <markus@intevation.de>
parents:
diff changeset
51 methods: {
aec9ed491dad more cleanup in client/src
Markus Kottlaender <markus@intevation.de>
parents:
diff changeset
52 close() {
1282
a7dd8a3356fc fixed contextBox animations
Markus Kottlaender <markus@intevation.de>
parents: 1278
diff changeset
53 this.$store.commit("application/showContextBox", false);
1276
aec9ed491dad more cleanup in client/src
Markus Kottlaender <markus@intevation.de>
parents:
diff changeset
54 this.$store.commit(
aec9ed491dad more cleanup in client/src
Markus Kottlaender <markus@intevation.de>
parents:
diff changeset
55 "application/showSearchbar",
aec9ed491dad more cleanup in client/src
Markus Kottlaender <markus@intevation.de>
parents:
diff changeset
56 this.showSearchbarLastState
aec9ed491dad more cleanup in client/src
Markus Kottlaender <markus@intevation.de>
parents:
diff changeset
57 );
aec9ed491dad more cleanup in client/src
Markus Kottlaender <markus@intevation.de>
parents:
diff changeset
58 }
aec9ed491dad more cleanup in client/src
Markus Kottlaender <markus@intevation.de>
parents:
diff changeset
59 }
aec9ed491dad more cleanup in client/src
Markus Kottlaender <markus@intevation.de>
parents:
diff changeset
60 };
aec9ed491dad more cleanup in client/src
Markus Kottlaender <markus@intevation.de>
parents:
diff changeset
61 </script>
aec9ed491dad more cleanup in client/src
Markus Kottlaender <markus@intevation.de>
parents:
diff changeset
62
1449
bb47531bdd22 sass to scss
Thomas Junk <thomas.junk@intevation.de>
parents: 1403
diff changeset
63 <style lang="scss" scoped>
bb47531bdd22 sass to scss
Thomas Junk <thomas.junk@intevation.de>
parents: 1403
diff changeset
64 .contextbox {
bb47531bdd22 sass to scss
Thomas Junk <thomas.junk@intevation.de>
parents: 1403
diff changeset
65 position: relative;
bb47531bdd22 sass to scss
Thomas Junk <thomas.junk@intevation.de>
parents: 1403
diff changeset
66 background-color: #ffffff;
bb47531bdd22 sass to scss
Thomas Junk <thomas.junk@intevation.de>
parents: 1403
diff changeset
67 opacity: $slight-transparent;
bb47531bdd22 sass to scss
Thomas Junk <thomas.junk@intevation.de>
parents: 1403
diff changeset
68 transition: max-width 0.3s, max-height 0.3s;
bb47531bdd22 sass to scss
Thomas Junk <thomas.junk@intevation.de>
parents: 1403
diff changeset
69 overflow: hidden;
bb47531bdd22 sass to scss
Thomas Junk <thomas.junk@intevation.de>
parents: 1403
diff changeset
70 background: #fff;
bb47531bdd22 sass to scss
Thomas Junk <thomas.junk@intevation.de>
parents: 1403
diff changeset
71 }
bb47531bdd22 sass to scss
Thomas Junk <thomas.junk@intevation.de>
parents: 1403
diff changeset
72 .contextbox > div:last-child {
bb47531bdd22 sass to scss
Thomas Junk <thomas.junk@intevation.de>
parents: 1403
diff changeset
73 width: 600px;
bb47531bdd22 sass to scss
Thomas Junk <thomas.junk@intevation.de>
parents: 1403
diff changeset
74 }
1276
aec9ed491dad more cleanup in client/src
Markus Kottlaender <markus@intevation.de>
parents:
diff changeset
75
1449
bb47531bdd22 sass to scss
Thomas Junk <thomas.junk@intevation.de>
parents: 1403
diff changeset
76 .contextboxcollapsed {
bb47531bdd22 sass to scss
Thomas Junk <thomas.junk@intevation.de>
parents: 1403
diff changeset
77 max-width: 0;
bb47531bdd22 sass to scss
Thomas Junk <thomas.junk@intevation.de>
parents: 1403
diff changeset
78 max-height: 0;
bb47531bdd22 sass to scss
Thomas Junk <thomas.junk@intevation.de>
parents: 1403
diff changeset
79 }
1276
aec9ed491dad more cleanup in client/src
Markus Kottlaender <markus@intevation.de>
parents:
diff changeset
80
1449
bb47531bdd22 sass to scss
Thomas Junk <thomas.junk@intevation.de>
parents: 1403
diff changeset
81 .contextboxextended {
1625
de4e4dcb8f87 staging area: implemented details and zoom to bbox
Thomas Junk <thomas.junk@intevation.de>
parents: 1612
diff changeset
82 max-width: 700px;
1449
bb47531bdd22 sass to scss
Thomas Junk <thomas.junk@intevation.de>
parents: 1403
diff changeset
83 max-height: 640px;
bb47531bdd22 sass to scss
Thomas Junk <thomas.junk@intevation.de>
parents: 1403
diff changeset
84 }
1276
aec9ed491dad more cleanup in client/src
Markus Kottlaender <markus@intevation.de>
parents:
diff changeset
85
1449
bb47531bdd22 sass to scss
Thomas Junk <thomas.junk@intevation.de>
parents: 1403
diff changeset
86 .close-contextbox {
bb47531bdd22 sass to scss
Thomas Junk <thomas.junk@intevation.de>
parents: 1403
diff changeset
87 position: absolute;
bb47531bdd22 sass to scss
Thomas Junk <thomas.junk@intevation.de>
parents: 1403
diff changeset
88 z-index: 2;
bb47531bdd22 sass to scss
Thomas Junk <thomas.junk@intevation.de>
parents: 1403
diff changeset
89 right: 0;
bb47531bdd22 sass to scss
Thomas Junk <thomas.junk@intevation.de>
parents: 1403
diff changeset
90 top: 7px;
bb47531bdd22 sass to scss
Thomas Junk <thomas.junk@intevation.de>
parents: 1403
diff changeset
91 height: $icon-width;
bb47531bdd22 sass to scss
Thomas Junk <thomas.junk@intevation.de>
parents: 1403
diff changeset
92 width: $icon-height;
bb47531bdd22 sass to scss
Thomas Junk <thomas.junk@intevation.de>
parents: 1403
diff changeset
93 }
1276
aec9ed491dad more cleanup in client/src
Markus Kottlaender <markus@intevation.de>
parents:
diff changeset
94 </style>