mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
Merge branch '4.16'
This commit is contained in:
commit
7facd49d33
@ -29,7 +29,10 @@
|
|||||||
<span v-if="image">
|
<span v-if="image">
|
||||||
<resource-icon :image="image" size="2x" style="margin-right: 5px"/>
|
<resource-icon :image="image" size="2x" style="margin-right: 5px"/>
|
||||||
</span>
|
</span>
|
||||||
<a-avatar v-else class="user-menu-avatar avatar" size="small" :src="avatar()"/>
|
<a-avatar v-else-if="userInitials" class="user-menu-avatar avatar" size="small" :style="{ backgroundColor: '#1890ff', color: 'white' }">
|
||||||
|
{{ userInitials }}
|
||||||
|
</a-avatar>
|
||||||
|
<a-avatar v-else class="user-menu-avatar avatar" size="small" icon="user" :style="{ backgroundColor: '#1890ff', color: 'white' }" />
|
||||||
<span>{{ nickname() }}</span>
|
<span>{{ nickname() }}</span>
|
||||||
</span>
|
</span>
|
||||||
<a-menu slot="overlay" class="user-menu-wrapper">
|
<a-menu slot="overlay" class="user-menu-wrapper">
|
||||||
@ -85,10 +88,13 @@ export default {
|
|||||||
data () {
|
data () {
|
||||||
return {
|
return {
|
||||||
image: '',
|
image: '',
|
||||||
|
userInitials: '',
|
||||||
countNotify: 0
|
countNotify: 0
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created () {
|
created () {
|
||||||
|
this.userInitials = (this.$store.getters.userInfo.firstname.toUpperCase().charAt(0) || '') +
|
||||||
|
(this.$store.getters.userInfo.lastname.toUpperCase().charAt(0) || '')
|
||||||
this.getIcon()
|
this.getIcon()
|
||||||
eventBus.$on('refresh-header', () => {
|
eventBus.$on('refresh-header', () => {
|
||||||
this.getIcon()
|
this.getIcon()
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user