mirror of
https://git.joinsharkey.org/Sharkey/Sharkey.git
synced 2024-12-28 05:43:08 +02:00
Fix bug
This commit is contained in:
parent
2076ab876a
commit
ba280ac380
1 changed files with 7 additions and 11 deletions
|
@ -2,12 +2,12 @@
|
|||
<div class="mk-user-preview">
|
||||
<template v-if="u != null">
|
||||
<div class="banner" :style="u.bannerUrl ? `background-image: url(${u.bannerUrl}?thumbnail&size=512)` : ''"></div>
|
||||
<router-link class="avatar" :to="`/@${acct}`">
|
||||
<router-link class="avatar" :to="`/@${getAcct(u)}`">
|
||||
<img :src="`${u.avatarUrl}?thumbnail&size=64`" alt="avatar"/>
|
||||
</router-link>
|
||||
<div class="title">
|
||||
<router-link class="name" :to="`/@${acct}`">{{ u.name }}</router-link>
|
||||
<p class="username">@{{ acct }}</p>
|
||||
<router-link class="name" :to="`/@${getAcct(u)}`">{{ u.name }}</router-link>
|
||||
<p class="username">@{{ getAcct(u) }}</p>
|
||||
</div>
|
||||
<div class="description">{{ u.description }}</div>
|
||||
<div class="status">
|
||||
|
@ -39,14 +39,10 @@ export default Vue.extend({
|
|||
required: true
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
acct() {
|
||||
return getAcct(this.u);
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
u: null
|
||||
u: null,
|
||||
getAcct
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
|
@ -57,8 +53,8 @@ export default Vue.extend({
|
|||
});
|
||||
} else {
|
||||
const query = this.user[0] == '@' ?
|
||||
parseAcct(this.user[0].substr(1)) :
|
||||
{ userId: this.user[0] };
|
||||
parseAcct(this.user.substr(1)) :
|
||||
{ userId: this.user };
|
||||
|
||||
(this as any).api('users/show', query).then(user => {
|
||||
this.u = user;
|
||||
|
|
Loading…
Reference in a new issue