fix: attachment actions icon and image size (#6710)

Signed-off-by: Alexander Onnikov <Alexander.Onnikov@xored.com>
This commit is contained in:
Alexander Onnikov 2024-09-25 00:24:03 +07:00 committed by GitHub
parent 822731c23c
commit b24027b2ea
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 5 additions and 5 deletions

View File

@ -23,7 +23,7 @@
getPreviewAlignment, getPreviewAlignment,
previewTypes previewTypes
} from '@hcengineering/presentation' } from '@hcengineering/presentation'
import { IconMoreH, IconOpen, Menu, Action as UIAction, closeTooltip, showPopup, tooltip } from '@hcengineering/ui' import { IconMoreH, Menu, Action as UIAction, closeTooltip, showPopup, tooltip } from '@hcengineering/ui'
import view, { Action } from '@hcengineering/view' import view, { Action } from '@hcengineering/view'
import AttachmentAction from './AttachmentAction.svelte' import AttachmentAction from './AttachmentAction.svelte'
@ -84,7 +84,7 @@
const openAction: UIAction = { const openAction: UIAction = {
label: view.string.Open, label: view.string.Open,
icon: IconOpen, icon: view.icon.Open,
action: async (props: any, evt: Event) => { action: async (props: any, evt: Event) => {
showPreview(evt as MouseEvent) showPreview(evt as MouseEvent)
} }
@ -126,7 +126,7 @@
{#if canPreview} {#if canPreview}
<AttachmentAction <AttachmentAction
label={view.string.Open} label={view.string.Open}
icon={IconOpen} icon={view.icon.Open}
size="small" size="small"
dataId="open-in-sidebar" dataId="open-in-sidebar"
action={showPreview} action={showPreview}

View File

@ -51,7 +51,7 @@
if (listProvider !== undefined) listProvider.updateFocus(value) if (listProvider !== undefined) listProvider.updateFocus(value)
const popupInfo = showPopup( const popupInfo = showPopup(
FilePreviewPopup, FilePreviewPopup,
{ file: value.file, name: value.name, contentType: value.type }, { file: value.file, name: value.name, contentType: value.type, metadata: value.metadata },
value.type.startsWith('image/') ? 'centered' : 'float' value.type.startsWith('image/') ? 'centered' : 'float'
) )
dispatch('open', popupInfo.id) dispatch('open', popupInfo.id)

View File

@ -92,7 +92,7 @@
if (item !== undefined) { if (item !== undefined) {
showPopup( showPopup(
FilePreviewPopup, FilePreviewPopup,
{ file: item.file, name: item.name, contentType: item.type }, { file: item.file, name: item.name, contentType: item.type, metadata: item.metadata },
item.type.startsWith('image/') ? 'centered' : 'float' item.type.startsWith('image/') ? 'centered' : 'float'
) )
} else { } else {