mirror of
https://github.com/hcengineering/platform.git
synced 2026-09-29 04:55:03 +02:00
Fixes for updated emojis (#8094)
Signed-off-by: Alexander Platov <alexander.platov@hardcoreeng.com>
This commit is contained in:
@@ -51,7 +51,7 @@
|
||||
export let category: Ref<StatusCategory> | undefined = status?.category
|
||||
export let value: string
|
||||
export let valuePattern: string | undefined = ''
|
||||
export let color: number | undefined = undefined
|
||||
export let color: number | number[] | undefined = undefined
|
||||
export let icons: Asset[]
|
||||
export let iconWithEmoji: Asset = view.ids.IconWithEmoji
|
||||
export let icon: Asset | undefined
|
||||
@@ -418,7 +418,7 @@
|
||||
<IconWithEmoji icon={color ?? 0} size={'medium'} />
|
||||
{/if}
|
||||
</div>
|
||||
<div class="hulyTableAttr-content" class:mb-2={selected === 1}>
|
||||
<div class="hulyTableAttr-content">
|
||||
{#if selected === 0}
|
||||
<ColorsPopup
|
||||
selected={getPlatformColorDef(color ?? 0, $themeStore.dark).name}
|
||||
@@ -434,11 +434,12 @@
|
||||
{:else}
|
||||
<EmojiPopup
|
||||
embedded
|
||||
selected={fromCodePoint(color ?? 0)}
|
||||
selected={Array.isArray(color) ? fromCodePoint(...color) : color ? fromCodePoint(color) : undefined}
|
||||
disabled={readonly}
|
||||
kind={'default'}
|
||||
on:close={(evt) => {
|
||||
if (readonly) return
|
||||
color = evt.detail.codePointAt(0)
|
||||
color = evt.detail.codes
|
||||
icon = iconWithEmoji
|
||||
}}
|
||||
/>
|
||||
|
||||
@@ -114,7 +114,11 @@
|
||||
)
|
||||
|
||||
$: index = sameCategory.findIndex((it) => it._id === value?._id) + 1
|
||||
$: icon = projectState?.icon === view.ids.IconWithEmoji ? IconWithEmoji : projectState?.icon
|
||||
$: emojiIcon = projectState?.icon === view.ids.IconWithEmoji
|
||||
$: icon = emojiIcon ? IconWithEmoji : projectState?.icon
|
||||
$: iconProps = emojiIcon
|
||||
? { icon: projectState?.color ?? value?.color ?? category?.color }
|
||||
: { fill: projectState?.color ?? value?.color ?? category?.color ?? 0 }
|
||||
|
||||
const dispatchAccentColor = (color?: ColorDefinition, icon?: Asset | typeof IconWithEmoji): void => {
|
||||
if (icon == null) {
|
||||
@@ -135,7 +139,7 @@
|
||||
{#if kind === 'table-attrs'}
|
||||
<button class="hulyTableAttr-content__row-icon-wrapper" on:click>
|
||||
{#if icon != null}
|
||||
<Icon {icon} {size} iconProps={{ icon: projectState?.color ?? value?.color ?? category?.color }} />
|
||||
<Icon {icon} {size} {iconProps} />
|
||||
{:else if category?._id === task.statusCategory.Active}
|
||||
<Icon
|
||||
icon={categoryIcons[category._id]}
|
||||
@@ -143,21 +147,14 @@
|
||||
iconProps={{
|
||||
index,
|
||||
count: sameCategory.length + 1,
|
||||
fill: projectState?.color ?? value?.color ?? category?.color
|
||||
...iconProps
|
||||
}}
|
||||
/>
|
||||
{:else}
|
||||
<Icon
|
||||
icon={categoryIcons[category?._id ?? task.statusCategory.UnStarted]}
|
||||
{size}
|
||||
iconProps={{ fill: projectState?.color ?? value?.color ?? category?.color }}
|
||||
/>
|
||||
<Icon icon={categoryIcons[category?._id ?? task.statusCategory.UnStarted]} {size} {iconProps} />
|
||||
{/if}
|
||||
</button>
|
||||
<span
|
||||
class="hulyTableAttr-content__row-label font-medium-12 uppercase grow overflow-label"
|
||||
style:color={projectState?.color ?? category?.color ?? 'var(--global-primary-TextColor)'}
|
||||
>
|
||||
<span class="hulyTableAttr-content__row-label font-medium-12 uppercase grow overflow-label">
|
||||
{value.name}
|
||||
</span>
|
||||
{:else}
|
||||
@@ -187,15 +184,11 @@
|
||||
iconProps={{
|
||||
index,
|
||||
count: sameCategory.length + 1,
|
||||
fill: projectState?.color ?? value?.color ?? category?.color
|
||||
...iconProps
|
||||
}}
|
||||
/>
|
||||
{:else}
|
||||
<Icon
|
||||
icon={categoryIcons[category?._id ?? task.statusCategory.UnStarted]}
|
||||
{size}
|
||||
iconProps={{ fill: projectState?.color ?? value?.color ?? category?.color }}
|
||||
/>
|
||||
<Icon icon={categoryIcons[category?._id ?? task.statusCategory.UnStarted]} {size} {iconProps} />
|
||||
{/if}
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
@@ -237,7 +237,7 @@
|
||||
_class={state._class}
|
||||
objectId={state._id}
|
||||
value={state}
|
||||
props={{ projectType: type._id, taskType: taskType._id, kind: 'table-attrs' }}
|
||||
props={{ projectType: type._id, taskType: taskType._id, kind: 'table-attrs', size: 'medium' }}
|
||||
/>
|
||||
<div class="hulyTableAttr-content__row-arrow">
|
||||
<IconOpenedArrow size={'small'} />
|
||||
|
||||
@@ -44,7 +44,7 @@
|
||||
export let objectId: Ref<TaskType>
|
||||
export let name: string | undefined
|
||||
export let icon: Asset | undefined
|
||||
export let color: number | undefined
|
||||
export let color: number | number[] | undefined
|
||||
export let readonly: boolean = true
|
||||
|
||||
const client = getClient()
|
||||
@@ -189,7 +189,7 @@
|
||||
{#if !readonly}
|
||||
<ButtonIcon
|
||||
icon={TaskTypeIcon}
|
||||
iconProps={{ value: taskType }}
|
||||
iconProps={{ value: taskType, size: 'medium' }}
|
||||
size={'large'}
|
||||
kind={'secondary'}
|
||||
dataId={'btnSelectIcon'}
|
||||
|
||||
@@ -49,14 +49,12 @@
|
||||
{@const icon = value?.icon === view.ids.IconWithEmoji ? IconWithEmoji : value?.icon}
|
||||
<!-- svelte-ignore a11y-click-events-have-key-events -->
|
||||
<!-- svelte-ignore a11y-no-static-element-interactions -->
|
||||
<div class="flex-presenter" on:click>
|
||||
<div class="state-container" class:inline>
|
||||
{#if icon != null}
|
||||
<Icon {icon} {size} iconProps={{ icon: value?.color }} />
|
||||
{:else}
|
||||
<div class="border-divider-color svg-{size} border-radius-1" style:background={color?.color} />
|
||||
{/if}
|
||||
</div>
|
||||
<div class="flex-center state-container clear-mins" class:inline on:click>
|
||||
{#if icon != null}
|
||||
<Icon {icon} {size} iconProps={{ icon: value?.color }} />
|
||||
{:else}
|
||||
<div class="border-divider-color svg-{size} border-radius-1" style:background={color?.color} />
|
||||
{/if}
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user