when the stealth mode is enabled, log out cloud service and hide sideboard (#13531)

* when the stealth mode is enabled, log out cloud service and hide sideboard

* update tooltip
This commit is contained in:
SoftFever
2026-05-09 00:46:41 +08:00
committed by GitHub
parent 447d4452e6
commit e42ff0b57d
7 changed files with 63 additions and 6 deletions

View File

@@ -924,6 +924,8 @@ wxBoxSizer *PreferencesDialog::create_item_checkbox(wxString title, wxString too
checkbox->SetValue(app_config->get_bool(param));
checkbox->SetToolTip(tip);
if (param == "sync_user_preset") { m_sync_user_preset_checkbox = checkbox; }
m_sizer_checkbox->Add(checkbox_title, 0, wxALIGN_CENTER | wxTOP | wxBOTTOM, FromDIP(3));
m_sizer_checkbox->Add(checkbox , 0, wxALIGN_CENTER | wxRIGHT | wxLEFT, FromDIP(5));
@@ -955,6 +957,12 @@ wxBoxSizer *PreferencesDialog::create_item_checkbox(wxString title, wxString too
}
BOOST_LOG_TRIVIAL(info) << __FUNCTION__ << " sync_user_preset: " << (sync ? "true" : "false");
}
else if (param == "stealth_mode") {
bool enabled = app_config->get_stealth_mode();
if (enabled) wxGetApp().on_stealth_mode_enter();
if (m_sync_user_preset_checkbox) m_sync_user_preset_checkbox->Enable(!enabled);
if (m_bambu_cloud_checkbox) m_bambu_cloud_checkbox->Enable(!enabled);
}
#ifdef __WXMSW__
if (param == "associate_3mf") {
@@ -1528,7 +1536,7 @@ void PreferencesDialog::create_items()
auto item_region = create_item_region_combobox(_L("Login region"), "");
g_sizer->Add(item_region);
auto item_stealth_mode = create_item_checkbox(_L("Stealth mode"), _L("This stops the transmission of data to Bambu's cloud services. Users who don't use BBL machines or use LAN mode only can safely turn on this function."), "stealth_mode");
auto item_stealth_mode = create_item_checkbox(_L("Stealth mode"), _L("This disables all cloud services e.g. Orca Cloud and Bambu Cloud. This stops the transmission of data to Bambu's cloud services too. Users who don't use BBL machines or use LAN mode only can safely turn on this function."), "stealth_mode");
g_sizer->Add(item_stealth_mode);
auto item_network_test = create_item_button(_L("Network test"), _L("Test") + " " + dots, "", _L("Open Network Test"), []() {
@@ -1552,6 +1560,7 @@ void PreferencesDialog::create_items()
text->Wrap(DESIGN_TITLE_SIZE.x);
auto cb = new ::CheckBox(m_parent);
m_bambu_cloud_checkbox = cb;
cb->SetValue(app_config->has_cloud_provider(BBL_CLOUD_PROVIDER));
cb->SetToolTip(text->GetToolTipText());
@@ -1585,6 +1594,11 @@ void PreferencesDialog::create_items()
auto item_user_sync = create_item_checkbox(_L("Auto sync user presets (Printer/Filament/Process)"), "", "sync_user_preset");
g_sizer->Add(item_user_sync);
if (app_config->get_stealth_mode()) {
if (m_bambu_cloud_checkbox) m_bambu_cloud_checkbox->Enable(false);
if (m_sync_user_preset_checkbox) m_sync_user_preset_checkbox->Enable(false);
}
auto item_system_sync = create_item_checkbox(_L("Update built-in Presets automatically."), "", "sync_system_preset");
g_sizer->Add(item_system_sync);