From 4a672f59d28b406ff85d446ad0f2d060341be270 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julius=20H=C3=A4rtl?= Date: Tue, 3 Sep 2019 10:07:27 +0200 Subject: [PATCH 1/2] Fallback to directory icon based on the mount type MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Julius Härtl --- apps/files/js/mainfileinfodetailview.js | 3 +++ core/js/share.js | 9 +++++---- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/apps/files/js/mainfileinfodetailview.js b/apps/files/js/mainfileinfodetailview.js index 4a2067e09e..f73b6a5556 100644 --- a/apps/files/js/mainfileinfodetailview.js +++ b/apps/files/js/mainfileinfodetailview.js @@ -186,6 +186,9 @@ this._previewManager.loadPreview(this.model, $iconDiv, $container); } else { var iconUrl = this.model.get('icon') || OC.MimeType.getIconUrl('dir'); + if (typeof this.model.get('mountType') !== 'undefined') { + iconUrl = OC.MimeType.getIconUrl('dir-' + this.model.get('mountType')) + } $iconDiv.css('background-image', 'url("' + iconUrl + '")'); } this.$el.find('[title]').tooltip({placement: 'bottom'}); diff --git a/core/js/share.js b/core/js/share.js index cef05eb647..26b420ab47 100644 --- a/core/js/share.js +++ b/core/js/share.js @@ -269,22 +269,23 @@ OC.Share = _.extend(OC.Share || {}, { var message, recipients, avatars; var ownerId = $tr.attr('data-share-owner-id'); var owner = $tr.attr('data-share-owner'); + var mountType = $tr.attr('data-mounttype'); var shareFolderIcon; var iconClass = 'icon-shared'; action.removeClass('shared-style'); // update folder icon if (type === 'dir' && (hasShares || hasLink || ownerId)) { - if (hasLink) { + if (typeof mountType !== 'undefined' && mountType !== 'shared-root' && mountType !== 'shared') { + shareFolderIcon = OC.MimeType.getIconUrl('dir-' + mountType); + } else if (hasLink) { shareFolderIcon = OC.MimeType.getIconUrl('dir-public'); - } - else { + } else { shareFolderIcon = OC.MimeType.getIconUrl('dir-shared'); } $tr.find('.filename .thumbnail').css('background-image', 'url(' + shareFolderIcon + ')'); $tr.attr('data-icon', shareFolderIcon); } else if (type === 'dir') { var isEncrypted = $tr.attr('data-e2eencrypted'); - var mountType = $tr.attr('data-mounttype'); // FIXME: duplicate of FileList._createRow logic for external folder, // need to refactor the icon logic into a single code path eventually if (isEncrypted === 'true') { From 23bd8f743098d3ae8bad8676a57df495d4ea9d99 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julius=20H=C3=A4rtl?= Date: Mon, 16 Sep 2019 11:30:05 +0200 Subject: [PATCH 2/2] Bump bundles MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Julius Härtl Signed-off-by: npmbuildbot[bot] --- core/js/dist/share_backend.js | Bin 117230 -> 117299 bytes core/js/dist/share_backend.js.map | Bin 374042 -> 374254 bytes 2 files changed, 0 insertions(+), 0 deletions(-) diff --git a/core/js/dist/share_backend.js b/core/js/dist/share_backend.js index 9129379f20bd614362182a3f2e81c9660342356f..4622fb3c6ee76016636b9e8b624e49264f955cfd 100644 GIT binary patch delta 160 zcmaDinSJvV_J%EtYzL%L^%6@;iZql`5=#`v{{GWA666Ba98K0Q)dB(EtDd delta 136 zcmdlyh5g-R_J%EtYzL+*9$<81%Cnz-`v9ZN^h*aAXSZTf{rsgFVRTh+_rYLFZq@l{@=9lJ`lvEa^Drs6Pl@yhxD%slF=1!k@kkOeVO-;=J d$V=OP=OE)`CdPv41xFa27z?&6VU69fObt#F5N^1)(ZRrmvO^62% zMlU9Kn8cH@+>8nF(!_%|6aNO!UX&m5GhTf&5R52?-P!lOneV;td$X^9v}~@mthRX? zXS1bDaeOfsf7R+~eLCu?je6kHC!3jPoES7HN^9`q3ZG%K7KSvEV{$R|Fd3qBh@==b z@&eW&@MMJg78o%pjrob6(k@OC3?f z?T~DmQC>l|)COGeDOqkVC8jx*HiZ2oL}`db<*tB4PGmwa6w{XtaJl{wZeWpv_RvCf z$|5Ku$;vg9q1V|vvkYs{sB)`MSX*%Qbaq;L!;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