Mercurial > gemma
comparison client/src/application/User.vue @ 585:ef307bd6b5d8
refac: restructured client application
To make the application more accessible for developers, the structure was reorganized.
Instead of sticking to technical terminology, the application terminology is according to the domain:
I.e. "map" contains everything regarding map (including store).
author | Thomas Junk <thomas.junk@intevation.de> |
---|---|
date | Fri, 07 Sep 2018 11:13:56 +0200 |
parents | |
children | b17a4482d07d |
comparison
equal
deleted
inserted
replaced
584:8b66a10aaf8a | 585:ef307bd6b5d8 |
---|---|
1 <template> | |
2 <div class="ui-element d-flex justify-content-around usermanagement"> | |
3 <img class="userpic" src="../application/assets/user.png"> | |
4 <span class="username align-self-center">{{ userinfo }}</span> | |
5 <span class="logout align-self-center" @click="logoff"> | |
6 <i class="fa fa-power-off"></i> | |
7 </span> | |
8 </div> | |
9 </template> | |
10 | |
11 <style lang="scss"> | |
12 .usermanagement { | |
13 background: white; | |
14 width: 150px; | |
15 padding: 0.25rem; | |
16 border-radius: 0.25rem; | |
17 } | |
18 </style> | |
19 | |
20 <script> | |
21 import { mapGetters } from "vuex"; | |
22 export default { | |
23 name: "user", | |
24 data() { | |
25 return {}; | |
26 }, | |
27 methods: { | |
28 logoff() { | |
29 this.$store.commit("user/clear_auth"); | |
30 this.$store.commit("application/resetSidebar"); | |
31 this.$router.push("/login"); | |
32 } | |
33 }, | |
34 computed: { | |
35 ...mapGetters("user", ["userinfo"]) | |
36 } | |
37 }; | |
38 </script> |