render placeholder avatars while fetching mentions
This commit is contained in:
parent
d521a06dad
commit
034b2c3bf9
3 changed files with 10 additions and 4 deletions
|
|
@ -8,15 +8,20 @@
|
||||||
:href="url"
|
:href="url"
|
||||||
class="original"
|
class="original"
|
||||||
target="_blank"
|
target="_blank"
|
||||||
v-html="content"
|
><!-- eslint-enable vue/no-v-html -->
|
||||||
/><!-- eslint-enable vue/no-v-html -->
|
<UserAvatar
|
||||||
|
v-if="shouldShowAvatar"
|
||||||
|
class="mention-avatar"
|
||||||
|
:user-id="null"
|
||||||
|
/>
|
||||||
|
<span v-html="content" />
|
||||||
|
</a>
|
||||||
<UserPopover
|
<UserPopover
|
||||||
v-else
|
v-else
|
||||||
:user-id="user.id"
|
:user-id="user.id"
|
||||||
:disabled="!shouldShowTooltip"
|
:disabled="!shouldShowTooltip"
|
||||||
>
|
>
|
||||||
<span
|
<span
|
||||||
v-if="user"
|
|
||||||
class="new"
|
class="new"
|
||||||
:style="style"
|
:style="style"
|
||||||
:class="classnames"
|
:class="classnames"
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,7 @@ const UserAvatar = {
|
||||||
props: {
|
props: {
|
||||||
// UserID of a user to show avatar of
|
// UserID of a user to show avatar of
|
||||||
userId: {
|
userId: {
|
||||||
required: true,
|
required: false, // You can pass null to just render a placeholder
|
||||||
type: String,
|
type: String,
|
||||||
},
|
},
|
||||||
// Use less space and use alternative roundness
|
// Use less space and use alternative roundness
|
||||||
|
|
|
||||||
|
|
@ -70,6 +70,7 @@
|
||||||
|
|
||||||
&.-placeholder {
|
&.-placeholder {
|
||||||
background-color: var(--background);
|
background-color: var(--background);
|
||||||
|
border: 1px solid var(--border)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue