Qfix: center media, improve matching (#5267)

Signed-off-by: Alexey Zinoviev <alexey.zinoviev@xored.com>
This commit is contained in:
Alexey Zinoviev 2024-04-09 19:16:43 +04:00 committed by GitHub
parent dd70ea43ff
commit 9e7a4548cb
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 2 deletions

View File

@ -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
},

View File

@ -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('*', '.*')}$`)
}
/**