mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-07-27 12:52:07 +00:00
feature add privacy policy for guide
This commit is contained in:
@@ -120,7 +120,7 @@
|
||||
#include "PrivacyUpdateDialog.hpp"
|
||||
#include "ModelMall.hpp"
|
||||
#include "HintNotification.hpp"
|
||||
|
||||
#include "bury_cfg/bury_point.hpp"
|
||||
//#ifdef WIN32
|
||||
//#include "BaseException.h"
|
||||
//#endif
|
||||
@@ -3754,6 +3754,9 @@ if (res) {
|
||||
} catch (std::exception &) {
|
||||
// wxMessageBox(e.what(), "", MB_OK);
|
||||
}
|
||||
auto isAgree = wxGetApp().app_config->get("snapmaker_privacy_policy", "isagree");
|
||||
|
||||
set_privacy_policy(isAgree == "true");
|
||||
}
|
||||
|
||||
void GUI_App::ShowDownNetPluginDlg() {
|
||||
@@ -7059,6 +7062,9 @@ bool GUI_App::run_wizard(ConfigWizard::RunReason reason, ConfigWizard::StartPage
|
||||
mainframe->refresh_plugin_tips();
|
||||
// BBS: remove SLA related message
|
||||
}
|
||||
auto isAgree = wxGetApp().app_config->get("snapmaker_privacy_policy", "isagree");
|
||||
|
||||
set_privacy_policy(isAgree == "true");
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
@@ -7746,7 +7746,7 @@ void Plater::priv::on_process_completed(SlicingProcessCompletedEvent &evt)
|
||||
if (m_slice_timing_active) {
|
||||
auto end_time = std::chrono::steady_clock::now();
|
||||
auto duration_ms = std::chrono::duration_cast<std::chrono::milliseconds>(end_time - m_slice_start_time).count();
|
||||
uint64_t timess = duration_ms;
|
||||
auto timess = duration_ms;
|
||||
if (evt.cancelled()) {
|
||||
BOOST_LOG_TRIVIAL(info) << "Slicing cancelled after " << duration_ms << " ms";
|
||||
m_slice_start_time = {};
|
||||
|
||||
@@ -492,6 +492,15 @@ void GuideFrame::OnScriptMessage(wxWebViewEvent &evt)
|
||||
this->Close();
|
||||
} else if (strCmd == "save_region") {
|
||||
m_Region = j["region"];
|
||||
m_ProfileJson["region"] = m_Region;
|
||||
}
|
||||
else if (strCmd == "common_openurl") {
|
||||
|
||||
std::string url = j["url"];
|
||||
std::string local = j["local"];
|
||||
if (!url.empty()) {
|
||||
wxLaunchDefaultBrowser(url);
|
||||
}
|
||||
}
|
||||
else if (strCmd == "network_plugin_install") {
|
||||
std::string sAction = j["data"]["action"];
|
||||
@@ -617,7 +626,7 @@ int GuideFrame::SaveProfile()
|
||||
// m_MainPtr->app_config->set(std::string(m_SectionName.mb_str()), "privacyuse", "1");
|
||||
// } else
|
||||
// m_MainPtr->app_config->set(std::string(m_SectionName.mb_str()), "privacyuse", "0");
|
||||
|
||||
m_MainPtr->app_config->set("snapmaker_privacy_policy", "isagree", PrivacyUse);
|
||||
m_MainPtr->app_config->set("region", m_Region);
|
||||
m_MainPtr->app_config->set_bool("stealth_mode", StealthMode);
|
||||
|
||||
|
||||
@@ -588,6 +588,14 @@ void WebPresetDialog::OnScriptMessage(wxWebViewEvent& evt)
|
||||
this->Close();
|
||||
} else if (strCmd == "save_region") {
|
||||
m_Region = j["region"];
|
||||
m_ProfileJson["region"] = m_Region;
|
||||
}
|
||||
else if (strCmd == "common_openurl") {
|
||||
|
||||
std::string url = j["url"];
|
||||
if (!url.empty()) {
|
||||
wxLaunchDefaultBrowser(url);
|
||||
}
|
||||
} else if (strCmd == "network_plugin_install") {
|
||||
std::string sAction = j["data"]["action"];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user