Mercurial > gemma
view 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 |
line wrap: on
line source
<template> <div class="ui-element d-flex justify-content-around usermanagement"> <img class="userpic" src="../application/assets/user.png"> <span class="username align-self-center">{{ userinfo }}</span> <span class="logout align-self-center" @click="logoff"> <i class="fa fa-power-off"></i> </span> </div> </template> <style lang="scss"> .usermanagement { background: white; width: 150px; padding: 0.25rem; border-radius: 0.25rem; } </style> <script> import { mapGetters } from "vuex"; export default { name: "user", data() { return {}; }, methods: { logoff() { this.$store.commit("user/clear_auth"); this.$store.commit("application/resetSidebar"); this.$router.push("/login"); } }, computed: { ...mapGetters("user", ["userinfo"]) } }; </script>