mirror of
https://github.com/hcengineering/platform.git
synced 2025-04-29 03:34:31 +00:00
LOVE: updated ParticipantView layout (#8287)
Signed-off-by: Alexander Platov <alexander.platov@hardcoreeng.com>
This commit is contained in:
parent
d4ef5a6815
commit
11b079a1f7
@ -24,7 +24,6 @@
|
|||||||
export let muted: boolean
|
export let muted: boolean
|
||||||
export let mirror: boolean
|
export let mirror: boolean
|
||||||
export let connecting: boolean = false
|
export let connecting: boolean = false
|
||||||
export let small: boolean = false
|
|
||||||
|
|
||||||
let parent: HTMLDivElement
|
let parent: HTMLDivElement
|
||||||
let activeTrack: boolean = false
|
let activeTrack: boolean = false
|
||||||
@ -55,17 +54,13 @@
|
|||||||
$: user = $personByIdStore.get(_id as Ref<Person>)
|
$: user = $personByIdStore.get(_id as Ref<Person>)
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<div id={_id} class="parent" class:small>
|
<div id={_id} class="parent">
|
||||||
<div class="label">
|
<div class="label">
|
||||||
<span class="overflow-label">{formatName(name)}</span>
|
<span class="overflow-label">{formatName(name)}</span>
|
||||||
{#if connecting}
|
<div class="icon" class:shown={muted || connecting}>
|
||||||
<div class="loading">
|
{#if connecting}<Loading size={'small'} shrink />{/if}
|
||||||
<Loading size={'small'} />
|
{#if muted}<Icon size="small" icon={love.icon.MicDisabled} />{/if}
|
||||||
</div>
|
</div>
|
||||||
{/if}
|
|
||||||
</div>
|
|
||||||
<div class="icon" class:muted>
|
|
||||||
<Icon size="medium" icon={love.icon.MicDisabled} />
|
|
||||||
</div>
|
</div>
|
||||||
<div bind:this={parent} class="cover" class:active={activeTrack} class:mirror={mirror && activeTrack}>
|
<div bind:this={parent} class="cover" class:active={activeTrack} class:mirror={mirror && activeTrack}>
|
||||||
<div class="ava">
|
<div class="ava">
|
||||||
@ -123,41 +118,42 @@
|
|||||||
.label {
|
.label {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
display: flex;
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
gap: 0.375rem;
|
gap: 0.5rem;
|
||||||
top: 0.5rem;
|
bottom: 0.375rem;
|
||||||
left: 0.5rem;
|
left: 0.375rem;
|
||||||
max-width: calc(100% - 1rem);
|
right: 0.375rem;
|
||||||
padding: 0.375rem;
|
max-width: calc(100% - 0.75rem);
|
||||||
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;
|
|
||||||
z-index: 1;
|
z-index: 1;
|
||||||
}
|
|
||||||
&.small .label {
|
|
||||||
font-size: 0.625rem;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
span,
|
||||||
.icon {
|
.icon {
|
||||||
position: absolute;
|
height: 1.5rem;
|
||||||
display: flex;
|
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;
|
justify-content: center;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
right: 0.5rem;
|
flex-shrink: 0;
|
||||||
bottom: 0.5rem;
|
gap: 0.25rem;
|
||||||
width: 2rem;
|
padding: 0.25rem;
|
||||||
height: 2rem;
|
min-width: 1.5rem;
|
||||||
background-color: #36373d;
|
|
||||||
border-radius: 0.5rem;
|
|
||||||
z-index: 1;
|
|
||||||
|
|
||||||
&:not(.muted) {
|
&.shown {
|
||||||
display: none;
|
display: flex;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
@ -417,14 +417,7 @@
|
|||||||
class:scroll-m-0={$screenSharing}
|
class:scroll-m-0={$screenSharing}
|
||||||
>
|
>
|
||||||
{#each activeParticipants as participant, i (participant._id)}
|
{#each activeParticipants as participant, i (participant._id)}
|
||||||
<ParticipantView
|
<ParticipantView bind:this={participantElements[i]} {...participant} />
|
||||||
bind:this={participantElements[i]}
|
|
||||||
{...participant}
|
|
||||||
small={$screenSharing ||
|
|
||||||
(!$screenSharing &&
|
|
||||||
((columns > 1 && (roomWidth - 16 * (columns - 1)) / columns < 300) ||
|
|
||||||
(rows > 1 && (roomHeight - 16 * (rows - 1)) / rows < 168)))}
|
|
||||||
/>
|
|
||||||
{/each}
|
{/each}
|
||||||
</div>
|
</div>
|
||||||
{/if}
|
{/if}
|
||||||
|
@ -380,7 +380,7 @@
|
|||||||
<div class="videoGrid">
|
<div class="videoGrid">
|
||||||
{#each activeParticipants as participant, i (participant._id)}
|
{#each activeParticipants as participant, i (participant._id)}
|
||||||
<div class="video">
|
<div class="video">
|
||||||
<ParticipantView bind:this={participantElements[i]} {...participant} small />
|
<ParticipantView bind:this={participantElements[i]} {...participant} />
|
||||||
</div>
|
</div>
|
||||||
{/each}
|
{/each}
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
Reference in New Issue
Block a user