From 11b079a1f71b49f44df9a268f26d5b5f912706b5 Mon Sep 17 00:00:00 2001 From: Alexander Platov Date: Wed, 19 Mar 2025 21:09:15 +0300 Subject: [PATCH] LOVE: updated ParticipantView layout (#8287) Signed-off-by: Alexander Platov --- .../src/components/ParticipantView.svelte | 78 +++++++++---------- .../love-resources/src/components/Room.svelte | 9 +-- .../src/components/VideoPopup.svelte | 2 +- 3 files changed, 39 insertions(+), 50 deletions(-) diff --git a/plugins/love-resources/src/components/ParticipantView.svelte b/plugins/love-resources/src/components/ParticipantView.svelte index 3cf72f2d47..94f2bed00b 100644 --- a/plugins/love-resources/src/components/ParticipantView.svelte +++ b/plugins/love-resources/src/components/ParticipantView.svelte @@ -24,7 +24,6 @@ export let muted: boolean export let mirror: boolean export let connecting: boolean = false - export let small: boolean = false let parent: HTMLDivElement let activeTrack: boolean = false @@ -55,17 +54,13 @@ $: user = $personByIdStore.get(_id as Ref) -
+
{formatName(name)} - {#if connecting} -
- -
- {/if} -
-
- +
+ {#if connecting}{/if} + {#if muted}{/if} +
@@ -123,41 +118,42 @@ .label { position: absolute; display: flex; + justify-content: space-between; align-items: center; - gap: 0.375rem; - top: 0.5rem; - left: 0.5rem; - max-width: calc(100% - 1rem); - padding: 0.375rem; - text-overflow: ellipsis; - overflow: hidden; - font-weight: 500; - font-size: 0.75rem; - color: rgba(35, 37, 45, 0.75); - background-color: rgba(255, 255, 255, 0.4); - border-radius: 0.375rem; + gap: 0.5rem; + bottom: 0.375rem; + left: 0.375rem; + right: 0.375rem; + max-width: calc(100% - 0.75rem); z-index: 1; - } - &.small .label { - font-size: 0.625rem; - } - } - .icon { - position: absolute; - display: flex; - justify-content: center; - align-items: center; - right: 0.5rem; - bottom: 0.5rem; - width: 2rem; - height: 2rem; - background-color: #36373d; - border-radius: 0.5rem; - z-index: 1; + span, + .icon { + height: 1.5rem; + background-color: rgba(0, 0, 0, 0.7); + border-radius: 0.375rem; + } + span { + padding: 0.25rem 0.5rem; + overflow: hidden; + text-overflow: ellipsis; + font-size: 0.875rem; + line-height: 1rem; + color: #ffffff; + } + .icon { + display: none; + justify-content: center; + align-items: center; + flex-shrink: 0; + gap: 0.25rem; + padding: 0.25rem; + min-width: 1.5rem; - &:not(.muted) { - display: none; + &.shown { + display: flex; + } + } } } diff --git a/plugins/love-resources/src/components/Room.svelte b/plugins/love-resources/src/components/Room.svelte index d17bcf8de9..f5af0ab872 100644 --- a/plugins/love-resources/src/components/Room.svelte +++ b/plugins/love-resources/src/components/Room.svelte @@ -417,14 +417,7 @@ class:scroll-m-0={$screenSharing} > {#each activeParticipants as participant, i (participant._id)} - 1 && (roomWidth - 16 * (columns - 1)) / columns < 300) || - (rows > 1 && (roomHeight - 16 * (rows - 1)) / rows < 168)))} - /> + {/each}
{/if} diff --git a/plugins/love-resources/src/components/VideoPopup.svelte b/plugins/love-resources/src/components/VideoPopup.svelte index d7641939fc..4c139be602 100644 --- a/plugins/love-resources/src/components/VideoPopup.svelte +++ b/plugins/love-resources/src/components/VideoPopup.svelte @@ -380,7 +380,7 @@
{#each activeParticipants as participant, i (participant._id)}
- +
{/each}