kopia lustrzana https://github.com/nextcloud/social
FIX: Show the account avatar when displaying a user profile to an unauthenticated user.
Signed-off-by: Cyrille Bollu <cyrpub@bollu.be>pull/746/head
rodzic
9fac5aea32
commit
2f7683a0ae
|
@ -23,7 +23,7 @@
|
|||
<template>
|
||||
<div v-if="account && accountInfo" class="user-profile">
|
||||
<div>
|
||||
<avatar v-if="accountInfo.local" :user="uid" :disable-tooltip="true"
|
||||
<avatar v-if="accountInfo.local" :user="localUid" :disable-tooltip="true"
|
||||
:size="128" />
|
||||
<avatar v-else :url="avatarUrl" :disable-tooltip="true"
|
||||
:size="128" />
|
||||
|
@ -125,6 +125,10 @@ export default {
|
|||
}
|
||||
},
|
||||
computed: {
|
||||
localUid() {
|
||||
// Returns only the local part of a username
|
||||
return (this.uid.indexOf('@') === -1) ? this.uid : this.uid.substr(0, this.uid.indexOf('@'))
|
||||
},
|
||||
account() {
|
||||
return (this.uid.indexOf('@') === -1) ? this.uid + '@' + this.hostname : this.uid
|
||||
},
|
||||
|
|
Ładowanie…
Reference in New Issue