fix(Lobby): make guest names visible for moderators when lobby is still active

Signed-off-by: Dorra Jaouad <dorra.jaoued7@gmail.com>
This commit is contained in:
Dorra Jaouad 2025-10-08 09:11:31 +02:00
parent a2899f5e05
commit 92ec4647cf

View file

@ -52,6 +52,7 @@ import { getGuestNickname } from '@nextcloud/auth'
import { subscribe, unsubscribe } from '@nextcloud/event-bus'
import { t } from '@nextcloud/l10n'
import { generateUrl } from '@nextcloud/router'
import debounce from 'debounce'
import escapeHtml from 'escape-html'
import { computed, nextTick, onBeforeUnmount, ref, useTemplateRef, watch } from 'vue'
import NcButton from '@nextcloud/vue/components/NcButton'
@ -85,6 +86,7 @@ const actorDisplayName = computed<string>(() => actorStore.displayName || guestU
const displayNameLabel = computed(() => t('spreed', 'Display name: {name}', {
name: `<strong>${escapeHtml(actorDisplayName.value)}</strong>`,
}, { escape: false }))
const debounceUpdateDisplayName = debounce(updateDisplayName, 500)
watch(actorDisplayName, (newValue) => {
guestUserName.value = newValue
@ -145,6 +147,7 @@ function toggleEdit() {
// One-way binding to parent component
watch(guestUserName, (newValue) => {
debounceUpdateDisplayName()
emit('update', newValue)
}, { immediate: true })
</script>