Encrypted and shared folders should use the encrypted icon

Signed-off-by: Louis Chemineau <louis@chmn.me>
This commit is contained in:
Louis Chemineau 2023-02-20 15:11:39 +01:00
Родитель 95eeba83b6
Коммит c09d4d3313
3 изменённых файлов: 9 добавлений и 9 удалений

Просмотреть файл

@ -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 {

4
dist/files_sharing-additionalScripts.js поставляемый

Различия файлов скрыты, потому что одна или несколько строк слишком длинны

2
dist/files_sharing-additionalScripts.js.map поставляемый

Различия файлов скрыты, потому что одна или несколько строк слишком длинны