Skip to content

Commit

Permalink
fix(Participant): always show titles
Browse files Browse the repository at this point in the history
Signed-off-by: Antreesy <antreesy.web@gmail.com>
  • Loading branch information
Antreesy committed Sep 5, 2024
1 parent 38c083d commit 636ee3d
Showing 1 changed file with 4 additions and 30 deletions.
34 changes: 4 additions & 30 deletions src/components/RightSidebar/Participants/Participant.vue
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@

<template #name>
<!-- First line: participant's name and type -->
<span ref="userName" class="participant__user" @mouseover="updateUserNameNeedsTitle">
<span :title="userNameTitle" class="participant__user-name">{{ computedName }}</span>
<span class="participant__user" :title="userNameTitle">
<span class="participant__user-name">{{ computedName }}</span>

Check warning on line 37 in src/components/RightSidebar/Participants/Participant.vue

View workflow job for this annotation

GitHub Actions / NPM lint

Multiple spaces found before 'class'
<span v-if="showModeratorLabel" class="participant__user-badge">({{ t('spreed', 'moderator') }})</span>
<span v-if="isBridgeBotUser" class="participant__user-badge">({{ t('spreed', 'bot') }})</span>
<span v-if="isGuest" class="participant__user-badge">({{ t('spreed', 'guest') }})</span>
Expand All @@ -48,11 +48,9 @@
{{ shareWithDisplayNameUnique }}
</span>
<span v-else-if="statusMessage"
ref="statusMessage"
class="participant__status"
:class="{ 'participant__status--highlighted': isParticipantSpeaking }"
:title="statusTitle"
@mouseover="updateStatusNeedsTitle">
:title="statusMessage">
{{ statusMessage }}
</span>
</template>
Expand Down Expand Up @@ -448,8 +446,6 @@ export default {
data() {
return {
isUserNameTitleVisible: false,
isStatusTitleVisible: false,
permissionsEditor: false,
isRemoveDialogOpen: false,
isBanParticipant: false,
Expand Down Expand Up @@ -485,9 +481,6 @@ export default {
},
userNameTitle() {
if (!this.isUserNameTitleVisible) {
return ''
}
let text = this.computedName
if (this.showModeratorLabel) {
text += ' (' + t('spreed', 'moderator') + ')'
Expand Down Expand Up @@ -556,14 +549,6 @@ export default {
return getStatusMessage(this.participant)
},
statusTitle() {
if (!this.isStatusTitleVisible) {
return false
}
return this.statusMessage
},
/**
* Check if the current participant belongs to the selected participants array
* in the store
Expand Down Expand Up @@ -902,19 +887,8 @@ export default {
methods: {
t,
formattedTime,
updateUserNameNeedsTitle() {
// check if ellipsized
const e = this.$refs.userName
this.isUserNameTitleVisible = (e && e.offsetWidth < e.scrollWidth)
},
updateStatusNeedsTitle() {
// check if ellipsized
const e = this.$refs.statusMessage
this.isStatusTitleVisible = (e && e.offsetWidth < e.scrollWidth)
},
formattedTime,
// Used to allow selecting participants in a search.
handleClick() {
Expand Down

0 comments on commit 636ee3d

Please sign in to comment.