mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-14 00:52:04 +00:00
Merge branch 'main' into dev/p2s-pr
This commit is contained in:
@@ -55,19 +55,17 @@
|
||||
|
||||
.PImg
|
||||
{
|
||||
position:relative;
|
||||
width:160px;
|
||||
height: 160px;
|
||||
width:120px; /* ORCA use covers as 120x120px but use source file as 240x240 for better quality on hidpi */
|
||||
height:120px; /* ORCA fit image to fill frame */
|
||||
padding:10px 20px /* ORCA use less vertical padding */
|
||||
}
|
||||
|
||||
.ModelCheckBox
|
||||
{
|
||||
position: absolute;
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
right: 10px;
|
||||
top: 10px;
|
||||
cursor: pointer;
|
||||
flex: 0 0 18px; /* ORCA match checkbox style and size */
|
||||
margin: 10px 5px 0 0;
|
||||
width: 18px;
|
||||
height: 18px;
|
||||
background-image: url("../img/emptycheck.svg");
|
||||
background-size: cover;
|
||||
}
|
||||
|
||||
@@ -108,14 +108,7 @@ function HandleModelList( pVal )
|
||||
if( !ModelHtml.hasOwnProperty(strVendor))
|
||||
ModelHtml[strVendor]='';
|
||||
|
||||
let CoverImage=OneModel['cover'];
|
||||
ModelHtml[strVendor]+='<div class="PrinterBlock" onClick="ChooseModel(\''+strVendor+'\',\''+OneModel['model']+'\')">'+
|
||||
'<div class="PImg">'+
|
||||
'<img class="ModelThumbnail" src="'+CoverImage+'" />'+
|
||||
'<div class="ModelCheckBox" vendor="' +strVendor+ '" model="'+OneModel['model']+'"></div>'+
|
||||
'</div>'+
|
||||
' <div class="PName">'+OneModel['name']+'</div>'+
|
||||
'</div>';
|
||||
ModelHtml[strVendor]+=CreatePrinterBlock(OneModel); // ORCA
|
||||
}
|
||||
|
||||
//Update Nozzel Html Append
|
||||
@@ -232,14 +225,7 @@ function FilterModelList(keyword) {
|
||||
if (!ModelHtml.hasOwnProperty(strVendor))
|
||||
ModelHtml[strVendor] = '';
|
||||
|
||||
let CoverImage = OneModel['cover'];
|
||||
ModelHtml[strVendor] += '<div class="PrinterBlock" onClick="ChooseModel(\''+strVendor+'\',\''+OneModel['model']+'\')">'+
|
||||
'<div class="PImg">'+
|
||||
'<img class="ModelThumbnail" src="'+CoverImage+'" />'+
|
||||
'<div class="ModelCheckBox" vendor="' +strVendor+ '" model="'+OneModel['model']+'"></div>'+
|
||||
'</div>'+
|
||||
' <div class="PName">'+OneModel['name']+'</div>'+
|
||||
'</div>';
|
||||
ModelHtml[strVendor]+=CreatePrinterBlock(OneModel); // ORCA
|
||||
}
|
||||
|
||||
//Update Nozzel Html Append
|
||||
@@ -276,6 +262,38 @@ function FilterModelList(keyword) {
|
||||
TranslatePage();
|
||||
}
|
||||
|
||||
function CreatePrinterBlock(OneModel)
|
||||
{
|
||||
// ORCA use single functuon to create blocks to simplify code
|
||||
let vendor = OneModel['vendor']
|
||||
vendorName = vendor=="BBL" ? "Bambu Lab" : vendor=="Custom" ? "Generic Printer" : vendor;
|
||||
|
||||
let modelName = OneModel['name'];
|
||||
// Most of it unneeded. this can be applied in profiles
|
||||
if( vendor=="Custom")
|
||||
modelName = modelName.split(" ")[1];
|
||||
// these uses different case in name; seckit, ratrig, blocks
|
||||
else if (modelName.toLowerCase().startsWith(vendorName.toLowerCase()))
|
||||
modelName = modelName.slice(vendorName.length);
|
||||
// these not matches. have to fix in profiles to reduce conditions in here;
|
||||
else if (vendor == "MagicMaker" && modelName.startsWith("MM"))
|
||||
modelName = modelName.slice(("MM").length);
|
||||
else if (vendor == "OrcaArena")
|
||||
modelName = modelName.slice(("Orca Arena").length);
|
||||
else if (vendor == "RolohaunDesign" && modelName.startsWith("Rolohaun"))
|
||||
modelName = modelName.slice(("Rolohaun").length);
|
||||
|
||||
return '<div class="PrinterBlock" onClick="ChooseModel(\''+vendor+'\',\''+OneModel['model']+'\')">'+
|
||||
'<div class="PImg">'+
|
||||
'<img class="ModelThumbnail" src="' + OneModel['cover'] + '" />'+
|
||||
'</div>'+
|
||||
'<div style="display: flex;">'+
|
||||
' <div class="ModelCheckBox" vendor="' +vendor+ '" model="'+OneModel['model']+'"></div>'+
|
||||
' <div class="PName"><p>'+ vendorName +'</p><p>' + modelName +'</p></div>'+
|
||||
'</div>'+
|
||||
'</div>';
|
||||
}
|
||||
|
||||
function SelectPrinterAll( sVendor )
|
||||
{
|
||||
$("div.OneVendorBlock[vendor='"+sVendor+"'] .ModelCheckBox").addClass('ModelCheckBoxSelected');
|
||||
|
||||
@@ -79,18 +79,17 @@
|
||||
.PImg
|
||||
{
|
||||
position:relative;
|
||||
width:160px;
|
||||
height: 160px;
|
||||
width:120px; /* ORCA use covers as 120x120px but use source file as 240x240 for better quality on hidpi */
|
||||
height:120px; /* ORCA fit image to fill frame */
|
||||
padding:10px 20px /* ORCA use less vertical padding */
|
||||
}
|
||||
|
||||
.ModelCheckBox
|
||||
{
|
||||
position: absolute;
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
right: 10px;
|
||||
top: 10px;
|
||||
cursor: pointer;
|
||||
flex: 0 0 18px; /* ORCA match checkbox style and size */
|
||||
margin: 10px 5px 0 0;
|
||||
width: 18px;
|
||||
height: 18px;
|
||||
background-image: url("../img/emptycheck.svg");
|
||||
background-size: cover;
|
||||
}
|
||||
@@ -109,6 +108,7 @@ img.ModelThumbnail
|
||||
.PName
|
||||
{
|
||||
font-weight: 700;
|
||||
line-height: 20px; /* ORCA */
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
|
||||
@@ -107,15 +107,8 @@ function HandleModelList( pVal )
|
||||
//Collect Html Node Nozzel Html
|
||||
if( !ModelHtml.hasOwnProperty(strVendor))
|
||||
ModelHtml[strVendor]='';
|
||||
|
||||
let CoverImage=OneModel['cover'];
|
||||
ModelHtml[strVendor]+='<div class="PrinterBlock" onClick="ChooseModel(\''+strVendor+'\',\''+OneModel['model']+'\')">'+
|
||||
'<div class="PImg">'+
|
||||
'<img class="ModelThumbnail" src="'+CoverImage+'" />'+
|
||||
'<div class="ModelCheckBox" vendor="' +strVendor+ '" model="'+OneModel['model']+'"></div>'+
|
||||
'</div>'+
|
||||
' <div class="PName">'+OneModel['name']+'</div>'+
|
||||
'</div>';
|
||||
|
||||
ModelHtml[strVendor]+=CreatePrinterBlock(OneModel); // ORCA
|
||||
}
|
||||
|
||||
//Update Nozzel Html Append
|
||||
@@ -231,15 +224,8 @@ function FilterModelList(keyword) {
|
||||
//Collect Html Node Nozzel Html
|
||||
if (!ModelHtml.hasOwnProperty(strVendor))
|
||||
ModelHtml[strVendor] = '';
|
||||
|
||||
let CoverImage = OneModel['cover'];
|
||||
ModelHtml[strVendor] += '<div class="PrinterBlock" onClick="ChooseModel(\''+strVendor+'\',\''+OneModel['model']+'\')">'+
|
||||
'<div class="PImg">'+
|
||||
'<img class="ModelThumbnail" src="'+CoverImage+'" />'+
|
||||
'<div class="ModelCheckBox" vendor="' +strVendor+ '" model="'+OneModel['model']+'"></div>'+
|
||||
'</div>'+
|
||||
' <div class="PName">'+OneModel['name']+'</div>'+
|
||||
'</div>';
|
||||
|
||||
ModelHtml[strVendor]+=CreatePrinterBlock(OneModel); // ORCA
|
||||
}
|
||||
|
||||
//Update Nozzel Html Append
|
||||
@@ -276,6 +262,38 @@ function FilterModelList(keyword) {
|
||||
TranslatePage();
|
||||
}
|
||||
|
||||
function CreatePrinterBlock(OneModel)
|
||||
{
|
||||
// ORCA use single functuon to create blocks to simplify code
|
||||
let vendor = OneModel['vendor']
|
||||
vendorName = vendor=="BBL" ? "Bambu Lab" : vendor=="Custom" ? "Generic Printer" : vendor;
|
||||
|
||||
let modelName = OneModel['name'];
|
||||
// Most of it unneeded. this can be applied in profiles
|
||||
if( vendor=="Custom")
|
||||
modelName = modelName.split(" ")[1];
|
||||
// these uses different case in name; seckit, ratrig, blocks
|
||||
else if (modelName.toLowerCase().startsWith(vendorName.toLowerCase()))
|
||||
modelName = modelName.slice(vendorName.length);
|
||||
// these not matches. have to fix in profiles to reduce conditions in here;
|
||||
else if (vendor == "MagicMaker" && modelName.startsWith("MM"))
|
||||
modelName = modelName.slice(("MM").length);
|
||||
else if (vendor == "OrcaArena")
|
||||
modelName = modelName.slice(("Orca Arena").length);
|
||||
else if (vendor == "RolohaunDesign" && modelName.startsWith("Rolohaun"))
|
||||
modelName = modelName.slice(("Rolohaun").length);
|
||||
|
||||
return '<div class="PrinterBlock" onClick="ChooseModel(\''+vendor+'\',\''+OneModel['model']+'\')">'+
|
||||
'<div class="PImg">'+
|
||||
'<img class="ModelThumbnail" src="' + OneModel['cover'] + '" />'+
|
||||
'</div>'+
|
||||
'<div style="display: flex;">'+
|
||||
' <div class="ModelCheckBox" vendor="' +vendor+ '" model="'+OneModel['model']+'"></div>'+
|
||||
' <div class="PName"><p>'+ vendorName +'</p><p>' + modelName +'</p></div>'+
|
||||
'</div>'+
|
||||
'</div>';
|
||||
}
|
||||
|
||||
function SelectPrinterAll( sVendor )
|
||||
{
|
||||
$("div.OneVendorBlock[vendor='"+sVendor+"'] .ModelCheckBox").addClass('ModelCheckBoxSelected');
|
||||
|
||||
@@ -1,5 +1 @@
|
||||
<svg width="28" height="28" viewBox="0 0 28 28" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M1 1H27V27H1V1ZM2 2V26H26V2H2Z" fill="#ACACAC"/>
|
||||
<path d="M2 2H26V26H2V2Z" fill="white" fill-opacity="0.3"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M25 3H3V25H25V3ZM2 2V26H26V2H2Z" fill="white"/>
|
||||
</svg>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 18 18"><rect x="0.5" y="1.5" width="14" height="14" rx="1" style="fill:none;stroke:#949494;stroke-miterlimit:10;opacity:1"/></svg>
|
||||
|
Before Width: | Height: | Size: 358 B After Width: | Height: | Size: 206 B |
@@ -1,7 +1 @@
|
||||
<svg width="28" height="28" viewBox="0 0 28 28" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M2 2H26V26H2V2Z" fill="#009688"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M1 1H27V27H1V1ZM2 2V26H26V2H2Z" fill="#ACACAC"/>
|
||||
<path d="M2 2H26V26H2V2Z" fill="#009688"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M25 3H3V25H25V3ZM2 2V26H26V2H2Z" fill="white"/>
|
||||
<path d="M22.7168 8.2832C23.0944 8.66079 23.0944 9.27137 22.7168 9.64495L12.112 20.2537C11.7344 20.6313 11.1239 20.6313 10.7503 20.2537L5.2832 14.7907C4.9056 14.4131 4.9056 13.8025 5.2832 13.4289C5.66079 13.0553 6.27137 13.0513 6.64495 13.4289L11.4251 18.2091L21.351 8.2832C21.7286 7.9056 22.3392 7.9056 22.7128 8.2832H22.7168Z" fill="white"/>
|
||||
</svg>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 18 18"><rect x="0" y="1" width="15" height="15" rx="1.5" style="fill:#009688"/><polyline points="12.5 6.5 5.5 11.5 2.5 7.5" style="fill:none;stroke:#fff;stroke-linecap:round;stroke-linejoin:round"/></svg>
|
||||
|
Before Width: | Height: | Size: 728 B After Width: | Height: | Size: 280 B |
Reference in New Issue
Block a user