]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
[MEDIA][UI] Added preview support for BMP, WEBP and ICO, displaying the name undernea...
authorMiguel Dantas <biodantasgs@gmail.com>
Sat, 15 Jun 2019 14:16:28 +0000 (15:16 +0100)
committerDiogo Cordeiro <diogo@fc.up.pt>
Sat, 3 Aug 2019 16:31:38 +0000 (17:31 +0100)
js/util.js
lib/framework.php

index b645e8b0298aa1dc0d5e218acac82f979f02aa6e..2e966dfcef87fad30a1701c0a2f6cd680fb71b15 100644 (file)
@@ -952,7 +952,8 @@ var SN = { // StatusNet
                 preview = false;
             }
 
-            var imageTypes = ['image/png', 'image/jpeg', 'image/gif', 'image/svg+xml'];
+            var imageTypes = ['image/png', 'image/jpeg', 'image/gif', 'image/svg+xml',
+                              'image/bmp', 'image/webp', 'image/vnd.microsoft.icon'];
             if ($.inArray(file.type, imageTypes) == -1) {
                 // We probably don't know how to show the file.
                 preview = false;
@@ -966,14 +967,16 @@ var SN = { // StatusNet
 
             if (preview) {
                 blobAsDataURL(file, function (url) {
-                    var fileentry = $('<li class="attachment"></li>');
-                    fileentry.append($('<code>' + file.name + '</code>'));
+                    var fileentry = $('<li>')
+                        .attr('class', 'attachment')
+                        .attr('style', 'text-align: center');
                     var img = $('<img>')
                         .attr('title', tooltip)
                         .attr('alt', tooltip)
                         .attr('src', url)
                         .attr('style', 'height: 120px');
                     fileentry.append(img);
+                    fileentry.append($('<br><code>' + file.name + '</code>'));
                     form.find('.attach-status').append(fileentry);
                 });
             } else {
index 355894e993ee4e95d447c4e4dc2af680fe9117d9..024ee1b1bf907a66dcdbccc344ae4f2faa118ee5 100644 (file)
@@ -32,7 +32,7 @@ defined('GNUSOCIAL') || die();
 define('GNUSOCIAL_ENGINE', 'GNU social');
 define('GNUSOCIAL_ENGINE_URL', 'https://www.gnu.org/software/social/');
 
-define('GNUSOCIAL_BASE_VERSION', '1.21.0');
+define('GNUSOCIAL_BASE_VERSION', '1.21.1');
 define('GNUSOCIAL_LIFECYCLE', 'dev'); // 'dev', 'alpha[0-9]+', 'beta[0-9]+', 'rc[0-9]+', 'release'
 
 define('GNUSOCIAL_VERSION', GNUSOCIAL_BASE_VERSION . '-' . GNUSOCIAL_LIFECYCLE);