mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-07 23:17:35 -06:00
NEW: add more track records
Change-Id: If82430f8b432f1a1d5a78cd6a63a16cf50d2bbaa Signed-off-by: Stone Li <stone.li@bambulab.com>
This commit is contained in:
parent
4893cebaa5
commit
43810bdac8
7 changed files with 69 additions and 18 deletions
|
@ -4115,10 +4115,17 @@ void GUI_App::check_track_enable()
|
|||
int major = 0, minor = 0, micro = 0;
|
||||
header_json["os"] = std::string(os_desc.ToUTF8());
|
||||
header_json["name"] = std::string(SLIC3R_APP_NAME);
|
||||
header_json["uuid"] = app_config->get("slicer_uuid");
|
||||
if (m_agent) {
|
||||
m_agent->track_header(header_json.dump());
|
||||
m_agent->track_enable(true);
|
||||
}
|
||||
/* record studio start event */
|
||||
json j;
|
||||
j["user_mode"] = this->get_mode_str();
|
||||
if (m_agent) {
|
||||
m_agent->track_event("studio_launch", j.dump());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -5041,6 +5048,13 @@ ConfigOptionMode GUI_App::get_mode()
|
|||
mode == "develop" ? comDevelop : comSimple;
|
||||
}
|
||||
|
||||
std::string GUI_App::get_mode_str()
|
||||
{
|
||||
if (!app_config->has("user_mode"))
|
||||
return "simple";
|
||||
return app_config->get("user_mode");
|
||||
}
|
||||
|
||||
void GUI_App::save_mode(const /*ConfigOptionMode*/int mode)
|
||||
{
|
||||
//BBS
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue