recent open
diff --git a/resources/web/homepage/js/home.js b/resources/web/homepage/js/home.js
index 442721416c..662b857353 100644
--- a/resources/web/homepage/js/home.js
+++ b/resources/web/homepage/js/home.js
@@ -12,6 +12,9 @@ function OnInit()
SendMsg_GetLoginInfo();
SendMsg_GetRecentFile();
+
+ //-----Christmas-----
+ ShowCabin();
}
//------最佳打开文件的右键菜单功能----------
@@ -22,7 +25,7 @@ var MousePosY=0;
function Set_RecentFile_MouseRightBtn_Event()
{
- $(".FileItem").mousedown(
+ $("#FileList .FileItem").mousedown(
function(e)
{
//FilePath
@@ -401,3 +404,66 @@ function OpenWikiUrl( strUrl )
//---------------Global-----------------
window.postMessage = HandleStudio;
+
+
+//---------------Christma cabin
+var CCabin={
+ "model":[
+ {
+ "name":"Christmas Cabin X1 X1C",
+ "icon":"Cover_X1_X1C.png",
+ "file":"Bambu Lab Christmas Cabin X1 X1C.gcode.3mf"
+ },
+ {
+ "name":"Christmas Cabin P1P",
+ "icon":"Cover_P1P.png",
+ "file":"Bambu Lab Christmas Cabin P1P.gcode.3mf"
+ }
+ ]
+};
+
+function ShowCabin()
+{
+ let nCabin=CCabin.model.length;
+
+ if(nCabin==0)
+ {
+ $('#CabinList').html('');
+
+ $('#ChristmasArea').hide();
+ return;
+ }
+
+ let strHtml='';
+ for(let m=0;m
'+
+ ''+
+ ''+OneCabin.name+'
'+
+ ' ';
+
+ strHtml+=OneHtml;
+ }
+
+ $('#CabinList').html(strHtml);
+
+ $('#ChristmasArea').show();
+ $('#ChristmasArea').css('display','flex');
+}
+
+function OnOpenCabin( cabinfile )
+{
+ //alert(cabinfile);
+
+ var tSend={};
+ tSend['sequence_id']=Math.round(new Date() / 1000);
+ tSend['command']="homepage_open_ccabin";
+ tSend['data']={};
+ tSend['data']['file']=cabinfile;
+
+ SendWXMessage( JSON.stringify(tSend) );
+}
+
+
diff --git a/resources/web/homepage/model/Bambu Lab Christmas Cabin P1P.gcode.3mf b/resources/web/homepage/model/Bambu Lab Christmas Cabin P1P.gcode.3mf
new file mode 100644
index 0000000000..a0eb821bd9
Binary files /dev/null and b/resources/web/homepage/model/Bambu Lab Christmas Cabin P1P.gcode.3mf differ
diff --git a/resources/web/homepage/model/Bambu Lab Christmas Cabin X1 X1C.gcode.3mf b/resources/web/homepage/model/Bambu Lab Christmas Cabin X1 X1C.gcode.3mf
new file mode 100644
index 0000000000..d2a4a5f64a
Binary files /dev/null and b/resources/web/homepage/model/Bambu Lab Christmas Cabin X1 X1C.gcode.3mf differ
diff --git a/resources/web/homepage/model/Cover_P1P.png b/resources/web/homepage/model/Cover_P1P.png
new file mode 100644
index 0000000000..145c81aa88
Binary files /dev/null and b/resources/web/homepage/model/Cover_P1P.png differ
diff --git a/resources/web/homepage/model/Cover_X1_X1C.png b/resources/web/homepage/model/Cover_X1_X1C.png
new file mode 100644
index 0000000000..d1e8cd3b71
Binary files /dev/null and b/resources/web/homepage/model/Cover_X1_X1C.png differ
diff --git a/src/slic3r/GUI/GUI_App.cpp b/src/slic3r/GUI/GUI_App.cpp
index 546079d2ce..6513533deb 100644
--- a/src/slic3r/GUI/GUI_App.cpp
+++ b/src/slic3r/GUI/GUI_App.cpp
@@ -3495,6 +3495,18 @@ std::string GUI_App::handle_web_request(std::string cmd)
wxLaunchDefaultBrowser(path.value());
}
}
+ }
+ else if (command_str.compare("homepage_open_ccabin") == 0) {
+ if (root.get_child_optional("data") != boost::none) {
+ pt::ptree data_node = root.get_child("data");
+ boost::optional