Add a OrcaSlicer badge in the thumbnail preview for published 3MF projects. Add a visual indicator in the publish dialog to show that something in the section is toggled

This commit is contained in:
Lam Wei Lun
2026-09-02 12:38:27 +08:00
parent f5984e7523
commit 4654d24f6f
8 changed files with 114 additions and 2 deletions

View File

@@ -552,7 +552,8 @@ body
background-color: #E4E4E4;
border-radius: 8px;
width: 184px;
height: 184px;
height: 184px;
position: relative;
}
.FileItem img
@@ -564,6 +565,19 @@ body
object-fit: cover;
}
.FileImg .FileLogoBadge
{
position: absolute;
top: 8px;
left: 8px;
width: 26px;
height: 26px;
padding: 2px;
box-sizing: border-box;
background-color: rgba(255,255,255,0.85);
border-radius: 50%;
}
.FileName
{
white-space: nowrap;

View File

@@ -226,10 +226,11 @@ function ShowRecentFileList( pList )
//let sShortName=sPath.substring(index+1,sPath.length);
let sBadge=sPublished? '<span class="FilePublishedBadge">PUB</span>':'';
let sLogoBadge=sPublished? '<img class="FileLogoBadge" src="../../images/OrcaSlicer_gradient_circle.svg" alt="" />':'';
let TmpHtml='<div class="FileItem" fpath="'+sPath+'" >'+
'<a class="FileTip" title="'+sPath+'"></a>'+
'<div class="FileImg" ><img src="'+sImg+'" onerror="this.onerror=null;this.src=\'img/d.png\';" alt="No Image" /></div>'+
'<div class="FileImg" ><img src="'+sImg+'" onerror="this.onerror=null;this.src=\'img/d.png\';" alt="No Image" />'+sLogoBadge+'</div>'+
'<div class="FileNamePack">'+sBadge+'<div class="FileName TextS1">'+sName+'</div></div>'+
'<div class="FileDate">'+sTime+'</div>'+
'</div>';