mirror of
https://github.com/hcengineering/platform.git
synced 2025-04-16 05:13:06 +00:00
Merge remote-tracking branch 'origin/develop' into staging
Signed-off-by: Andrey Sobolev <haiodo@gmail.com>
This commit is contained in:
commit
5ad1d5b927
@ -20,7 +20,7 @@
|
||||
|
||||
import { ComponentType } from 'svelte'
|
||||
|
||||
export let value: IconProps
|
||||
export let value: IconProps | undefined
|
||||
export let size: IconSize
|
||||
export let iconWithEmoji: AnySvelteComponent | Asset | ComponentType | undefined = view.ids.IconWithEmoji
|
||||
export let defaultIcon: AnySvelteComponent | Asset | ComponentType = document.icon.Document
|
||||
@ -28,10 +28,10 @@
|
||||
|
||||
<Icon
|
||||
{size}
|
||||
icon={value.icon === iconWithEmoji && iconWithEmoji ? IconWithEmoji : value.icon ?? defaultIcon}
|
||||
iconProps={value.icon === iconWithEmoji && iconWithEmoji
|
||||
? { icon: value.color }
|
||||
icon={value?.icon === iconWithEmoji && iconWithEmoji ? IconWithEmoji : value?.icon ?? defaultIcon}
|
||||
iconProps={value?.icon === iconWithEmoji && iconWithEmoji
|
||||
? { icon: value?.color }
|
||||
: {
|
||||
fill: value.color !== undefined ? getPlatformColorDef(value.color, $themeStore.dark).icon : 'currentColor'
|
||||
fill: value?.color !== undefined ? getPlatformColorDef(value?.color, $themeStore.dark).icon : 'currentColor'
|
||||
}}
|
||||
/>
|
||||
|
@ -42,7 +42,13 @@
|
||||
</script>
|
||||
|
||||
{#if object !== undefined && version !== undefined && blob !== undefined && contentType !== undefined}
|
||||
<FilePreview file={blob} {contentType} name={version.title} metadata={version.metadata} fit />
|
||||
<FilePreview
|
||||
file={blob}
|
||||
{contentType}
|
||||
name={version.title}
|
||||
metadata={version.metadata}
|
||||
fit={contentType !== 'application/pdf'}
|
||||
/>
|
||||
|
||||
{#if object.versions > 1}
|
||||
<div class="w-full mt-6">
|
||||
|
@ -45,8 +45,7 @@ export async function loadCollabYdoc (
|
||||
}
|
||||
|
||||
if (!blob.contentType.includes('application/ydoc')) {
|
||||
ctx.error('invalid content type', { contentType: blob.contentType })
|
||||
return undefined
|
||||
ctx.warn('invalid content type', { contentType: blob.contentType })
|
||||
}
|
||||
|
||||
// no need to apply gc because we load existing document
|
||||
|
Loading…
Reference in New Issue
Block a user