NEW: PrintHistory and Model Info
JIRA: none Change-Id: Ie86677010972568655f99a6b49ede32c5772b912
@ -107,7 +107,15 @@ var LangText={
|
||||
"t113": "You may change your choice in preference anytime.",
|
||||
"t114": "Home",
|
||||
"t115": "Batch",
|
||||
"t116": "Retry"
|
||||
"t116": "Retry",
|
||||
"t117": "Print History",
|
||||
"t118": "Printing",
|
||||
"t119": "Success",
|
||||
"t120": "Canceled",
|
||||
"t121": "Search",
|
||||
"t122": "Search online models",
|
||||
"t123": "Plate",
|
||||
"t124": ""
|
||||
},
|
||||
"zh_CN": {
|
||||
"t1": "欢迎使用Bambu Studio",
|
||||
@ -218,6 +226,14 @@ var LangText={
|
||||
"t114": "首页",
|
||||
"t115": "批量处理",
|
||||
"t116": "重试",
|
||||
"t117": "打印历史",
|
||||
"t118": "正在打印",
|
||||
"t119": "成功",
|
||||
"t120": "已取消",
|
||||
"t121": "搜索",
|
||||
"t122": "搜索在线模型",
|
||||
"t123": "第",
|
||||
"t124": " 盘",
|
||||
"wk1": "快速入门指南",
|
||||
"wk2": "本文介绍了Bambu Studio的最基本用法。它指导用户配置软件,创建项目,并逐步完成第一个打印任务。",
|
||||
"wk3": "基于项目的工作流",
|
||||
@ -343,7 +359,15 @@ var LangText={
|
||||
"t113": "好みはいつでも変更できます.",
|
||||
"t114": "トップページ",
|
||||
"t115": "バッチ",
|
||||
"t116": "[再試行]"
|
||||
"t116": "[再試行]",
|
||||
"t117": "印刷履歴",
|
||||
"t118": "印刷中",
|
||||
"t119": "成功",
|
||||
"t120": "キャンセルされた",
|
||||
"t121": "検索",
|
||||
"t122": "オンラインモデルを検索する",
|
||||
"t123": "シート材",
|
||||
"t124": ""
|
||||
},
|
||||
"it_IT": {
|
||||
"t1": "Benvenuti allo Studio Bambu",
|
||||
@ -453,7 +477,15 @@ var LangText={
|
||||
"t113": "Puoi cambiare la tua scelta in qualsiasi momento.",
|
||||
"t114": "Home",
|
||||
"t115": "Lotto",
|
||||
"t116": "Riprova"
|
||||
"t116": "Riprova",
|
||||
"t117": "Storico di stampa",
|
||||
"t118": "Stampa in corso",
|
||||
"t119": "Successo",
|
||||
"t120": "annullato",
|
||||
"t121": "Ricerca",
|
||||
"t122": "Cerca modelli online",
|
||||
"t123": "piatto",
|
||||
"t124": ""
|
||||
},
|
||||
"fr_FR": {
|
||||
"t1": "Bienvenue chez Bambu Studio",
|
||||
@ -563,7 +595,15 @@ var LangText={
|
||||
"t113": "Vous pouvez modifier vos préférences à tout moment.",
|
||||
"t114": "Accueil",
|
||||
"t115": "Un lot de",
|
||||
"t116": "Retenter"
|
||||
"t116": "Retenter",
|
||||
"t117": "Historique d'impression",
|
||||
"t118": "Impression en cours",
|
||||
"t119": "Succès",
|
||||
"t120": "annulé",
|
||||
"t121": "Recherche",
|
||||
"t122": "Rechercher des modèles en ligne",
|
||||
"t123": "assiette",
|
||||
"t124": ""
|
||||
},
|
||||
"de_DE": {
|
||||
"t1": "Willkommen im Bambu Studio",
|
||||
@ -673,7 +713,15 @@ var LangText={
|
||||
"t113": "Sie können Ihre Wahl jederzeit ändern.",
|
||||
"t114": "Startseite",
|
||||
"t115": "Charge",
|
||||
"t116": "Erneut versuchen"
|
||||
"t116": "Erneut versuchen",
|
||||
"t117": "Druckverlauf",
|
||||
"t118": "Wird gedruckt",
|
||||
"t119": "Erfolg",
|
||||
"t120": "storniert",
|
||||
"t121": "Suche",
|
||||
"t122": "Suche Online-Modelle",
|
||||
"t123": "Teller",
|
||||
"t124": ""
|
||||
},
|
||||
"hu_HU": {
|
||||
"t1": "Üdvözöljük a Bambu Stúdióban",
|
||||
@ -783,7 +831,15 @@ var LangText={
|
||||
"t113": "Bármikor megváltoztathatja a preferenciáját.",
|
||||
"t114": "honlap",
|
||||
"t115": "Tétel",
|
||||
"t116": "Újrapróbálkozás"
|
||||
"t116": "Újrapróbálkozás",
|
||||
"t117": "Nyomtatási előzmények",
|
||||
"t118": "Nyomtatás folyamatban",
|
||||
"t119": "Siker",
|
||||
"t120": "törölt",
|
||||
"t121": "Keresés",
|
||||
"t122": "Online modellek keresése",
|
||||
"t123": "tányér",
|
||||
"t124": ""
|
||||
},
|
||||
"es_ES": {
|
||||
"t1": "Bienvenido a Bambu Studio",
|
||||
@ -893,7 +949,15 @@ var LangText={
|
||||
"t113": "Puede cambiar sus preferencias en cualquier momento.",
|
||||
"t114": "Página de inicio",
|
||||
"t115": "Un lote",
|
||||
"t116": "Reintentar"
|
||||
"t116": "Reintentar",
|
||||
"t117": "Historial de impresión",
|
||||
"t118": "Imprimiendo",
|
||||
"t119": "Éxito",
|
||||
"t120": "cancelado",
|
||||
"t121": "Búsqueda",
|
||||
"t122": "Buscar modelos en línea",
|
||||
"t123": "plato",
|
||||
"t124": ""
|
||||
},
|
||||
"sv_SE": {
|
||||
"t1": "Välkommen till Bambu Studio",
|
||||
@ -1003,7 +1067,15 @@ var LangText={
|
||||
"t113": "Du kan ändra ditt val när som helst.",
|
||||
"t114": "startsida",
|
||||
"t115": "Batch",
|
||||
"t116": "Försök igen"
|
||||
"t116": "Försök igen",
|
||||
"t117": "Utskriftshistorik",
|
||||
"t118": "Skrivs ut",
|
||||
"t119": "Lyckad",
|
||||
"t120": "avbruten",
|
||||
"t121": "Sök",
|
||||
"t122": "Sök online-modeller",
|
||||
"t123": "fat",
|
||||
"t124": ""
|
||||
},
|
||||
"cs_CZ": {
|
||||
"t1": "Vítejte v Bambu Studio",
|
||||
@ -1113,7 +1185,15 @@ var LangText={
|
||||
"t113": "Své preference můžete kdykoliv změnit.",
|
||||
"t114": "domovská stránka",
|
||||
"t115": "Šarže",
|
||||
"t116": "Zkuste to znovu"
|
||||
"t116": "Zkuste to znovu",
|
||||
"t117": "Historie tisku",
|
||||
"t118": "Tisk probíhá",
|
||||
"t119": "Úspěch",
|
||||
"t120": "zrušený",
|
||||
"t121": "Hledat",
|
||||
"t122": "Hledat online modely",
|
||||
"t123": "talíř",
|
||||
"t124": ""
|
||||
},
|
||||
"nl_NL": {
|
||||
"t1": "Welkom bij Bambu Studio",
|
||||
@ -1223,7 +1303,15 @@ var LangText={
|
||||
"t113": "U kunt uw keuze op elk gewenst moment wijzigen.",
|
||||
"t114": "startpagina",
|
||||
"t115": "Batch",
|
||||
"t116": "Probeer het opnieuw"
|
||||
"t116": "Probeer het opnieuw",
|
||||
"t117": "Afdrukhistoriek",
|
||||
"t118": "Aan het printen",
|
||||
"t119": "Succes",
|
||||
"t120": "geannuleerd",
|
||||
"t121": "Zoeken",
|
||||
"t122": "Zoek online modellen",
|
||||
"t123": "bord",
|
||||
"t124": ""
|
||||
},
|
||||
"uk_UA": {
|
||||
"t1": "Вітаємо в Bambu Studio!",
|
||||
@ -1333,7 +1421,15 @@ var LangText={
|
||||
"t113": "Ви можете змінити свої переваги в будь-який час.",
|
||||
"t114": "Головна сторінка",
|
||||
"t115": "Одна партія",
|
||||
"t116": "Спробувати знову"
|
||||
"t116": "Спробувати знову",
|
||||
"t117": "Історія друку",
|
||||
"t118": "Друкується",
|
||||
"t119": "Успіх",
|
||||
"t120": "скасований",
|
||||
"t121": "Пошук",
|
||||
"t122": "Пошук онлайн-моделей",
|
||||
"t123": "тарілка",
|
||||
"t124": ""
|
||||
},
|
||||
"ru_RU": {
|
||||
"t1": "Приветствуем в Bambu Studio!",
|
||||
@ -1443,7 +1539,15 @@ var LangText={
|
||||
"t113": "Вы можете изменить свои предпочтения в любое время.",
|
||||
"t114": "Главная страница",
|
||||
"t115": "Одна партия",
|
||||
"t116": "Повторить попытку"
|
||||
"t116": "Повторить попытку",
|
||||
"t117": "История печати",
|
||||
"t118": "Печатается",
|
||||
"t119": "Успех",
|
||||
"t120": "отмененный",
|
||||
"t121": "Поиск",
|
||||
"t122": "Поиск онлайн-моделей",
|
||||
"t123": "тарелка",
|
||||
"t124": ""
|
||||
},
|
||||
"tr_TR": {
|
||||
"t1": "Bambu Stüdyo'ya Hoş Geldiniz",
|
||||
@ -1553,7 +1657,15 @@ var LangText={
|
||||
"t113": "ercihlerinizde istediğiniz zaman seçiminizi değiştirebilirsiniz.",
|
||||
"t114": "Ana Sayfa",
|
||||
"t115": "Toplu",
|
||||
"t116": "Yeniden Dene"
|
||||
"t116": "Yeniden Dene",
|
||||
"t117": "Yazdırma geçmişi",
|
||||
"t118": "Yazdırılıyor",
|
||||
"t119": "Başarılı",
|
||||
"t120": "iptal edildi",
|
||||
"t121": "Arama",
|
||||
"t122": "Çevrimiçi modelleri arayın",
|
||||
"t123": "tabak",
|
||||
"t124": ""
|
||||
},
|
||||
"pt_BR": {
|
||||
"t1": "Bem-vindo ao Bambu Studio",
|
||||
@ -1663,7 +1775,15 @@ var LangText={
|
||||
"t113": "Você pode alterar sua escolha nas Preferências a qualquer momento",
|
||||
"t114": "Inicio",
|
||||
"t115": "Lote",
|
||||
"t116": "Retentar"
|
||||
"t116": "Retentar",
|
||||
"t117": "Histórico de impressão",
|
||||
"t118": "Imprimindo",
|
||||
"t119": "Sucesso",
|
||||
"t120": "cancelado",
|
||||
"t121": "Pesquisa",
|
||||
"t122": "Procurar modelos online",
|
||||
"t123": "prato",
|
||||
"t124": ""
|
||||
},
|
||||
"ko_KR": {
|
||||
"t1": "Bambu Studio에 오신 것을 환영합니다",
|
||||
@ -1773,7 +1893,15 @@ var LangText={
|
||||
"t113": "언제든지 환경 설정에서 선택을 변경할 수 있습니다.",
|
||||
"t114": "홈",
|
||||
"t115": "일괄 처리",
|
||||
"t116": "재시도"
|
||||
"t116": "재시도",
|
||||
"t117": "인쇄 기록",
|
||||
"t118": "인쇄 중",
|
||||
"t119": "성공",
|
||||
"t120": "취소된",
|
||||
"t121": "검색",
|
||||
"t122": "온라인 모델을 검색하다",
|
||||
"t123": "접시",
|
||||
"t124": ""
|
||||
},
|
||||
"pl_PL": {
|
||||
"t1": "Witamy w Bambu Studio",
|
||||
@ -1883,7 +2011,15 @@ var LangText={
|
||||
"t113": "Opcja można zmienić w preferencjach w dowolnym momencie.",
|
||||
"t114": "Strona główna",
|
||||
"t115": "Wartość zbiorcza",
|
||||
"t116": "Ponów"
|
||||
"t116": "Ponów",
|
||||
"t117": "Historia druku",
|
||||
"t118": "Drukuje się",
|
||||
"t119": "Sukces",
|
||||
"t120": "anulowany",
|
||||
"t121": "Wyszukiwanie",
|
||||
"t122": "Wyszukaj modele online",
|
||||
"t123": "talerz",
|
||||
"t124": ""
|
||||
}
|
||||
};
|
||||
|
||||
@ -1926,3 +2062,35 @@ function TranslatePage()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function GetCurrentTextByKey( key )
|
||||
{
|
||||
let strLang=GetQueryString("lang");
|
||||
if(strLang!=null)
|
||||
{
|
||||
//setCookie(LANG_COOKIE_NAME,strLang,LANG_COOKIE_EXPIRESECOND,'/');
|
||||
localStorage.setItem(LANG_COOKIE_NAME,strLang);
|
||||
}
|
||||
else
|
||||
{
|
||||
//strLang=getCookie(LANG_COOKIE_NAME);
|
||||
strLang=localStorage.getItem(LANG_COOKIE_NAME);
|
||||
}
|
||||
|
||||
//alert(strLang);
|
||||
|
||||
if( !LangText.hasOwnProperty(strLang) )
|
||||
strLang="en";
|
||||
|
||||
let strText='';
|
||||
if( LangText[strLang].hasOwnProperty(key) )
|
||||
{
|
||||
strText=LangText[strLang][key];
|
||||
}
|
||||
else if(strLang!='en' && LangText['en'].hasOwnProperty(key) )
|
||||
{
|
||||
strText=LangText['en'][key];
|
||||
}
|
||||
|
||||
return strText;
|
||||
}
|
||||
|
@ -15,6 +15,7 @@ html, body {
|
||||
padding:0px;
|
||||
border: 0px;
|
||||
margin: 0px;
|
||||
background-color: #FFF;
|
||||
}
|
||||
|
||||
/*---字体----*/
|
||||
@ -91,8 +92,14 @@ html, body {
|
||||
#MenuArea
|
||||
{
|
||||
display:flex;
|
||||
justify-content: flex-end;
|
||||
margin-bottom: 24px;
|
||||
flex-direction:row-reverse;
|
||||
}
|
||||
|
||||
#MenuBtnBlock
|
||||
{
|
||||
display:flex;
|
||||
margin-left: 60px;
|
||||
}
|
||||
|
||||
.Menu_Btn
|
||||
@ -109,6 +116,13 @@ html, body {
|
||||
width: 18px;
|
||||
}
|
||||
|
||||
.Menu_Btn span
|
||||
{
|
||||
display: inline-block;
|
||||
width: 100%;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
/*---弹性内容块---*/
|
||||
.GuideBlock
|
||||
{
|
||||
@ -121,7 +135,7 @@ html, body {
|
||||
{
|
||||
width: calc(50% - 20px);
|
||||
}
|
||||
.SingleGuideBar :nth-child(n+3)
|
||||
.SingleGuideBar > :nth-child(n+3)
|
||||
{
|
||||
display: none;
|
||||
}
|
||||
@ -133,7 +147,7 @@ html, body {
|
||||
{
|
||||
width: calc(33% - 20px);
|
||||
}
|
||||
.SingleGuideBar :nth-child(n+4)
|
||||
.SingleGuideBar > :nth-child(n+4)
|
||||
{
|
||||
display: none;
|
||||
}
|
||||
@ -144,7 +158,7 @@ html, body {
|
||||
{
|
||||
width: calc(25% - 20px);
|
||||
}
|
||||
.SingleGuideBar :nth-child(n+5)
|
||||
.SingleGuideBar > :nth-child(n+5)
|
||||
{
|
||||
display: none;
|
||||
}
|
||||
@ -155,7 +169,7 @@ html, body {
|
||||
{
|
||||
width: calc(20% - 20px);
|
||||
}
|
||||
.SingleGuideBar :nth-child(n+6)
|
||||
.SingleGuideBar > :nth-child(n+6)
|
||||
{
|
||||
display: none;
|
||||
}
|
||||
|
@ -107,3 +107,43 @@ html,body
|
||||
{
|
||||
filter: invert(1);
|
||||
}
|
||||
|
||||
#HotModel_Search_Bar
|
||||
{
|
||||
border: 1px solid #323A3D;
|
||||
background-color: #36363A;
|
||||
}
|
||||
|
||||
#HotModel_Search_InputArea
|
||||
{
|
||||
background-color: #36363A;
|
||||
}
|
||||
|
||||
#HotModel_Search_Input
|
||||
{
|
||||
background-color: #36363A;
|
||||
caret-color: white;
|
||||
color: #FFFFFF;
|
||||
}
|
||||
|
||||
#HotModel_Search_Btn img
|
||||
{
|
||||
filter: invert(100%) brightness(100);
|
||||
}
|
||||
|
||||
/*----Makerlab-----*/
|
||||
.MakerlabItem
|
||||
{
|
||||
border: none;
|
||||
}
|
||||
|
||||
/*---Print History----*/
|
||||
.PrintHistoryImg img
|
||||
{
|
||||
border: 1px solid #474747;
|
||||
}
|
||||
|
||||
#PrintHistory_Refresh_Btn
|
||||
{
|
||||
filter: invert(80%) brightness(20);
|
||||
}
|
||||
|
@ -32,14 +32,14 @@ body
|
||||
word-break: break-all;
|
||||
position: relative;
|
||||
cursor: pointer;
|
||||
border-radius: 8px;
|
||||
border-radius: 8px;
|
||||
border: 1px solid #EEEEEE;
|
||||
}
|
||||
|
||||
.MakerlabImg img
|
||||
{
|
||||
width: 100%;
|
||||
aspect-radio: 16/9;
|
||||
border-radius: 8px 8px 0px 0px;
|
||||
}
|
||||
|
||||
.MakerlabTextBlock
|
||||
@ -71,4 +71,165 @@ body
|
||||
{
|
||||
font-size: 10px;
|
||||
color: #ACACAC;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*------Print History------*/
|
||||
#PrintHistoryArea
|
||||
{
|
||||
display: none;
|
||||
min-height: 100px;
|
||||
}
|
||||
|
||||
#PrintHistory_Refresh_Btn
|
||||
{
|
||||
margin-left: 30px;
|
||||
cursor: pointer;
|
||||
filter: brightness(3);
|
||||
width: 24px;
|
||||
}
|
||||
|
||||
#PrintHistory_Refresh_Btn:hover
|
||||
{
|
||||
width: 27px;
|
||||
}
|
||||
|
||||
#PrintHistoryList
|
||||
{
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.PrintHistoryItem
|
||||
{
|
||||
position: relative;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
overflow: hidden;
|
||||
word-break: break-all;
|
||||
position: relative;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.PrintHistoryImg img
|
||||
{
|
||||
border-radius: 12px;
|
||||
width: calc(100% - 2px);
|
||||
aspect-ratio: 4/3;
|
||||
object-fit:contain;
|
||||
border: 1px solid #EEEEEE;
|
||||
}
|
||||
|
||||
.PrintHistoryTextBlock
|
||||
{
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.PrintHistoryName
|
||||
{
|
||||
font-size: 14px;
|
||||
font-weight: 700;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.PrintHistory_Line2
|
||||
{
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.PrintHistory_Line2 img
|
||||
{
|
||||
width: 14px;
|
||||
height: 14px;
|
||||
margin-right: 4px;
|
||||
}
|
||||
|
||||
.PH_PrintTime
|
||||
{
|
||||
width: 50px;
|
||||
margin-right: 4px;
|
||||
}
|
||||
|
||||
.PH_DeviceName
|
||||
{
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.PrintHistoryInfo
|
||||
{
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.PrintHistoryPlate
|
||||
{
|
||||
display: flex;
|
||||
font-size: 12px;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.PH_PlateName
|
||||
{
|
||||
flex-grow: 1;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.PH_PrintDate
|
||||
{
|
||||
margin-left: 4px;
|
||||
}
|
||||
|
||||
|
||||
.PrintHistoryStatus
|
||||
{
|
||||
margin-left: 6px;
|
||||
font-size: 12px;
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
.PH_Status_Printing
|
||||
{
|
||||
color: #FF6F00;
|
||||
}
|
||||
|
||||
.PH_Status_Fail
|
||||
{
|
||||
color: #D01B1B;
|
||||
}
|
||||
|
||||
.PH_Status_Success
|
||||
{
|
||||
color: #00AE42;
|
||||
}
|
||||
|
||||
.PH_Gcode_Icon
|
||||
{
|
||||
background-color: #5C5C5C;
|
||||
display: inline-block;
|
||||
padding: 6px 12px;
|
||||
width: Hug (61px)px;
|
||||
height: Hug (28px)px;
|
||||
gap: 10px;
|
||||
border-radius: 12px 0px 4px 0px;
|
||||
opacity: 0px;
|
||||
color: #FFFFFF;
|
||||
position: absolute;
|
||||
top: 1px;
|
||||
left: 1px;
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
|
@ -215,6 +215,12 @@ body
|
||||
display: none;
|
||||
}
|
||||
|
||||
.BtnItem[menu="printhistory"]
|
||||
{
|
||||
display: none;
|
||||
}
|
||||
|
||||
|
||||
.JumpIcon
|
||||
{
|
||||
display: none;
|
||||
|
@ -59,8 +59,7 @@
|
||||
{
|
||||
display:flex;
|
||||
flex-direction: column;
|
||||
cursor: pointer;
|
||||
border-radius: 8px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.HotModel_PrevBlock
|
||||
@ -160,3 +159,42 @@
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
/*-----Search Bar------*/
|
||||
#HotModel_Search_Bar
|
||||
{
|
||||
display: none;
|
||||
align-items: center;
|
||||
border-radius: 22px;
|
||||
border: 1px solid #EEEEEE;
|
||||
flex-grow: 1;
|
||||
background-color: #FFFFFF;
|
||||
}
|
||||
|
||||
#HotModel_Search_InputArea
|
||||
{
|
||||
background-color: #FFF;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
flex-grow: 1;
|
||||
padding: 0px 22px 0px 0px;
|
||||
border-radius: 22px 0px 0px 22px;
|
||||
}
|
||||
|
||||
#HotModel_Search_Input
|
||||
{
|
||||
height: 30px;
|
||||
flex-grow: 1;
|
||||
outline: none;
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
|
||||
#HotModel_Search_Btn
|
||||
{
|
||||
width: 60px;
|
||||
height: 100%;
|
||||
border-radius: 0px 22px 22px 0px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
@ -102,7 +102,6 @@
|
||||
word-break: break-all;
|
||||
position: relative;
|
||||
cursor: pointer;
|
||||
border-radius: 8px;
|
||||
}
|
||||
|
||||
.FileMask
|
||||
|
@ -1,7 +1,7 @@
|
||||
|
||||
html
|
||||
{
|
||||
background-color: #F8F8F8;
|
||||
background-color: #FFF;
|
||||
padding: 28px 36px;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
|
@ -22,7 +22,7 @@
|
||||
<div id="WarnMainArea">
|
||||
<div id="WarnIcon"><img src="img/disconnect.svg" /></div>
|
||||
<div id="WarnTip" class="trans TextS1" tid="t40">Network disconnect, please check and try again later.</div>
|
||||
<div id="WarnBtn" class="trans Btn_Green" tid="t116" onClick="SwitchContent('online')">Retry</div>
|
||||
<div id="WarnBtn" class="trans Btn_Green" tid="t116" onClick="OnLineRetry()">Retry</div>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
|
@ -18,20 +18,30 @@
|
||||
<script type="text/javascript" src="../include/globalapi.js"></script>
|
||||
|
||||
<script type="text/javascript" src="../data/text.js"></script>
|
||||
|
||||
<script type="text/javascript" src="js/test.js"></script>
|
||||
<script type="text/javascript" src="js/home.js"></script>
|
||||
<!--<script type="text/javascript" src="js/test.js"></script>-->
|
||||
|
||||
</head>
|
||||
<body class="ZScrol" onLoad="OnHomeInit()">
|
||||
|
||||
<!----------Project Menu---------->
|
||||
<div id="MenuArea">
|
||||
<div class="Menu_Btn Btn_White" onClick="OnClickOpenProject()">
|
||||
<img src="img/project_open.svg" /><span class="trans" tid='t33'>Open Project</span>
|
||||
</div>
|
||||
<div class="Menu_Btn Btn_Green" onClick="OnClickNewProject()">
|
||||
<img src="img/project_new.svg" /><span class="trans" tid='t32'>Create new project</span>
|
||||
</div>
|
||||
<div id="MenuBtnBlock">
|
||||
<div class="Menu_Btn Btn_White" onClick="OnClickOpenProject()">
|
||||
<img src="img/project_open.svg" /><span class="trans" tid='t33'>Open Project</span>
|
||||
</div>
|
||||
<div class="Menu_Btn Btn_Green" onClick="OnClickNewProject()">
|
||||
<img src="img/project_new.svg" /><span class="trans" tid='t32'>Create new project</span>
|
||||
</div>
|
||||
</div>
|
||||
<div id="HotModel_Search_Bar">
|
||||
<div id="HotModel_Search_Btn" >
|
||||
<img src="img/search.svg" />
|
||||
</div>
|
||||
<div id="HotModel_Search_InputArea">
|
||||
<input id="HotModel_Search_Input" maxlength="1000" placeholder="" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@ -101,7 +111,7 @@
|
||||
<div class="Content-Title trans TextS1" tid="t107">Online Models</div>
|
||||
</div>
|
||||
<div class="Right_Title_More TextS1" onClick="SwtichLeftMenu('online')"><span class="trans" tid="t108">MORE</span> ></div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="HotModelList" class="SingleGuideBar">
|
||||
<!-- <div class="HotModelPiece GuideBlock" onClick="OpenOneStaffPickModel(1)">
|
||||
<div class="HotModel_PrevBlock">
|
||||
@ -256,7 +266,8 @@
|
||||
<div class="Right_Title_More TextS1" onClick="SwtichLeftMenu('makerlab')"><span class="trans" tid="t108">MORE</span> ></div>
|
||||
</div>
|
||||
<div id="LabList" class="SingleGuideBar">
|
||||
<!-- <div class="MakerlabItem GuideBlock" onClick="OnOpenOneMakerlab('aaaa')" >
|
||||
<!--
|
||||
<div class="MakerlabItem GuideBlock" onClick="OnOpenOneMakerlab('aaaa')" >
|
||||
<div class="MakerlabImg"><img src="img/ml1.jpg"/></div>
|
||||
<div class="MakerlabTextBlock">
|
||||
<div class="MakerlabName">xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx</div>
|
||||
@ -303,10 +314,136 @@
|
||||
<div class="MakerlabDesc">xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx</div>
|
||||
<div class="MakerlabAuthor">xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx</div>
|
||||
</div>
|
||||
</div> -->
|
||||
</div>
|
||||
-->
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-------------Print History-------------->
|
||||
<div id="PrintHistoryArea">
|
||||
<div id="PrintHistory_Bar" class="Title_Bar">
|
||||
<div class="Title_Left_Area">
|
||||
<img class="TitleSmallIcon" src="./img/ph.svg" />
|
||||
<div class="Content-Title trans TextS1" tid="t117">Print History</div>
|
||||
<img id="PrintHistory_Refresh_Btn" src="img/refresh.svg" onClick="SendMsg_GetPrintHistory()" />
|
||||
</div>
|
||||
<div class="Right_Title_More TextS1" onClick="SwtichLeftMenu('printhistory')"><span class="trans" tid="t108">MORE</span> ></div>
|
||||
</div>
|
||||
|
||||
<div id="PrintHistoryList" class="SingleGuideBar">
|
||||
|
||||
<!-- <div class="PrintHistoryItem GuideBlock" onClick="OnOpenPrintHistory(0)" >
|
||||
<div class="PrintHistoryImg"><img src="img/ml1.jpg"/></div>
|
||||
<div class="PrintHistoryTextBlock">
|
||||
<div class="PrintHistoryName TextS1">xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx</div>
|
||||
<div class="PrintHistory_Line2">
|
||||
<img src="img/time.svg" /><span class="PH_PrintTime TextS2">999.5h</span>
|
||||
<img src="img/device.svg" /><span class="PH_DeviceName TextS2">XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX</span>
|
||||
</div>
|
||||
<div class="PrintHistoryInfo">
|
||||
<div class="PrintHistoryPlate TextS2">
|
||||
<div class="PH_PlateName"><span tid="t123" class="trans"></span> 1<span title="t124" class="trans"></span></div>
|
||||
<div class="PH_PrintDate">(2022/07/22 21:11)</div>
|
||||
</div>
|
||||
<div class="PrintHistoryStatus PH_Status_Printing TextS2 trans" tid="t118">Printing</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="PH_Gcode_Icon">Gcode</div>
|
||||
</div>
|
||||
<div class="PrintHistoryItem GuideBlock" onClick="OnOpenPrintHistory(0)" >
|
||||
<div class="PrintHistoryImg"><img src="img/ml1.jpg"/></div>
|
||||
<div class="PrintHistoryTextBlock">
|
||||
<div class="PrintHistoryName TextS1">xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx</div>
|
||||
<div class="PrintHistory_Line2">
|
||||
<img src="img/time.svg" /><span class="PH_PrintTime TextS2">999.5h</span>
|
||||
<img src="img/device.svg" /><span class="PH_DeviceName TextS2">XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX</span>
|
||||
</div>
|
||||
<div class="PrintHistoryInfo">
|
||||
<div class="PrintHistoryPlate TextS2">
|
||||
<div class="PH_PlateName"><span tid="t123" class="trans"></span> 1<span title="t124" class="trans"> - xxxxxxxxxxxxx</span></div>
|
||||
<div class="PH_PrintDate">(2022/07/22 21:11)</div>
|
||||
</div>
|
||||
<div class="PrintHistoryStatus PH_Status_Success TextS2 trans" tid="t119">Success</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="PH_Gcode_Icon">Gcode</div>
|
||||
</div>
|
||||
<div class="PrintHistoryItem GuideBlock" onClick="OnOpenPrintHistory(0)" >
|
||||
<div class="PrintHistoryImg"><img src="img/ml1.jpg"/></div>
|
||||
<div class="PrintHistoryTextBlock">
|
||||
<div class="PrintHistoryName TextS1">xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx</div>
|
||||
<div class="PrintHistory_Line2">
|
||||
<img src="img/time.svg" /><span class="PH_PrintTime TextS2">999.5h</span>
|
||||
<img src="img/device.svg" /><span class="PH_DeviceName TextS2">XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX</span>
|
||||
</div>
|
||||
<div class="PrintHistoryInfo">
|
||||
<div class="PrintHistoryPlate TextS2">
|
||||
<div class="PH_PlateName"><span tid="t123" class="trans"></span> 1<span title="t124" class="trans"></span></div>
|
||||
<div class="PH_PrintDate">(2022/07/22 21:11)</div>
|
||||
</div>
|
||||
<div class="PrintHistoryStatus PH_Status_Fail TextS2 trans" tid="t120">Canceled</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="PH_Gcode_Icon">Gcode</div>
|
||||
</div>
|
||||
<div class="PrintHistoryItem GuideBlock" onClick="OnOpenPrintHistory(0)" >
|
||||
<div class="PrintHistoryImg"><img src="img/ml1.jpg"/></div>
|
||||
<div class="PrintHistoryTextBlock">
|
||||
<div class="PrintHistoryName TextS1">xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx</div>
|
||||
<div class="PrintHistory_Line2">
|
||||
<img src="img/time.svg" /><span class="PH_PrintTime TextS2">999.5h</span>
|
||||
<img src="img/device.svg" /><span class="PH_DeviceName TextS2">XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX</span>
|
||||
</div>
|
||||
<div class="PrintHistoryInfo">
|
||||
<div class="PrintHistoryPlate TextS2">
|
||||
<div class="PH_PlateName"><span tid="t123" class="trans"></span> 1<span title="t124" class="trans"></span></div>
|
||||
<div class="PH_PrintDate">(2022/07/22 21:11)</div>
|
||||
</div>
|
||||
<div class="PrintHistoryStatus PH_Status_Printing TextS2 trans" tid="t118">Printing</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="PH_Gcode_Icon">Gcode</div>
|
||||
</div>
|
||||
<div class="PrintHistoryItem GuideBlock" onClick="OnOpenPrintHistory(0)" >
|
||||
<div class="PrintHistoryImg"><img src="img/ml1.jpg"/></div>
|
||||
<div class="PrintHistoryTextBlock">
|
||||
<div class="PrintHistoryName TextS1">xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx</div>
|
||||
<div class="PrintHistory_Line2">
|
||||
<img src="img/time.svg" /><span class="PH_PrintTime TextS2">999.5h</span>
|
||||
<img src="img/device.svg" /><span class="PH_DeviceName TextS2">XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX</span>
|
||||
</div>
|
||||
<div class="PrintHistoryInfo">
|
||||
<div class="PrintHistoryPlate TextS2">
|
||||
<div class="PH_PlateName">xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx</div>
|
||||
<div class="PH_PrintDate">(2022/07/22 21:11)</div>
|
||||
</div>
|
||||
<div class="PrintHistoryStatus PH_Status_Printing TextS2 trans" tid="t118">Printing</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="PH_Gcode_Icon">Gcode</div>
|
||||
</div>
|
||||
<div class="PrintHistoryItem GuideBlock" onClick="OnOpenPrintHistory(0)" >
|
||||
<div class="PrintHistoryImg"><img src="img/ml1.jpg"/></div>
|
||||
<div class="PrintHistoryTextBlock">
|
||||
<div class="PrintHistoryName TextS1">xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx</div>
|
||||
<div class="PrintHistory_Line2">
|
||||
<img src="img/time.svg" /><span class="PH_PrintTime TextS2">999.5h</span>
|
||||
<img src="img/device.svg" /><span class="PH_DeviceName TextS2">XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX</span>
|
||||
</div>
|
||||
<div class="PrintHistoryInfo">
|
||||
<div class="PrintHistoryPlate TextS2">
|
||||
<div class="PH_PlateName"><span tid="t123" class="trans"></span> 1<span title="t124" class="trans"></span></div>
|
||||
<div class="PH_PrintDate">(2022/07/22 21:11)</div>
|
||||
</div>
|
||||
<div class="PrintHistoryStatus PH_Status_Printing TextS2 trans" tid="t118">Printing</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="PH_Gcode_Icon">Gcode</div>
|
||||
</div> -->
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<!----------Recent Context Menu--------->
|
||||
|
15
resources/web/homepage3/img/device.svg
Normal file
@ -0,0 +1,15 @@
|
||||
<svg width="14" height="14" viewBox="0 0 14 14" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<g clip-path="url(#clip0_18273_33564)">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M1.46387 3.92552C1.46387 3.64575 1.68122 3.41895 1.94934 3.41895H10.2717C10.5398 3.41895 10.7572 3.64575 10.7572 3.92552V12.6097C10.7572 12.8895 10.5398 13.1163 10.2717 13.1163H1.94934C1.68122 13.1163 1.46387 12.8895 1.46387 12.6097V3.92552ZM2.43481 4.4321V12.1032H9.78623V4.4321H2.43481Z" fill="#595959"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M4.6844 1.15161C4.76844 1.08584 4.87064 1.05029 4.97569 1.05029H12.5415C12.7378 1.05029 12.9148 1.17372 12.99 1.36301C13.0651 1.55231 13.0236 1.7702 12.8848 1.91508L10.615 4.2835C10.524 4.3785 10.4005 4.43187 10.2717 4.43187H1.94937C1.74041 4.43187 1.55489 4.29234 1.48881 4.08549C1.42273 3.87863 1.49092 3.65086 1.65809 3.52003L4.6844 1.15161ZM5.13751 2.06345L3.40578 3.41871H10.0706L11.3694 2.06345H5.13751Z" fill="#595959"/>
|
||||
<path d="M6.48921 7.08301H12.5418L10.2721 10.2409H3.46289L6.48921 7.08301Z" fill="#DDDDDD"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M7.24543 3.37305C7.53792 3.37305 7.77503 3.62047 7.77503 3.92568V6.2941C7.77503 6.59931 7.53792 6.84673 7.24543 6.84673C6.95293 6.84673 6.71582 6.59931 6.71582 6.2941V3.92568C6.71582 3.62047 6.95293 3.37305 7.24543 3.37305Z" fill="#595959"/>
|
||||
<path d="M10.2715 3.92555L12.5412 1.55713V9.45187L10.2715 12.6098V3.92555Z" fill="#DDDDDD"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M12.7271 1.08887C12.9085 1.16728 13.0268 1.35199 13.0268 1.55689V9.45162C13.0268 9.56123 12.9927 9.66788 12.9297 9.75557L10.66 12.9135C10.5346 13.0879 10.3163 13.1591 10.1181 13.0901C9.91985 13.0211 9.78613 12.8276 9.78613 12.6095V3.92531C9.78613 3.79095 9.83728 3.6621 9.92832 3.5671L12.1981 1.19868C12.3369 1.0538 12.5457 1.01046 12.7271 1.08887ZM10.7571 4.13514V11.0898L12.0559 9.28276V2.77988L10.7571 4.13514Z" fill="#595959"/>
|
||||
</g>
|
||||
<defs>
|
||||
<clipPath id="clip0_18273_33564">
|
||||
<rect width="13.4167" height="14" fill="white" transform="translate(0.458008)"/>
|
||||
</clipPath>
|
||||
</defs>
|
||||
</svg>
|
After Width: | Height: | Size: 2.0 KiB |
8
resources/web/homepage3/img/left_ph.svg
Normal file
@ -0,0 +1,8 @@
|
||||
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M5.40039 4.91553H17.0909C17.3671 4.91553 17.5909 5.13939 17.5909 5.41553V9.8976C18.1143 9.97737 18.617 10.1201 19.0909 10.3179V5.41553C19.0909 4.31096 18.1955 3.41553 17.0909 3.41553H5.40039C4.29582 3.41553 3.40039 4.31096 3.40039 5.41553V19.0272C3.40039 20.1317 4.29582 21.0272 5.40039 21.0272H12.2727C11.7959 20.5923 11.3846 20.0868 11.0554 19.5272H5.40039C5.12425 19.5272 4.90039 19.3033 4.90039 19.0272V5.41553C4.90039 5.13938 5.12425 4.91553 5.40039 4.91553Z" fill="#6B6B6B"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M16.1221 7.88135C16.1221 8.29556 15.7863 8.63135 15.3721 8.63135L6.90246 8.63135C6.48824 8.63135 6.15246 8.29556 6.15246 7.88135C6.15246 7.46713 6.48824 7.13135 6.90246 7.13135L15.3721 7.13135C15.7863 7.13135 16.1221 7.46713 16.1221 7.88135Z" fill="#6B6B6B"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M10.667 12.2212C10.667 12.6354 10.3312 12.9712 9.91699 12.9712H6.90238C6.48816 12.9712 6.15238 12.6354 6.15238 12.2212C6.15238 11.807 6.48816 11.4712 6.90238 11.4712H9.91699C10.3312 11.4712 10.667 11.807 10.667 12.2212Z" fill="#6B6B6B"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M10.667 16.561C10.667 16.9752 10.3312 17.311 9.91699 17.311H6.90238C6.48816 17.311 6.15238 16.9752 6.15238 16.561C6.15238 16.1468 6.48816 15.811 6.90238 15.811H9.91699C10.3312 15.811 10.667 16.1468 10.667 16.561Z" fill="#6B6B6B"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M16.6118 12.7271C14.6577 12.7271 13.0732 14.3115 13.0732 16.2656C13.0732 18.2198 14.6577 19.8042 16.6118 19.8042C17.4261 19.8042 18.1742 19.5299 18.7723 19.0681C19.1002 18.815 19.5712 18.8756 19.8243 19.2035C20.0774 19.5313 20.0168 20.0023 19.689 20.2555C18.8379 20.9125 17.7698 21.3042 16.6118 21.3042C13.8292 21.3042 11.5732 19.0482 11.5732 16.2656C11.5732 13.483 13.8292 11.2271 16.6118 11.2271C19.3944 11.2271 21.6504 13.483 21.6504 16.2656C21.6504 17.0661 21.4632 17.8243 21.1296 18.4983C20.9459 18.8696 20.496 19.0216 20.1248 18.8379C19.7536 18.6541 19.6015 18.2043 19.7853 17.833C20.0189 17.3609 20.1504 16.8299 20.1504 16.2656C20.1504 14.3115 18.566 12.7271 16.6118 12.7271Z" fill="#6B6B6B"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M16.2773 12.918C16.6916 12.918 17.0273 13.2538 17.0273 13.668V15.8262H18.8871C19.3013 15.8262 19.6371 16.162 19.6371 16.5762C19.6371 16.9905 19.3013 17.3262 18.8871 17.3262H16.4953C15.9607 17.3262 15.5273 16.8929 15.5273 16.3583V13.668C15.5273 13.2538 15.8631 12.918 16.2773 12.918Z" fill="#6B6B6B"/>
|
||||
</svg>
|
After Width: | Height: | Size: 2.5 KiB |
23
resources/web/homepage3/img/ph.svg
Normal file
@ -0,0 +1,23 @@
|
||||
<svg width="28" height="28" viewBox="0 0 28 28" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<rect x="2.42383" y="2.28613" width="18.3456" height="22.6158" rx="3" fill="url(#paint0_linear_18237_33272)"/>
|
||||
<circle cx="18.5852" cy="19.6536" r="6.0598" fill="url(#paint1_linear_18237_33272)"/>
|
||||
<circle cx="19.5178" cy="19.614" r="6.0598" fill="url(#paint2_linear_18237_33272)"/>
|
||||
<path d="M19.5176 15.8853V19.5466C19.5176 20.0989 19.9653 20.5466 20.5176 20.5466H22.5475" stroke="white" stroke-width="1.5" stroke-linecap="round"/>
|
||||
<path d="M6.42285 6.67041H16.7712" stroke="white" stroke-width="2" stroke-linecap="round"/>
|
||||
<path d="M6.42285 13.6084H12.1177" stroke="white" stroke-width="2" stroke-linecap="round"/>
|
||||
<path d="M6.42285 20.5469H10.592" stroke="white" stroke-width="2" stroke-linecap="round"/>
|
||||
<defs>
|
||||
<linearGradient id="paint0_linear_18237_33272" x1="11.5966" y1="2.28613" x2="11.5966" y2="24.9019" gradientUnits="userSpaceOnUse">
|
||||
<stop stop-color="#6662FF"/>
|
||||
<stop offset="1" stop-color="#8945F8"/>
|
||||
</linearGradient>
|
||||
<linearGradient id="paint1_linear_18237_33272" x1="18.5852" y1="13.5937" x2="18.5852" y2="25.7134" gradientUnits="userSpaceOnUse">
|
||||
<stop stop-color="#A8A6FF"/>
|
||||
<stop offset="1" stop-color="#7345FF"/>
|
||||
</linearGradient>
|
||||
<linearGradient id="paint2_linear_18237_33272" x1="19.5178" y1="13.5542" x2="19.5178" y2="25.6738" gradientUnits="userSpaceOnUse">
|
||||
<stop stop-color="#8C82FF"/>
|
||||
<stop offset="1" stop-color="#9E9CFF"/>
|
||||
</linearGradient>
|
||||
</defs>
|
||||
</svg>
|
After Width: | Height: | Size: 1.4 KiB |
3
resources/web/homepage3/img/refresh.svg
Normal file
@ -0,0 +1,3 @@
|
||||
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M20.069 10.7578C20.5849 10.7578 21 10.3428 21 9.82681V4.2406C21 3.72466 20.5849 3.30957 20.069 3.30957C19.553 3.30957 19.1379 3.72466 19.1379 4.2406V7.34793L18.3621 6.43629C16.7716 4.52767 14.3703 3.30957 11.6897 3.30957C6.89095 3.30957 3 7.20052 3 11.9992C3 16.7979 6.89095 20.6889 11.6897 20.6889C13.6448 20.6889 15.4526 20.041 16.9034 18.951C17.3147 18.6406 17.3961 18.0587 17.0897 17.6475C16.7832 17.2363 16.1974 17.1548 15.7862 17.4613C14.6457 18.3186 13.2297 18.8268 11.6897 18.8268C7.91897 18.8268 4.86207 15.7699 4.86207 11.9992C4.86207 8.22854 7.91897 5.17164 11.6897 5.17164C13.7961 5.17164 15.6815 6.12595 16.9345 7.63112L16.9384 7.63888L18.0091 8.89578H14.4828C13.9668 8.89578 13.5517 9.31086 13.5517 9.82681C13.5517 10.3428 13.9668 10.7578 14.4828 10.7578H20.069Z" fill="#1F1F1F"/>
|
||||
</svg>
|
After Width: | Height: | Size: 907 B |
3
resources/web/homepage3/img/search.svg
Normal file
@ -0,0 +1,3 @@
|
||||
<svg width="19" height="20" viewBox="0 0 19 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M7.43718 16.285C9.03616 16.285 10.5107 15.7453 11.7171 14.8458L16.2555 19.5833C16.4661 19.8031 16.7438 19.9131 17.0406 19.9131C17.663 19.9131 18.1034 19.4133 18.1034 18.7737C18.1034 18.4738 18.0077 18.184 17.797 17.9741L13.2873 13.2566C14.2352 11.9573 14.8001 10.3481 14.8001 8.59904C14.8001 4.37127 11.4873 0.913086 7.43718 0.913086C3.39665 0.913086 0.0742188 4.36127 0.0742188 8.59904C0.0742188 12.8268 3.38707 16.285 7.43718 16.285ZM7.43718 14.6259C4.27752 14.6259 1.66362 11.8973 1.66362 8.59904C1.66362 5.30078 4.27752 2.57221 7.43718 2.57221C10.5968 2.57221 13.2107 5.30078 13.2107 8.59904C13.2107 11.8973 10.5968 14.6259 7.43718 14.6259Z" fill="#ACACAC"/>
|
||||
</svg>
|
After Width: | Height: | Size: 775 B |
3
resources/web/homepage3/img/search_dark.svg
Normal file
@ -0,0 +1,3 @@
|
||||
<svg width="19" height="20" viewBox="0 0 19 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M7.90105 15.4647C9.50002 15.4647 10.9745 14.925 12.1809 14.0254L16.7194 18.7629C16.93 18.9828 17.2077 19.0928 17.5045 19.0928C18.1268 19.0928 18.5673 18.593 18.5673 17.9534C18.5673 17.6535 18.4715 17.3637 18.2609 17.1538L13.7512 12.4363C14.6991 11.137 15.264 9.52781 15.264 7.77873C15.264 3.55095 11.9512 0.0927734 7.90105 0.0927734C3.86051 0.0927734 0.538086 3.54096 0.538086 7.77873C0.538086 12.0065 3.85094 15.4647 7.90105 15.4647ZM7.90105 13.8056C4.74139 13.8056 2.12749 11.077 2.12749 7.77873C2.12749 4.48046 4.74139 1.7519 7.90105 1.7519C11.0607 1.7519 13.6746 4.48046 13.6746 7.77873C13.6746 11.077 11.0607 13.8056 7.90105 13.8056Z" fill="white"/>
|
||||
</svg>
|
After Width: | Height: | Size: 767 B |
12
resources/web/homepage3/img/time.svg
Normal file
@ -0,0 +1,12 @@
|
||||
<svg width="14" height="15" viewBox="0 0 14 15" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M12.5778 7.45799C12.5778 4.06393 9.9498 1.3125 6.70801 1.3125V7.45799L10.85 11.8125C11.9172 10.6997 12.5778 9.1596 12.5778 7.45799Z" fill="#DDDDDD"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M6.70788 1.83809C3.74395 1.83809 1.34121 4.34529 1.34121 7.43809C1.34121 10.5309 3.74395 13.0381 6.70788 13.0381C9.67181 13.0381 12.0745 10.5309 12.0745 7.43809C12.0745 4.34529 9.67181 1.83809 6.70788 1.83809ZM0.334961 7.43809C0.334961 3.76539 3.18821 0.788086 6.70788 0.788086C10.2275 0.788086 13.0808 3.76539 13.0808 7.43809C13.0808 11.1108 10.2275 14.0881 6.70788 14.0881C3.18821 14.0881 0.334961 11.1108 0.334961 7.43809Z" fill="#595959"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M6.7082 5.16309C6.98607 5.16309 7.21133 5.39814 7.21133 5.68809V7.43809C7.21133 7.72804 6.98607 7.96309 6.7082 7.96309C6.43033 7.96309 6.20508 7.72804 6.20508 7.43809V5.68809C6.20508 5.39814 6.43033 5.16309 6.7082 5.16309Z" fill="#595959"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M6.35244 7.06685C6.54892 6.86183 6.86748 6.86183 7.06397 7.06685L8.74105 8.81686C8.93753 9.02188 8.93753 9.35429 8.74105 9.55932C8.54457 9.76434 8.22601 9.76434 8.02952 9.55932L6.35244 7.80932C6.15596 7.60429 6.15596 7.27188 6.35244 7.06685Z" fill="#595959"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M0.418945 7.4375C0.418945 7.19588 0.606659 7 0.838216 7H2.09603C2.32759 7 2.5153 7.19588 2.5153 7.4375C2.5153 7.67912 2.32759 7.875 2.09603 7.875H0.838216C0.606659 7.875 0.418945 7.67912 0.418945 7.4375Z" fill="#595959"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M10.9004 7.4375C10.9004 7.19588 11.0881 7 11.3197 7H12.5775C12.809 7 12.9967 7.19588 12.9967 7.4375C12.9967 7.67912 12.809 7.875 12.5775 7.875H11.3197C11.0881 7.875 10.9004 7.67912 10.9004 7.4375Z" fill="#595959"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M6.70833 14C6.47678 14 6.28906 13.8041 6.28906 13.5625L6.28906 12.25C6.28906 12.0084 6.47678 11.8125 6.70833 11.8125C6.93989 11.8125 7.1276 12.0084 7.1276 12.25L7.1276 13.5625C7.1276 13.8041 6.93989 14 6.70833 14Z" fill="#595959"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M6.70833 3.0625C6.47678 3.0625 6.28906 2.86662 6.28906 2.625L6.28906 1.3125C6.28906 1.07088 6.47678 0.875 6.70833 0.875C6.93989 0.875 7.1276 1.07088 7.1276 1.3125L7.1276 2.625C7.1276 2.86662 6.93989 3.0625 6.70833 3.0625Z" fill="#595959"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M2.3925 0.565641C2.55623 0.736495 2.55623 1.0135 2.3925 1.18436L1.13469 2.49686C0.97095 2.66771 0.705482 2.66771 0.541747 2.49686C0.378011 2.326 0.378011 2.049 0.541747 1.87814L1.79956 0.565641C1.96329 0.394786 2.22876 0.394786 2.3925 0.565641Z" fill="#595959"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M11.0235 0.565641C10.8598 0.736495 10.8598 1.0135 11.0235 1.18436L12.2813 2.49686C12.4451 2.66771 12.7105 2.66771 12.8743 2.49686C13.038 2.326 13.038 2.049 12.8743 1.87814L11.6165 0.565641C11.4527 0.394786 11.1873 0.394786 11.0235 0.565641Z" fill="#595959"/>
|
||||
</svg>
|
After Width: | Height: | Size: 3.0 KiB |
@ -4,6 +4,7 @@ var m_HotModelList=null;
|
||||
var m_ForUModelList=null;
|
||||
|
||||
var m_MakerlabList=null;
|
||||
var m_PrintHistoryList=null;
|
||||
|
||||
function OnHomeInit()
|
||||
{
|
||||
@ -13,8 +14,26 @@ function OnHomeInit()
|
||||
SendMsg_GetRecentFile();
|
||||
SendMsg_GetStaffPick();
|
||||
SendMsg_GetMakerlabList();
|
||||
SendMsg_GetPrintHistory();
|
||||
|
||||
document.getElementById('HotModel_Search_Input').onkeydown = function (event) {
|
||||
if (event.key === 'Enter') {
|
||||
OnSearchOnline();
|
||||
}
|
||||
|
||||
event.defaultPrevented();
|
||||
};
|
||||
|
||||
let ModelSearchTip=GetCurrentTextByKey('t122');
|
||||
$('#HotModel_Search_Input').prop('placeholder', ModelSearchTip);
|
||||
|
||||
//Test
|
||||
//ShowMakerlabList(Test_MakerlabList['list']);
|
||||
|
||||
//$('#PrintHistoryArea').show();
|
||||
//ShowPrintHistory(Test_PrintTaskList['hits']);
|
||||
|
||||
//Show4UPick(Test_4UModelList['hits']);
|
||||
}
|
||||
|
||||
//Recent详情页面的状态
|
||||
@ -31,9 +50,25 @@ function OnRecentInit()
|
||||
Set_RecentFile_Delete_Checkbox_Event();
|
||||
}
|
||||
|
||||
var m_LineMenuName='';
|
||||
function OnLineInit()
|
||||
{
|
||||
TranslatePage();
|
||||
m_LineMenuName=GetQueryString("menu");
|
||||
}
|
||||
|
||||
function OnLineRetry()
|
||||
{
|
||||
if(m_LineMenuName!="" && m_LineMenuName!=null)
|
||||
SwitchContent(m_LineMenuName);
|
||||
}
|
||||
|
||||
function ShowLineWarn( bShow )
|
||||
{
|
||||
if(bShow)
|
||||
$('#WarnMainArea').show();
|
||||
else
|
||||
$('#WarnMainArea').hide();
|
||||
}
|
||||
|
||||
//------最佳打开文件的右键菜单功能----------
|
||||
@ -103,6 +138,7 @@ function Set_RecentFile_MouseRightBtn_Event()
|
||||
function HandleStudio( pVal )
|
||||
{
|
||||
let strCmd = pVal['command'];
|
||||
//alert(strCmd);
|
||||
|
||||
if(strCmd=='get_recent_projects')
|
||||
{
|
||||
@ -195,6 +231,43 @@ function HandleStudio( pVal )
|
||||
|
||||
OnHomeInit();
|
||||
}
|
||||
else if(strCmd=='printhistory_task_show')
|
||||
{
|
||||
if( m_PrintHistoryList!=null && pVal['hits'].length>0 )
|
||||
{
|
||||
let SS1=JSON.stringify(pVal['list']);
|
||||
let SS2=JSON.stringify(m_PrintHistoryList);
|
||||
|
||||
if( SS1==SS2 )
|
||||
{
|
||||
alert("PrintHistory is Same. Ignore");
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
m_PrintHistoryList=pVal['hits'];
|
||||
|
||||
ShowPrintHistory(m_PrintHistoryList);
|
||||
}
|
||||
else if(strCmd=='homepage_leftmenu_show')
|
||||
{
|
||||
let MenuName=pVal['menu'];
|
||||
let nShow=pVal['show']*1;
|
||||
|
||||
if(MenuName=='printhistory')
|
||||
{
|
||||
if(nShow==1)
|
||||
{
|
||||
$('#PrintHistoryArea').show();
|
||||
}
|
||||
else
|
||||
{
|
||||
$('#PrintHistoryArea').hide();
|
||||
m_PrintHistoryList=null;
|
||||
$('#PrintHistoryList').html('');
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function OnBoardChange( strMenu )
|
||||
@ -210,7 +283,10 @@ function OnBoardChange( strMenu )
|
||||
SendMsg_GetStaffPick();
|
||||
|
||||
if( m_MakerlabList==null || m_MakerlabList.length==0 )
|
||||
SendMsg_GetMakerlabList();
|
||||
SendMsg_GetMakerlabList();
|
||||
|
||||
if( m_PrintHistoryList==null )
|
||||
SendMsg_GetPrintHistory();
|
||||
}
|
||||
else if(strMenu=='recent')
|
||||
{
|
||||
@ -663,6 +739,7 @@ function ShowStaffPick( ModelList )
|
||||
$('#HotModelList').html(strPickHtml);
|
||||
InitStaffPick();
|
||||
$('#HotModelArea').show();
|
||||
$('#HotModel_Search_Bar').css('display','flex');
|
||||
}
|
||||
|
||||
function Show4UPick( ModelList )
|
||||
@ -721,6 +798,7 @@ function Show4UPick( ModelList )
|
||||
$('#HotModelList').html(strPickHtml);
|
||||
InitStaffPick();
|
||||
$('#HotModelArea').show();
|
||||
$('#HotModel_Search_Bar').css('display','flex');
|
||||
}
|
||||
|
||||
function OpenOneStaffPickModel( ModelID )
|
||||
@ -736,6 +814,20 @@ function OpenOneStaffPickModel( ModelID )
|
||||
}
|
||||
|
||||
|
||||
function OnSearchOnline(event)
|
||||
{
|
||||
let strKW=$('#HotModel_Search_Input').val().trim();
|
||||
if(strKW=='' )
|
||||
return;
|
||||
|
||||
var tSend={};
|
||||
tSend['sequence_id']=Math.round(new Date() / 1000);
|
||||
tSend['command']="homepage_online_search";
|
||||
tSend['keyword']=strKW;
|
||||
|
||||
SendWXMessage( JSON.stringify(tSend) );
|
||||
}
|
||||
|
||||
//----------MakerLab------------
|
||||
function IsChinese()
|
||||
{
|
||||
@ -818,6 +910,122 @@ function OnOpenOneMakerlab( ChildUrl )
|
||||
SendWXMessage( JSON.stringify(tSend) );
|
||||
}
|
||||
|
||||
//-----------Print History------------
|
||||
function SendMsg_GetPrintHistory()
|
||||
{
|
||||
var tSend={};
|
||||
tSend['sequence_id']=Math.round(new Date() / 1000);
|
||||
tSend['command']="homepage_printhistory_get";
|
||||
|
||||
SendWXMessage( JSON.stringify(tSend) );
|
||||
}
|
||||
|
||||
function convertTimeFormat(timeStr)
|
||||
{
|
||||
const date = new Date(timeStr);
|
||||
const year = date.getFullYear(); // 取后两位年份
|
||||
const day = date.getDate();
|
||||
const month = date.getMonth() + 1;
|
||||
const hours = date.getHours();
|
||||
const minutes = date.getMinutes();
|
||||
return `${year}/${month.toString().padStart(2, '0')}/${day.toString().padStart(2, '0')} ${hours.toString().padStart(2, '0')}:${minutes.toString().padStart(2, '0')}`;
|
||||
}
|
||||
|
||||
|
||||
//只更新HTML内容,不控制显示/隐藏
|
||||
function ShowPrintHistory( TaskList )
|
||||
{
|
||||
let TaskTotal=TaskList.length;
|
||||
|
||||
let strTaskHtml='';
|
||||
for(let a=0;a<TaskTotal;a++)
|
||||
{
|
||||
let OneTask=TaskList[a];
|
||||
|
||||
let TaskID=OneTask['id'];
|
||||
let Status=OneTask['status'];
|
||||
|
||||
let TaskName=OneTask['designTitle']!=''?OneTask['designTitle']:OneTask['title'];
|
||||
let CoverImg=OneTask['cover'];
|
||||
|
||||
let DeviceName=OneTask['deviceName'];
|
||||
let CostTime=OneTask['costTime'];
|
||||
if( Status==2 || Status==3 )
|
||||
{
|
||||
if( OneTask['startTime']!=null && OneTask['endTime']!=null )
|
||||
{
|
||||
CostTime=DateToUnixstamp(OneTask['endTime'])-DateToUnixstamp(OneTask['startTime']);
|
||||
}
|
||||
}
|
||||
let strCostTime='';
|
||||
if(CostTime>=3600)
|
||||
{
|
||||
strCostTime=Math.round( (CostTime/3600)*10 )/10+'h';
|
||||
}
|
||||
else if(CostTime>=60)
|
||||
{
|
||||
strCostTime=Math.floor( CostTime/60 )+'min';
|
||||
}
|
||||
else
|
||||
strCostTime=CostTime+'s';
|
||||
|
||||
let PlateName='<span tid="t123" class="trans"></span> '+OneTask['plateIndex']+'<span tid="t124" class="trans"></span>';
|
||||
if( OneTask['plateName'].trim()!='' )
|
||||
PlateName+=' - '+OneTask['plateName'].trim();
|
||||
|
||||
let StartTime=convertTimeFormat( OneTask['startTime'] );
|
||||
|
||||
let isPublicProfile =OneTask['isPublicProfile'];
|
||||
let sMode=OneTask['mode'];
|
||||
|
||||
strTaskHtml+=
|
||||
'<div class="PrintHistoryItem GuideBlock" onClick="OnOpenPrintHistory('+TaskID+')" >'+
|
||||
' <div class="PrintHistoryImg"><img src="'+CoverImg+'" onerror="this.onerror=null;this.src=\'img/d.png\';" /></div>'+
|
||||
' <div class="PrintHistoryTextBlock">'+
|
||||
' <div class="PrintHistoryName TextS1">'+TaskName+'</div>'+
|
||||
' <div class="PrintHistory_Line2">'+
|
||||
' <img src="img/time.svg" /><span class="PH_PrintTime TextS2">'+strCostTime+'</span>'+
|
||||
' <img src="img/device.svg" /><span class="PH_DeviceName TextS2">'+DeviceName+'</span>'+
|
||||
' </div>'+
|
||||
' <div class="PrintHistoryInfo">'+
|
||||
' <div class="PrintHistoryPlate TextS2">'+
|
||||
' <div class="PH_PlateName">'+PlateName+'</div>'+
|
||||
' <div class="PH_PrintDate">('+StartTime+')</div>'+
|
||||
' </div>';
|
||||
switch(Status)
|
||||
{
|
||||
case 2:
|
||||
strTaskHtml+=' <div class="PrintHistoryStatus PH_Status_Success trans" tid="t119">Success</div>';
|
||||
break;
|
||||
case 3:
|
||||
strTaskHtml+=' <div class="PrintHistoryStatus PH_Status_Fail trans" tid="t120">Canceled</div>';
|
||||
break;
|
||||
default:
|
||||
strTaskHtml+=' <div class="PrintHistoryStatus PH_Status_Printing trans" tid="t118">Printing</div>';
|
||||
break;
|
||||
}
|
||||
strTaskHtml+=
|
||||
' </div>'+
|
||||
' </div>';
|
||||
if( isPublicProfile==false && sMode!='cloud_slice' )
|
||||
strTaskHtml+=' <div class="PH_Gcode_Icon">Gcode</div>';
|
||||
|
||||
strTaskHtml+='</div>';
|
||||
}
|
||||
|
||||
$('#PrintHistoryList').html(strTaskHtml);
|
||||
TranslatePage();
|
||||
}
|
||||
|
||||
function OnOpenPrintHistory( TaskID )
|
||||
{
|
||||
var tSend={};
|
||||
tSend['sequence_id']=Math.round(new Date() / 1000);
|
||||
tSend['command']="homepage_printhistory_click";
|
||||
tSend['taskid']=TaskID*1;
|
||||
|
||||
SendWXMessage( JSON.stringify(tSend) );
|
||||
}
|
||||
|
||||
//---------------Global-----------------
|
||||
window.postMessage = HandleStudio;
|
||||
|
@ -54,4 +54,933 @@ var Test_MakerlabList={
|
||||
}
|
||||
}
|
||||
]
|
||||
};
|
||||
|
||||
var Test_PrintTaskList={
|
||||
"command": "printhistory_task_show",
|
||||
"total": 15,
|
||||
"hits": [
|
||||
{
|
||||
"id": 3622536,
|
||||
"designId": 374186,
|
||||
"designTitle": "首发模型0914 1409 --0918 12:00改为独家",
|
||||
"designTitleTranslated": "Exclusive model debut 0914 1409 --0918 12:00",
|
||||
"instanceId": 32755,
|
||||
"modelId": "CNQ72af310210f64b",
|
||||
"title": "首发变独家",
|
||||
"cover": "https://public-dev-cdn.bambulab.net/makerworld/model/CNQ72af310210f64b/4007130/instance/plate_1.png",
|
||||
"status": 3,
|
||||
"feedbackStatus": 1,
|
||||
"startTime": "2024-09-20T09:56:22Z",
|
||||
"endTime": "2024-09-20T09:56:32Z",
|
||||
"weight": 0,
|
||||
"length": 0,
|
||||
"costTime": 0,
|
||||
"profileId": 4007130,
|
||||
"plateIndex": 1,
|
||||
"plateName": "",
|
||||
"deviceId": "03W09A380900239",
|
||||
"amsDetailMapping": [
|
||||
{
|
||||
"ams": 0,
|
||||
"sourceColor": "FFFFFFFF",
|
||||
"targetColor": "",
|
||||
"filamentId": "",
|
||||
"filamentType": "PLA",
|
||||
"targetFilamentType": "PLA",
|
||||
"weight": 0
|
||||
}
|
||||
],
|
||||
"mode": "cloud_slice",
|
||||
"isPublicProfile": true,
|
||||
"isPrintable": true,
|
||||
"isDelete": false,
|
||||
"deviceModel": "X1E",
|
||||
"deviceName": "3DP-03W-239",
|
||||
"bedType": "Cool Plate"
|
||||
},
|
||||
{
|
||||
"id": 3622535,
|
||||
"designId": 374186,
|
||||
"designTitle": "首发模型0914 1409 --0918 12:00改为独家",
|
||||
"designTitleTranslated": "Exclusive model debut 0914 1409 --0918 12:00",
|
||||
"instanceId": 32755,
|
||||
"modelId": "CNQ72af310210f64b",
|
||||
"title": "首发变独家",
|
||||
"cover": "https://public-dev-cdn.bambulab.net/makerworld/model/CNQ72af310210f64b/4007130/instance/plate_1.png",
|
||||
"status": 3,
|
||||
"feedbackStatus": 1,
|
||||
"startTime": "2024-09-20T09:55:42Z",
|
||||
"endTime": "2024-09-20T09:56:00Z",
|
||||
"weight": 0,
|
||||
"length": 0,
|
||||
"costTime": 0,
|
||||
"profileId": 4007130,
|
||||
"plateIndex": 1,
|
||||
"plateName": "",
|
||||
"deviceId": "03W09A380900239",
|
||||
"amsDetailMapping": [
|
||||
{
|
||||
"ams": 0,
|
||||
"sourceColor": "FFFFFFFF",
|
||||
"targetColor": "",
|
||||
"filamentId": "",
|
||||
"filamentType": "PLA",
|
||||
"targetFilamentType": "PLA",
|
||||
"weight": 0
|
||||
}
|
||||
],
|
||||
"mode": "cloud_slice",
|
||||
"isPublicProfile": true,
|
||||
"isPrintable": true,
|
||||
"isDelete": false,
|
||||
"deviceModel": "X1E",
|
||||
"deviceName": "3DP-03W-239",
|
||||
"bedType": "Cool Plate"
|
||||
},
|
||||
{
|
||||
"id": 3622505,
|
||||
"designId": 374186,
|
||||
"designTitle": "首发模型0914 1409 --0918 12:00改为独家",
|
||||
"designTitleTranslated": "Exclusive model debut 0914 1409 --0918 12:00",
|
||||
"instanceId": 32755,
|
||||
"modelId": "CNQ72af310210f64b",
|
||||
"title": "首发变独家",
|
||||
"cover": "https://public-dev-cdn.bambulab.net/makerworld/cache/1/CNQ72af310210f64b/4007130/3mf/3/REP1/Metadata/plate_3.png",
|
||||
"status": 2,
|
||||
"feedbackStatus": 1,
|
||||
"startTime": "2024-09-20T06:38:33Z",
|
||||
"endTime": "2024-09-20T08:27:56Z",
|
||||
"weight": 53.54,
|
||||
"length": 1766,
|
||||
"costTime": 6376,
|
||||
"profileId": 4007130,
|
||||
"plateIndex": 3,
|
||||
"plateName": "",
|
||||
"deviceId": "03W09A380900239",
|
||||
"amsDetailMapping": [
|
||||
{
|
||||
"ams": 0,
|
||||
"sourceColor": "FFFFFFFF",
|
||||
"targetColor": "FFFFFFFF",
|
||||
"filamentId": "",
|
||||
"filamentType": "PLA",
|
||||
"targetFilamentType": "PLA",
|
||||
"weight": 53.54
|
||||
}
|
||||
],
|
||||
"mode": "cloud_slice",
|
||||
"isPublicProfile": true,
|
||||
"isPrintable": true,
|
||||
"isDelete": false,
|
||||
"deviceModel": "X1E",
|
||||
"deviceName": "3DP-03W-239",
|
||||
"bedType": "Cool Plate"
|
||||
},
|
||||
{
|
||||
"id": 3622504,
|
||||
"designId": 374186,
|
||||
"designTitle": "首发模型0914 1409 --0918 12:00改为独家",
|
||||
"designTitleTranslated": "Exclusive model debut 0914 1409 --0918 12:00",
|
||||
"instanceId": 32755,
|
||||
"modelId": "CNQ72af310210f64b",
|
||||
"title": "首发变独家",
|
||||
"cover": "https://public-dev-cdn.bambulab.net/makerworld/cache/1/CNQ72af310210f64b/4007130/3mf/3/%23A0E20EFF/REP1/Metadata/plate_3.png",
|
||||
"status": 2,
|
||||
"feedbackStatus": 1,
|
||||
"startTime": "2024-09-20T06:38:18Z",
|
||||
"endTime": "2024-09-20T08:38:35Z",
|
||||
"weight": 56.09,
|
||||
"length": 1766,
|
||||
"costTime": 7131,
|
||||
"profileId": 4007130,
|
||||
"plateIndex": 3,
|
||||
"plateName": "",
|
||||
"deviceId": "00W00A242600023",
|
||||
"amsDetailMapping": [
|
||||
{
|
||||
"ams": 1,
|
||||
"sourceColor": "FFFFFFFF",
|
||||
"targetColor": "A0E20EFF",
|
||||
"filamentId": "",
|
||||
"filamentType": "PLA",
|
||||
"targetFilamentType": "PLA",
|
||||
"weight": 56.09
|
||||
}
|
||||
],
|
||||
"mode": "cloud_slice",
|
||||
"isPublicProfile": true,
|
||||
"isPrintable": true,
|
||||
"isDelete": false,
|
||||
"deviceModel": "X1",
|
||||
"deviceName": "025",
|
||||
"bedType": "Cool Plate"
|
||||
},
|
||||
{
|
||||
"id": 3622499,
|
||||
"designId": 374186,
|
||||
"designTitle": "首发模型0914 1409 --0918 12:00改为独家",
|
||||
"designTitleTranslated": "Exclusive model debut 0914 1409 --0918 12:00",
|
||||
"instanceId": 32755,
|
||||
"modelId": "CNQ72af310210f64b",
|
||||
"title": "首发变独家",
|
||||
"cover": "https://public-dev-cdn.bambulab.net/makerworld/cache/1/CNQ72af310210f64b/4007130/3mf/3/REP1/Metadata/plate_3.png",
|
||||
"status": 2,
|
||||
"feedbackStatus": 1,
|
||||
"startTime": "2024-09-20T04:12:14Z",
|
||||
"endTime": "2024-09-20T06:02:16Z",
|
||||
"weight": 53.54,
|
||||
"length": 1766,
|
||||
"costTime": 6376,
|
||||
"profileId": 4007130,
|
||||
"plateIndex": 3,
|
||||
"plateName": "",
|
||||
"deviceId": "03W09A380900239",
|
||||
"amsDetailMapping": [
|
||||
{
|
||||
"ams": 0,
|
||||
"sourceColor": "FFFFFFFF",
|
||||
"targetColor": "FFFFFFFF",
|
||||
"filamentId": "",
|
||||
"filamentType": "PLA",
|
||||
"targetFilamentType": "PLA",
|
||||
"weight": 53.54
|
||||
}
|
||||
],
|
||||
"mode": "cloud_slice",
|
||||
"isPublicProfile": true,
|
||||
"isPrintable": true,
|
||||
"isDelete": false,
|
||||
"deviceModel": "X1E",
|
||||
"deviceName": "3DP-03W-239",
|
||||
"bedType": "Cool Plate"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
var Test_4UModelList={
|
||||
"hits": [
|
||||
{
|
||||
"id": 374202,
|
||||
"title": "0920 可定制",
|
||||
"titleTranslated": "0920 Customizable",
|
||||
"cover": "https://public-dev-cdn.bambulab.net/makerworld/model/CNQc553e8906eaff0/design/2024-09-20_7cf6087c009.jpg",
|
||||
"likeCount": 0,
|
||||
"collectionCount": 1,
|
||||
"shareCount": 0,
|
||||
"printCount": 0,
|
||||
"downloadCount": 0,
|
||||
"commentCount": 0,
|
||||
"readCount": 0,
|
||||
"designCreator": {
|
||||
"uid": 1074649781,
|
||||
"name": "xiaohuan.li888888888888888888888888888",
|
||||
"avatar": "https://public-us-cdn.bambulab.net/avatar/9a12d850-539a-11ef-bcfb-2953b84d62de.jpg",
|
||||
"fanCount": 6,
|
||||
"followCount": 6,
|
||||
"createTime": "2023-08-29T07:06:16Z",
|
||||
"certificated": true,
|
||||
"handle": "xiaohuan.li6667",
|
||||
"level": 30,
|
||||
"gradeType": 4
|
||||
},
|
||||
"createTime": "2024-09-20T03:10:43Z",
|
||||
"nsfw": false,
|
||||
"hotScore": 794,
|
||||
"status": 1,
|
||||
"hasCollect": false,
|
||||
"hasLike": false,
|
||||
"hasDislike": false,
|
||||
"isStaffPicked": true,
|
||||
"pickReason": "",
|
||||
"isPrintable": true,
|
||||
"isOfficial": false,
|
||||
"isPointRedeemable": false,
|
||||
"pointRedeemDetail": {
|
||||
"price": 0,
|
||||
"sku": "",
|
||||
"status": 0
|
||||
},
|
||||
"isExclusive": true,
|
||||
"contest": {
|
||||
"contestId": 124,
|
||||
"rank": 0,
|
||||
"status": 1,
|
||||
"contestName": "0718 contest",
|
||||
"contestStatus": 0,
|
||||
"comment": ""
|
||||
},
|
||||
"source": 4,
|
||||
"customizedByMakerLab": true,
|
||||
"preset": {
|
||||
"type": "",
|
||||
"filamentConfig": null,
|
||||
"printerConfig": null,
|
||||
"processConfig": null,
|
||||
"printerSettings": null,
|
||||
"file": {
|
||||
"name": "",
|
||||
"size": 0,
|
||||
"url": ""
|
||||
}
|
||||
},
|
||||
"coverLandscape": "",
|
||||
"coverPortrait": "",
|
||||
"boostCnt": 0,
|
||||
"bomsNeeded": false,
|
||||
"bannerTitle": "",
|
||||
"ext": "{\"rc\":[\"4|0.93\"],\"rk\":\"-0.04|0\"}",
|
||||
"modelId": "CNQc553e8906eaff0"
|
||||
},
|
||||
{
|
||||
"id": 374215,
|
||||
"title": "jeep",
|
||||
"titleTranslated": "",
|
||||
"cover": "https://public-dev-cdn.bambulab.net/makerworld/model/CNQ5da5ab69430323/design/2024-09-20_ef0049a4b5026.jpg",
|
||||
"likeCount": 0,
|
||||
"collectionCount": 1,
|
||||
"shareCount": 0,
|
||||
"printCount": 0,
|
||||
"downloadCount": 1,
|
||||
"commentCount": 1,
|
||||
"readCount": 0,
|
||||
"designCreator": {
|
||||
"uid": 415112594,
|
||||
"name": "Yifan Wu",
|
||||
"avatar": "https://public-dev-cdn.bambulab.net/avatar/415112594/2023-05-06_1f35259225fad.jpg",
|
||||
"fanCount": 14,
|
||||
"followCount": 14,
|
||||
"createTime": "2022-04-07T09:52:23Z",
|
||||
"certificated": false,
|
||||
"handle": "wuyifan",
|
||||
"level": 11,
|
||||
"gradeType": 1
|
||||
},
|
||||
"createTime": "2024-09-20T12:00:13Z",
|
||||
"nsfw": false,
|
||||
"hotScore": 2726,
|
||||
"status": 1,
|
||||
"hasCollect": false,
|
||||
"hasLike": false,
|
||||
"hasDislike": false,
|
||||
"isStaffPicked": false,
|
||||
"pickReason": "",
|
||||
"isPrintable": true,
|
||||
"isOfficial": false,
|
||||
"isPointRedeemable": false,
|
||||
"pointRedeemDetail": {
|
||||
"price": 0,
|
||||
"sku": "",
|
||||
"status": 0
|
||||
},
|
||||
"isExclusive": true,
|
||||
"contest": {
|
||||
"contestId": 0,
|
||||
"rank": 0,
|
||||
"status": 0,
|
||||
"contestName": "",
|
||||
"contestStatus": 0,
|
||||
"comment": ""
|
||||
},
|
||||
"source": 7,
|
||||
"customizedByMakerLab": false,
|
||||
"preset": {
|
||||
"type": "",
|
||||
"filamentConfig": null,
|
||||
"printerConfig": null,
|
||||
"processConfig": null,
|
||||
"printerSettings": null,
|
||||
"file": {
|
||||
"name": "",
|
||||
"size": 0,
|
||||
"url": ""
|
||||
}
|
||||
},
|
||||
"coverLandscape": "",
|
||||
"coverPortrait": "",
|
||||
"boostCnt": 3,
|
||||
"bomsNeeded": false,
|
||||
"bannerTitle": "",
|
||||
"ext": "{\"rc\":[\"7|1\"],\"rk\":\"-0.11|1\"}",
|
||||
"modelId": "CNQ5da5ab69430323"
|
||||
},
|
||||
{
|
||||
"id": 374216,
|
||||
"title": "小迷宫",
|
||||
"titleTranslated": "mini maze",
|
||||
"cover": "https://public-dev-cdn.bambulab.net/makerworld/model/DSM00000000374216/design/2024-09-20_e31bc38f1cef9.webp",
|
||||
"likeCount": 0,
|
||||
"collectionCount": 0,
|
||||
"shareCount": 0,
|
||||
"printCount": 0,
|
||||
"downloadCount": 2,
|
||||
"commentCount": 0,
|
||||
"readCount": 0,
|
||||
"designCreator": {
|
||||
"uid": 415112594,
|
||||
"name": "Yifan Wu",
|
||||
"avatar": "https://public-dev-cdn.bambulab.net/avatar/415112594/2023-05-06_1f35259225fad.jpg",
|
||||
"fanCount": 14,
|
||||
"followCount": 14,
|
||||
"createTime": "2022-04-07T09:52:23Z",
|
||||
"certificated": false,
|
||||
"handle": "wuyifan",
|
||||
"level": 11,
|
||||
"gradeType": 1
|
||||
},
|
||||
"createTime": "2024-09-20T12:44:02Z",
|
||||
"nsfw": false,
|
||||
"hotScore": 1891,
|
||||
"status": 1,
|
||||
"hasCollect": false,
|
||||
"hasLike": false,
|
||||
"hasDislike": false,
|
||||
"isStaffPicked": false,
|
||||
"pickReason": "",
|
||||
"isPrintable": true,
|
||||
"isOfficial": false,
|
||||
"isPointRedeemable": false,
|
||||
"pointRedeemDetail": {
|
||||
"price": 0,
|
||||
"sku": "",
|
||||
"status": 0
|
||||
},
|
||||
"isExclusive": true,
|
||||
"contest": {
|
||||
"contestId": 0,
|
||||
"rank": 0,
|
||||
"status": 0,
|
||||
"contestName": "",
|
||||
"contestStatus": 0,
|
||||
"comment": ""
|
||||
},
|
||||
"source": 7,
|
||||
"customizedByMakerLab": false,
|
||||
"preset": {
|
||||
"type": "",
|
||||
"filamentConfig": null,
|
||||
"printerConfig": null,
|
||||
"processConfig": null,
|
||||
"printerSettings": null,
|
||||
"file": {
|
||||
"name": "",
|
||||
"size": 0,
|
||||
"url": ""
|
||||
}
|
||||
},
|
||||
"coverLandscape": "",
|
||||
"coverPortrait": "",
|
||||
"boostCnt": 1,
|
||||
"bomsNeeded": false,
|
||||
"bannerTitle": "",
|
||||
"ext": "{\"rc\":[\"7|0.92\"],\"rk\":\"-0.17|2\"}",
|
||||
"modelId": "CNQ581249e18cec42"
|
||||
},
|
||||
{
|
||||
"id": 374218,
|
||||
"title": "运营开启独家未达标用户",
|
||||
"titleTranslated": "The following content requires translation:\nExclusive unmet user operations have been initiated.",
|
||||
"cover": "https://public-dev-cdn.bambulab.net/makerworld/model/CNQf2d9054da20bfe/design/2024-09-23_d4d635adef548.jpg",
|
||||
"likeCount": 0,
|
||||
"collectionCount": 0,
|
||||
"shareCount": 0,
|
||||
"printCount": 0,
|
||||
"downloadCount": 11,
|
||||
"commentCount": 0,
|
||||
"readCount": 0,
|
||||
"designCreator": {
|
||||
"uid": 1375262870,
|
||||
"name": "XNCS025",
|
||||
"avatar": "https://oss-cdn.bambulab.com/default-avatar.png",
|
||||
"fanCount": 1,
|
||||
"followCount": 1,
|
||||
"createTime": "2023-03-07T02:14:57Z",
|
||||
"certificated": false,
|
||||
"handle": "XNCS025",
|
||||
"level": 4,
|
||||
"gradeType": 0
|
||||
},
|
||||
"createTime": "2024-09-23T07:17:13Z",
|
||||
"nsfw": false,
|
||||
"hotScore": 2447,
|
||||
"status": 1,
|
||||
"hasCollect": false,
|
||||
"hasLike": false,
|
||||
"hasDislike": false,
|
||||
"isStaffPicked": false,
|
||||
"pickReason": "",
|
||||
"isPrintable": true,
|
||||
"isOfficial": false,
|
||||
"isPointRedeemable": false,
|
||||
"pointRedeemDetail": {
|
||||
"price": 0,
|
||||
"sku": "",
|
||||
"status": 0
|
||||
},
|
||||
"isExclusive": true,
|
||||
"contest": {
|
||||
"contestId": 0,
|
||||
"rank": 0,
|
||||
"status": 0,
|
||||
"contestName": "",
|
||||
"contestStatus": 0,
|
||||
"comment": ""
|
||||
},
|
||||
"source": 7,
|
||||
"customizedByMakerLab": false,
|
||||
"preset": {
|
||||
"type": "",
|
||||
"filamentConfig": null,
|
||||
"printerConfig": null,
|
||||
"processConfig": null,
|
||||
"printerSettings": null,
|
||||
"file": {
|
||||
"name": "",
|
||||
"size": 0,
|
||||
"url": ""
|
||||
}
|
||||
},
|
||||
"coverLandscape": "",
|
||||
"coverPortrait": "",
|
||||
"boostCnt": 0,
|
||||
"bomsNeeded": false,
|
||||
"bannerTitle": "",
|
||||
"ext": "{\"rc\":[\"7|0.96\"],\"rk\":\"-0.21|3\"}",
|
||||
"modelId": "CNQf2d9054da20bfe"
|
||||
},
|
||||
{
|
||||
"id": 374229,
|
||||
"title": "测试一下定时任务",
|
||||
"titleTranslated": "Test the scheduled task",
|
||||
"cover": "https://public-dev-cdn.bambulab.net/makerworld/model/CNQe4b47ef2e53023/design/2024-09-23_ed5de35b423cc.webp",
|
||||
"likeCount": 0,
|
||||
"collectionCount": 0,
|
||||
"shareCount": 0,
|
||||
"printCount": 2,
|
||||
"downloadCount": 2,
|
||||
"commentCount": 0,
|
||||
"readCount": 0,
|
||||
"designCreator": {
|
||||
"uid": 1812646376,
|
||||
"name": "银鱼test2",
|
||||
"avatar": "https://public-cdn.bblmw.com/default/avatar.png",
|
||||
"fanCount": 1,
|
||||
"followCount": 1,
|
||||
"createTime": "2024-09-12T07:02:50Z",
|
||||
"certificated": false,
|
||||
"handle": "user_1812646376",
|
||||
"level": 10,
|
||||
"gradeType": 1
|
||||
},
|
||||
"createTime": "2024-09-23T10:42:15Z",
|
||||
"nsfw": false,
|
||||
"hotScore": 1442,
|
||||
"status": 1,
|
||||
"hasCollect": false,
|
||||
"hasLike": false,
|
||||
"hasDislike": false,
|
||||
"isStaffPicked": false,
|
||||
"pickReason": "",
|
||||
"isPrintable": true,
|
||||
"isOfficial": false,
|
||||
"isPointRedeemable": false,
|
||||
"pointRedeemDetail": {
|
||||
"price": 0,
|
||||
"sku": "",
|
||||
"status": 0
|
||||
},
|
||||
"isExclusive": false,
|
||||
"contest": {
|
||||
"contestId": 0,
|
||||
"rank": 0,
|
||||
"status": 0,
|
||||
"contestName": "",
|
||||
"contestStatus": 0,
|
||||
"comment": ""
|
||||
},
|
||||
"source": 7,
|
||||
"customizedByMakerLab": false,
|
||||
"preset": {
|
||||
"type": "",
|
||||
"filamentConfig": null,
|
||||
"printerConfig": null,
|
||||
"processConfig": null,
|
||||
"printerSettings": null,
|
||||
"file": {
|
||||
"name": "",
|
||||
"size": 0,
|
||||
"url": ""
|
||||
}
|
||||
},
|
||||
"coverLandscape": "",
|
||||
"coverPortrait": "",
|
||||
"boostCnt": 0,
|
||||
"bomsNeeded": false,
|
||||
"bannerTitle": "",
|
||||
"ext": "{\"rc\":[\"7|0.88\"],\"rk\":\"-0.22|4\"}",
|
||||
"modelId": "CNQe4b47ef2e53023"
|
||||
},
|
||||
{
|
||||
"id": 371892,
|
||||
"title": "测试竞赛",
|
||||
"titleTranslated": "",
|
||||
"cover": "https://public-dev-cdn.bambulab.net/makerworld/model/DSM00000000371892/design/2024-03-28_6875c4e16c667.jpg",
|
||||
"likeCount": 1,
|
||||
"collectionCount": 1,
|
||||
"shareCount": 0,
|
||||
"printCount": 0,
|
||||
"downloadCount": 1,
|
||||
"commentCount": 0,
|
||||
"readCount": 0,
|
||||
"designCreator": {
|
||||
"uid": 3185390264,
|
||||
"name": "fang.nie",
|
||||
"avatar": "https://public-dev-cdn.bambulab.net/avatar/3185390264/2024-02-26_fc5558ccc29f1.jpg",
|
||||
"fanCount": 6,
|
||||
"followCount": 6,
|
||||
"createTime": "2022-05-11T07:56:50Z",
|
||||
"certificated": false,
|
||||
"handle": "fang.nie",
|
||||
"level": 8,
|
||||
"gradeType": 1
|
||||
},
|
||||
"createTime": "2024-03-28T07:59:10Z",
|
||||
"nsfw": false,
|
||||
"hotScore": 0,
|
||||
"status": 1,
|
||||
"hasCollect": false,
|
||||
"hasLike": false,
|
||||
"hasDislike": false,
|
||||
"isStaffPicked": true,
|
||||
"pickReason": "",
|
||||
"isPrintable": false,
|
||||
"isOfficial": false,
|
||||
"isPointRedeemable": false,
|
||||
"pointRedeemDetail": {
|
||||
"price": 0,
|
||||
"sku": "",
|
||||
"status": 0
|
||||
},
|
||||
"isExclusive": false,
|
||||
"contest": {
|
||||
"contestId": 75,
|
||||
"rank": 0,
|
||||
"status": 1,
|
||||
"contestName": "0306进行中的竞赛",
|
||||
"contestStatus": 0,
|
||||
"comment": ""
|
||||
},
|
||||
"source": 4,
|
||||
"customizedByMakerLab": false,
|
||||
"preset": {
|
||||
"type": "",
|
||||
"filamentConfig": null,
|
||||
"printerConfig": null,
|
||||
"processConfig": null,
|
||||
"printerSettings": null,
|
||||
"file": {
|
||||
"name": "",
|
||||
"size": 0,
|
||||
"url": ""
|
||||
}
|
||||
},
|
||||
"coverLandscape": "",
|
||||
"coverPortrait": "",
|
||||
"boostCnt": 0,
|
||||
"bomsNeeded": false,
|
||||
"bannerTitle": "",
|
||||
"ext": "{\"rc\":[\"4|1\"],\"rk\":\"-0.28|5\"}",
|
||||
"modelId": ""
|
||||
},
|
||||
{
|
||||
"id": 374114,
|
||||
"title": "打印时长超过20小时",
|
||||
"titleTranslated": "Printing duration exceeds 20 hours",
|
||||
"cover": "https://public-dev-cdn.bambulab.net/makerworld/model/CNQf47c4b034a745c/design/2024-08-30_2606102d038c5.webp",
|
||||
"likeCount": 0,
|
||||
"collectionCount": 0,
|
||||
"shareCount": 0,
|
||||
"printCount": 0,
|
||||
"downloadCount": 0,
|
||||
"commentCount": 0,
|
||||
"readCount": 0,
|
||||
"designCreator": {
|
||||
"uid": 3345032319,
|
||||
"name": "Summer_lights",
|
||||
"avatar": "https://public-cdn.bambulab.com/default/avatar.png",
|
||||
"fanCount": 2,
|
||||
"followCount": 2,
|
||||
"createTime": "2023-08-04T08:43:14Z",
|
||||
"certificated": true,
|
||||
"handle": "Summer_lights",
|
||||
"level": 7,
|
||||
"gradeType": 1
|
||||
},
|
||||
"createTime": "2024-08-30T02:52:40Z",
|
||||
"nsfw": false,
|
||||
"hotScore": 0,
|
||||
"status": 1,
|
||||
"hasCollect": false,
|
||||
"hasLike": false,
|
||||
"hasDislike": false,
|
||||
"isStaffPicked": true,
|
||||
"pickReason": "",
|
||||
"isPrintable": true,
|
||||
"isOfficial": false,
|
||||
"isPointRedeemable": false,
|
||||
"pointRedeemDetail": {
|
||||
"price": 0,
|
||||
"sku": "",
|
||||
"status": 0
|
||||
},
|
||||
"isExclusive": false,
|
||||
"contest": {
|
||||
"contestId": 0,
|
||||
"rank": 0,
|
||||
"status": 0,
|
||||
"contestName": "",
|
||||
"contestStatus": 0,
|
||||
"comment": ""
|
||||
},
|
||||
"source": 4,
|
||||
"customizedByMakerLab": false,
|
||||
"preset": {
|
||||
"type": "",
|
||||
"filamentConfig": null,
|
||||
"printerConfig": null,
|
||||
"processConfig": null,
|
||||
"printerSettings": null,
|
||||
"file": {
|
||||
"name": "",
|
||||
"size": 0,
|
||||
"url": ""
|
||||
}
|
||||
},
|
||||
"coverLandscape": "",
|
||||
"coverPortrait": "",
|
||||
"boostCnt": 0,
|
||||
"bomsNeeded": false,
|
||||
"bannerTitle": "",
|
||||
"ext": "{\"rc\":[\"4|0.86\"],\"rk\":\"-0.4|6\"}",
|
||||
"modelId": "CNQf47c4b034a745c"
|
||||
},
|
||||
{
|
||||
"id": 374044,
|
||||
"title": "恐龙模型",
|
||||
"titleTranslated": "Dinosaur Model",
|
||||
"cover": "https://public-dev-cdn.bambulab.net/makerworld/model/DSM00000000374044/design/2024-08-08_0cade4e99b18c.png",
|
||||
"likeCount": 2,
|
||||
"collectionCount": 2,
|
||||
"shareCount": 0,
|
||||
"printCount": 0,
|
||||
"downloadCount": 1,
|
||||
"commentCount": 10,
|
||||
"readCount": 0,
|
||||
"designCreator": {
|
||||
"uid": 3603343695,
|
||||
"name": "龙井~qa",
|
||||
"avatar": "https://public-dev-cdn.bambulab.net/avatar/3603343695/2023-11-01_f32d53e210073.jpg",
|
||||
"fanCount": 12,
|
||||
"followCount": 12,
|
||||
"createTime": "2022-08-01T07:37:47Z",
|
||||
"certificated": false,
|
||||
"handle": "user_3603343695",
|
||||
"level": 10,
|
||||
"gradeType": 1
|
||||
},
|
||||
"createTime": "2024-08-08T08:09:44Z",
|
||||
"nsfw": false,
|
||||
"hotScore": 163,
|
||||
"status": 1,
|
||||
"hasCollect": false,
|
||||
"hasLike": false,
|
||||
"hasDislike": false,
|
||||
"isStaffPicked": true,
|
||||
"pickReason": "",
|
||||
"isPrintable": true,
|
||||
"isOfficial": true,
|
||||
"isPointRedeemable": false,
|
||||
"pointRedeemDetail": {
|
||||
"price": 0,
|
||||
"sku": "",
|
||||
"status": 0
|
||||
},
|
||||
"isExclusive": false,
|
||||
"contest": {
|
||||
"contestId": 0,
|
||||
"rank": 0,
|
||||
"status": 0,
|
||||
"contestName": "",
|
||||
"contestStatus": 0,
|
||||
"comment": ""
|
||||
},
|
||||
"source": 4,
|
||||
"customizedByMakerLab": false,
|
||||
"preset": {
|
||||
"type": "",
|
||||
"filamentConfig": null,
|
||||
"printerConfig": null,
|
||||
"processConfig": null,
|
||||
"printerSettings": null,
|
||||
"file": {
|
||||
"name": "",
|
||||
"size": 0,
|
||||
"url": ""
|
||||
}
|
||||
},
|
||||
"coverLandscape": "",
|
||||
"coverPortrait": "",
|
||||
"boostCnt": 4,
|
||||
"bomsNeeded": false,
|
||||
"bannerTitle": "",
|
||||
"ext": "{\"rc\":[\"4|0.79\"],\"rk\":\"-0.43|7\"}",
|
||||
"modelId": "CNQ1ff72338b76e42"
|
||||
},
|
||||
{
|
||||
"id": 374224,
|
||||
"title": "testing1",
|
||||
"titleTranslated": "",
|
||||
"cover": "https://public-dev-cdn.bambulab.net/makerworld/model/CNQ6d8c4e451cb1cb/design/2024-09-23_523ae314284da.webp",
|
||||
"likeCount": 0,
|
||||
"collectionCount": 0,
|
||||
"shareCount": 0,
|
||||
"printCount": 0,
|
||||
"downloadCount": 0,
|
||||
"commentCount": 0,
|
||||
"readCount": 0,
|
||||
"designCreator": {
|
||||
"uid": 899054757,
|
||||
"name": "user_899054757",
|
||||
"avatar": "https://public-us-cdn.bambulab.net/avatar/bfe3d810-798b-11ef-bd70-27bc07e67d92.jpg",
|
||||
"fanCount": 0,
|
||||
"followCount": 0,
|
||||
"createTime": "2024-09-20T09:19:40Z",
|
||||
"certificated": false,
|
||||
"handle": "user_899054757",
|
||||
"level": 6,
|
||||
"gradeType": 0
|
||||
},
|
||||
"createTime": "2024-09-23T09:48:17Z",
|
||||
"nsfw": false,
|
||||
"hotScore": 0,
|
||||
"status": 1,
|
||||
"hasCollect": false,
|
||||
"hasLike": false,
|
||||
"hasDislike": false,
|
||||
"isStaffPicked": false,
|
||||
"pickReason": "",
|
||||
"isPrintable": true,
|
||||
"isOfficial": false,
|
||||
"isPointRedeemable": false,
|
||||
"pointRedeemDetail": {
|
||||
"price": 0,
|
||||
"sku": "",
|
||||
"status": 0
|
||||
},
|
||||
"isExclusive": false,
|
||||
"contest": {
|
||||
"contestId": 0,
|
||||
"rank": 0,
|
||||
"status": 0,
|
||||
"contestName": "",
|
||||
"contestStatus": 0,
|
||||
"comment": ""
|
||||
},
|
||||
"source": 7,
|
||||
"customizedByMakerLab": false,
|
||||
"preset": {
|
||||
"type": "",
|
||||
"filamentConfig": null,
|
||||
"printerConfig": null,
|
||||
"processConfig": null,
|
||||
"printerSettings": null,
|
||||
"file": {
|
||||
"name": "",
|
||||
"size": 0,
|
||||
"url": ""
|
||||
}
|
||||
},
|
||||
"coverLandscape": "",
|
||||
"coverPortrait": "",
|
||||
"boostCnt": 0,
|
||||
"bomsNeeded": false,
|
||||
"bannerTitle": "",
|
||||
"ext": "{\"rc\":[\"7|0.56\"],\"rk\":\"-0.43|8\"}",
|
||||
"modelId": "CNQ6d8c4e451cb1cb"
|
||||
},
|
||||
{
|
||||
"id": 374227,
|
||||
"title": "test2",
|
||||
"titleTranslated": "",
|
||||
"cover": "https://public-dev-cdn.bambulab.net/makerworld/model/DSM00000000374227/design/2024-09-23_ff06b8ab9e468.jpg",
|
||||
"likeCount": 0,
|
||||
"collectionCount": 0,
|
||||
"shareCount": 0,
|
||||
"printCount": 0,
|
||||
"downloadCount": 0,
|
||||
"commentCount": 0,
|
||||
"readCount": 0,
|
||||
"designCreator": {
|
||||
"uid": 899054757,
|
||||
"name": "user_899054757",
|
||||
"avatar": "https://public-us-cdn.bambulab.net/avatar/bfe3d810-798b-11ef-bd70-27bc07e67d92.jpg",
|
||||
"fanCount": 0,
|
||||
"followCount": 0,
|
||||
"createTime": "2024-09-20T09:19:40Z",
|
||||
"certificated": false,
|
||||
"handle": "user_899054757",
|
||||
"level": 6,
|
||||
"gradeType": 0
|
||||
},
|
||||
"createTime": "2024-09-23T09:51:22Z",
|
||||
"nsfw": false,
|
||||
"hotScore": 0,
|
||||
"status": 1,
|
||||
"hasCollect": false,
|
||||
"hasLike": false,
|
||||
"hasDislike": false,
|
||||
"isStaffPicked": false,
|
||||
"pickReason": "",
|
||||
"isPrintable": false,
|
||||
"isOfficial": false,
|
||||
"isPointRedeemable": false,
|
||||
"pointRedeemDetail": {
|
||||
"price": 0,
|
||||
"sku": "",
|
||||
"status": 0
|
||||
},
|
||||
"isExclusive": false,
|
||||
"contest": {
|
||||
"contestId": 0,
|
||||
"rank": 0,
|
||||
"status": 0,
|
||||
"contestName": "",
|
||||
"contestStatus": 0,
|
||||
"comment": ""
|
||||
},
|
||||
"source": 7,
|
||||
"customizedByMakerLab": false,
|
||||
"preset": {
|
||||
"type": "",
|
||||
"filamentConfig": null,
|
||||
"printerConfig": null,
|
||||
"processConfig": null,
|
||||
"printerSettings": null,
|
||||
"file": {
|
||||
"name": "",
|
||||
"size": 0,
|
||||
"url": ""
|
||||
}
|
||||
},
|
||||
"coverLandscape": "",
|
||||
"coverPortrait": "",
|
||||
"boostCnt": 0,
|
||||
"bomsNeeded": false,
|
||||
"bannerTitle": "",
|
||||
"ext": "{\"rc\":[\"7|0.68\"],\"rk\":\"-0.49|9\"}",
|
||||
"modelId": ""
|
||||
}
|
||||
],
|
||||
"seed": 1149157380,
|
||||
"surplus": 32
|
||||
};
|
@ -59,6 +59,10 @@
|
||||
<div ><img class="JumpIcon" src="img/jump.svg" /></div>
|
||||
<div id="MakerlabNewTag" class="BtnNewIcon">New</div>
|
||||
</div>
|
||||
<div menu="printhistory" class="BtnItem" onClick="GotoMenu('printhistory')">
|
||||
<div class="BtnIcon "><img class="LeftIcon" src="img/left_ph.svg" /></div>
|
||||
<div class="BtnText trans" tid="t117">Print History</div>
|
||||
</div>
|
||||
<div menu="manual" class="BtnItem" onClick="GotoMenu('manual')">
|
||||
<div class="BtnIcon "><img class="LeftIcon" src="img/left_manual.svg" /></div>
|
||||
<div class="BtnText trans" tid="t87">User Manual</div>
|
||||
|
@ -62,7 +62,7 @@ function GetFullDate()
|
||||
return tDate;
|
||||
}
|
||||
|
||||
|
||||
//return YYYY-MM-DD
|
||||
function Unixtimestamp2Date( nSecond )
|
||||
{
|
||||
var d=new Date(nSecond*1000);
|
||||
@ -93,6 +93,18 @@ function Unixtimestamp2Date( nSecond )
|
||||
return tDate.strdate;
|
||||
}
|
||||
|
||||
function DateToUnixstamp( strDate )
|
||||
{
|
||||
const date = new Date(strDate);
|
||||
return Math.floor(date.getTime() / 1000);
|
||||
}
|
||||
|
||||
function DateToUnixstampMS( strDate )
|
||||
{
|
||||
const date = new Date(strDate);
|
||||
return date.getTime();
|
||||
}
|
||||
|
||||
|
||||
//------------Array Function-------------
|
||||
Array.prototype.in_array = function (e) {
|
||||
@ -468,10 +480,16 @@ function DisableHotkey( b_CtrlP )
|
||||
if (e.shiftKey && e.metaKey)
|
||||
OutputKey(e.keyCode, false, true, true);
|
||||
|
||||
if (window.event) {
|
||||
try { e.keyCode = 0; } catch (e) { }
|
||||
e.returnValue = false;
|
||||
//F1--F12
|
||||
if ( e.keyCode>=112 && e.keyCode<=123 )
|
||||
{
|
||||
e.preventDefault();
|
||||
}
|
||||
|
||||
// if (window.event) {
|
||||
// try { e.keyCode = 0; } catch (e) { }
|
||||
// e.returnValue = false;
|
||||
// }
|
||||
};
|
||||
|
||||
window.addEventListener('mousewheel', function (event) {
|
||||
|
@ -22,8 +22,6 @@
|
||||
<script type="text/javascript" src="model.js"></script>
|
||||
</head>
|
||||
<body onLoad="OnInit()">
|
||||
|
||||
|
||||
<div id="EmptyArea">
|
||||
<div><img src="img/null.png"></div>
|
||||
<div>no model information</div>
|
||||
|
@ -4,7 +4,6 @@
|
||||
padding: 0px;
|
||||
border: 0px;
|
||||
font-family: "system-ui", "Segoe UI", Roboto, Oxygen, Ubuntu, "Fira Sans", "Droid Sans", "Helvetica Neue", sans-sans;
|
||||
user-select: none;
|
||||
}
|
||||
|
||||
html
|
||||
|
@ -144,6 +144,14 @@ function Request3MFInfo()
|
||||
SendWXMessage( JSON.stringify(tSend) );
|
||||
}
|
||||
|
||||
function HtmlDecodeFrom3MF(strInput)
|
||||
{
|
||||
const el = document.createElement('textarea');
|
||||
el.innerHTML = strInput;
|
||||
el.innerHTML = el.value;
|
||||
return el.value;
|
||||
}
|
||||
|
||||
function HandleStudio(pVal)
|
||||
{
|
||||
let strCmd=pVal['command'];
|
||||
@ -213,6 +221,7 @@ function ShowModelInfo( pModel )
|
||||
let UploadType=pModel.upload_type.toLowerCase();
|
||||
let sLicence=pModel.license.toUpperCase();
|
||||
let sModelDesc=decodeURIComponent(pModel.description);
|
||||
sModelDesc=HtmlDecodeFrom3MF( sModelDesc );
|
||||
|
||||
if( pModel.hasOwnProperty('model_id') )
|
||||
{
|
||||
@ -275,8 +284,8 @@ function ShowModelInfo( pModel )
|
||||
$('#ModelLicenceImg').hide();
|
||||
break;
|
||||
}
|
||||
|
||||
$('#Model_Desc').html( html_decode(sModelDesc) );
|
||||
|
||||
$('#Model_Desc').html( sModelDesc );
|
||||
|
||||
let ModelPreviewList=pModel.preview_img;
|
||||
let TotalPreview=ModelPreviewList.length;
|
||||
@ -490,11 +499,12 @@ function ShowProfilelInfo( pProfile )
|
||||
let sProfileName=decodeURIComponent(pProfile.name);
|
||||
let sProfileAuthor=decodeURIComponent(pProfile.author);
|
||||
let sProfileDesc=decodeURIComponent(pProfile.description);
|
||||
sProfileDesc=HtmlDecodeFrom3MF(sProfileDesc);
|
||||
|
||||
$('#ProfileName').html(sProfileName);
|
||||
$('#ProfileAuthor').html(sProfileAuthor);
|
||||
|
||||
$('#Profile_Desc').html( html_decode(sProfileDesc) );
|
||||
$('#Profile_Desc').html( sProfileDesc );
|
||||
|
||||
let ProfilePreviewList=pProfile.preview_img;
|
||||
let TotalPreview=ProfilePreviewList.length;
|
||||
|
@ -4205,17 +4205,6 @@ 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);
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (command_str.compare("common_openurl") == 0) {
|
||||
boost::optional<std::string> path = root.get_optional<std::string>("url");
|
||||
if (path.has_value()) {
|
||||
@ -4287,6 +4276,34 @@ std::string GUI_App::handle_web_request(std::string cmd)
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (command_str.compare("homepage_online_search") == 0) {
|
||||
if (root.get_child_optional("keyword") != boost::none)
|
||||
{
|
||||
std::string strKW = root.get_optional<std::string>("keyword").value();
|
||||
|
||||
if (mainframe && mainframe->m_webview)
|
||||
{
|
||||
mainframe->m_webview->OpenMakerworldSearchPage(strKW);
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (command_str.compare("homepage_printhistory_click") == 0) {
|
||||
if (root.get_child_optional("taskid") != boost::none) {
|
||||
int nTaskID = root.get<int>("taskid");
|
||||
|
||||
if (mainframe && mainframe->m_webview)
|
||||
{
|
||||
mainframe->m_webview->SetPrintHistoryTaskID(nTaskID);
|
||||
mainframe->m_webview->SwitchLeftMenu("printhistory");
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (command_str.compare("homepage_printhistory_get")==0)
|
||||
{
|
||||
if (mainframe && mainframe->m_webview) {
|
||||
mainframe->m_webview->ShowUserPrintTask(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (...) {
|
||||
|
@ -29,6 +29,8 @@
|
||||
#include "MainFrame.hpp"
|
||||
#include <slic3r/GUI/Widgets/WebView.hpp>
|
||||
|
||||
#include <regex>
|
||||
|
||||
namespace Slic3r { namespace GUI {
|
||||
|
||||
wxDEFINE_EVENT(EVT_PROJECT_RELOAD, wxCommandEvent);
|
||||
@ -61,7 +63,7 @@ ProjectPanel::ProjectPanel(wxWindow *parent, wxWindowID id, const wxPoint &pos,
|
||||
m_browser->Bind(wxEVT_WEBVIEW_NAVIGATED, &ProjectPanel::on_navigated, this);
|
||||
m_browser->Bind(wxEVT_WEBVIEW_SCRIPT_MESSAGE_RECEIVED, &ProjectPanel::OnScriptMessage, this, m_browser->GetId());
|
||||
Bind(wxEVT_WEBVIEW_NAVIGATING, &ProjectPanel::onWebNavigating, this, m_browser->GetId());
|
||||
|
||||
Bind(wxEVT_WEBVIEW_NEWWINDOW, &ProjectPanel::OnNewWindow, this);
|
||||
Bind(EVT_PROJECT_RELOAD, &ProjectPanel::on_reload, this);
|
||||
|
||||
SetSizer(main_sizer);
|
||||
@ -71,6 +73,42 @@ ProjectPanel::ProjectPanel(wxWindow *parent, wxWindowID id, const wxPoint &pos,
|
||||
|
||||
ProjectPanel::~ProjectPanel() {}
|
||||
|
||||
std::string trim(const std::string &str, const std::string &charsToTrim)
|
||||
{
|
||||
std::regex pattern("^[" + charsToTrim + "]+|[" + charsToTrim + "]+$");
|
||||
return std::regex_replace(str, pattern, "");
|
||||
}
|
||||
|
||||
/**
|
||||
* On new window, we veto to stop extra windows appearing
|
||||
*/
|
||||
void ProjectPanel::OnNewWindow(wxWebViewEvent &evt)
|
||||
{
|
||||
BOOST_LOG_TRIVIAL(trace) << __FUNCTION__ << ": " << evt.GetURL().ToUTF8().data();
|
||||
wxString flag = " (other)";
|
||||
|
||||
if (evt.GetNavigationAction() == wxWEBVIEW_NAV_ACTION_USER) { flag = " (user)"; }
|
||||
|
||||
if (wxGetApp().get_mode() == comDevelop)
|
||||
wxLogMessage("%s", "New window; url='" + evt.GetURL() + "'" + flag);
|
||||
|
||||
// If we handle new window events then just load them in local browser
|
||||
wxString tmpUrl = evt.GetURL();
|
||||
|
||||
if (tmpUrl.StartsWith("File://") || tmpUrl.StartsWith("file://"))
|
||||
{
|
||||
std::regex pattern("%22http.+%22");
|
||||
std::smatch matches;
|
||||
std::string UrlTmp = tmpUrl.ToStdString();
|
||||
if (std::regex_search(UrlTmp, matches, pattern)) { tmpUrl = trim(matches[0].str(), "%22"); }
|
||||
}
|
||||
|
||||
if (boost::starts_with(tmpUrl, "http://") || boost::starts_with(tmpUrl, "https://")) {
|
||||
m_browser->Stop();
|
||||
evt.Veto();
|
||||
wxLaunchDefaultApplication(tmpUrl);
|
||||
}
|
||||
}
|
||||
|
||||
void ProjectPanel::onWebNavigating(wxWebViewEvent& evt)
|
||||
{
|
||||
@ -109,8 +147,6 @@ void ProjectPanel::on_reload(wxCommandEvent& evt)
|
||||
description = model.model_info->description;
|
||||
update_type = model.model_info->origin;
|
||||
|
||||
|
||||
|
||||
if (model.design_info && !model.design_info->DesignerId.empty()) {
|
||||
|
||||
if (m_model_id_map.count(model.design_info->DesignerId) > 0) {
|
||||
@ -121,7 +157,6 @@ void ProjectPanel::on_reload(wxCommandEvent& evt)
|
||||
m_model_id_map[model.design_info->DesignerId] = model_id;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
try {
|
||||
if (!model.model_info->copyright.empty()) {
|
||||
@ -277,8 +312,6 @@ void ProjectPanel::OnScriptMessage(wxWebViewEvent& evt)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
else if (strCmd == "debug_info") {
|
||||
//wxString msg = j["msg"];
|
||||
|
@ -67,7 +67,6 @@ private:
|
||||
wxString m_root_dir;
|
||||
std::map<std::string, std::string> m_model_id_map;
|
||||
static inline int m_sequence_id = 8000;
|
||||
|
||||
|
||||
public:
|
||||
ProjectPanel(wxWindow *parent, wxWindowID id = wxID_ANY, const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize, long style = wxTAB_TRAVERSAL);
|
||||
@ -78,7 +77,8 @@ public:
|
||||
void on_reload(wxCommandEvent& evt);
|
||||
void on_size(wxSizeEvent& event);
|
||||
void on_navigated(wxWebViewEvent& event);
|
||||
|
||||
void OnNewWindow(wxWebViewEvent &evt);
|
||||
|
||||
void msw_rescale();
|
||||
void update_model_data();
|
||||
void clear_model_info();
|
||||
|
@ -926,7 +926,7 @@ bool GuideFrame::run()
|
||||
int main_frame_display_index = wxDisplay::GetFromWindow(wxGetApp().mainframe);
|
||||
int guide_display_index = wxDisplay::GetFromWindow(this);
|
||||
if (main_frame_display_index != guide_display_index) {
|
||||
wxDisplay display = wxDisplay(main_frame_display_index);
|
||||
wxDisplay display(wxGetApp().mainframe);
|
||||
wxRect screenRect = display.GetGeometry();
|
||||
int guide_x = screenRect.x + (screenRect.width - this->GetSize().GetWidth()) / 2;
|
||||
int guide_y = screenRect.y + (screenRect.height - this->GetSize().GetHeight()) / 2;
|
||||
@ -1133,7 +1133,7 @@ int GuideFrame::LoadProfile()
|
||||
|
||||
wxString strVendor = from_u8(iter->path().string()).BeforeLast('.');
|
||||
strVendor = strVendor.AfterLast( '\\');
|
||||
strVendor = strVendor.AfterLast('\/');
|
||||
strVendor = strVendor.AfterLast('/');
|
||||
wxString strExtension = from_u8(iter->path().string()).AfterLast('.').Lower();
|
||||
|
||||
if (w2s(strVendor) == PresetBundle::BBL_BUNDLE && strExtension.CmpNoCase("json") == 0)
|
||||
@ -1152,7 +1152,7 @@ int GuideFrame::LoadProfile()
|
||||
//cout << iter->path().string() << endl;
|
||||
wxString strVendor = from_u8(iter->path().string()).BeforeLast('.');
|
||||
strVendor = strVendor.AfterLast( '\\');
|
||||
strVendor = strVendor.AfterLast('\/');
|
||||
strVendor = strVendor.AfterLast('/');
|
||||
wxString strExtension = from_u8(iter->path().string()).AfterLast('.').Lower();
|
||||
|
||||
if (w2s(strVendor) != PresetBundle::BBL_BUNDLE && strExtension.CmpNoCase("json")==0)
|
||||
@ -1459,7 +1459,7 @@ std::string GuideFrame::w2s(wxString sSrc)
|
||||
|
||||
void GuideFrame::GetStardardFilePath(std::string &FilePath) {
|
||||
StrReplace(FilePath, "\\", w2s(wxString::Format("%c", boost::filesystem::path::preferred_separator)));
|
||||
StrReplace(FilePath, "\/", w2s(wxString::Format("%c", boost::filesystem::path::preferred_separator)));
|
||||
StrReplace(FilePath, "/", w2s(wxString::Format("%c", boost::filesystem::path::preferred_separator)));
|
||||
}
|
||||
|
||||
//bool GuideFrame::LoadFile(std::string jPath, std::string &sContent)
|
||||
|
@ -272,13 +272,7 @@ void ZUserLogin::OnScriptMessage(wxWebViewEvent &evt)
|
||||
json j = json::parse(into_u8(str_input));
|
||||
|
||||
wxString strCmd = j["command"];
|
||||
|
||||
if (strCmd == "autotest_token")
|
||||
{
|
||||
m_AutotestToken = j["data"]["token"];
|
||||
}
|
||||
if (strCmd == "user_login") {
|
||||
j["data"]["autotest_token"] = m_AutotestToken;
|
||||
wxGetApp().handle_script_message(j.dump());
|
||||
Close();
|
||||
}
|
||||
|
@ -70,8 +70,6 @@ private:
|
||||
wxString TargetUrl;
|
||||
wxWebView *m_browser;
|
||||
|
||||
std::string m_AutotestToken;
|
||||
|
||||
#if wxUSE_WEBVIEW_IE
|
||||
wxMenuItem *m_script_object_el;
|
||||
wxMenuItem *m_script_date_el;
|
||||
|
@ -96,22 +96,7 @@ WebViewPanel::WebViewPanel(wxWindow *parent)
|
||||
//Create Webview Panel
|
||||
m_home_web = new wxBoxSizer(wxHORIZONTAL);
|
||||
|
||||
// Create the webview
|
||||
m_browser = WebView::CreateWebView(this, UrlRight);
|
||||
if (m_browser == nullptr) {
|
||||
wxLogError("Could not init m_browser");
|
||||
return;
|
||||
}
|
||||
|
||||
m_browserMW = WebView::CreateWebView(this, "about:blank");
|
||||
if (m_browserMW == nullptr) {
|
||||
wxLogError("Could not init m_browserMW");
|
||||
return;
|
||||
}
|
||||
m_browserMW->Hide();
|
||||
SetMakerworldModelID("");
|
||||
m_onlinefirst = false;
|
||||
|
||||
// LeftMenu webview
|
||||
m_leftfirst = false;
|
||||
m_browserLeft = WebView::CreateWebView(this, UrlLeft);
|
||||
if (m_browserLeft == nullptr) {
|
||||
@ -122,9 +107,38 @@ WebViewPanel::WebViewPanel(wxWindow *parent)
|
||||
m_browserLeft->SetMinSize(wxSize(FromDIP(224), -1));
|
||||
m_browserLeft->SetMaxSize(wxSize(FromDIP(224), -1));
|
||||
|
||||
// Create the webview
|
||||
m_browser = WebView::CreateWebView(this, UrlRight);
|
||||
if (m_browser == nullptr) {
|
||||
wxLogError("Could not init m_browser");
|
||||
return;
|
||||
}
|
||||
|
||||
// Makerworld webview
|
||||
m_browserMW = WebView::CreateWebView(this, "about:blank");
|
||||
if (m_browserMW == nullptr) {
|
||||
wxLogError("Could not init m_browserMW");
|
||||
return;
|
||||
}
|
||||
m_browserMW->Hide();
|
||||
SetMakerworldModelID("");
|
||||
m_onlinefirst = false;
|
||||
|
||||
// PrintHistory webview
|
||||
m_browserPH = WebView::CreateWebView(this, "about:blank");
|
||||
if (m_browserPH == nullptr) {
|
||||
wxLogError("Could not init m_browserPH");
|
||||
return;
|
||||
}
|
||||
m_browserPH->Hide();
|
||||
SetPrintHistoryTaskID(0);
|
||||
m_printhistoryfirst = false;
|
||||
|
||||
// Position
|
||||
m_home_web->Add(m_browserLeft, 0, wxEXPAND | wxALL, 0);
|
||||
m_home_web->Add(m_browser, 1, wxEXPAND | wxALL, 0);
|
||||
m_home_web->Add(m_browserMW, 1, wxEXPAND | wxALL, 0);
|
||||
m_home_web->Add(m_browserPH, 1, wxEXPAND | wxALL, 0);
|
||||
|
||||
topsizer->Add(m_home_web,1, wxEXPAND | wxALL, 0);
|
||||
|
||||
@ -277,6 +291,9 @@ void WebViewPanel::ResetWholePage()
|
||||
|
||||
m_Region = tmp_Region;
|
||||
|
||||
//loginstatus
|
||||
m_loginstatus = -1;
|
||||
|
||||
//left
|
||||
if (m_browserLeft != nullptr && m_leftfirst) m_browserLeft->Reload();
|
||||
|
||||
@ -291,6 +308,19 @@ void WebViewPanel::ResetWholePage()
|
||||
//online
|
||||
SetMakerworldModelID("");
|
||||
m_onlinefirst = false;
|
||||
|
||||
//PrintHistory
|
||||
SetPrintHistoryTaskID(0);
|
||||
m_printhistoryfirst = false;
|
||||
}
|
||||
|
||||
wxString WebViewPanel::MakeDisconnectUrl(std::string MenuName)
|
||||
{
|
||||
wxString UrlDisconnect = wxString::Format("file://%s/web/homepage3/disconnect.html?menu=%s", from_u8(resources_dir()), MenuName);
|
||||
wxString strlang = wxGetApp().current_language_code_safe();
|
||||
if (strlang != "") { UrlDisconnect = wxString::Format("file://%s/web/homepage3/disconnect.html?menu=%s&lang=%s", from_u8(resources_dir()), MenuName, strlang); }
|
||||
|
||||
return UrlDisconnect;
|
||||
}
|
||||
|
||||
void WebViewPanel::load_url(wxString& url)
|
||||
@ -482,21 +512,32 @@ void WebViewPanel::OnFreshLoginStatus(wxTimerEvent &event)
|
||||
if (mainframe && mainframe->m_webview == this)
|
||||
Slic3r::GUI::wxGetApp().get_login_info();
|
||||
|
||||
if (wxGetApp().is_user_login()) {
|
||||
if (m_loginstatus != 1)
|
||||
std::string phShow = wxGetApp().app_config->get("app", "show_print_history");
|
||||
|
||||
if (wxGetApp().is_user_login())
|
||||
{
|
||||
if (m_loginstatus != 1)
|
||||
{
|
||||
m_loginstatus = 1;
|
||||
|
||||
if (m_onlinefirst)
|
||||
UpdateMakerworldLoginStatus();
|
||||
}
|
||||
|
||||
if (m_TaskInfo == "" && m_browser && phShow != "false")
|
||||
{
|
||||
SetPrintHistoryTaskID(0);
|
||||
ShowUserPrintTask(true);
|
||||
}
|
||||
} else {
|
||||
if (m_loginstatus != 0) {
|
||||
m_loginstatus = 0;
|
||||
|
||||
if (m_onlinefirst)
|
||||
SetMakerworldPageLoginStatus(false);
|
||||
}
|
||||
}
|
||||
|
||||
if (m_TaskInfo != "" && m_browser) ShowUserPrintTask(false);
|
||||
}
|
||||
}
|
||||
|
||||
@ -811,7 +852,12 @@ void WebViewPanel::UpdateMakerworldLoginStatus()
|
||||
|
||||
std::string newticket;
|
||||
int ret = agent->request_bind_ticket(&newticket);
|
||||
if (ret==0) SetMakerworldPageLoginStatus(true, newticket);
|
||||
if (ret==0)
|
||||
SetMakerworldPageLoginStatus(true, newticket);
|
||||
else {
|
||||
wxString UrlDisconnect = MakeDisconnectUrl("online");
|
||||
m_browserMW->LoadURL(UrlDisconnect);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -884,6 +930,76 @@ int WebViewPanel::get_model_mall_detail_url(std::string *url, std::string id)
|
||||
return 0;
|
||||
}
|
||||
|
||||
void WebViewPanel::ShowUserPrintTask(bool bShow)
|
||||
{
|
||||
std::string phShow = wxGetApp().app_config->get("app", "show_print_history");
|
||||
if (bShow && phShow == "false") bShow = false;
|
||||
|
||||
if (bShow)
|
||||
{
|
||||
NetworkAgent *agent = GUI::wxGetApp().getAgent();
|
||||
if (agent && agent->is_user_login()) {
|
||||
static long long PrintTaskMs = 0;
|
||||
|
||||
auto now = std::chrono::system_clock::now();
|
||||
long long TmpMs = std::chrono::duration_cast<std::chrono::milliseconds>(now.time_since_epoch()).count();
|
||||
long long nInterval = TmpMs - PrintTaskMs;
|
||||
if (nInterval < 2000) return;
|
||||
PrintTaskMs = TmpMs;
|
||||
|
||||
BBL::TaskQueryParams task_query_params;
|
||||
task_query_params.limit = 5;
|
||||
task_query_params.offset = 0;
|
||||
int result = agent->get_user_tasks(task_query_params, &m_TaskInfo);
|
||||
BOOST_LOG_TRIVIAL(trace) << "task_manager: get_task_list task_info=" << m_TaskInfo;
|
||||
if (result == 0) {
|
||||
try {
|
||||
json j = json::parse(m_TaskInfo);
|
||||
BOOST_LOG_TRIVIAL(trace) << "task_manager: get_task_list task count =" << j["hits"].size();
|
||||
|
||||
auto body2 = from_u8(m_TaskInfo);
|
||||
body2.insert(1, "\"command\": \"printhistory_task_show\", ");
|
||||
RunScript(wxString::Format("window.postMessage(%s)", body2));
|
||||
|
||||
SetLeftMenuShow("printhistory", 1);
|
||||
|
||||
return;
|
||||
} catch (...) {}
|
||||
}
|
||||
else
|
||||
m_TaskInfo = "";
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
//Hide Left Menu
|
||||
SetLeftMenuShow("printhistory", 0);
|
||||
m_TaskInfo = "";
|
||||
|
||||
//Hide WebBrowser
|
||||
if (m_contentname == "printhistory") SwitchLeftMenu("home");
|
||||
|
||||
//refresh url
|
||||
auto host = wxGetApp().get_model_http_url(wxGetApp().app_config->get_country_code());
|
||||
|
||||
wxString language_code = wxGetApp().current_language_code().BeforeFirst('_');
|
||||
language_code = language_code.ToStdString();
|
||||
|
||||
wxString mw_OffUrl = (boost::format("%1%%2%/studio/print-history?from=bambustudio") % host % language_code.mb_str()).str();
|
||||
wxString Finalurl = wxString::Format("%sapi/sign-out?to=%s", host, UrlEncode("about:blank"));
|
||||
|
||||
m_browserPH->LoadURL(Finalurl);
|
||||
SetPrintHistoryTaskID(0);
|
||||
m_TaskInfo = "";
|
||||
|
||||
//First Enter False
|
||||
m_printhistoryfirst = false;
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
void WebViewPanel::update_mode()
|
||||
{
|
||||
GetSizer()->Show(size_t(0), wxGetApp().app_config->get("internal_developer_mode") == "true");
|
||||
@ -1305,30 +1421,54 @@ void WebViewPanel::OnError(wxWebViewEvent& evt)
|
||||
//m_info->ShowMessage(_L("An error occurred loading ") + evt.GetURL() + "\n" + "'" + category + "'", wxICON_ERROR);
|
||||
|
||||
if (evt.GetInt() == wxWEBVIEW_NAV_ERR_CONNECTION && evt.GetId() == m_browserMW->GetId())
|
||||
{
|
||||
{
|
||||
m_online_LastUrl = m_browserMW->GetCurrentURL();
|
||||
|
||||
if (m_contentname == "online")
|
||||
{
|
||||
wxString errurl = evt.GetURL();
|
||||
|
||||
wxString UrlRight = wxString::Format("file://%s/web/homepage3/disconnect.html", from_u8(resources_dir()));
|
||||
|
||||
wxString strlang = wxGetApp().current_language_code_safe();
|
||||
if (strlang != "") {
|
||||
UrlRight = wxString::Format("file://%s/web/homepage3/disconnect.html?lang=%s", from_u8(resources_dir()), strlang);
|
||||
}
|
||||
|
||||
m_browserMW->LoadURL(UrlRight);
|
||||
wxString UrlDisconnect = MakeDisconnectUrl("online");
|
||||
m_browserMW->LoadURL(UrlDisconnect);
|
||||
|
||||
SetWebviewShow("online", true);
|
||||
SetWebviewShow("right", false);
|
||||
SetWebviewShow("printhistory", false);
|
||||
}
|
||||
}
|
||||
|
||||
if (evt.GetInt() == wxWEBVIEW_NAV_ERR_CONNECTION && evt.GetId() == m_browserPH->GetId()) {
|
||||
m_print_history_LastUrl = m_browserPH->GetCurrentURL();
|
||||
|
||||
if (m_contentname == "printhistory") {
|
||||
wxString errurl = evt.GetURL();
|
||||
|
||||
wxString UrlDisconnect = MakeDisconnectUrl("printhistory");
|
||||
m_browserPH->LoadURL(UrlDisconnect);
|
||||
|
||||
SetWebviewShow("printhistory", true);
|
||||
SetWebviewShow("online", false);
|
||||
SetWebviewShow("right", false);
|
||||
}
|
||||
}
|
||||
|
||||
UpdateState();
|
||||
}
|
||||
|
||||
void WebViewPanel::OpenMakerworldSearchPage(std::string KeyWord)
|
||||
{
|
||||
if (KeyWord.empty()) return;
|
||||
|
||||
auto host = wxGetApp().get_model_http_url(wxGetApp().app_config->get_country_code());
|
||||
|
||||
wxString language_code = wxGetApp().current_language_code().BeforeFirst('_');
|
||||
language_code = language_code.ToStdString();
|
||||
|
||||
m_online_LastUrl = (boost::format("%1%%2%/studio/webview/search?keyword=%3%&from=bambustudio") % host % language_code.mb_str() % UrlEncode(KeyWord)).str();
|
||||
|
||||
SwitchLeftMenu("online");
|
||||
}
|
||||
|
||||
void WebViewPanel::SetMakerworldModelID(std::string ModelID)
|
||||
{
|
||||
auto host = wxGetApp().get_model_http_url(wxGetApp().app_config->get_country_code());
|
||||
@ -1342,6 +1482,19 @@ void WebViewPanel::SetMakerworldModelID(std::string ModelID)
|
||||
m_online_LastUrl = (boost::format("%1%%2%/studio/webview?from=bambustudio") % host % language_code.mb_str()).str();
|
||||
}
|
||||
|
||||
void WebViewPanel::SetPrintHistoryTaskID(int TaskID)
|
||||
{
|
||||
auto host = wxGetApp().get_model_http_url(wxGetApp().app_config->get_country_code());
|
||||
|
||||
wxString language_code = wxGetApp().current_language_code().BeforeFirst('_');
|
||||
language_code = language_code.ToStdString();
|
||||
|
||||
if (TaskID != 0)
|
||||
m_print_history_LastUrl = (boost::format("%1%%2%/studio/print-history/%3%?from=bambustudio") % host % language_code.mb_str() % TaskID).str();
|
||||
else
|
||||
m_print_history_LastUrl = (boost::format("%1%%2%/studio/print-history?from=bambustudio") % host % language_code.mb_str()).str();
|
||||
}
|
||||
|
||||
void WebViewPanel::SwitchWebContent(std::string modelname, int refresh)
|
||||
{
|
||||
m_contentname = modelname;
|
||||
@ -1357,6 +1510,8 @@ void WebViewPanel::SwitchWebContent(std::string modelname, int refresh)
|
||||
wxString FinalUrl = LabUrl;
|
||||
NetworkAgent *agent = GUI::wxGetApp().getAgent();
|
||||
if (agent && agent->is_user_login()) {
|
||||
std::string BambuHost=agent->get_bambulab_host();
|
||||
|
||||
std::string newticket;
|
||||
int ret = agent->request_bind_ticket(&newticket);
|
||||
if (ret == 0) GetJumpUrl(true, newticket, FinalUrl, FinalUrl);
|
||||
@ -1390,6 +1545,7 @@ void WebViewPanel::SwitchWebContent(std::string modelname, int refresh)
|
||||
|
||||
SetWebviewShow("online", true);
|
||||
SetWebviewShow("right", false);
|
||||
SetWebviewShow("printhistory", false);
|
||||
|
||||
GetSizer()->Layout();
|
||||
|
||||
@ -1397,6 +1553,44 @@ void WebViewPanel::SwitchWebContent(std::string modelname, int refresh)
|
||||
wxGetApp().app_config->set_str("homepage", "online_clicked", "1");
|
||||
wxGetApp().app_config->save();
|
||||
wxGetApp().CallAfter([this] { ShowMenuNewTag("online", "0"); });
|
||||
|
||||
} else if (modelname.compare("printhistory") == 0) {
|
||||
|
||||
if (!m_printhistoryfirst)
|
||||
{
|
||||
NetworkAgent *agent = GUI::wxGetApp().getAgent();
|
||||
if (agent == nullptr) return;
|
||||
|
||||
std::string BambuHost = agent->get_bambulab_host();
|
||||
wxString FinalUrl = m_print_history_LastUrl;
|
||||
std::string newticket;
|
||||
int ret = agent->request_bind_ticket(&newticket);
|
||||
if (ret == 0) {
|
||||
GetJumpUrl(true, newticket, FinalUrl, FinalUrl);
|
||||
m_browserPH->LoadURL(FinalUrl);
|
||||
|
||||
m_print_history_LastUrl = "";
|
||||
m_printhistoryfirst = true;
|
||||
} else {
|
||||
wxString UrlDisconnect = MakeDisconnectUrl("printhistory");
|
||||
m_browserPH->LoadURL(UrlDisconnect);
|
||||
}
|
||||
} else {
|
||||
if (m_print_history_LastUrl != "") {
|
||||
m_browserPH->LoadURL(m_print_history_LastUrl);
|
||||
|
||||
m_print_history_LastUrl = "";
|
||||
} else {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
SetWebviewShow("online", false);
|
||||
SetWebviewShow("right", false);
|
||||
SetWebviewShow("printhistory", true);
|
||||
|
||||
GetSizer()->Layout();
|
||||
|
||||
} else if (modelname.compare("home") == 0 || modelname.compare("recent") == 0 || modelname.compare("manual") == 0) {
|
||||
if (!m_browser) return;
|
||||
|
||||
@ -1410,12 +1604,11 @@ void WebViewPanel::SwitchWebContent(std::string modelname, int refresh)
|
||||
|
||||
WebView::RunScript(m_browser, strJS);
|
||||
|
||||
CallAfter([this]{
|
||||
SetWebviewShow("online", false);
|
||||
SetWebviewShow("right", true);
|
||||
SetWebviewShow("online", false);
|
||||
SetWebviewShow("printhistory", false);
|
||||
SetWebviewShow("right", true);
|
||||
|
||||
GetSizer()->Layout();
|
||||
});
|
||||
GetSizer()->Layout();
|
||||
}
|
||||
}
|
||||
|
||||
@ -1498,6 +1691,7 @@ void WebViewPanel::SetLeftMenuShow(std::string menuname, int show)
|
||||
|
||||
wxString strJS = wxString::Format("HandleStudio(%s)", m_Res.dump(-1, ' ', true));
|
||||
WebView::RunScript(m_browserLeft, strJS);
|
||||
WebView::RunScript(m_browser, strJS);
|
||||
}
|
||||
|
||||
void WebViewPanel::SetWebviewShow(wxString name, bool show)
|
||||
@ -1509,6 +1703,8 @@ void WebViewPanel::SetWebviewShow(wxString name, bool show)
|
||||
TmpWeb = m_browser;
|
||||
else if (name == "online")
|
||||
TmpWeb = m_browserMW;
|
||||
else if (name == "printhistory")
|
||||
TmpWeb = m_browserPH;
|
||||
|
||||
if (TmpWeb != nullptr)
|
||||
{
|
||||
|
@ -97,10 +97,14 @@ public:
|
||||
void ResetWholePage();
|
||||
|
||||
void SetMakerworldModelID(std::string ModelID);
|
||||
void OpenMakerworldSearchPage(std::string KeyWord);
|
||||
void SetPrintHistoryTaskID(int TaskID);
|
||||
void SwitchWebContent(std::string modelname, int refresh=0);
|
||||
void SwitchLeftMenu(std::string strMenu);
|
||||
void OpenOneMakerlab(std::string url);
|
||||
|
||||
wxString MakeDisconnectUrl(std::string MenuName);
|
||||
|
||||
void CheckMenuNewTag();
|
||||
void ShowMenuNewTag(std::string menuname, std::string show);
|
||||
void SetLeftMenuShow(std::string menuname, int show);
|
||||
@ -120,6 +124,9 @@ public:
|
||||
void get_makerlab_list(std::function<void(std::string)> callback);
|
||||
int get_model_mall_detail_url(std::string *url, std::string id);
|
||||
|
||||
std::string m_TaskInfo;
|
||||
void ShowUserPrintTask(bool bShow);
|
||||
|
||||
void UpdateMakerworldLoginStatus();
|
||||
void SetMakerworldPageLoginStatus(bool login, wxString ticket = "");
|
||||
|
||||
@ -136,12 +143,15 @@ private:
|
||||
wxWebView* m_browser;
|
||||
wxWebView* m_browserLeft;
|
||||
wxWebView * m_browserMW;
|
||||
wxWebView *m_browserPH; //PrintHistory
|
||||
std::string m_contentname;
|
||||
bool m_leftfirst; //Left First Loaded
|
||||
bool m_onlinefirst; //Online Page First Load
|
||||
//std::string m_online_spec_id; // Online Page Spec_ID
|
||||
wxString m_online_type; //recommend & browse
|
||||
wxString m_online_LastUrl; //PageLastError Url
|
||||
bool m_leftfirst; //Left First Loaded
|
||||
bool m_onlinefirst; //Online Page First Load
|
||||
bool m_printhistoryfirst; //print history first load
|
||||
//std::string m_online_spec_id; // Online Page Spec_ID
|
||||
wxString m_online_type; //recommend & browse
|
||||
wxString m_online_LastUrl; //PageLastError Url
|
||||
wxString m_print_history_LastUrl;
|
||||
|
||||
wxBoxSizer *bSizer_toolbar;
|
||||
wxButton * m_button_back;
|
||||
|