UBER-473: show icon for department (#3472)

Signed-off-by: Vyacheslav Tumanov <me@slavatumanov.me>
This commit is contained in:
Vyacheslav Tumanov
2023-06-29 21:30:15 +07:00
committed by GitHub
parent a50733a556
commit 090348fc47
16 changed files with 45 additions and 43 deletions
@@ -24,7 +24,7 @@
Button,
EditBox,
IconEdit,
IconWithEmojii,
IconWithEmoji,
Label,
Toggle,
eventToHTMLElement,
@@ -270,8 +270,8 @@
<Label label={tracker.string.ChooseIcon} />
</div>
<Button
icon={icon === tracker.component.IconWithEmojii ? IconWithEmojii : icon ?? tracker.icon.Home}
iconProps={icon === tracker.component.IconWithEmojii
icon={icon === tracker.component.IconWithEmoji ? IconWithEmoji : icon ?? tracker.icon.Home}
iconProps={icon === tracker.component.IconWithEmoji
? { icon: color }
: {
fill:
@@ -16,7 +16,7 @@
import { Ref } from '@hcengineering/core'
import { createQuery } from '@hcengineering/presentation'
import { Project } from '@hcengineering/tracker'
import { Icon, IconWithEmojii, getPlatformColorDef, getPlatformColorForTextDef, themeStore } from '@hcengineering/ui'
import { Icon, IconWithEmoji, getPlatformColorDef, getPlatformColorForTextDef, themeStore } from '@hcengineering/ui'
import tracker from '../../plugin'
export let value: [Ref<Project>, Ref<Project>[]][]
@@ -37,9 +37,9 @@
{#each projects as project, i}
{#if value && i < MAX_VISIBLE_PROJECTS}
{@const icon =
project.icon === tracker.component.IconWithEmojii ? IconWithEmojii : project.icon ?? tracker.icon.Home}
project.icon === tracker.component.IconWithEmoji ? IconWithEmoji : project.icon ?? tracker.icon.Home}
{@const iconProps =
project.icon === tracker.component.IconWithEmojii
project.icon === tracker.component.IconWithEmoji
? { icon: project.color }
: {
fill:
@@ -55,7 +55,7 @@
<div class="float-left-box">
<!-- svelte-ignore a11y-click-events-have-key-events -->
<TabsControl
model={[{ label: tracker.string.ProjectIconCategory }, { label: tracker.string.ProjectEmojiiCategory }]}
model={[{ label: tracker.string.ProjectIconCategory }, { label: tracker.string.ProjectEmojiCategory }]}
>
<svelte:fragment slot="content" let:selected>
{#if selected === 0}
@@ -82,7 +82,7 @@
<EmojiPopup
embedded
on:close={(evt) => {
dispatch('close', { icon: tracker.component.IconWithEmojii, color: evt.detail.codePointAt(0) })
dispatch('close', { icon: tracker.component.IconWithEmoji, color: evt.detail.codePointAt(0) })
}}
/>
{/if}
@@ -14,7 +14,7 @@
-->
<script lang="ts">
import { Project } from '@hcengineering/tracker'
import { Icon, IconWithEmojii, getPlatformColorDef, getPlatformColorForTextDef, themeStore } from '@hcengineering/ui'
import { Icon, IconWithEmoji, getPlatformColorDef, getPlatformColorForTextDef, themeStore } from '@hcengineering/ui'
import tracker from '../../plugin'
export let value: Project | undefined
@@ -24,10 +24,10 @@
{#if value}
<div class="flex-presenter cursor-default" class:inline-presenter={inline}>
<div class="icon" class:emoji={value.icon === tracker.component.IconWithEmojii}>
<div class="icon" class:emoji={value.icon === tracker.component.IconWithEmoji}>
<Icon
icon={value.icon === tracker.component.IconWithEmojii ? IconWithEmojii : value.icon ?? tracker.icon.Home}
iconProps={value.icon === tracker.component.IconWithEmojii
icon={value.icon === tracker.component.IconWithEmoji ? IconWithEmoji : value.icon ?? tracker.icon.Home}
iconProps={value.icon === tracker.component.IconWithEmoji
? { icon: value.color }
: {
fill:
@@ -16,7 +16,7 @@
import { Ref, Space } from '@hcengineering/core'
import { Project } from '@hcengineering/tracker'
import {
IconWithEmojii,
IconWithEmoji,
getCurrentLocation,
getPlatformColorDef,
getPlatformColorForTextDef,
@@ -43,8 +43,8 @@
{#if model.specials}
<TreeNode
{collapsed}
icon={space?.icon === tracker.component.IconWithEmojii ? IconWithEmojii : space?.icon ?? model.icon}
iconProps={space?.icon === tracker.component.IconWithEmojii
icon={space?.icon === tracker.component.IconWithEmoji ? IconWithEmoji : space?.icon ?? model.icon}
iconProps={space?.icon === tracker.component.IconWithEmoji
? { icon: space.color }
: {
fill: