mirror of
https://github.com/hcengineering/platform.git
synced 2025-04-22 00:10:37 +00:00
Corrected colors in headers (ListView) (#3728)
Signed-off-by: Alexander Platov <sas_lord@mail.ru>
This commit is contained in:
parent
c7bb5b9cab
commit
65c511ef77
@ -13,6 +13,7 @@ export interface ColorDefinition {
|
|||||||
name: string
|
name: string
|
||||||
color: string
|
color: string
|
||||||
icon?: string
|
icon?: string
|
||||||
|
iconText?: string
|
||||||
title?: string
|
title?: string
|
||||||
number?: string
|
number?: string
|
||||||
background?: string
|
background?: string
|
||||||
@ -50,13 +51,14 @@ const defineAvatarColor = (
|
|||||||
dark: boolean = false
|
dark: boolean = false
|
||||||
): ColorDefinition => {
|
): ColorDefinition => {
|
||||||
const background = rgbToHex(hslToRgb(h / 360, s / 100, l / 100))
|
const background = rgbToHex(hslToRgb(h / 360, s / 100, l / 100))
|
||||||
const icon: string | undefined = rgbToHex(hslToRgb(h / 360, 0.5, 0.6))
|
const icon = rgbToHex(hslToRgb(h / 360, 0.5, 0.6))
|
||||||
const title: string | undefined = rgbToHex(hslToRgb(h / 360, 0.9, 0.9))
|
const iconText = rgbToHex(hslToRgb(h / 360, 0.9, 0.9))
|
||||||
return {
|
return {
|
||||||
name,
|
name,
|
||||||
color: background,
|
color: background,
|
||||||
icon,
|
icon,
|
||||||
title,
|
iconText,
|
||||||
|
title: undefined,
|
||||||
number: undefined,
|
number: undefined,
|
||||||
background:
|
background:
|
||||||
gradient.length === 1
|
gradient.length === 1
|
||||||
|
@ -107,7 +107,7 @@
|
|||||||
{:else if name && displayName && displayName !== ''}
|
{:else if name && displayName && displayName !== ''}
|
||||||
<div
|
<div
|
||||||
class="ava-text"
|
class="ava-text"
|
||||||
style:color={color ? color.title : 'var(--accented-button-color)'}
|
style:color={color ? color.iconText : 'var(--accented-button-color)'}
|
||||||
data-name={displayName.toLocaleUpperCase()}
|
data-name={displayName.toLocaleUpperCase()}
|
||||||
/>
|
/>
|
||||||
{:else}
|
{:else}
|
||||||
|
Loading…
Reference in New Issue
Block a user