mirror of
https://github.com/hcengineering/platform.git
synced 2025-05-29 19:56:18 +00:00
Informative icons for the LOVE sidebar (#7275)
Signed-off-by: Alexander Platov <alexander.platov@hardcoreeng.com>
This commit is contained in:
parent
d9aa05122e
commit
596185bd5c
@ -16,17 +16,30 @@
|
||||
import type { Asset, IntlString } from '@hcengineering/platform'
|
||||
import type { AnySvelteComponent } from '@hcengineering/ui'
|
||||
import { AppItem } from '@hcengineering/workbench-resources'
|
||||
import { RoomType } from '@hcengineering/love'
|
||||
import { currentRoom } from '../../stores'
|
||||
import { isConnected, isSharingEnabled, isCameraEnabled, isMicEnabled } from '../../utils'
|
||||
import love from '../../plugin'
|
||||
|
||||
export let label: IntlString
|
||||
export let icon: Asset | AnySvelteComponent
|
||||
export let selected: boolean = false
|
||||
export let size: 'small' | 'medium' | 'large' = 'small'
|
||||
|
||||
$: allowCam = $currentRoom?.type === RoomType.Video
|
||||
</script>
|
||||
|
||||
<AppItem
|
||||
{label}
|
||||
{icon}
|
||||
icon={$isSharingEnabled
|
||||
? love.icon.SharingDisabled
|
||||
: $isConnected && allowCam && !$isCameraEnabled && !$isMicEnabled
|
||||
? love.icon.CamDisabled
|
||||
: $isConnected && !allowCam && !$isMicEnabled
|
||||
? love.icon.MicDisabled
|
||||
: !allowCam || (!$isCameraEnabled && $isMicEnabled)
|
||||
? love.icon.Mic
|
||||
: icon}
|
||||
{selected}
|
||||
{size}
|
||||
kind={$isSharingEnabled
|
||||
|
@ -119,7 +119,7 @@
|
||||
}
|
||||
&.accented,
|
||||
&.accented.selected {
|
||||
background-color: var(--global-disabled-PriorityColor);
|
||||
background-color: var(--button-secondary-active-BackgroundColor);
|
||||
}
|
||||
&.positive .icon-container,
|
||||
&.negative .icon-container,
|
||||
|
Loading…
Reference in New Issue
Block a user