mirror of
https://github.com/hcengineering/platform.git
synced 2025-06-07 16:30:49 +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 { createEventDispatcher, onMount } from 'svelte'
|
||||||
import tracker from '../../plugin'
|
import tracker from '../../plugin'
|
||||||
|
|
||||||
export let value: WithLookup<Milestone>
|
export let value: WithLookup<Milestone> | undefined
|
||||||
export let shouldShowAvatar = true
|
export let shouldShowAvatar = true
|
||||||
export let disabled = false
|
export let disabled = false
|
||||||
export let inline = false
|
export let inline = false
|
||||||
@ -39,15 +39,17 @@
|
|||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<DocNavLink object={value} {disabled} {inline} {accent} noUnderline={disabled} {onClick}>
|
{#if value}
|
||||||
<div class="flex-presenter" class:inline-presenter={inline}>
|
<DocNavLink object={value} {disabled} {inline} {accent} noUnderline={disabled} {onClick}>
|
||||||
{#if !inline && shouldShowAvatar}
|
<div class="flex-presenter" class:inline-presenter={inline}>
|
||||||
<div class="icon">
|
{#if !inline && shouldShowAvatar}
|
||||||
<Icon icon={tracker.icon.Milestone} size="small" />
|
<div class="icon">
|
||||||
</div>
|
<Icon icon={tracker.icon.Milestone} size="small" />
|
||||||
{/if}
|
</div>
|
||||||
<span title={value.label} class="overflow-label label" class:no-underline={disabled} class:fs-bold={accent}>
|
{/if}
|
||||||
{value.label}
|
<span title={value.label} class="overflow-label label" class:no-underline={disabled} class:fs-bold={accent}>
|
||||||
</span>
|
{value.label}
|
||||||
</div>
|
</span>
|
||||||
</DocNavLink>
|
</div>
|
||||||
|
</DocNavLink>
|
||||||
|
{/if}
|
||||||
|
@ -17,27 +17,29 @@
|
|||||||
import { Icon, IconWithEmojii, getPlatformColorDef, getPlatformColorForTextDef, themeStore } from '@hcengineering/ui'
|
import { Icon, IconWithEmojii, getPlatformColorDef, getPlatformColorForTextDef, themeStore } from '@hcengineering/ui'
|
||||||
import tracker from '../../plugin'
|
import tracker from '../../plugin'
|
||||||
|
|
||||||
export let value: Project
|
export let value: Project | undefined
|
||||||
export let inline: boolean = false
|
export let inline: boolean = false
|
||||||
export let accent: boolean = false
|
export let accent: boolean = false
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<div class="flex-presenter cursor-default" class:inline-presenter={inline}>
|
{#if value}
|
||||||
<div class="icon" class:emoji={value.icon === tracker.component.IconWithEmojii}>
|
<div class="flex-presenter cursor-default" class:inline-presenter={inline}>
|
||||||
<Icon
|
<div class="icon" class:emoji={value.icon === tracker.component.IconWithEmojii}>
|
||||||
icon={value.icon === tracker.component.IconWithEmojii ? IconWithEmojii : value.icon ?? tracker.icon.Home}
|
<Icon
|
||||||
iconProps={value.icon === tracker.component.IconWithEmojii
|
icon={value.icon === tracker.component.IconWithEmojii ? IconWithEmojii : value.icon ?? tracker.icon.Home}
|
||||||
? { icon: value.color }
|
iconProps={value.icon === tracker.component.IconWithEmojii
|
||||||
: {
|
? { icon: value.color }
|
||||||
fill:
|
: {
|
||||||
value.color !== undefined
|
fill:
|
||||||
? getPlatformColorDef(value.color, $themeStore.dark).icon
|
value.color !== undefined
|
||||||
: getPlatformColorForTextDef(value.name, $themeStore.dark).icon
|
? getPlatformColorDef(value.color, $themeStore.dark).icon
|
||||||
}}
|
: getPlatformColorForTextDef(value.name, $themeStore.dark).icon
|
||||||
size="small"
|
}}
|
||||||
/>
|
size="small"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
<span class="label no-underline nowrap" class:fs-bold={accent}>
|
||||||
|
{value.name}
|
||||||
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<span class="label no-underline nowrap" class:fs-bold={accent}>
|
{/if}
|
||||||
{value.name}
|
|
||||||
</span>
|
|
||||||
</div>
|
|
||||||
|
Loading…
Reference in New Issue
Block a user