diff --git a/.github/workflows/build_orca.yml b/.github/workflows/build_orca.yml index ae2068ccb1..42cffde13f 100644 --- a/.github/workflows/build_orca.yml +++ b/.github/workflows/build_orca.yml @@ -135,7 +135,7 @@ jobs: path: ${{ github.workspace }}/Snapmaker_Orca_Mac_${{inputs.arch}}_${{ env.ver }}.dmg - name: Deploy Mac release - if: github.ref == 'refs/heads/main' && inputs.os == 'macos-14' + if: github.ref == 'refs/heads/main' && inputs.os == 'macos-14' || github.ref == 'refs/heads/2.0.0' && inputs.os == 'macos-14' uses: WebFreak001/deploy-nightly@v3.1.0 with: upload_url: https://uploads.github.com/repos/Snapmaker/OrcaSlicer/releases/169912305/assets{?name,label} diff --git a/resources/web/flutter/index.html b/resources/web/flutter/index.html index af28f10bf1..b955781318 100644 --- a/resources/web/flutter/index.html +++ b/resources/web/flutter/index.html @@ -14,7 +14,7 @@ This is a placeholder for base href that will be replaced by the value of the `--base-href` argument provided to `flutter build`. --> - + @@ -202,6 +202,6 @@ } - + Snapmaker Orca diff --git a/src/slic3r/GUI/HttpServer.cpp b/src/slic3r/GUI/HttpServer.cpp index 0b169a79b1..1688fa6548 100644 --- a/src/slic3r/GUI/HttpServer.cpp +++ b/src/slic3r/GUI/HttpServer.cpp @@ -261,7 +261,7 @@ std::string HttpServer::map_url_to_file_path(const std::string& url) { trimmed_url = "/index.html"; // 默认首页 } - std::string base_path = resources_dir() + "/web"; // 根据你的需求定义 + std::string base_path = resources_dir(); // 根据你的需求定义 return base_path + trimmed_url; // 拼接成新的路径 } diff --git a/src/slic3r/GUI/SSWCP.cpp b/src/slic3r/GUI/SSWCP.cpp index b6e2a5b0a9..9e0a0f3cd3 100644 --- a/src/slic3r/GUI/SSWCP.cpp +++ b/src/slic3r/GUI/SSWCP.cpp @@ -291,6 +291,13 @@ void SSWCP_MachineFind_Instance::onOneEngineEnd() // SSWCP_MachineOption_Instance void SSWCP_MachineOption_Instance::process() { + if (m_event_id != "") { + json header; + send_to_js(); + + m_header.clear(); + m_header["event_id"] = m_event_id; + } if (m_cmd == "sw_SendGCodes") { sw_SendGCodes(); } diff --git a/src/slic3r/GUI/WebDeviceDialog.hpp b/src/slic3r/GUI/WebDeviceDialog.hpp index 956bdf45c0..cdb41992a7 100644 --- a/src/slic3r/GUI/WebDeviceDialog.hpp +++ b/src/slic3r/GUI/WebDeviceDialog.hpp @@ -29,7 +29,7 @@ class WebDeviceDialog : public wxDialog wxWebView *m_browser; wxString m_javascript; - wxString m_device_url = "http://localhost:13619/flutter/index.html"; + wxString m_device_url = "http://localhost:13619/web/flutter/index.html"; DECLARE_EVENT_TABLE() }; diff --git a/src/slic3r/GUI/WebViewDialog.cpp b/src/slic3r/GUI/WebViewDialog.cpp index 9b6faf937b..f25073fc74 100644 --- a/src/slic3r/GUI/WebViewDialog.cpp +++ b/src/slic3r/GUI/WebViewDialog.cpp @@ -43,7 +43,7 @@ WebViewPanel::WebViewPanel(wxWindow *parent) url = wxString::Format("file://%s/web/homepage/index.html?lang=%s", from_u8(resources_dir()), strlang); // test - // url = "http://localhost:13619/flutter/index.html"; + // url = "http://localhost:13619/web/flutter/index.html"; wxBoxSizer* topsizer = new wxBoxSizer(wxVERTICAL); diff --git a/src/slic3r/Utils/MoonRaker.cpp b/src/slic3r/Utils/MoonRaker.cpp index 4fc1fe2cd6..0607ced162 100644 --- a/src/slic3r/Utils/MoonRaker.cpp +++ b/src/slic3r/Utils/MoonRaker.cpp @@ -828,12 +828,19 @@ void Moonraker_Mqtt::on_status_arrived(const std::string& payload) try { json body = json::parse(payload); + json data; + if (body.count("params")) { + data = body["params"]; + } else { + return; + } + // 待修改 if (!m_status_cb) { return; } - m_status_cb(body); + m_status_cb(data); } catch (std::exception& e) {} }