Updated to 1.9.5, and optimize calibration and device

This commit is contained in:
QIDI TECH
2024-09-16 16:07:29 +08:00
parent fa251e0a9a
commit d842832b25
90 changed files with 2753 additions and 998 deletions

View File

@@ -814,7 +814,30 @@ void WebViewPanel::SetMakerworldPageLoginStatus(bool login ,wxString ticket)
mw_currenturl.Replace("modelid=", "");
}
//mw_currenturl.Replace("modelid=", "");
//1.9.5
//If AgreeTerms, Redirect Other Url
std::regex pattern("^https://.*/(.*/){0,1}agree-terms.*");
if (std::regex_match(mw_currenturl.ToStdString(), pattern)) {
std::regex ParamPattern("agreeBackUrl=([^&]+)");
std::smatch match;
std::string CurUrl = mw_currenturl.ToStdString();
if (std::regex_search(CurUrl, match, ParamPattern))
{
//std::cout << "Param Value: " << match[1] << std::endl;
mw_currenturl = wxGetApp().url_decode(std::string(match[1]));
} else {
//std::cout << "Not Find agreeBackUrl" << std::endl;
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();
mw_currenturl = (boost::format("%1%%2%/studio/webview?from=qidistudio") % host % language_code.mb_str()).str();
}
} else {
//std::cout << "The string does not match the pattern." << std::endl;
}
wxString mw_jumpurl = "";
bool b = GetJumpUrl(login, ticket, mw_currenturl, mw_jumpurl);
@@ -1375,6 +1398,8 @@ void WebViewPanel::SwitchWebContent(std::string modelname, int refresh)
CallAfter([this]{
SetWebviewShow("online", false);
SetWebviewShow("right", true);
GetSizer()->Layout();
});
}
}