@@ -48,6 +48,9 @@ .tooltipContent { position: relative; display: inline-block; + display: flex; + min-height: 144px; + min-width: 128px; &::after { content: ''; @@ -36,7 +36,8 @@ const formatFileSize = (bytes: number) => { const formatFileName = (name: string, maxLength: number = 30) => { const lastDot = name.lastIndexOf('.') const baseName = lastDot > 0 ? name.slice(0, lastDot) : name - const ext = lastDot > 0 ? name.slice(lastDot + 1) : '' + const extWithMeta = lastDot > 0 ? name.slice(lastDot + 1) : '' + const ext = extWithMeta.split('?')[0] if (baseName.length <= maxLength) return name return `${baseName.slice(0, maxLength)}...${ext}` } @@ -9,7 +9,7 @@ export const FILE_TYPE_ICONS: Record = { } /** Иконка по умолчанию для неизвестных типов */ -export const DEFAULT_FILE_ICON = '/svg/filetypes/file.svg' +export const DEFAULT_FILE_ICON = '/svg/filetypes/word-doc.svg' const IMAGE_MIME_PREFIXES = ['image/'] const IMAGE_EXTENSIONS = ['png', 'jpg', 'jpeg', 'gif', 'webp', 'bmp', 'svg']