diff --git a/src/Services/Misc/FAIconGenerator.php b/src/Services/Misc/FAIconGenerator.php index b1687f2f..274c778d 100644 --- a/src/Services/Misc/FAIconGenerator.php +++ b/src/Services/Misc/FAIconGenerator.php @@ -29,16 +29,16 @@ use InvalidArgumentException; class FAIconGenerator { protected const EXT_MAPPING = [ - 'fa-file-pdf' => ['pdf'], + 'fa-file-pdf' => ['pdf', 'ps', 'eps'], 'fa-file-image' => Attachment::PICTURE_EXTS, - 'fa-file-alt' => ['txt', 'md', 'rtf', 'log', 'rst', 'tex'], - 'fa-file-csv' => ['csv'], - 'fa-file-word' => ['doc', 'docx', 'odt'], - 'fa-file-archive' => ['zip', 'rar', 'bz2', 'tar', '7z', 'gz'], - 'fa-file-audio' => ['mp3', 'wav', 'aac', 'm4a', 'wma'], + 'fa-file-lines' => ['txt', 'md', 'log', 'rst', 'tex'], + 'fa-file-csv' => ['csv', 'tsv'], + 'fa-file-word' => ['doc', 'docx', 'odt', 'rtf'], + 'fa-file-zipper' => ['zip', 'rar', 'bz2', 'tar', '7z', 'gz', 'tgz'], + 'fa-file-audio' => ['mp3', 'wav', 'aac', 'm4a', 'wma', 'ogg', 'flac', 'alac'], 'fa-file-powerpoint' => ['ppt', 'pptx', 'odp', 'pps', 'key'], - 'fa-file-excel' => ['xls', 'xlr', 'xlsx', 'ods'], - 'fa-file-code' => ['php', 'xml', 'html', 'js', 'ts', 'htm', 'c', 'cpp'], + 'fa-file-excel' => ['xls', 'xlr', 'xlsx', 'ods', 'numbers'], + 'fa-file-code' => ['php', 'xml', 'html', 'js', 'ts', 'htm', 'c', 'cpp', 'json'], 'fa-file-video' => ['webm', 'avi', 'mp4', 'mkv', 'wmv'], ]; diff --git a/templates/components/attachments.macro.html.twig b/templates/components/attachments.macro.html.twig index 9c858dd9..f35de2fb 100644 --- a/templates/components/attachments.macro.html.twig +++ b/templates/components/attachments.macro.html.twig @@ -19,7 +19,7 @@ {% endmacro %} -{% macro attachment_icon(attachment, attachment_helper, class = "fa-fw fas fa-3x", link = true) %} +{% macro attachment_icon(attachment, attachment_helper, class = "fa-fw fas fa-3x hoverpic", link = true) %} {% set disabled = attachment.secure and not is_granted("show_secure", attachment) %} {% if not attachment_helper or attachment_helper.fileExisting(attachment) %} {% if link and not disabled %}