diff options
author | Louis <6653109+artonge@users.noreply.github.com> | 2023-02-21 10:10:12 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-02-21 10:10:12 +0100 |
commit | b2d283ba1f1250bd7bac31873bfd575090848ef5 (patch) | |
tree | ac2a475baa473ace5bf3af807df647c37add5d3f /apps | |
parent | 13ef475a0a85fc9a7c5c297ba773b03dda056cba (diff) | |
parent | c09d4d33138cecc82b53156d8038c340e06867f5 (diff) | |
download | nextcloud-server-b2d283ba1f1250bd7bac31873bfd575090848ef5.tar.gz nextcloud-server-b2d283ba1f1250bd7bac31873bfd575090848ef5.zip |
Merge pull request #36748 from nextcloud/artonge/fix/encrypted_shared_folder
Encrypted-shared folders should use the encrypted icon
Diffstat (limited to 'apps')
-rw-r--r-- | apps/files_sharing/src/share.js | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/apps/files_sharing/src/share.js b/apps/files_sharing/src/share.js index be003d51fa4..ca4dba7c888 100644 --- a/apps/files_sharing/src/share.js +++ b/apps/files_sharing/src/share.js @@ -330,7 +330,11 @@ import { getCapabilities } from '@nextcloud/capabilities' var iconClass = 'icon-shared' action.removeClass('shared-style') // update folder icon - if (type === 'dir' && (hasShares || hasLink || ownerId)) { + var isEncrypted = $tr.attr('data-e2eencrypted') + if (type === 'dir' && isEncrypted === 'true') { + shareFolderIcon = OC.MimeType.getIconUrl('dir-encrypted') + $tr.attr('data-icon', shareFolderIcon) + } else if (type === 'dir' && (hasShares || hasLink || ownerId)) { if (typeof mountType !== 'undefined' && mountType !== 'shared-root' && mountType !== 'shared') { shareFolderIcon = OC.MimeType.getIconUrl('dir-' + mountType) } else if (hasLink) { @@ -341,13 +345,9 @@ import { getCapabilities } from '@nextcloud/capabilities' $tr.find('.filename .thumbnail').css('background-image', 'url(' + shareFolderIcon + ')') $tr.attr('data-icon', shareFolderIcon) } else if (type === 'dir') { - var isEncrypted = $tr.attr('data-e2eencrypted') // FIXME: duplicate of FileList._createRow logic for external folder, // need to refactor the icon logic into a single code path eventually - if (isEncrypted === 'true') { - shareFolderIcon = OC.MimeType.getIconUrl('dir-encrypted') - $tr.attr('data-icon', shareFolderIcon) - } else if (mountType && mountType.indexOf('external') === 0) { + if (mountType && mountType.indexOf('external') === 0) { shareFolderIcon = OC.MimeType.getIconUrl('dir-external') $tr.attr('data-icon', shareFolderIcon) } else { |