This is an automated email from the git hooks/post-receive script. New commit to branch bow-v2-go in repository bow. See https://gitlab.nuiton.org/chorem/bow.git commit e467561894e860897801341f94b9c1a70cae6883 Author: Benjamin <poussin@codelutin.com> Date: Mon May 18 03:00:07 2020 +0200 ajout dans le menu le lien vers les stats --- web/src/components/layout/Sidebar.vue | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/web/src/components/layout/Sidebar.vue b/web/src/components/layout/Sidebar.vue index 0a74354..4b75544 100644 --- a/web/src/components/layout/Sidebar.vue +++ b/web/src/components/layout/Sidebar.vue @@ -9,6 +9,9 @@ <i class="icon-square-plus icon"></i> </router-link> </div> + <div v-if="user.admin"> + <a :href="statsUrl">stats</a> + </div> <div class="sidebar-menu-link"> <router-link to="/about" title="About"> <i class="icon-help icon"></i> @@ -26,9 +29,24 @@ import { Component, Vue } from 'vue-property-decorator' components: {} }) class Sidebar extends Vue { + user = {} + statsUrl = '' + add() { this.$router.push({ name: 'Edit', params: { id: 'new' } }) } + + loadData() { + console.log('loadData Header') + this.user = this.$store.get('bow-user') || {} + } + + beforeMount() { + this.statsUrl = this.$fetch.createUrl('/system/stats') + this.loadData() + this.$store.addListener('bow-user', this.loadData, this) + } + } export default Sidebar -- To stop receiving notification emails like this one, please contact chorem.org SCM administrator <admin+scm@chorem.org>.