mirror of
https://github.com/hcengineering/platform.git
synced 2025-05-25 17:42:57 +00:00
UBERF-9453: Fixed the size of avatars in the Office (#7978)
This commit is contained in:
parent
d66149a010
commit
106bf71ff3
@ -88,6 +88,10 @@
|
|||||||
&.disabled .floorGrid-room__header > span { color: var(--theme-trans-color); }
|
&.disabled .floorGrid-room__header > span { color: var(--theme-trans-color); }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Fix Avatars
|
||||||
|
.floorGrid-room .floorGrid-room__field .hulyAvatar-container.hulyAvatarSize-large,
|
||||||
|
.floorGrid-room .floorGrid-room__field .hulyAvatar-container.hulyAvatarSize-large img { width: 100%; }
|
||||||
|
|
||||||
.floorGrid-configureRoom {
|
.floorGrid-configureRoom {
|
||||||
&__header {
|
&__header {
|
||||||
top: calc(100% / var(--huly-floor-roomHeight) / 3 * -1.6 + .75rem - 1px);
|
top: calc(100% / var(--huly-floor-roomHeight) / 3 * -1.6 + .75rem - 1px);
|
||||||
|
@ -57,6 +57,7 @@
|
|||||||
export let variant: 'circle' | 'roundedRect' | 'none' = 'roundedRect'
|
export let variant: 'circle' | 'roundedRect' | 'none' = 'roundedRect'
|
||||||
export let borderColor: number | undefined = undefined
|
export let borderColor: number | undefined = undefined
|
||||||
export let showStatus: boolean = false
|
export let showStatus: boolean = false
|
||||||
|
export let adaptiveName: boolean = false
|
||||||
|
|
||||||
export function pulse (): void {
|
export function pulse (): void {
|
||||||
avatarInst.pulse()
|
avatarInst.pulse()
|
||||||
@ -143,6 +144,7 @@
|
|||||||
{bColor}
|
{bColor}
|
||||||
bind:element
|
bind:element
|
||||||
withStatus
|
withStatus
|
||||||
|
{adaptiveName}
|
||||||
/>
|
/>
|
||||||
<div class="hulyAvatar-statusMarker {size}" class:online={isOnline} class:offline={!isOnline} />
|
<div class="hulyAvatar-statusMarker {size}" class:online={isOnline} class:offline={!isOnline} />
|
||||||
</div>
|
</div>
|
||||||
@ -158,5 +160,6 @@
|
|||||||
{color}
|
{color}
|
||||||
{bColor}
|
{bColor}
|
||||||
bind:element
|
bind:element
|
||||||
|
{adaptiveName}
|
||||||
/>
|
/>
|
||||||
{/if}
|
{/if}
|
||||||
|
@ -28,6 +28,7 @@
|
|||||||
export let bColor: string | undefined = undefined
|
export let bColor: string | undefined = undefined
|
||||||
export let withStatus: boolean = false
|
export let withStatus: boolean = false
|
||||||
export let element: HTMLElement
|
export let element: HTMLElement
|
||||||
|
export let adaptiveName: boolean = false
|
||||||
|
|
||||||
export function pulse (): void {
|
export function pulse (): void {
|
||||||
if (element === undefined) return
|
if (element === undefined) return
|
||||||
@ -51,7 +52,7 @@
|
|||||||
$: hasImg = url != null && !imgError
|
$: hasImg = url != null && !imgError
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
{#if size === 'full' && !url && displayName && displayName !== ''}
|
{#if (size === 'full' || adaptiveName) && !url && displayName && displayName !== ''}
|
||||||
<div
|
<div
|
||||||
bind:this={element}
|
bind:this={element}
|
||||||
class="hulyAvatar-container hulyAvatarSize-{size} {variant}"
|
class="hulyAvatar-container hulyAvatarSize-{size} {variant}"
|
||||||
|
@ -141,6 +141,7 @@
|
|||||||
|
|
||||||
<!-- svelte-ignore a11y-no-static-element-interactions -->
|
<!-- svelte-ignore a11y-no-static-element-interactions -->
|
||||||
<!-- svelte-ignore a11y-mouse-events-have-key-events -->
|
<!-- svelte-ignore a11y-mouse-events-have-key-events -->
|
||||||
|
<!-- svelte-ignore a11y-click-events-have-key-events -->
|
||||||
<div
|
<div
|
||||||
class="floorGrid-room"
|
class="floorGrid-room"
|
||||||
class:preview
|
class:preview
|
||||||
@ -183,9 +184,9 @@
|
|||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{#if personInfo}
|
{#if personInfo}
|
||||||
<Avatar name={person?.name ?? personInfo.name} {person} size={'full'} showStatus={false} />
|
<Avatar name={person?.name ?? personInfo.name} {person} size={'large'} showStatus={false} adaptiveName />
|
||||||
{:else if hoveredRoomX === x && hoveredRoomY === y}
|
{:else if hoveredRoomX === x && hoveredRoomY === y}
|
||||||
<Avatar name={meName} person={meAvatar} size={'full'} showStatus={false} />
|
<Avatar name={meName} person={meAvatar} size={'large'} showStatus={false} adaptiveName />
|
||||||
{/if}
|
{/if}
|
||||||
</div>
|
</div>
|
||||||
{/each}
|
{/each}
|
||||||
|
Loading…
Reference in New Issue
Block a user