Skip to content

Commit

Permalink
show e2e folder icon on encrypted folders
Browse files Browse the repository at this point in the history
Signed-off-by: Bjoern Schiessle <[email protected]>
  • Loading branch information
schiessle committed Sep 26, 2017
1 parent 8d13ea9 commit 095240c
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 1 deletion.
5 changes: 4 additions & 1 deletion apps/files/js/filelist.js
Original file line number Diff line number Diff line change
Expand Up @@ -1145,7 +1145,10 @@
if (type === 'dir') {
mime = mime || 'httpd/unix-directory';

if (fileData.mountType && fileData.mountType.indexOf('external') === 0) {
if (fileData.isEncrypted) {
icon = OC.MimeType.getIconUrl('dir-encrypted');
dataIcon = icon;
} else if (fileData.mountType && fileData.mountType.indexOf('external') === 0) {
icon = OC.MimeType.getIconUrl('dir-external');
dataIcon = icon;
}
Expand Down
1 change: 1 addition & 0 deletions core/img/filetypes/folder-encrypted.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions core/js/mimetype.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ OC.MimeType = {
// Generate path
if (mimeType === 'dir' && $.inArray('folder', files) !== -1) {
return 'folder';
} else if (mimeType === 'dir-encrypted' && $.inArray('folder-encrypted', files) !== -1) {
return 'folder-encrypted';
} else if (mimeType === 'dir-shared' && $.inArray('folder-shared', files) !== -1) {
return 'folder-shared';
} else if (mimeType === 'dir-public' && $.inArray('folder-public', files) !== -1) {
Expand Down
1 change: 1 addition & 0 deletions core/js/mimetypelist.js
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ OC.MimeTypeList={
"folder-public",
"folder-shared",
"folder-starred",
"folder-encrypted",
"image",
"link",
"location",
Expand Down

0 comments on commit 095240c

Please sign in to comment.