feature add Personal Information Cross-Border Transfer Notice

This commit is contained in:
alves
2025-12-25 12:10:58 +08:00
parent 0302c21415
commit 4ec2812268
7 changed files with 90 additions and 34 deletions

View File

@@ -89,13 +89,6 @@ bool AppConfig::get_stealth_mode()
return true;
}
auto isAgree = get("app", "privacy_policy_isagree");
if (isAgree.empty())
{
return true;
}
return get_bool("stealth_mode");
}

View File

@@ -3764,9 +3764,6 @@ if (res) {
} catch (std::exception &) {
// wxMessageBox(e.what(), "", MB_OK);
}
auto isAgree = wxGetApp().app_config->get("app", "isagree");
set_privacy_policy(isAgree == "true");
}
void GUI_App::ShowDownNetPluginDlg() {
@@ -7293,10 +7290,14 @@ void GUI_App::user_login_notify(const json& res)
bool GUI_App::config_wizard_startup()
{
auto isAgree = wxGetApp().app_config->get("app", "privacy_policy_isagree");
set_privacy_policy(isAgree == "true");
if (!m_app_conf_exists || preset_bundle->printers.only_default_printers()) {
BOOST_LOG_TRIVIAL(info) << "run wizard...";
run_wizard(ConfigWizard::RR_DATA_EMPTY);
BOOST_LOG_TRIVIAL(info) << "finished run wizard";
return true;
} /*else if (get_app_config()->legacy_datadir()) {
// Looks like user has legacy pre-vendorbundle data directory,
@@ -7308,6 +7309,13 @@ bool GUI_App::config_wizard_startup()
run_wizard(ConfigWizard::RR_DATA_LEGACY);
return true;
}*/
if (isAgree.empty())
{
run_wizard(ConfigWizard::RR_DATA_EMPTY); // Compatible with older versions
return true;
}
return false;
}

View File

@@ -749,7 +749,10 @@ wxBoxSizer *PreferencesDialog::create_item_checkbox(wxString title, wxWindow *pa
app_config->save();
if (param == "privacy_policy_isagree")
set_privacy_policy(checkbox->GetValue());
{
app_config->set("app", "privacy_policy_isagree", checkbox->GetValue());
set_privacy_policy(checkbox->GetValue());
}
// if (param == "staff_pick_switch") {
// bool pbool = app_config->get("staff_pick_switch") == "true";
// wxGetApp().switch_staff_pick(pbool);

View File

@@ -34,6 +34,7 @@
#include <libslic3r/Utils.hpp>
#include "CreatePresetsDialog.hpp"
#include <mutex>
#include "bury_cfg/bury_point.hpp"
using namespace nlohmann;
@@ -521,7 +522,7 @@ void GuideFrame::OnScriptMessage(wxWebViewEvent &evt)
std::string url = j["url"];
std::string local = j["local"];
if (!url.empty()) {
wxLaunchDefaultBrowser(url);
wxLaunchDefaultBrowser(url.c_str());
}
}
else if (strCmd == "network_plugin_install") {
@@ -649,6 +650,7 @@ int GuideFrame::SaveProfile()
// } else
// m_MainPtr->app_config->set(std::string(m_SectionName.mb_str()), "privacyuse", "0");
m_MainPtr->app_config->set("app", "privacy_policy_isagree", PrivacyUse);
set_privacy_policy(PrivacyUse);
m_MainPtr->app_config->set("region", m_Region);
m_MainPtr->app_config->set_bool("stealth_mode", StealthMode);