ENH: create new page on click of privacy policy

Change-Id: I20026514c1e880986f24716c9f473507f608cd67
This commit is contained in:
tao.jin 2023-02-16 17:07:40 +08:00 committed by Lane.Wei
parent 1b3ac0a0b6
commit e422797292
4 changed files with 38 additions and 32 deletions

View file

@ -287,6 +287,15 @@ void ZUserLogin::OnScriptMessage(wxWebViewEvent &evt)
wxLaunchDefaultBrowser(url);
});
}
}
else if (strCmd == "new_webpage") {
if (j["data"].contains("url")) {
std::string jump_url = j["data"]["url"].get<std::string>();
CallAfter([this, jump_url] {
wxString url = wxString::FromUTF8(jump_url);
wxLaunchDefaultBrowser(url);
});
}
return;
}
} catch (std::exception &e) {