From 6daf6fd561158fd0b03902630c5f9a21362f1642 Mon Sep 17 00:00:00 2001 From: "zorro.zhang" Date: Thu, 6 Jun 2024 14:56:32 +0800 Subject: [PATCH] NEW: Open PrivacyPolicy WebPage depend on Country JIRA: none Change-Id: Ifb620e6d6cb30f1553b5afe94a0fdf96341febac (cherry picked from commit b6339c05c52900cab13070ab45ca33ce5495bc05) --- resources/web/guide/11/11.js | 2 +- resources/web/guide/3/3.js | 24 +++++++++++++++++++++++- resources/web/guide/3/index.html | 2 +- src/slic3r/GUI/WebGuideDialog.cpp | 6 ++++++ 4 files changed, 31 insertions(+), 3 deletions(-) diff --git a/resources/web/guide/11/11.js b/resources/web/guide/11/11.js index 3a5f7c914a..0c5d4f8844 100644 --- a/resources/web/guide/11/11.js +++ b/resources/web/guide/11/11.js @@ -62,7 +62,7 @@ function GotoPolicyPage() SendWXMessage( JSON.stringify(tSend) ); - window.location.href="../3/index.html"; + window.location.href="../3/index.html?region="+RegionFinal; } diff --git a/resources/web/guide/3/3.js b/resources/web/guide/3/3.js index 0c609fccde..d6842804bc 100644 --- a/resources/web/guide/3/3.js +++ b/resources/web/guide/3/3.js @@ -1,9 +1,15 @@ +m_Region='US'; + function OnInit() { TranslatePage(); SendPrivacySelect(); + + let strRegion=GetQueryString('region'); + if( strRegion!=null ) + m_Region=strRegion.toLowerCase(); } @@ -97,4 +103,20 @@ function HandleModelInfo( pVal ) } window.location.href="../21/index.html"; -} \ No newline at end of file +} + +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) ); +} diff --git a/resources/web/guide/3/index.html b/resources/web/guide/3/index.html index a365c0fdec..f7b973c283 100644 --- a/resources/web/guide/3/index.html +++ b/resources/web/guide/3/index.html @@ -20,7 +20,7 @@
-In the 3D Printing community, we learn from each other’s 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 Privacy Policy +In the 3D Printing community, we learn from each other’s 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 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.

You may change your choice in preference anytime.

diff --git a/src/slic3r/GUI/WebGuideDialog.cpp b/src/slic3r/GUI/WebGuideDialog.cpp index 8e5326fb99..3f237348ce 100644 --- a/src/slic3r/GUI/WebGuideDialog.cpp +++ b/src/slic3r/GUI/WebGuideDialog.cpp @@ -485,6 +485,12 @@ void GuideFrame::OnScriptMessage(wxWebViewEvent &evt) } else InstallNetplugin = false; + } + else if (strCmd == "common_openurl") + { + std::string strUrl = j["url"]; + + wxLaunchDefaultBrowser(strUrl); } } catch (std::exception &e) { // wxMessageBox(e.what(), "json Exception", MB_OK);