Online service configuration: fixed URL in connect select pritner

This commit is contained in:
Jan Bařtipán 2024-07-03 15:27:14 +02:00 committed by Lukas Matena
parent 6eca12a1ed
commit 38939b0703
2 changed files with 6 additions and 3 deletions

View File

@ -649,12 +649,14 @@ wxString ConnectWebViewPanel::get_login_script(bool refresh)
.then(function (resp) {
console.log('Login resp', resp);
resp.text()
.then(function (json) { console.log('Login resp body', json); })
.then(function (json) { console.log('Login resp body', json); return json; })
.then(function (body) {
if (resp.status >= 400) errorHandler({status: resp.status, body});
});
})
.catch(errorHandler);
.catch(function (err){
errorHandler({message: err.message, stack: err.stack});
});
)",
#endif
access_token
@ -1226,7 +1228,7 @@ void WebViewDialog::EndModal(int retCode)
PrinterPickWebViewDialog::PrinterPickWebViewDialog(wxWindow* parent, std::string& ret_val)
: WebViewDialog(parent
, L"https://connect.prusa3d.com/slicer-select-printer"
, GUI::from_u8(Utils::ServiceConfig::instance().connect_select_printer_url())
, _L("Choose a printer")
, wxSize(std::max(parent->GetClientSize().x / 2, 100 * wxGetApp().em_unit()), std::max(parent->GetClientSize().y / 2, 50 * wxGetApp().em_unit()))
,{"_prusaSlicer"}

View File

@ -11,6 +11,7 @@ public:
std::string connect_status_url() const { return m_connect_url + "/slicer/status"; }
std::string connect_printer_list_url() const { return m_connect_url + "/slicer/printer_list"; }
std::string connect_select_printer_url() const { return m_connect_url + "/slicer-select-printer"; }
std::string connect_printers_url() const { return m_connect_url + "/app/printers/"; }
std::string connect_teams_url() const { return m_connect_url + "/app/teams"; }