mirror of
https://github.com/hcengineering/platform.git
synced 2025-06-07 08:21:08 +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 { Asset, IntlString } from '@hcengineering/platform'
|
||||||
import type { AnySvelteComponent } from '@hcengineering/ui'
|
import type { AnySvelteComponent } from '@hcengineering/ui'
|
||||||
import { AppItem } from '@hcengineering/workbench-resources'
|
import { AppItem } from '@hcengineering/workbench-resources'
|
||||||
|
import { RoomType } from '@hcengineering/love'
|
||||||
|
import { currentRoom } from '../../stores'
|
||||||
import { isConnected, isSharingEnabled, isCameraEnabled, isMicEnabled } from '../../utils'
|
import { isConnected, isSharingEnabled, isCameraEnabled, isMicEnabled } from '../../utils'
|
||||||
|
import love from '../../plugin'
|
||||||
|
|
||||||
export let label: IntlString
|
export let label: IntlString
|
||||||
export let icon: Asset | AnySvelteComponent
|
export let icon: Asset | AnySvelteComponent
|
||||||
export let selected: boolean = false
|
export let selected: boolean = false
|
||||||
export let size: 'small' | 'medium' | 'large' = 'small'
|
export let size: 'small' | 'medium' | 'large' = 'small'
|
||||||
|
|
||||||
|
$: allowCam = $currentRoom?.type === RoomType.Video
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<AppItem
|
<AppItem
|
||||||
{label}
|
{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}
|
{selected}
|
||||||
{size}
|
{size}
|
||||||
kind={$isSharingEnabled
|
kind={$isSharingEnabled
|
||||||
|
@ -119,7 +119,7 @@
|
|||||||
}
|
}
|
||||||
&.accented,
|
&.accented,
|
||||||
&.accented.selected {
|
&.accented.selected {
|
||||||
background-color: var(--global-disabled-PriorityColor);
|
background-color: var(--button-secondary-active-BackgroundColor);
|
||||||
}
|
}
|
||||||
&.positive .icon-container,
|
&.positive .icon-container,
|
||||||
&.negative .icon-container,
|
&.negative .icon-container,
|
||||||
|
Loading…
Reference in New Issue
Block a user