mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-13 17:58:03 -06:00
Show help info of setting up connection
This commit is contained in:
parent
7816c93741
commit
1a281e99a6
4 changed files with 66 additions and 22 deletions
33
resources/web/orca/missing_connection.html
Normal file
33
resources/web/orca/missing_connection.html
Normal file
|
@ -0,0 +1,33 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Printer Connection Required</title>
|
||||
<style>
|
||||
body {
|
||||
font-family: Arial, sans-serif;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
height: 100vh;
|
||||
margin: 0;
|
||||
background-color: #272727;
|
||||
}
|
||||
.container {
|
||||
text-align: center;
|
||||
background-color: #272727;
|
||||
padding: 30px;
|
||||
border-radius: 10px;
|
||||
box-shadow: 0 4px 6px rgba(39, 39, 39, 0.1);
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="container">
|
||||
<h1>Printer Connection</h1>
|
||||
<p>Please set up your printer connection to view the device.</p>
|
||||
<img src="setup_connection.gif" alt="Printer connection setup demonstration" style="max-width: 100%; height: auto; display: block;"/>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
BIN
resources/web/orca/setup_connection.gif
Normal file
BIN
resources/web/orca/setup_connection.gif
Normal file
Binary file not shown.
After Width: | Height: | Size: 738 KiB |
|
@ -864,13 +864,13 @@ void MainFrame::show_option(bool show)
|
|||
}
|
||||
}
|
||||
|
||||
void MainFrame::init_tabpanel()
|
||||
{
|
||||
// wxNB_NOPAGETHEME: Disable Windows Vista theme for the Notebook background. The theme performance is terrible on Windows 10
|
||||
// with multiple high resolution displays connected.
|
||||
void MainFrame::init_tabpanel() {
|
||||
// wxNB_NOPAGETHEME: Disable Windows Vista theme for the Notebook background. The theme performance is terrible on
|
||||
// Windows 10 with multiple high resolution displays connected.
|
||||
// BBS
|
||||
wxBoxSizer *side_tools = create_side_tools();
|
||||
m_tabpanel = new Notebook(this, wxID_ANY, wxDefaultPosition, wxDefaultSize, side_tools, wxNB_TOP | wxTAB_TRAVERSAL | wxNB_NOPAGETHEME);
|
||||
m_tabpanel = new Notebook(this, wxID_ANY, wxDefaultPosition, wxDefaultSize, side_tools,
|
||||
wxNB_TOP | wxTAB_TRAVERSAL | wxNB_NOPAGETHEME);
|
||||
m_tabpanel->SetBackgroundColour(*wxWHITE);
|
||||
|
||||
#ifndef __WXOSX__ // Don't call SetFont under OSX to avoid name cutting in ObjectList
|
||||
|
@ -887,12 +887,23 @@ void MainFrame::init_tabpanel()
|
|||
new_sel == tpMonitor) {
|
||||
if (!wxGetApp().getAgent()) {
|
||||
e.Veto();
|
||||
BOOST_LOG_TRIVIAL(info) << boost::format("skipped tab switch from %1% to %2%, lack of network plugins")%old_sel %new_sel;
|
||||
BOOST_LOG_TRIVIAL(info) << boost::format("skipped tab switch from %1% to %2%, lack of network plugins") %
|
||||
old_sel % new_sel;
|
||||
if (m_plater) {
|
||||
wxCommandEvent *evt = new wxCommandEvent(EVT_INSTALL_PLUGIN_HINT);
|
||||
wxQueueEvent(m_plater, evt);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (new_sel == tpMonitor && wxGetApp().preset_bundle != nullptr) {
|
||||
auto cfg = wxGetApp().preset_bundle->printers.get_edited_preset().config;
|
||||
wxString url = cfg.opt_string("print_host_webui").empty() ? cfg.opt_string("print_host")
|
||||
: cfg.opt_string("print_host_webui");
|
||||
if (url.empty()) {
|
||||
wxString url = wxString::Format("file://%s/web/orca/missing_connection.html", from_u8(resources_dir()));
|
||||
m_printer_view->load_url(url);
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
|
|
@ -161,7 +161,7 @@ bool OctoPrint::test(wxString &msg) const
|
|||
|
||||
wxString OctoPrint::get_test_ok_msg () const
|
||||
{
|
||||
return _(L("Connection to OctoPrint works correctly."));
|
||||
return _(L("Connection to OctoPrint/Klipper works correctly."));
|
||||
}
|
||||
|
||||
wxString OctoPrint::get_test_failed_msg (wxString &msg) const
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue