2.2.0 dev lxy 1218 (#73)

* Modification: Migrate login interface

* Change 'China' to 'Chinese Mainland'

* Add: wcp_networktestdialog

* Optimization: Main process freezing when connecting devices

* Add: wcp_gettimelapseinstance & wcp_defectdetactionconfig

* Change: network test level

* Optimization: U1 piece-by-piece printing alarm alert

* Optimization: Adjust the display order of brands for the selected models

* Fix: WebpresetDialog now loads presets synchronously to prevent crashes

* Add: wcp_sw_SubscribePageStateChange & wcp_sw_UnsubscribePageStateChange
This commit is contained in:
xiaoyeliu
2025-12-18 20:02:40 +08:00
committed by GitHub
parent e145435f6f
commit ece21860e7
11 changed files with 271 additions and 19 deletions

View File

@@ -7236,6 +7236,24 @@ void GUI_App::device_card_notify(const json& res)
}
}
void GUI_App::page_state_notify_webview(wxWebView* webview, const std::string& state)
{
if (!webview) return;
json notification_data;
notification_data["state"] = state;
for (const auto& instance : m_page_state_subscribers) {
if (instance.first == webview) {
auto ptr = instance.second.lock();
if (ptr) {
ptr->m_res_data = notification_data;
ptr->send_to_js();
}
}
}
}
void GUI_App::cache_notify(const std::string& key, const json& res)
{
for (const auto& instance : m_cache_subscribers) {