mirror of
https://github.com/hcengineering/platform.git
synced 2025-04-13 11:50:56 +00:00
process undefined (#3458)
Signed-off-by: Ruslan Bayandinov <wazsone@ya.ru>
This commit is contained in:
parent
66275fd344
commit
6f25c8e529
@ -20,7 +20,7 @@
|
||||
import { createEventDispatcher, onMount } from 'svelte'
|
||||
import tracker from '../../plugin'
|
||||
|
||||
export let value: WithLookup<Milestone>
|
||||
export let value: WithLookup<Milestone> | undefined
|
||||
export let shouldShowAvatar = true
|
||||
export let disabled = false
|
||||
export let inline = false
|
||||
@ -39,15 +39,17 @@
|
||||
})
|
||||
</script>
|
||||
|
||||
<DocNavLink object={value} {disabled} {inline} {accent} noUnderline={disabled} {onClick}>
|
||||
<div class="flex-presenter" class:inline-presenter={inline}>
|
||||
{#if !inline && shouldShowAvatar}
|
||||
<div class="icon">
|
||||
<Icon icon={tracker.icon.Milestone} size="small" />
|
||||
</div>
|
||||
{/if}
|
||||
<span title={value.label} class="overflow-label label" class:no-underline={disabled} class:fs-bold={accent}>
|
||||
{value.label}
|
||||
</span>
|
||||
</div>
|
||||
</DocNavLink>
|
||||
{#if value}
|
||||
<DocNavLink object={value} {disabled} {inline} {accent} noUnderline={disabled} {onClick}>
|
||||
<div class="flex-presenter" class:inline-presenter={inline}>
|
||||
{#if !inline && shouldShowAvatar}
|
||||
<div class="icon">
|
||||
<Icon icon={tracker.icon.Milestone} size="small" />
|
||||
</div>
|
||||
{/if}
|
||||
<span title={value.label} class="overflow-label label" class:no-underline={disabled} class:fs-bold={accent}>
|
||||
{value.label}
|
||||
</span>
|
||||
</div>
|
||||
</DocNavLink>
|
||||
{/if}
|
||||
|
@ -17,27 +17,29 @@
|
||||
import { Icon, IconWithEmojii, getPlatformColorDef, getPlatformColorForTextDef, themeStore } from '@hcengineering/ui'
|
||||
import tracker from '../../plugin'
|
||||
|
||||
export let value: Project
|
||||
export let value: Project | undefined
|
||||
export let inline: boolean = false
|
||||
export let accent: boolean = false
|
||||
</script>
|
||||
|
||||
<div class="flex-presenter cursor-default" class:inline-presenter={inline}>
|
||||
<div class="icon" class:emoji={value.icon === tracker.component.IconWithEmojii}>
|
||||
<Icon
|
||||
icon={value.icon === tracker.component.IconWithEmojii ? IconWithEmojii : value.icon ?? tracker.icon.Home}
|
||||
iconProps={value.icon === tracker.component.IconWithEmojii
|
||||
? { icon: value.color }
|
||||
: {
|
||||
fill:
|
||||
value.color !== undefined
|
||||
? getPlatformColorDef(value.color, $themeStore.dark).icon
|
||||
: getPlatformColorForTextDef(value.name, $themeStore.dark).icon
|
||||
}}
|
||||
size="small"
|
||||
/>
|
||||
{#if value}
|
||||
<div class="flex-presenter cursor-default" class:inline-presenter={inline}>
|
||||
<div class="icon" class:emoji={value.icon === tracker.component.IconWithEmojii}>
|
||||
<Icon
|
||||
icon={value.icon === tracker.component.IconWithEmojii ? IconWithEmojii : value.icon ?? tracker.icon.Home}
|
||||
iconProps={value.icon === tracker.component.IconWithEmojii
|
||||
? { icon: value.color }
|
||||
: {
|
||||
fill:
|
||||
value.color !== undefined
|
||||
? getPlatformColorDef(value.color, $themeStore.dark).icon
|
||||
: getPlatformColorForTextDef(value.name, $themeStore.dark).icon
|
||||
}}
|
||||
size="small"
|
||||
/>
|
||||
</div>
|
||||
<span class="label no-underline nowrap" class:fs-bold={accent}>
|
||||
{value.name}
|
||||
</span>
|
||||
</div>
|
||||
<span class="label no-underline nowrap" class:fs-bold={accent}>
|
||||
{value.name}
|
||||
</span>
|
||||
</div>
|
||||
{/if}
|
||||
|
Loading…
Reference in New Issue
Block a user