Fixed: icon addition and style

This commit is contained in:
Dmitry-Ilyushechkin
2025-09-08 16:12:22 +03:00
parent 7fe41bbb74
commit 3dff485126
2 changed files with 16 additions and 6 deletions

View File

@ -478,6 +478,15 @@ li.menu-item {
}
}
.icon.shield, i.icon.img-el.shield {
position: absolute;
width: 16px;
height: 16px;
top: 26px;
left: 29px;
background-position: -60px -76px;
}
.name {
white-space: nowrap;
overflow: hidden;

View File

@ -146,10 +146,11 @@
<svg class="icon" data-iconname="${info.type === 'folder' ? 'folder' : `${info.format}`}" data-precls="tool-icon">
<use xlink:href="#${info.type === 'folder' ? 'folder-small' : info.format}"></use>
</svg>
${info.crypted ? `<svg class="icon" data-iconname="shield" data-precls="tool-icon">
${info.crypted ? `<svg class="icon shield" data-iconname="shield" data-precls="tool-icon">
<use xlink:href="#shield"></use>
</svg>` : ''}
${!isSvgIcons ? `<i class="icon ${info.type === 'folder' ? 'img-el folder' : `img-format ${info.format}`}"></i>` :''}
${!isSvgIcons ? `<i class="icon ${info.type === 'folder' ? 'img-el folder' : `img-format ${info.format}`}"></i>` : ''}
${info.crypted && !isSvgIcons ? `<i class="icon img-el shield"></i>` : ''}
</div>
<p class="name">${info.name}</p>
<span class="ext">${info.ext}</span>
@ -206,8 +207,8 @@
let icoName = svgElem.attr('data-iconname');
iconContainer.append(`<i class="icon img-format ${icoName}"></i>`);
if (elm.hasClass('crypted-svg')) {
iconContainer.append(`<svg class="icon shield"><use xlink:href="#shield"></use></svg>`);
if (iconContainer.find('.icon.shield').length) {
iconContainer.append(`<i class="icon img-el shield"></i>`);
}
});
@ -233,8 +234,8 @@
iconContainer.append(`<i class="icon img-el folder"></i>`);
if (elm.hasClass('crypted-svg')) {
iconContainer.append(`<svg class="icon shield"><use xlink:href="#shield"></use></svg>`);
if (iconContainer.find('.icon.shield').length) {
iconContainer.append(`<i class="icon img-el shield"></i>`);
}
});