diff --git a/api/src/Image.php b/api/src/Image.php index 558f8389e2..2642e510df 100644 --- a/api/src/Image.php +++ b/api/src/Image.php @@ -43,8 +43,8 @@ class Image 'arrow_left' => 'caret-left-fill', 'arrow_right' => 'caret-right-fill', 'arrow_up' => 'caret-up-fill', - 'back' => 'forward', - 'bullet' => /*'record-*/ 'circle', + 'back' => 'arrow-bar-left', + 'bullet' => 'record', 'cake' => 'cake2', 'calendar' => 'calendar3', 'call' => 'telephone', @@ -53,7 +53,7 @@ class Image 'check' => 'check-lg', 'close' => 'x-lg', 'configure' => 'gear', - 'continue' => 'forward', + 'continue' => 'arrow-bar-right', //'copy' => 'copy', 'cti_phone' => 'telephone', 'cursor_editable' => 'copy', @@ -69,7 +69,7 @@ class Image 'discard' => 'arrow-counterclockwise', 'done' => 'check-lg', 'dots' => 'three-dots-vertical', - 'down' => 'forward', + 'down' => 'array-bar-down', //'download' => 'download', 'drop' => 'paperclip', 'edit' => 'pencil-square', @@ -83,7 +83,7 @@ class Image 'folder' => 'folder2', 'folder_management' => 'folder-check', 'generate_password' => 'key', - 'goup' => 'forward', + 'goup' => 'arrow-bar-up', 'group' => 'people', 'hangup' => 'telephone-minus', 'help' => 'question-circle', @@ -100,7 +100,7 @@ class Image 'list_alt' => 'list', //'lock' => 'lock', 'logout' => 'power', - 'menu_active' => 'forward', + //used in mobile: 'menu_active' => 'array-bar-left', 'menu_list' => 'list-task', 'milestone' => 'check2-circle', 'mime128_directory' => 'folder2', @@ -113,8 +113,8 @@ class Image 'mime128_text_csv' => 'filetype-csv', 'mime128_text_x-python' => 'filetype-py', 'mime128_text_x-markdown' => 'filetype-md', - //'mime128_text_x-vcard' => '', // todo - //'mime128_text_calendar' => '', // todo + 'mime128_text_x-vcard' => 'bi-filetype-vcs', + 'mime128_text_calendar' => 'bi-filetype-ics', 'mime128_application_pdf' => 'filetype-pdf', 'mime128_application_javascript' => 'filetype-js', 'mime128_application_rtf' => 'file-earmark-richtext', @@ -134,9 +134,20 @@ class Image 'mime128_application_postscript' => 'filetype-ai', 'mime128_application_vnd.ms-excel' => 'filetype-xls', 'mime128_application_vnd.ms-powerpoint' => 'filetype-ppt', - 'mime128_application_vnd.oasis.opendocument.presentation' => 'file-earmark-slides', // todo - 'mime128_application_vnd.oasis.opendocument.spreadsheet' => 'file-earmark-spreadsheet', // todo - 'mime128_application_vnd.oasis.opendocument.text' => 'file-earmark-word', // todo + 'mime128_application_vnd.oasis.opendocument.presentation' => 'bi-filetype-odp', + 'mime128_application_vnd.oasis.opendocument.spreadsheet' => 'bi-filetype-ods', + 'mime128_application_vnd.oasis.opendocument.text' => 'bi-filetype-odt', + 'mime128_application_vnd.oasis.opendocument.graphics' => 'bi-filetype-odg', + //'mime128_application/vnd.oasis.opendocument.text-template' => 'bi-filetype-ott', + //'mime128_application/vnd.oasis.opendocument.text-web' => 'bi-filetype-oth', + //'mime128_application/vnd.oasis.opendocument.text-master' => 'bi-filetype-odm', + //'mime128_application/vnd.oasis.opendocument.spreadsheet-template' => 'bi-filetype-ots', + //'mime128_application/vnd.oasis.opendocument.chart' => 'bi-filetype-odc', + //'mime128_application/vnd.oasis.opendocument.presentation-template' => 'bi-filetype-otp', + //'mime128_application/vnd.oasis.opendocument.graphics-template' => 'bi-filetype-otg', + //'mime128_application/vnd.oasis.opendocument.formula' => 'bi-filetype-odf', + //'mime128_application/vnd.oasis.opendocument.database' => 'bi-filetype-odb', + //'mime128_application/vnd.oasis.opendocument.image' => 'bi-filetype-odi', 'mime128_application_vnd.openxmlformats-officedocument.presentationml.presentation' => 'filetype-pptx', //'mime128_application_vnd.openxmlformats-officedocument.presentationml.slideshow' => '', 'mime128_application_vnd.openxmlformats-officedocument.spreadsheetml.sheet' => 'filetype-xlsx', @@ -146,6 +157,7 @@ class Image 'mime128_video' => 'file-earmark-play', 'mime128_video_mp4' => 'filetype-mp4', 'mime128_video_mov' => 'filetype-mov', + 'mime128_video_webm' => 'bi-filetype-webm', //'mime128_video_ogg' => '', 'mime128_image' => 'file-earmark-image', 'mime128_image_bmp' => 'filetype-bmp', @@ -167,7 +179,7 @@ class Image 'navbar' => 'app', 'new' => 'file-earmark-plus', 'new_leaf' => 'file-earmark-plus', - 'next' => 'forward', + 'next' => 'array-bar-right', 'notification_message' => 'bell', 'notification_message_active' => 'bell', 'offer' => 'question-square', @@ -180,7 +192,7 @@ class Image 'plus' => 'plus-lg', 'portrait' => 'tablet', 'preferences' => 'gear', - 'previous' => 'forward', + 'previous' => 'array-bar-left', 'print' => 'printer', 'prio_high' => 'arrow-up-circle', 'prio_low' => 'arrow-down-circle', @@ -200,7 +212,7 @@ class Image 'tentative' => 'clock-history', 'timestamp' => 'magic', //'unlock' => 'unlock', - 'up' => 'forward', + 'up' => 'arrow-bar-up', 'update' => 'shield-exclamation', 'upload' => 'box-arrow-up', 'url' => 'link-45deg', @@ -220,11 +232,11 @@ class Image 'calendar/month_view' => 'calendar-month', 'calendar/multiweek_view' => 'card-list', 'calendar/needs-action' => 'question-circle', - 'calendar/next' => 'forward', + 'calendar/next' => 'arrow-bar-right', 'calendar/nonblocking' => 'ban', 'calendar/planner_category_view' => 'tags', 'calendar/planner_view' => 'people', - 'calendar/previous' => 'forward', + 'calendar/previous' => 'arrow-bar-left', 'calendar/private' => 'key', 'calendar/recur' => 'arrow-clockwise', 'calendar/rejected' => 'x-circle', diff --git a/api/src/Vfs.php b/api/src/Vfs.php index 86b193f934..299f134426 100644 --- a/api/src/Vfs.php +++ b/api/src/Vfs.php @@ -1093,15 +1093,15 @@ class Vfs extends Vfs\Base $mime_full = strtolower(str_replace ('/','_',$mime_type)); list($mime_part) = explode('_',$mime_full); - if (!($img=Image::find('etemplate',$icon='mime'.$size.'_'.$mime_full)) && + if (!($img=Image::find('api',$icon='mime'.$size.'_'.$mime_full)) && // check mime-alias-map before falling back to more generic icons !(isset(MimeMagic::$mime_alias_map[$mime_type]) && - ($img=Image::find('etemplate',$icon='mime'.$size.'_'.str_replace('/','_',MimeMagic::$mime_alias_map[$mime_full])))) && - !($img=Image::find('etemplate',$icon='mime'.$size.'_'.$mime_part))) + ($img=Image::find('api',$icon='mime'.$size.'_'.str_replace('/','_',MimeMagic::$mime_alias_map[$mime_full])))) && + !($img=Image::find('api',$icon='mime'.$size.'_'.$mime_part))) { - $img = Image::find('etemplate',$icon='mime'.$size.'_unknown'); + $img = Image::find('api',$icon='mime'.$size.'_unknown'); } - return $et_image ? 'etemplate/'.$icon : $img; + return $et_image ? 'api/'.$icon : $img; } /** diff --git a/api/templates/default/images/bi-file-earmark-word.png b/api/templates/default/images/bi-file-earmark-word.png new file mode 100644 index 0000000000..edb4d1f92e Binary files /dev/null and b/api/templates/default/images/bi-file-earmark-word.png differ diff --git a/api/templates/default/images/bi-filetype-ics.svg b/api/templates/default/images/bi-filetype-ics.svg new file mode 100644 index 0000000000..0e243a5b89 --- /dev/null +++ b/api/templates/default/images/bi-filetype-ics.svg @@ -0,0 +1,55 @@ + + + + + + + + + + diff --git a/api/templates/default/images/bi-filetype-odg.png b/api/templates/default/images/bi-filetype-odg.png new file mode 100644 index 0000000000..473131696f Binary files /dev/null and b/api/templates/default/images/bi-filetype-odg.png differ diff --git a/api/templates/default/images/bi-filetype-odg.svg b/api/templates/default/images/bi-filetype-odg.svg new file mode 100644 index 0000000000..36ddb27a25 --- /dev/null +++ b/api/templates/default/images/bi-filetype-odg.svg @@ -0,0 +1,57 @@ + + + + + + + + + + diff --git a/api/templates/default/images/bi-filetype-odp.png b/api/templates/default/images/bi-filetype-odp.png new file mode 100644 index 0000000000..c6e972b652 Binary files /dev/null and b/api/templates/default/images/bi-filetype-odp.png differ diff --git a/api/templates/default/images/bi-filetype-odp.svg b/api/templates/default/images/bi-filetype-odp.svg new file mode 100644 index 0000000000..1a3e0d0fee --- /dev/null +++ b/api/templates/default/images/bi-filetype-odp.svg @@ -0,0 +1,57 @@ + + + + + + + + + + diff --git a/api/templates/default/images/bi-filetype-ods.png b/api/templates/default/images/bi-filetype-ods.png new file mode 100644 index 0000000000..d3951f2998 Binary files /dev/null and b/api/templates/default/images/bi-filetype-ods.png differ diff --git a/api/templates/default/images/bi-filetype-ods.svg b/api/templates/default/images/bi-filetype-ods.svg new file mode 100644 index 0000000000..d56ded086d --- /dev/null +++ b/api/templates/default/images/bi-filetype-ods.svg @@ -0,0 +1,57 @@ + + + + + + + + + + diff --git a/api/templates/default/images/bi-filetype-odt.png b/api/templates/default/images/bi-filetype-odt.png new file mode 100644 index 0000000000..8f9160ab91 Binary files /dev/null and b/api/templates/default/images/bi-filetype-odt.png differ diff --git a/api/templates/default/images/bi-filetype-odt.svg b/api/templates/default/images/bi-filetype-odt.svg new file mode 100644 index 0000000000..6ae03a1716 --- /dev/null +++ b/api/templates/default/images/bi-filetype-odt.svg @@ -0,0 +1,54 @@ + + + + + + + + + + diff --git a/api/templates/default/images/bi-filetype-vcs.svg b/api/templates/default/images/bi-filetype-vcs.svg new file mode 100644 index 0000000000..9d96ef2b46 --- /dev/null +++ b/api/templates/default/images/bi-filetype-vcs.svg @@ -0,0 +1,55 @@ + + + + + + + + + + diff --git a/api/templates/default/images/bi-filetype-webm.svg b/api/templates/default/images/bi-filetype-webm.svg new file mode 100644 index 0000000000..3ae935804b --- /dev/null +++ b/api/templates/default/images/bi-filetype-webm.svg @@ -0,0 +1,68 @@ + + + + + + + + + + + + + + + diff --git a/api/templates/default/images/bi-save-new.svg b/api/templates/default/images/bi-save-new.svg index edfeb3be50..c3838d0c37 100644 --- a/api/templates/default/images/bi-save-new.svg +++ b/api/templates/default/images/bi-save-new.svg @@ -36,15 +36,16 @@ id="path1" /> + sodipodi:nodetypes="cssscsscsscsscsscs" + style="stroke-width:1.29228" /> diff --git a/api/templates/default/images/bi-save.svg b/api/templates/default/images/bi-save.svg index 4cece8e82a..ed542b52e1 100644 --- a/api/templates/default/images/bi-save.svg +++ b/api/templates/default/images/bi-save.svg @@ -7,7 +7,7 @@ viewBox="0 0 16 16" version="1.1" id="svg2" - sodipodi:docname="bi-save2.svg" + sodipodi:docname="bi-save.svg" xml:space="preserve" inkscape:version="1.3.2 (091e20e, 2023-11-25)" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" @@ -28,7 +28,7 @@ inkscape:cy="7.9903265" inkscape:window-width="1392" inkscape:window-height="1067" - inkscape:window-x="3273" + inkscape:window-x="3400" inkscape:window-y="25" inkscape:window-maximized="0" inkscape:current-layer="svg2" /> diff --git a/api/thumbnail.php b/api/thumbnail.php index ca53becd6e..dd23c92561 100644 --- a/api/thumbnail.php +++ b/api/thumbnail.php @@ -147,7 +147,7 @@ function read_thumbnail($src) { // Check whether the destination file already exists and is newer than // the source file. Assume the file doesn't exist if thumbnail is turned off. - $exists = file_exists($dst) && filemtime($dst) >= filemtime($src); + $exists = file_exists($dst) && filemtime($dst) >= max(filemtime($src), filemtime(__FILE__)); // Only generate the thumbnail if the destination file does not match the // conditions mentioned above. Abort if $maxsize is 0. $gen_thumb = !$exists; @@ -498,8 +498,14 @@ function corner_tag(&$target_image, &$tag_image, $mime) list($app, $icon) = explode('/', Vfs::mime_icon($mime), 2); list(, $path) = explode($GLOBALS['egw_info']['server']['webserver_url'], Api\Image::find($app, $icon), 2); - if (str_ends_with($path, '.svg')) return; - $dst = EGW_SERVER_ROOT.$path; + $dst = EGW_SERVER_ROOT . $path; + // GD can not deal directly with SVG, we need have a PNG to add it + if (str_ends_with($dst, '.svg') && + !file_exists($dst = EGW_SERVER_ROOT . '/api/templates/default/images/bi-'. + str_replace('bi-', '', basename($dst, '.svg')).'.png')) + { + return; + } $tag_image = imagecreatefrompng($dst); } @@ -513,7 +519,7 @@ function corner_tag(&$target_image, &$tag_image, $mime) { imagecopyresampled($target_image,$tag_image, $target_width - $tag_width, - $target_height - $tag_height, + $target_height - round(1.1*$tag_height), 0,0, $tag_width, $tag_height, @@ -524,7 +530,7 @@ function corner_tag(&$target_image, &$tag_image, $mime) } /** - * Create an gd_image with transparent background. + * Create a gd_image with transparent background. * * @param int $w the width of the resulting image * @param int $h the height of the resutling image