Skip to content

Commit

Permalink
add prop to define root node tag for Participant.vue
Browse files Browse the repository at this point in the history
Signed-off-by: Maksim Sukharev <antreesy.web@gmail.com>
  • Loading branch information
Antreesy committed Sep 14, 2023
1 parent 0724e0c commit b63940a
Showing 1 changed file with 16 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@
-->

<template>
<li :data-nav-id="`${participant.source}_${participant.id}`"
<component :is="tag"
:data-nav-id="participantNavigationId"
class="participant-row"
:class="{
'offline': isOffline,
Expand Down Expand Up @@ -201,7 +202,7 @@
@close="hidePermissionsEditor" />
<!-- Checkmark in case the current participant is selected -->
<div v-if="isSelected" class="icon-checkmark participant-row__utils utils__checkmark" />
</li>
</component>
</template>

<script>
Expand Down Expand Up @@ -275,6 +276,11 @@ export default {
],

props: {
tag: {
type: String,
default: 'li',
},

participant: {
type: Object,
required: true,
Expand Down Expand Up @@ -320,6 +326,14 @@ export default {
return this.$store.getters.getMainContainerSelector()
},

participantNavigationId() {
if (this.participant.actorType && this.participant.actorId) {
return this.participant.actorType + '_' + this.participant.actorId
} else {
return this.participant.source + '_' + this.participant.id
}
},

participantSettingsAriaLabel() {
return t('spreed', 'Settings for participant "{user}"', { user: this.computedName })
},
Expand Down

0 comments on commit b63940a

Please sign in to comment.