зеркало из https://github.com/nextcloud/spreed.git
Show mentions to all using a UserBubble
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
This commit is contained in:
Родитель
b276e058a9
Коммит
d7cc4f3510
|
@ -29,6 +29,12 @@
|
||||||
background-image: url('../img/changelog.svg');
|
background-image: url('../img/changelog.svg');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// "forced-white" needs to be included in the class name as the UserBubble
|
||||||
|
// does not accept several classes.
|
||||||
|
.icon-group-forced-white {
|
||||||
|
background-image: url(icon-color-path('group', 'actions', 'fff', 1, true));
|
||||||
|
}
|
||||||
|
|
||||||
.forced-white {
|
.forced-white {
|
||||||
&.icon-menu-people {
|
&.icon-menu-people {
|
||||||
background-image: url(icon-color-path('menu-people', 'spreed', 'fff', 1));
|
background-image: url(icon-color-path('menu-people', 'spreed', 'fff', 1));
|
||||||
|
|
|
@ -287,6 +287,8 @@ export default {
|
||||||
return PlainText
|
return PlainText
|
||||||
} else if (messagePartType === 'user') {
|
} else if (messagePartType === 'user') {
|
||||||
return Mention
|
return Mention
|
||||||
|
} else if (messagePartType === 'call') {
|
||||||
|
return Mention
|
||||||
} else if (messagePartType === 'file') {
|
} else if (messagePartType === 'file') {
|
||||||
return FilePreview
|
return FilePreview
|
||||||
}
|
}
|
||||||
|
|
|
@ -20,7 +20,11 @@
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<UserBubble
|
<UserBubble v-if="isMentionToAll"
|
||||||
|
:display-name="data.name"
|
||||||
|
:avatar-image="'icon-group-forced-white'"
|
||||||
|
:primary="true" />
|
||||||
|
<UserBubble v-else
|
||||||
:display-name="data.name"
|
:display-name="data.name"
|
||||||
:user="data.id"
|
:user="data.id"
|
||||||
:primary="isCurrentUser" />
|
:primary="isCurrentUser" />
|
||||||
|
@ -50,6 +54,9 @@ export default {
|
||||||
},
|
},
|
||||||
|
|
||||||
computed: {
|
computed: {
|
||||||
|
isMentionToAll() {
|
||||||
|
return this.data.type === 'call'
|
||||||
|
},
|
||||||
isCurrentUser() {
|
isCurrentUser() {
|
||||||
return this.$store.getters.getActorType() === 'users'
|
return this.$store.getters.getActorType() === 'users'
|
||||||
&& this.data.id === this.$store.getters.getUserId()
|
&& this.data.id === this.$store.getters.getUserId()
|
||||||
|
|
Загрузка…
Ссылка в новой задаче