mirror of
https://github.com/hcengineering/platform.git
synced 2025-04-18 22:38:33 +00:00
Qfix: center media, improve matching (#5267)
Signed-off-by: Alexey Zinoviev <alexey.zinoviev@xored.com>
This commit is contained in:
parent
dd70ea43ff
commit
9e7a4548cb
@ -198,7 +198,7 @@ export function createModel (builder: Builder): void {
|
||||
core.space.Model,
|
||||
{
|
||||
contentType: ['video/*', 'audio/*'],
|
||||
alignment: 'float',
|
||||
alignment: 'centered',
|
||||
component: attachment.component.MediaViewer,
|
||||
extension: attachment.extension.AttachmentPreview
|
||||
},
|
||||
|
@ -195,7 +195,7 @@ previewTypesQuery.query(attachments.class.AttachmentPreviewExtension, {}, (resul
|
||||
})
|
||||
|
||||
function getPreviewTypeRegExp (type: string): RegExp {
|
||||
return new RegExp(type.replace(/\//g, '\\/'))
|
||||
return new RegExp(`^${type.replaceAll('/', '\\/').replaceAll('*', '.*')}$`)
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user