slight changes to Profile.vue to display role, groups, etc.
This commit is contained in:
@@ -88,6 +88,7 @@
|
||||
});
|
||||
EventBus.$on('storedTokens', () => {
|
||||
this.$store.dispatch('loadUsers');
|
||||
this.$store.dispatch('loadProfile');
|
||||
});
|
||||
|
||||
this.$store.dispatch('loadLoginProviders');
|
||||
|
||||
@@ -39,12 +39,15 @@
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<hr/>
|
||||
|
||||
<p><strong>{{$t('first_name')}}: </strong>{{profile.first_name}}</p>
|
||||
<p><strong>{{$t('last_name')}}: </strong>{{profile.last_name}}</p>
|
||||
|
||||
<hr/>
|
||||
<p v-if="profile.role"><strong>{{$t('role')}}: </strong>{{profile.role}}</p>
|
||||
<p><strong>{{$t('groups')}}: </strong><span v-for="g in profile.groups">{{g.name}}, </span></p>
|
||||
<p><strong>{{$t('permissions')}}: </strong><span v-for="p in profile.effective_permissions">{{p}}</span></p>
|
||||
|
||||
<hr/>
|
||||
|
||||
|
||||
35
src/components/Test.vue
Normal file
35
src/components/Test.vue
Normal file
@@ -0,0 +1,35 @@
|
||||
<template>
|
||||
<div>
|
||||
<b-alert
|
||||
:show="dismissCountDown"
|
||||
dismissible
|
||||
variant="warning"
|
||||
@dismissed="dismissCountDown=0"
|
||||
@dismiss-count-down="countDownChanged"
|
||||
>
|
||||
This alert will dismiss after {{ dismissCountDown }} seconds...
|
||||
</b-alert>
|
||||
<b-button @click="showAlert" variant="info" class="m-1">
|
||||
Show alert with count-down timer
|
||||
</b-button>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
dismissSecs: 5,
|
||||
dismissCountDown: 0,
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
countDownChanged(dismissCountDown) {
|
||||
this.dismissCountDown = dismissCountDown;
|
||||
},
|
||||
showAlert() {
|
||||
this.dismissCountDown = this.dismissSecs;
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
Reference in New Issue
Block a user