diff options
author | Julius Härtl <jus@bitgrid.net> | 2019-09-03 10:07:27 +0200 |
---|---|---|
committer | Roeland Jago Douma <roeland@famdouma.nl> | 2019-09-15 19:29:57 +0200 |
commit | 260d93e5f2e40f4da95a028c2171f0f0e0e4550f (patch) | |
tree | 7d03182ab75368beafb43b13b34d2ae3c79e2ff5 /core/js | |
parent | a195c186e60da066072a060a845e0e9b6ca617ae (diff) | |
download | nextcloud-server-260d93e5f2e40f4da95a028c2171f0f0e0e4550f.tar.gz nextcloud-server-260d93e5f2e40f4da95a028c2171f0f0e0e4550f.zip |
Fallback to directory icon based on the mount type
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Diffstat (limited to 'core/js')
-rw-r--r-- | core/js/share.js | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/core/js/share.js b/core/js/share.js index cef05eb6479..26b420ab477 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') { |