NEW: Open PrivacyPolicy WebPage depend on Country

JIRA: none
Change-Id: Ifb620e6d6cb30f1553b5afe94a0fdf96341febac
(cherry picked from commit b6339c05c52900cab13070ab45ca33ce5495bc05)
This commit is contained in:
zorro.zhang 2024-06-06 14:56:32 +08:00 committed by Lane.Wei
parent a84374ed3a
commit 6daf6fd561
4 changed files with 31 additions and 3 deletions

View File

@ -62,7 +62,7 @@ function GotoPolicyPage()
SendWXMessage( JSON.stringify(tSend) ); SendWXMessage( JSON.stringify(tSend) );
window.location.href="../3/index.html"; window.location.href="../3/index.html?region="+RegionFinal;
} }

View File

@ -1,9 +1,15 @@
m_Region='US';
function OnInit() function OnInit()
{ {
TranslatePage(); TranslatePage();
SendPrivacySelect(); SendPrivacySelect();
let strRegion=GetQueryString('region');
if( strRegion!=null )
m_Region=strRegion.toLowerCase();
} }
@ -98,3 +104,19 @@ function HandleModelInfo( pVal )
window.location.href="../21/index.html"; window.location.href="../21/index.html";
} }
function OpenPrivacyPolicy()
{
let PolicyUrl='';
if( m_Region=='china' )
PolicyUrl="https://bambulab.cn/policies/software-privacy";
else
PolicyUrl="https://bambulab.com/policies/privacy";
var tSend={};
tSend['sequence_id']=Math.round(new Date() / 1000);
tSend['command']="common_openurl";
tSend['url']=PolicyUrl;
SendWXMessage( JSON.stringify(tSend) );
}

View File

@ -20,7 +20,7 @@
</div> </div>
<div id="Content"> <div id="Content">
<div id="PolicyTxt" class="TextS2 TextArea1 ZScrol"> <div id="PolicyTxt" class="TextS2 TextArea1 ZScrol">
<a class="trans" tid="t54">In the 3D Printing community, we learn from each others successes and failures to adjust our own slicing parameters and settings. Bambu Studio follows the same principle and uses machine learning to improve its performance from the successes and failures of the vast number of prints by our users. We are training Bambu Studio to be smarter by feeding them the real-world data. If you are willing, this service will access information from your error logs and usage logs, which may include information described in </a><a class="HyperLink trans" tid="t55" href="https://bambulab.com/policies/privacy" target="_blank">Privacy Policy</a><a class="trans" tid="t56"> <a class="trans" tid="t54">In the 3D Printing community, we learn from each others successes and failures to adjust our own slicing parameters and settings. Bambu Studio follows the same principle and uses machine learning to improve its performance from the successes and failures of the vast number of prints by our users. We are training Bambu Studio to be smarter by feeding them the real-world data. If you are willing, this service will access information from your error logs and usage logs, which may include information described in </a><a class="HyperLink trans" tid="t55" onClick="OpenPrivacyPolicy()">Privacy Policy</a><a class="trans" tid="t56">
. We will not collect any Personal Data by which an individual can be identified directly or indirectly, including without limitation names, addresses, payment information, or phone numbers. By enabling this service, you agree to these terms and the statement about Privacy Policy. . We will not collect any Personal Data by which an individual can be identified directly or indirectly, including without limitation names, addresses, payment information, or phone numbers. By enabling this service, you agree to these terms and the statement about Privacy Policy.
</a> </a>
<p class="trans" tid="t113" style="text-indent:2em;">You may change your choice in preference anytime.</p> <p class="trans" tid="t113" style="text-indent:2em;">You may change your choice in preference anytime.</p>

View File

@ -486,6 +486,12 @@ void GuideFrame::OnScriptMessage(wxWebViewEvent &evt)
else else
InstallNetplugin = false; InstallNetplugin = false;
} }
else if (strCmd == "common_openurl")
{
std::string strUrl = j["url"];
wxLaunchDefaultBrowser(strUrl);
}
} catch (std::exception &e) { } catch (std::exception &e) {
// wxMessageBox(e.what(), "json Exception", MB_OK); // wxMessageBox(e.what(), "json Exception", MB_OK);
BOOST_LOG_TRIVIAL(trace) << "GuideFrame::OnScriptMessage;Error:" << e.what(); BOOST_LOG_TRIVIAL(trace) << "GuideFrame::OnScriptMessage;Error:" << e.what();