annotate client/src/application/Userbar.vue @ 666:4c36b0e39d78

feat: prepareProfile converts geoJSON to diagram data. PrepareProfile assumes data given in geoJSON format. It extracts heigth and width information for the diagram and transposes every coordinate given relative to the first coordinate in the first set.
author Thomas Junk <thomas.junk@intevation.de>
date Tue, 18 Sep 2018 13:43:24 +0200
parents 620a65f11b33
children ca628dce90dd
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
585
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
1 <template>
629
8278b2fb0c33 refac: UI refactorization
Thomas Junk <thomas.junk@intevation.de>
parents: 626
diff changeset
2 <div>
630
855cca0142ec refac: Usermanagement now flexible sidebar layout
Thomas Junk <thomas.junk@intevation.de>
parents: 629
diff changeset
3 <img @click="extendUserMenu" class="ui-element userpic shadow" src="../application/assets/user.png">
629
8278b2fb0c33 refac: UI refactorization
Thomas Junk <thomas.junk@intevation.de>
parents: 626
diff changeset
4 <div :class="userManagementStyle">
8278b2fb0c33 refac: UI refactorization
Thomas Junk <thomas.junk@intevation.de>
parents: 626
diff changeset
5 <span v-if="!isUsermenuCollapsed" class="username align-self-center">{{ userinfo }}</span>
8278b2fb0c33 refac: UI refactorization
Thomas Junk <thomas.junk@intevation.de>
parents: 626
diff changeset
6 <span v-if="!isUsermenuCollapsed" class="logout align-self-center" @click="logoff">
8278b2fb0c33 refac: UI refactorization
Thomas Junk <thomas.junk@intevation.de>
parents: 626
diff changeset
7 <i class="fa fa-power-off"></i>
8278b2fb0c33 refac: UI refactorization
Thomas Junk <thomas.junk@intevation.de>
parents: 626
diff changeset
8 </span>
8278b2fb0c33 refac: UI refactorization
Thomas Junk <thomas.junk@intevation.de>
parents: 626
diff changeset
9 </div>
621
b17a4482d07d feat: UI adaptation of 4 slots
Thomas Junk <thomas.junk@intevation.de>
parents: 585
diff changeset
10 </div>
585
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
11 </template>
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
12
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
13 <style lang="scss">
629
8278b2fb0c33 refac: UI refactorization
Thomas Junk <thomas.junk@intevation.de>
parents: 626
diff changeset
14 .userpic {
8278b2fb0c33 refac: UI refactorization
Thomas Junk <thomas.junk@intevation.de>
parents: 626
diff changeset
15 background: white;
8278b2fb0c33 refac: UI refactorization
Thomas Junk <thomas.junk@intevation.de>
parents: 626
diff changeset
16 position: absolute;
8278b2fb0c33 refac: UI refactorization
Thomas Junk <thomas.junk@intevation.de>
parents: 626
diff changeset
17 bottom: $offset;
8278b2fb0c33 refac: UI refactorization
Thomas Junk <thomas.junk@intevation.de>
parents: 626
diff changeset
18 left: $offset;
630
855cca0142ec refac: Usermanagement now flexible sidebar layout
Thomas Junk <thomas.junk@intevation.de>
parents: 629
diff changeset
19 height: $icon-width;
855cca0142ec refac: Usermanagement now flexible sidebar layout
Thomas Junk <thomas.junk@intevation.de>
parents: 629
diff changeset
20 width: $icon-height;
629
8278b2fb0c33 refac: UI refactorization
Thomas Junk <thomas.junk@intevation.de>
parents: 626
diff changeset
21 border-radius: $border-radius;
8278b2fb0c33 refac: UI refactorization
Thomas Junk <thomas.junk@intevation.de>
parents: 626
diff changeset
22 }
8278b2fb0c33 refac: UI refactorization
Thomas Junk <thomas.junk@intevation.de>
parents: 626
diff changeset
23
8278b2fb0c33 refac: UI refactorization
Thomas Junk <thomas.junk@intevation.de>
parents: 626
diff changeset
24 .username {
8278b2fb0c33 refac: UI refactorization
Thomas Junk <thomas.junk@intevation.de>
parents: 626
diff changeset
25 margin-left: 40px;
8278b2fb0c33 refac: UI refactorization
Thomas Junk <thomas.junk@intevation.de>
parents: 626
diff changeset
26 }
8278b2fb0c33 refac: UI refactorization
Thomas Junk <thomas.junk@intevation.de>
parents: 626
diff changeset
27
585
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
28 .usermanagement {
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
29 background: white;
629
8278b2fb0c33 refac: UI refactorization
Thomas Junk <thomas.junk@intevation.de>
parents: 626
diff changeset
30 margin-left: $offset;
632
f2097d2aa048 fix: adjusted icon sizes
Thomas Junk <thomas.junk@intevation.de>
parents: 631
diff changeset
31 padding: $offset;
629
8278b2fb0c33 refac: UI refactorization
Thomas Junk <thomas.junk@intevation.de>
parents: 626
diff changeset
32 border-radius: $border-radius;
8278b2fb0c33 refac: UI refactorization
Thomas Junk <thomas.junk@intevation.de>
parents: 626
diff changeset
33 margin-bottom: $offset;
632
f2097d2aa048 fix: adjusted icon sizes
Thomas Junk <thomas.junk@intevation.de>
parents: 631
diff changeset
34 height: $icon-height;
585
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
35 }
622
47f11401d999 feat: Usermenu is now collapsible
Thomas Junk <thomas.junk@intevation.de>
parents: 621
diff changeset
36
47f11401d999 feat: Usermenu is now collapsible
Thomas Junk <thomas.junk@intevation.de>
parents: 621
diff changeset
37 .usermanagementcollapsed {
629
8278b2fb0c33 refac: UI refactorization
Thomas Junk <thomas.junk@intevation.de>
parents: 626
diff changeset
38 transition: 0.3s;
632
f2097d2aa048 fix: adjusted icon sizes
Thomas Junk <thomas.junk@intevation.de>
parents: 631
diff changeset
39 width: $icon-width;
622
47f11401d999 feat: Usermenu is now collapsible
Thomas Junk <thomas.junk@intevation.de>
parents: 621
diff changeset
40 }
47f11401d999 feat: Usermenu is now collapsible
Thomas Junk <thomas.junk@intevation.de>
parents: 621
diff changeset
41
47f11401d999 feat: Usermenu is now collapsible
Thomas Junk <thomas.junk@intevation.de>
parents: 621
diff changeset
42 .usermanagementexpanded {
631
13bccabbf7c5 fix: usermenu or sidebar trigger arrangement of user/userdetailsview
Thomas Junk <thomas.junk@intevation.de>
parents: 630
diff changeset
43 width: $sidebar-width;
622
47f11401d999 feat: Usermenu is now collapsible
Thomas Junk <thomas.junk@intevation.de>
parents: 621
diff changeset
44 }
585
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
45 </style>
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
46
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
47 <script>
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
48 import { mapGetters } from "vuex";
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
49 export default {
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
50 name: "user",
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
51 data() {
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
52 return {};
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
53 },
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
54 methods: {
622
47f11401d999 feat: Usermenu is now collapsible
Thomas Junk <thomas.junk@intevation.de>
parents: 621
diff changeset
55 extendUserMenu() {
47f11401d999 feat: Usermenu is now collapsible
Thomas Junk <thomas.junk@intevation.de>
parents: 621
diff changeset
56 this.$store.commit("application/toggleUserMenu");
47f11401d999 feat: Usermenu is now collapsible
Thomas Junk <thomas.junk@intevation.de>
parents: 621
diff changeset
57 },
585
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
58 logoff() {
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
59 this.$store.commit("user/clear_auth");
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
60 this.$store.commit("application/resetSidebar");
622
47f11401d999 feat: Usermenu is now collapsible
Thomas Junk <thomas.junk@intevation.de>
parents: 621
diff changeset
61 this.$store.commit("application/resetUserMenu");
647
620a65f11b33 fix: splitscreenoption has to be reset for logout
Thomas Junk <thomas.junk@intevation.de>
parents: 641
diff changeset
62 this.$store.commit("application/resetSplitScreen");
585
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
63 this.$router.push("/login");
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
64 }
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
65 },
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
66 computed: {
622
47f11401d999 feat: Usermenu is now collapsible
Thomas Junk <thomas.junk@intevation.de>
parents: 621
diff changeset
67 ...mapGetters("user", ["userinfo"]),
47f11401d999 feat: Usermenu is now collapsible
Thomas Junk <thomas.junk@intevation.de>
parents: 621
diff changeset
68 ...mapGetters("application", ["isUsermenuCollapsed"]),
47f11401d999 feat: Usermenu is now collapsible
Thomas Junk <thomas.junk@intevation.de>
parents: 621
diff changeset
69 userManagementStyle() {
47f11401d999 feat: Usermenu is now collapsible
Thomas Junk <thomas.junk@intevation.de>
parents: 621
diff changeset
70 return {
47f11401d999 feat: Usermenu is now collapsible
Thomas Junk <thomas.junk@intevation.de>
parents: 621
diff changeset
71 "ui-element": true,
47f11401d999 feat: Usermenu is now collapsible
Thomas Junk <thomas.junk@intevation.de>
parents: 621
diff changeset
72 "d-flex": true,
47f11401d999 feat: Usermenu is now collapsible
Thomas Junk <thomas.junk@intevation.de>
parents: 621
diff changeset
73 "flex-row": true,
47f11401d999 feat: Usermenu is now collapsible
Thomas Junk <thomas.junk@intevation.de>
parents: 621
diff changeset
74 "justify-content-around": true,
47f11401d999 feat: Usermenu is now collapsible
Thomas Junk <thomas.junk@intevation.de>
parents: 621
diff changeset
75 usermanagement: true,
47f11401d999 feat: Usermenu is now collapsible
Thomas Junk <thomas.junk@intevation.de>
parents: 621
diff changeset
76 usermanagementcollapsed: this.isUsermenuCollapsed,
47f11401d999 feat: Usermenu is now collapsible
Thomas Junk <thomas.junk@intevation.de>
parents: 621
diff changeset
77 usermanagementexpanded: !this.isUsermenuCollapsed,
47f11401d999 feat: Usermenu is now collapsible
Thomas Junk <thomas.junk@intevation.de>
parents: 621
diff changeset
78 shadow: true
47f11401d999 feat: Usermenu is now collapsible
Thomas Junk <thomas.junk@intevation.de>
parents: 621
diff changeset
79 };
47f11401d999 feat: Usermenu is now collapsible
Thomas Junk <thomas.junk@intevation.de>
parents: 621
diff changeset
80 }
585
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
81 }
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
82 };
ef307bd6b5d8 refac: restructured client application
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
83 </script>