Missing Mac implementation of receiving login data from browser.

+ fix of current connect address
This commit is contained in:
David Kocik 2024-01-05 15:24:15 +01:00
parent ff64f7167d
commit 488254f7fb
2 changed files with 10 additions and 2 deletions

View File

@ -3011,7 +3011,15 @@ void GUI_App::MacOpenURL(const wxString& url)
BOOST_LOG_TRIVIAL(error) << "Recieved command to open URL, but it is not allowed in app configuration. URL: " << url;
return;
}
start_download(into_u8(url));
std::string narrow_url = into_u8(url);
if (boost::starts_with(narrow_url, "prusaslicer://open?file=")) {
start_download(std::move(narrow_url));
} else if (boost::starts_with(narrow_url, "prusaslicer://login")) {
plater()->get_user_account()->on_login_code_recieved(std::move(narrow_url));
} else {
BOOST_LOG_TRIVIAL(error) << "MacOpenURL recieved improper URL: " << url;
}
}
#endif /* __APPLE */

View File

@ -55,7 +55,7 @@ public:
std::string get_access_token();
const ConnectPrinterStateMap& get_printer_state_map() const { return m_printer_map; }
const std::map<std::string, std::string> get_user_data() const { return m_user_data; }
std::string get_connect_address() const { return "https://connect.prusa3d.com"; }
std::string get_connect_address() const { return "https://dev.connect.prusa3d.com"; }
// standalone utility methods
std::string get_model_from_json(const std::string& message) const;