1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-08 10:22:46 +00:00

Folder shared out (#5601)

* show if folder has been shared out

* [dir view] use special folder icon to identify folders which are shared out

* [dir view] improvement: in a library, make only one request to get the data of folders shared out

---------

Co-authored-by: llj <lingjun.li1@gmail.com>
This commit is contained in:
lian
2023-11-15 17:01:50 +08:00
committed by GitHub
parent 4e5c6fa98a
commit a9c3a6638c
5 changed files with 37 additions and 3 deletions

View File

@@ -373,7 +373,7 @@ export const Utils = {
if (dirent.permission && (dirent.permission === 'r' || dirent.permission === 'preview')) {
readonly = true;
}
return this.getFolderIconUrl(readonly, size);
return this.getFolderIconUrl(readonly, size, dirent.has_been_shared_out);
} else {
return this.getFileIconUrl(dirent.name, size);
}
@@ -389,12 +389,12 @@ export const Utils = {
}
},
getFolderIconUrl: function(readonly = false, size) {
getFolderIconUrl: function(readonly = false, size, sharedOut) {
if (!size) {
size = Utils.isHiDPI() ? 48 : 24;
}
size = size > 24 ? 192 : 24;
return `${mediaUrl}img/folder${readonly ? '-read-only-' : '-'}${size}.png`;
return `${mediaUrl}img/folder${readonly ? '-read-only' : ''}${sharedOut ? '-shared-out' : ''}-${size}.png`;
},
getFileIconUrl: function(filename, size) {