mirror of
				https://github.com/SoftFever/OrcaSlicer.git
				synced 2025-10-30 20:21:12 -06:00 
			
		
		
		
	NEW: add christmas cabin
Change-Id: Icf9a56c2fdcc34e8eda6254dbb7d33695b41fc7f
This commit is contained in:
		
							parent
							
								
									545fdbf96b
								
							
						
					
					
						commit
						d8f0749474
					
				
					 8 changed files with 139 additions and 1 deletions
				
			
		|  | @ -605,4 +605,28 @@ body | |||
| 	font-size: 14px; | ||||
| } | ||||
| 
 | ||||
| /*------Christmas cabin---*/ | ||||
| #ChristmasArea | ||||
| { | ||||
| 	margin-top: 10px; | ||||
| 	display: flex; | ||||
| 	flex-direction: column; | ||||
| } | ||||
| 
 | ||||
| #ChristmasTitleBlock | ||||
| { | ||||
| 	display:flex; | ||||
| 	align-items: center; | ||||
| 	padding: 6px; | ||||
| 	border-bottom-width: 1px; | ||||
| 	border-bottom-style: solid; | ||||
| } | ||||
| 
 | ||||
| #CabinList | ||||
| { | ||||
| 	display: flex; | ||||
| 	flex-wrap: wrap; | ||||
| 	align-content: flex-start; | ||||
| 	overflow-y: auto; | ||||
| 
 | ||||
| } | ||||
|  | @ -76,6 +76,42 @@ | |||
| 	 | ||||
| 	<div id="DebugText"></div> | ||||
| 	 | ||||
| 	<div id="ChristmasArea"> | ||||
| 		<div id="ChristmasTitleBlock"> | ||||
| 		    <div id="ChristmasTitle" class="Content-Title trans TextS1" tid="t92">Christmas Cabin</div> | ||||
| 		</div> | ||||
| 		<div id="CabinList"> | ||||
| <!--		    <div class="FileItem" onClick="OnOpenRecentFile('aaaa')" fpath='d:\model\11.3mf'> | ||||
| 				<div class="FileImg"><img src="img/d.png"/></div> | ||||
| 				<div class="FileName TextS1">abcd12334abcd12334abcd12334.3mf</div> | ||||
| 			</div> | ||||
| 		    <div class="FileItem" onClick="OnOpenRecentFile('aaaa')" fpath='d:\model\11.3mf'> | ||||
| 				<div class="FileImg"><img src="img/d.png"/></div> | ||||
| 				<div class="FileName TextS1">abcd12334abcd12334abcd12334.3mf</div> | ||||
| 			</div> | ||||
| 		    <div class="FileItem" onClick="OnOpenRecentFile('aaaa')" fpath='d:\model\11.3mf'> | ||||
| 				<div class="FileImg"><img src="img/d.png"/></div> | ||||
| 				<div class="FileName TextS1">abcd12334abcd12334abcd12334.3mf</div> | ||||
| 			</div> | ||||
| 		    <div class="FileItem" onClick="OnOpenRecentFile('aaaa')" fpath='d:\model\11.3mf'> | ||||
| 				<div class="FileImg"><img src="img/d.png"/></div> | ||||
| 				<div class="FileName TextS1">abcd12334abcd12334abcd12334.3mf</div> | ||||
| 			</div> | ||||
| 		    <div class="FileItem" onClick="OnOpenRecentFile('aaaa')" fpath='d:\model\11.3mf'> | ||||
| 				<div class="FileImg"><img src="img/d.png"/></div> | ||||
| 				<div class="FileName TextS1">abcd12334abcd12334abcd12334.3mf</div> | ||||
| 			</div> | ||||
| 		    <div class="FileItem" onClick="OnOpenRecentFile('aaaa')" fpath='d:\model\11.3mf'> | ||||
| 				<div class="FileImg"><img src="img/d.png"/></div> | ||||
| 				<div class="FileName TextS1">abcd12334abcd12334abcd12334.3mf</div> | ||||
| 			</div> | ||||
| 		    <div class="FileItem" onClick="OnOpenRecentFile('aaaa')" fpath='d:\model\11.3mf'> | ||||
| 				<div class="FileImg"><img src="img/d.png"/></div> | ||||
| 				<div class="FileName TextS1">abcd12334abcd12334abcd12334.3mf</div> | ||||
| 			</div>	-->		 | ||||
| 		</div> | ||||
| 	</div>	 | ||||
| 	 | ||||
| 	<div id="RecentFileArea"> | ||||
| 		<div id="RecentTitleBlock"> | ||||
| 		    <div id="RecentTitle" class="Content-Title trans TextS1" tid="t35">recent open</div> | ||||
|  |  | |||
|  | @ -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<nCabin;m++) | ||||
| 	{ | ||||
| 		let OneCabin=CCabin.model[m]; | ||||
| 		 | ||||
| 		let OneHtml='<div class="FileItem" onClick="OnOpenCabin(\''+OneCabin.file+'\')" >'+ | ||||
| 				    '<div class="FileImg"><img src="model/'+OneCabin.icon+'"/></div>'+ | ||||
| 				    '<div class="FileName TextS1">'+OneCabin.name+'</div>'+ | ||||
| 			        '</div>'; | ||||
| 		 | ||||
| 		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) );		 | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
|  |  | |||
										
											Binary file not shown.
										
									
								
							
										
											Binary file not shown.
										
									
								
							
							
								
								
									
										
											BIN
										
									
								
								resources/web/homepage/model/Cover_P1P.png
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								resources/web/homepage/model/Cover_P1P.png
									
										
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							| After Width: | Height: | Size: 938 KiB | 
							
								
								
									
										
											BIN
										
									
								
								resources/web/homepage/model/Cover_X1_X1C.png
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								resources/web/homepage/model/Cover_X1_X1C.png
									
										
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							| After Width: | Height: | Size: 941 KiB | 
|  | @ -3496,6 +3496,18 @@ std::string GUI_App::handle_web_request(std::string cmd) | |||
|                     } | ||||
|                 } | ||||
|             }  | ||||
|             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<std::string> path      = data_node.get_optional<std::string>("file"); | ||||
|                     if (path.has_value())  | ||||
|                     {  | ||||
|                         std::string Fullpath = resources_dir() + "/web/homepage/model/" + path.value();    | ||||
| 
 | ||||
|                         this->request_open_project(Fullpath); | ||||
|                     } | ||||
|                 } | ||||
|             } | ||||
| 
 | ||||
|         } | ||||
|     } | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 zorro.zhang
						zorro.zhang