Compare commits
226
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ebf74860f4 | ||
|
|
ed0a6976c1 | ||
|
|
1c4127acf2 | ||
|
|
a121e56085 | ||
|
|
010b3ac55b | ||
|
|
b944af5448 | ||
|
|
0f0180bc50 | ||
|
|
7148bebef2 | ||
|
|
63c90c7eb6 | ||
|
|
ed45815d3b | ||
|
|
d856b73cd1 | ||
|
|
86d3421f1e | ||
|
|
b5b25bd90c | ||
|
|
0db74e9e37 | ||
|
|
be0063e2a0 | ||
|
|
b743467bca | ||
|
|
8a9bc456b6 | ||
|
|
75aad8b880 | ||
|
|
7fc5e298ad | ||
|
|
1de95b12ec | ||
|
|
1e54c92b00 | ||
|
|
8eb67ae2b6 | ||
|
|
69bb61a30d | ||
|
|
a3ad590d4b | ||
|
|
702981e324 | ||
|
|
b4764194b0 | ||
|
|
d5694835d0 | ||
|
|
25a4c3e476 | ||
|
|
19496a1f0a | ||
|
|
1a8a9558d3 | ||
|
|
d94543207f | ||
|
|
9c70a0cafa | ||
|
|
c5aaa2f79f | ||
|
|
595c937d50 | ||
|
|
28a6f5a813 | ||
|
|
4901d4992c | ||
|
|
56d61ce6ae | ||
|
|
be2efac9fd | ||
|
|
7b19c902de | ||
|
|
bf60aef344 | ||
|
|
674ad36ddb | ||
|
|
f535ccf493 | ||
|
|
06bf0acdc3 | ||
|
|
5307412484 | ||
|
|
bd7cf76076 | ||
|
|
aa4c269eab | ||
|
|
d7c2dc5033 | ||
|
|
9da5c356f7 | ||
|
|
bd5723dda6 | ||
|
|
3ab0a5952a | ||
|
|
d76343b7bb | ||
|
|
d94e9f18f3 | ||
|
|
4610eb70bc | ||
|
|
649bbaa7dc | ||
|
|
887da6745a | ||
|
|
b7e94ba25e | ||
|
|
629e0f2f7c | ||
|
|
e919a81536 | ||
|
|
d6b98639c1 | ||
|
|
4ac9b56775 | ||
|
|
e0c1330c4a | ||
|
|
0d89f42935 | ||
|
|
1e5c6c39de | ||
|
|
ff782d9d04 | ||
|
|
61c2ba38b0 | ||
|
|
65cb342cb8 | ||
|
|
81e78e770c | ||
|
|
5ed63ed27f | ||
|
|
c831d33873 | ||
|
|
55df4da104 | ||
|
|
e3db2731ab | ||
|
|
f81c253e85 | ||
|
|
ec67ab3033 | ||
|
|
8acf2b3b7e | ||
|
|
3d14e8ba46 | ||
|
|
450c3db1e6 | ||
|
|
39dbebb2d2 | ||
|
|
94f60516c1 | ||
|
|
098c946dde | ||
|
|
97020863d2 | ||
|
|
d1218aa0f5 | ||
|
|
dc4a322420 | ||
|
|
2ff9e5a111 | ||
|
|
058688d470 | ||
|
|
26ed70b4a7 | ||
|
|
7b3781ebaf | ||
|
|
52ad699f92 | ||
|
|
b2335b16f2 | ||
|
|
a339cabc7d | ||
|
|
b6966f05ee | ||
|
|
c1b344e94c | ||
|
|
35f30aef4f | ||
|
|
da72a4e272 | ||
|
|
e5b0ad292b | ||
|
|
a54813a167 | ||
|
|
95a13c9c44 | ||
|
|
d1905f100a | ||
|
|
a3a12882f8 | ||
|
|
ffa05ee1d5 | ||
|
|
ea49345138 | ||
|
|
83e10bde0c | ||
|
|
9895622cfa | ||
|
|
c38716ba2a | ||
|
|
88ecdcc3c6 | ||
|
|
11f97d6289 | ||
|
|
706ed470c4 | ||
|
|
a6c927508f | ||
|
|
eeac987784 | ||
|
|
275a268c43 | ||
|
|
9c37383787 | ||
|
|
bc353a060d | ||
|
|
5286be32b1 | ||
|
|
3bb52a566e | ||
|
|
64e7626e04 | ||
|
|
deb81094d0 | ||
|
|
667bb2976d | ||
|
|
f404895126 | ||
|
|
6a2617075b | ||
|
|
2f984a6d5b | ||
|
|
d16f0e0fdf | ||
|
|
d91e3a64ba | ||
|
|
81a7289194 | ||
|
|
4f65bd4ba2 | ||
|
|
1934e29bad | ||
|
|
73f445d005 | ||
|
|
e45d7d69d2 | ||
|
|
cd6a5c3b4a | ||
|
|
0c4601e23a | ||
|
|
abec546575 | ||
|
|
93dd1e3034 | ||
|
|
1decdd2c57 | ||
|
|
093cd7c5d4 | ||
|
|
a20bab62a5 | ||
|
|
02ebeb8371 | ||
|
|
814f23213e | ||
|
|
f2a33a8e48 | ||
|
|
9df182f44a | ||
|
|
ec832488a9 | ||
|
|
07d9b75425 | ||
|
|
a150d11e81 | ||
|
|
cb87b4c198 | ||
|
|
f4b393053d | ||
|
|
97ace01908 | ||
|
|
63f438671f | ||
|
|
9a8c208930 | ||
|
|
f8bbc5e97c | ||
|
|
25d1267a07 | ||
|
|
1e090484ae | ||
|
|
62f95cddf5 | ||
|
|
5e865aa670 | ||
|
|
5b33db421d | ||
|
|
684e65ed59 | ||
|
|
7f6e6e5bdf | ||
|
|
c4181443e6 | ||
|
|
a51d2167d0 | ||
|
|
6c4bbdb5f9 | ||
|
|
b0e7e503ed | ||
|
|
fae1cc4ab6 | ||
|
|
dda7a488bb | ||
|
|
a33d26f17a | ||
|
|
53d85223e8 | ||
|
|
003586cb7a | ||
|
|
253ff4900c | ||
|
|
91f2b2fa05 | ||
|
|
f6f7fce424 | ||
|
|
f0e3a0a77a | ||
|
|
d190657221 | ||
|
|
0ba9d9c6b6 | ||
|
|
36b8acdcd9 | ||
|
|
648bbe581e | ||
|
|
0bbab2182f | ||
|
|
1298da15f2 | ||
|
|
945a3f8eaf | ||
|
|
abe66b4557 | ||
|
|
37a08a3a37 | ||
|
|
6844e6242c | ||
|
|
de4efb514c | ||
|
|
9d9e914533 | ||
|
|
4037715c8d | ||
|
|
f1724206f6 | ||
|
|
7005b87870 | ||
|
|
06cb14db46 | ||
|
|
25062e5a36 | ||
|
|
ca368867e2 | ||
|
|
d654518c65 | ||
|
|
8021d5a7ad | ||
|
|
cb4910758e | ||
|
|
af1809e025 | ||
|
|
6277a7380d | ||
|
|
3bfeb4613c | ||
|
|
e68bc016b6 | ||
|
|
0cf0311c54 | ||
|
|
8110b2f7b7 | ||
|
|
04ead521b0 | ||
|
|
f6fe02a347 | ||
|
|
8ef89d42f0 | ||
|
|
fe264e6142 | ||
|
|
dd3c897b75 | ||
|
|
d3ee2f920b | ||
|
|
95ebc25434 | ||
|
|
b533955bc3 | ||
|
|
501b012bdb | ||
|
|
69eb41923d | ||
|
|
1187216d5b | ||
|
|
61bb2dcac1 | ||
|
|
79b42aa588 | ||
|
|
9f506f8cbf | ||
|
|
b6527b471a | ||
|
|
85436a0cd6 | ||
|
|
1a6792b6b5 | ||
|
|
7b66065e77 | ||
|
|
7aad8f905d | ||
|
|
881ebbd49a | ||
|
|
8a87d8a144 | ||
|
|
6912dc027e | ||
|
|
123426c6ec | ||
|
|
869423f4c6 | ||
|
|
d92543e1c3 | ||
|
|
460fa71c70 | ||
|
|
1a7a23205b | ||
|
|
3f0f76e2d9 | ||
|
|
46381879e3 | ||
|
|
5218b0baea | ||
|
|
ce09984983 | ||
|
|
9bcbfa48de | ||
|
|
43674bf2d5 |
No files matched your search
@@ -1,39 +1,52 @@
|
||||
# Mainsail
|
||||
<p align="center">
|
||||
<img src="docs/assets/img/logo.png" alt="Sublime's custom image"/>
|
||||
</p>
|
||||
|
||||
Mainsail a lightweight & responsive web interface for [Klipper](https://github.com/KevinOConnor/klipper), the 3D printer firmware. It communicates with [Moonraker (Klipper-API)](https://github.com/arksine/moonraker) from [Arksine](https://github.com/arksine).
|
||||
# Mainsail
|
||||
[](https://github.com/mainsail-crew/mainsail/releases) [](https://docs.mainsail.xyz/development/localization) [](https://github.com/mainsail-crew/mainsail/stargazers) [](https://github.com/mainsail-crew/mainsail/network/members)
|
||||
[](https://github.com/mainsail-crew/mainsail/blob/develop/LICENSE) [](https://github.com/mainsail-crew/mainsail/commits/) 
|
||||
[](https://discord.gg/skWTwTD) [](https://www.patreon.com/meteyou)
|
||||
|
||||
Mainsail makes Klipper more accessible by adding a lightweight, responsive web user interface, centred around an intuitive and consistent design philosophy.
|
||||
|
||||
[Getting Started](https://docs.mainsail.xyz/setup)
|
||||
|
||||
Mainsail is also available in remote mode on [http://my.mainsail.xyz](http://my.mainsail.xyz). Find out [more](https://docs.mainsail.xyz/setup#mymainsailxyz).
|
||||
|
||||
[Documentation](https://docs.mainsail.xyz)
|
||||
[Release Notes](https://github.com/meteyou/mainsail/releases)
|
||||
[Release Notes](https://github.com/mainsail-crew/mainsail/releases)
|
||||
|
||||
## Screenshots
|
||||

|
||||
|
||||
## Features
|
||||
- Optimized for desktops, tablets and mobile devices
|
||||
- Responsive web interface, optimized for desktops, tablets and mobile devices
|
||||
- Supports multiple 3D printers (Printer Farm)
|
||||
- Localization (i18n)
|
||||
- File Manager (gcode and config files)
|
||||
- File Editor (gcode and config files)
|
||||
- Print History / Stats
|
||||
- Print History and Statistics
|
||||
- Job Queue
|
||||
- Temperature Presets (with custom gcode)
|
||||
- Bed Mesh Leveling
|
||||
- Bed Mesh visualisation
|
||||
- G-Code Viewer
|
||||
- Multi-Webcam support
|
||||
- Control power devices (relays, TPLink, Tasmota, ..)
|
||||
- Customizable UI (logos, backgrounds & even custom css)
|
||||
- Timelapse integration
|
||||
- Control power devices such as relays, TPLink and Tasmota devices, and more
|
||||
- Powerful Macro-Management
|
||||
- Configurable dashboard
|
||||
- Customizable user interface including logos, backgrounds, and custom CSS
|
||||
- Exclude objects (not yet officially supported by Klipper)
|
||||
|
||||
## Get support & assistance
|
||||
Do you need help or just want to talk? Join us on [Discord](https://discord.gg/skWTwTD). We have a very active community.
|
||||
Have you found a bug? Then we would like you to create an [issue](https://github.com/meteyou/mainsail/issues).
|
||||
## Help and Support
|
||||
Do you need help or just want to talk? Join our active community on [Discord](https://discord.gg/skWTwTD).
|
||||
Have you found a bug? Please create an [Issue](https://github.com/mainsail-crew/mainsail/issues) in GitHub and let us know.
|
||||
|
||||
## Support this project
|
||||
The project is primarily developed and maintained by meteyou. To keep the project going he invests his free time, almost every day. To motivate him (☕🍺😜) there are several ways to support the project.
|
||||
## Support Mainsail
|
||||
Mainsail is primarily developed and maintained by meteyou. To keep the project going he invests his free time, almost every day. To motivate him (☕🍺😜) there are several ways to support him:
|
||||
|
||||
- [Patreon (recurring)](https://patreon.com/meteyou)
|
||||
- [Ko-Fi (one-time)](https://ko-fi.com/mainsail)
|
||||
[](https://www.patreon.com/meteyou)
|
||||
[](https://ko-fi.com/mainsail)
|
||||
|
||||
## Credit, sources and inspiration
|
||||
* [Kevin O'Connor](https://github.com/KevinOConnor) for the awesome 3D printer firmware [Klipper](https://github.com/KevinOConnor/klipper)
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
FROM node:buster AS base
|
||||
FROM node:16-buster AS base
|
||||
|
||||
EXPOSE 8080
|
||||
|
||||
|
||||
@@ -20,6 +20,7 @@ source "https://rubygems.org"
|
||||
group :jekyll_plugins do
|
||||
gem "jekyll-feed", "~> 0.12"
|
||||
gem "jekyll-remote-theme"
|
||||
gem "jekyll-redirect-from"
|
||||
end
|
||||
|
||||
# Windows and JRuby does not include zoneinfo files, so bundle the tzinfo-data gem
|
||||
|
||||
@@ -17,3 +17,6 @@ defaults:
|
||||
path: "" # an empty string here means all files in the project
|
||||
values:
|
||||
image: assets/img/rtfm.png
|
||||
|
||||
plugins:
|
||||
- jekyll-redirect-from
|
||||
@@ -3,3 +3,4 @@ Dracula,,steadyjaw,dracula-mainsail-theme
|
||||
Cyberpunk,,Dario-Ciceri,cp2077-mainsail-theme
|
||||
Mainsail x Voron Toolhead,Various toolhead images inside the theme folder can be renamed to 'sidebar-background.png',eriroh,Mainsail-x-Voron-Toolhead-Theme
|
||||
Rat Rig (unofficial), includes various sidebar images which can be renamed to ‘sidebar-background.png’,Raabi91,ratrig-mainsail-theme
|
||||
Cryd,,cryd-s,Mainsail-Theme-by-Cryd
|
||||
|
@@ -49,6 +49,21 @@ $btn-primary-color: $red-300;
|
||||
content: url("/assets/img/alert.svg");
|
||||
}
|
||||
|
||||
.youtube-container {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
height: 0;
|
||||
padding-bottom: 56.25%; /* 9/16 */
|
||||
}
|
||||
|
||||
.youtube-container > iframe {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.key {
|
||||
padding: 0px 5px;
|
||||
border-radius: 3px;
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 17 KiB After Width: | Height: | Size: 6.0 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 385 KiB After Width: | Height: | Size: 692 KiB |
@@ -4,6 +4,8 @@ title: Configuration
|
||||
nav_order: 5
|
||||
has_children: false
|
||||
permalink: /configuration
|
||||
redirect_from:
|
||||
- /necessary-configuration
|
||||
---
|
||||
|
||||
# Required configuration
|
||||
@@ -11,7 +13,7 @@ permalink: /configuration
|
||||
**Mainsail requires a minimum configuration to function properly and will display a warning at startup if the required parts are not found in your configuration file(s).**
|
||||
{: .warning}
|
||||
|
||||
The following configuration elements are mandatory and must be configured for Mainsail to operate:
|
||||
The following configuration elements are mandatory and must be configured for Mainsail to operate correctly:
|
||||
|
||||
* [Virtual SD Card](configuration#virtual_sdcard)
|
||||
* [Display Status](configuration#display_status)
|
||||
@@ -22,28 +24,28 @@ The following configuration elements are optional, including making tweaks and a
|
||||
* [Custom Commands](configuration#customisation)
|
||||
|
||||
## Virtual SD Card
|
||||
This allows gcode file uploads.
|
||||
The `Virtual SD Card` allows gcode file uploads.
|
||||
```yaml
|
||||
[virtual_sdcard]
|
||||
path: ~/gcode_files
|
||||
```
|
||||
|
||||
## Display Status
|
||||
This is required for messages in your status panel, if you don't have a `[display]` in your configuration.
|
||||
`Display Status` is required for messages in your status panel, if you don't have `[display]` in your configuration.
|
||||
```yaml
|
||||
[display_status]
|
||||
```
|
||||
|
||||
## Pause, Resume, Cancel
|
||||
This enables pause / resume in mainsail.
|
||||
These macros enable pause and resume in Klipper.
|
||||
|
||||
```yaml
|
||||
[pause_resume]
|
||||
```
|
||||
|
||||
# Macros
|
||||
## for pause / resume / cancel functionality
|
||||
These should be modified to your own needs.
|
||||
## Add pause / resume / cancel functionality
|
||||
You can modify the below macros to fit your needs.
|
||||
{% raw %}
|
||||
```yaml
|
||||
[gcode_macro PAUSE]
|
||||
@@ -118,12 +120,12 @@ gcode:
|
||||
# Optional
|
||||
|
||||
## Customisation
|
||||
Klipper has many canned/preset commands that are themselves just macros.
|
||||
Klipper has a number of preset commands that are also just macros.
|
||||
|
||||
The default configuration of these may not suit your needs or preferences, (though they are usually a good place to start). It's possible to adjust these by including them in your config, along with whatever code you would like to run.
|
||||
The default configuration of these may not suit your needs or preferences, though they are usually a good place to start. It's possible to adjust these by including them in your config, along with any additional code you would like to run.
|
||||
|
||||
## Example
|
||||
Adjusting the `BED_MESH_CALIBRATE` command (which can be run from the Sidebar > Heightmap > Calibrate.
|
||||
Adjusting the `BED_MESH_CALIBRATE` command, which is found in the menu at Sidebar > Heightmap > Calibrate.
|
||||
{% raw %}
|
||||
```yaml
|
||||
[gcode_macro BED_MESH_CALIBRATE]
|
||||
|
||||
+3
-3
@@ -13,13 +13,13 @@ description: >-
|
||||
<!-- {{ page.description }} -->
|
||||
|
||||
|
||||
We would like acknowledge the valuable contributions that many people and projects have made to Mainsail, particularly the:
|
||||
We would like acknowledge the valuable contributions that many people and projects have made to Mainsail, especially the following:
|
||||
|
||||
- contributors, who help make Mainsail better
|
||||
- testers, who help find bugs in Mainsail, so they can be quickly fixed
|
||||
- supporters via patreon/ko-fi
|
||||
- supporters via Patreon and Ko-fi
|
||||
|
||||
..and of course the projects Mainsail is built on, especially [Klipper](https://github.com/KevinOConnor/klipper){:target="_blank"}, [Moonraker](https://github.com/Arksine/moonraker){:target="_blank"} and [MainsailOS](https://github.com/mainsail-crew/MainsailOS/){:target="_blank"}.
|
||||
We would like to thank the projects Mainsail is built on, especially [Klipper](https://github.com/KevinOConnor/klipper){:target="_blank"}, [Moonraker](https://github.com/Arksine/moonraker){:target="_blank"}, and [MainsailOS](https://github.com/mainsail-crew/MainsailOS/){:target="_blank"}.
|
||||
|
||||
**THANK YOU for your continued support.**
|
||||
|
||||
|
||||
+11
-10
@@ -9,33 +9,34 @@ has_toc: false
|
||||
|
||||
# Data Privacy
|
||||
|
||||
We understand the need for data privacy and have designed Mainsail to operate in your browser’s cache locally.
|
||||
Mainsail understands the need for data privacy and it has been designed to only run in your browser locally.
|
||||
|
||||
The following table applies to Mainsail when installed locallaly, or accessed via [my.mainsail.xyz](http://my.mainsail.xyz).
|
||||
The following table applies to Mainsail when installed locally or accessed remotely at [my.mainsail.xyz](http://my.mainsail.xyz).
|
||||
|
||||
| YES | NO |
|
||||
| :--------------: | :---------------: |
|
||||
| Store static files in browser storage (.html, .js, .css) | ‘Phone home’ |
|
||||
| Communicate directly with your printer via the Moonraker API | Send/transfer any data externally |
|
||||
| Store static files in browser storage (.html, .js, .css) | ‘Telemetry’ |
|
||||
| Communicate directly with your printer via the Moonraker API | Send or transfer any data externally |
|
||||
|
||||
## Will my data be safe if I use the hosted version?
|
||||
Accessing [my.mainsail.xyz](http://my.mainsail.xyz) stores the .html, .js and .css files for Mainsail locally in the brower's storage in exactly the same way that an instance running on your local hardware would do. In reality, there is no functional difference (or concern) between accessing Mainsail from a privately or publicly hosted instance.
|
||||
Accessing [my.mainsail.xyz](http://my.mainsail.xyz) stores the .html, .js and .css files for Mainsail locally in your brower's storage in exactly the same way that an instance running on your local hardware would do. There is no functional difference or concerns between accessing Mainsail locally or in a remotely public hosted instance.
|
||||
|
||||
|
||||
Parallel operation is also possible.
|
||||
Running Mainsail both locally and remotely in parallel is also possible.
|
||||
|
||||
# Third party software
|
||||
|
||||
We do not modify third party packages or software, nor control their attitude to Data Privacy.
|
||||
Mainsail does not modify any third party packages and does not control Data Privacy for any third party packages you choose to install.
|
||||
|
||||
If you are concerned, please consider the privacy policies (or contacting the developer) of:
|
||||
If you are concerned, please review the privacy policies for the following third party software:
|
||||
|
||||
* [RaspberryOS](https://www.raspberrypi.org/privacy/)
|
||||
* Klipper
|
||||
* Moonraker
|
||||
|
||||
Please contact the developers of any of the above software if you have any concerns.
|
||||
|
||||
It is worth noting that Klipper, Moonraker and RaspberryOS are open source software and ( whilst this brings no guarantee of privacy and security) the source is available and open to peer review.
|
||||
It is worth noting that Klipper, Moonraker and RaspberryOS are open source software. This does not bring a guarantee of privacy and security, but the source code is available and open to peer review.
|
||||
{: .info}
|
||||
The Raspberry Foundation is a registered charity in the United Kingdom, with extensive Privacy and Safeguarding policies.
|
||||
The Raspberry Foundation is a registered charity in the United Kingdom with extensive Privacy and Safeguarding policies.
|
||||
{: .info}
|
||||
+20
-14
@@ -6,7 +6,7 @@ has_children: false
|
||||
---
|
||||
|
||||
# Welcome to Mainsail!
|
||||
Mainsail aims to make Klipper more accessible to end users through a lightweight, responsive web ui, centred around an intuitive and consistent design philsophy.
|
||||
Mainsail makes Klipper more accessible by adding a lightweight, responsive web user interface, centred around an intuitive and consistent design philosophy.
|
||||
{: .fs-5 }
|
||||
|
||||
[Getting Started](/setup){: .btn .btn-primary }
|
||||
@@ -17,30 +17,36 @@ Mainsail aims to make Klipper more accessible to end users through a lightweight
|
||||

|
||||
|
||||
## Features
|
||||
- Optimized for desktops, tablets and mobile devices
|
||||
- Responsive web interface, optimized for desktops, tablets and mobile devices
|
||||
- Supports multiple 3D printers (Printer Farm)
|
||||
- Localization (i18n)
|
||||
- File Manager (gcode and config files)
|
||||
- File Editor (gcode and config files)
|
||||
- Print History / Stats
|
||||
- File Manager (G-Code and config files)
|
||||
- File Editor (G-Code and config files)
|
||||
- Print History and Statistics
|
||||
- Job Queue
|
||||
- Temperature Presets (with custom gcode)
|
||||
- Bed Mesh Leveling
|
||||
- Bed Mesh visualisation
|
||||
- G-Code Viewer
|
||||
- Multi-Webcam support
|
||||
- Control power devices (relays, TPLink, Tasmota, ..)
|
||||
- Customizable UI (logos, backgrounds & even custom css)
|
||||
- Timelapse integration
|
||||
- Control power devices such as relays, TPLink and Tasmota devices, and more
|
||||
- Powerful Macro-Management
|
||||
- Configurable dashboard
|
||||
- Customizable user interface including logos, backgrounds, and custom CSS
|
||||
- Exclude objects (not yet officially supported by Klipper)
|
||||
|
||||
## Get support & assistance
|
||||
Do you need help or just want to talk? Join us on discord. We have a very active community.
|
||||
Have you found a bug? Then we would like you to create an Issue on GitHub.
|
||||
## Help and Support
|
||||
Do you need help or just want to talk? Join our active community on Discord.
|
||||
Have you found a bug? Please create an Issue in GitHub and let us know.
|
||||
|
||||
[Discord](https://discord.gg/skWTwTD){: .btn}{:target="_blank"}
|
||||
[GitHub Issues](https://github.com/mainsail-crew/mainsail/issues){: .btn}{:target="_blank"}
|
||||
|
||||
## Support this project
|
||||
The project is primarily developed and maintained by meteyou. To keep the project going he invests his free time, almost every day. To motivate him (☕🍺😜) there are several ways to support the project.
|
||||
## Support Mainsail
|
||||
Mainsail is primarily developed and maintained by `meteyou`. To keep the project going he invests his free time, almost every day. To motivate him (☕🍺😜) there are several ways to support him:
|
||||
|
||||
- [Patreon (recurring)](https://patreon.com/meteyou){:target="_blank"}
|
||||
- [Ko-Fi (one-time)](https://ko-fi.com/mainsail){:target="_blank"}
|
||||
|
||||
However, we would also like to ask you to support the regular contributors.
|
||||
Please also support all of our maintainers and contributors.
|
||||
{: .info}
|
||||
@@ -1,7 +1,7 @@
|
||||
---
|
||||
layout: default
|
||||
title: Necessary Configuration
|
||||
nav_order: 5
|
||||
nav_exclude: true
|
||||
has_children: false
|
||||
permalink: /necessary-configuration
|
||||
---
|
||||
@@ -120,4 +120,4 @@ gcode:
|
||||
BASE_BED_MESH_CALIBRATE
|
||||
#after the original gcode
|
||||
```
|
||||
{% endraw %}
|
||||
{% endraw %}
|
||||
@@ -5,7 +5,7 @@ parent: Quicktips
|
||||
has_children: false
|
||||
permalink: /quicktips/additional-sensors
|
||||
description: >-
|
||||
Integrate additional sensors into the temperature graph. For example Raspberry Pi, MCU, BMExxx, HTU21D, LM75 and more..
|
||||
You can integrate additional sensors [supported by Klipper](https://www.klipper3d.org/Config_Reference.html#temperature-sensors) into the temperature graph in Mainsail.
|
||||
---
|
||||
|
||||
# {{ page.title }}
|
||||
@@ -13,7 +13,7 @@ description: >-
|
||||
|
||||
## Raspberry Pi temperature sensor
|
||||
|
||||
Append the following section to your printer.cfg:
|
||||
Append the following section to your `printer.cfg`:
|
||||
|
||||
```yaml
|
||||
[temperature_sensor raspberry_pi]
|
||||
@@ -24,7 +24,7 @@ max_temp: 100
|
||||
|
||||
## ATSAM, ATAMD, and STM32 temperature sensor
|
||||
|
||||
Append the following section to your printer.cfg:
|
||||
Append the following section to your `printer.cfg`:
|
||||
|
||||
```yaml
|
||||
[temperature_sensor mcu_temp]
|
||||
|
||||
@@ -5,22 +5,22 @@ parent: Quicktips
|
||||
has_children: false
|
||||
permalink: /quicktips/console-shortcuts
|
||||
description: >-
|
||||
Similar to a terminal of your OS, there are some keyboard shortcuts in Mainsail that make your everyday life easier.
|
||||
Keyboard shortcuts are available for those who prefer shortcuts.
|
||||
---
|
||||
|
||||
# {{ page.title }}
|
||||
{{ page.description }}
|
||||
|
||||
## Help command
|
||||
## List of Commands
|
||||
|
||||
Issue a `HELP` command to get a list of possible commands.
|
||||
Issue a `HELP` command in the console to get a list of all available commands.
|
||||
|
||||
## Autocomplete
|
||||
|
||||
You can start typing a command and then complete it with the tab-key. If there are several possibilities, you will get a list of choices.
|
||||
You can start typing a command and then complete it with the Tab key. If there are several possibilities, a list of choices will be displayed.
|
||||
|
||||

|
||||
|
||||
## Scroll through commands
|
||||
|
||||
Using the ↑ up / ↓ down arrow keys you can scroll through previous commands.
|
||||
Use the ↑ up and ↓ down arrow keys to scroll through previously used commands in the console.
|
||||
@@ -5,14 +5,14 @@ parent: Quicktips
|
||||
has_children: false
|
||||
permalink: /quicktips/disable-octoprint-lcd-menu
|
||||
description: >-
|
||||
Klipper is shipped with an Octoprint entry in the LCD menu. These menu points don't work with Mainsail.
|
||||
Klipper ships with an Octoprint entry in the LCD menu which does not work with Mainsail.
|
||||
---
|
||||
|
||||
# {{ page.title }}
|
||||
{{ page.description }}
|
||||
|
||||
## Modify printer.cfg
|
||||
Just add the following entry to your printer.cfg:
|
||||
Add the following entry to your printer.cfg to disable Octoprint:
|
||||
|
||||
```yaml
|
||||
[menu __main __octoprint]
|
||||
|
||||
@@ -5,7 +5,7 @@ parent: Quicktips
|
||||
has_children: false
|
||||
permalink: /quicktips/hide-gcode_macros
|
||||
description: >-
|
||||
As you probably already noticed, you can show and hide the gcode macros in the interface settings, but there is more...
|
||||
You can show and hide G-Code macros in the interface settings
|
||||
---
|
||||
|
||||
# {{ page.title }}
|
||||
@@ -25,10 +25,10 @@ gcode:
|
||||
M300
|
||||
```
|
||||
|
||||
`MY_AWESOME_GCODE` appears in your interface settings, `_MY_HELPER_CODE` not.
|
||||
`MY_AWESOME_GCODE` appears in your interface settings, `_MY_HELPER_CODE` does not.
|
||||
|
||||

|
||||
|
||||
By the way, this also works for other configuration sections like, **fans and outputs.**
|
||||
This also works for other configuration sections including **fans and outputs.**
|
||||
{: .info}
|
||||
|
||||
@@ -1,24 +1,25 @@
|
||||
---
|
||||
layout: default
|
||||
title: Print History/Stats
|
||||
title: Print History and Statistics
|
||||
parent: Quicktips
|
||||
has_children: false
|
||||
permalink: /quicktips/history
|
||||
description: >-
|
||||
Since Mainsail 1.5.0 it is possible to report and visualize print statistics. These contain various information such as print status, print duration, amount of filament used, etc.
|
||||
You can view your print history and statistics in the History section of Mainsail.
|
||||
|
||||
---
|
||||
|
||||
# {{ page.title }}
|
||||
{{ page.description }}
|
||||
It's also possible to reprint jobs.
|
||||
This includes print job status, duration, amount of filament used, and more. You can also reprint a print job.
|
||||
|
||||
{: style="width: 50%;"}
|
||||
|
||||
## Enable print history tracking
|
||||
|
||||
For this, it is necessary to enable print history tracking in moonraker.
|
||||
To enable print history tracking, you must first enable this feature in Moonraker.
|
||||
|
||||
Just add `[history]` to your moonraker.conf and restart moonraker.
|
||||
Add `[history]` to your `moonraker.conf ` configuration file and restart Moonraker.
|
||||
|
||||
The new history entry will appear in Mainsails sidebar.
|
||||
The new history entry will appear in Mainsail's sidebar.
|
||||
|
||||
@@ -5,7 +5,7 @@ nav_order: 10
|
||||
has_children: true
|
||||
permalink: /quicktips
|
||||
description: >-
|
||||
quick tips, without much explanation
|
||||
Quick tips for Mainsail users.
|
||||
---
|
||||
|
||||
# {{ page.title }}
|
||||
|
||||
+52
-37
@@ -12,75 +12,91 @@ description: >-
|
||||
{{ page.description }}
|
||||
|
||||
__Disclaimer__
|
||||
Thank you [Charlie_Powell](https://community.octoprint.org/u/Charlie_Powell) for letting us adapt your guide for mainsailOS!
|
||||
Thank you to [Charlie_Powell](https://community.octoprint.org/u/Charlie_Powell) for letting us adapt his guide for MainsailOS!
|
||||
The original guide can be found [here](https://community.octoprint.org/t/setting-up-multiple-webcams-in-octopi-the-right-way/32669).
|
||||
{: .info}
|
||||
|
||||
## Prerequisites
|
||||
You need:
|
||||
For multicam to work, you will need:
|
||||
|
||||
- mainsailOS v0.5.0 or higher
|
||||
- ssh access
|
||||
- at least two cameras
|
||||
- MainsailOS v0.5.0 or higher
|
||||
- SSH access
|
||||
- Two or more cameras
|
||||
|
||||
__WARNING__
|
||||
**If you are working on a existing installation, make a backup!**
|
||||
**If you are working with an existing installation, make a backup!**
|
||||
{: .warning}
|
||||
|
||||
## Creating the configuration files
|
||||
mainsailOS supports an infinite number of webcam*.txt-style configuration files. They can be placed in
|
||||
MainsailOS supports an infinite number of `webcam*.txt` style configuration files. They should be placed in
|
||||
`/home/pi/klipper_config`.
|
||||
|
||||
In the UI, got to 'Settings > Interface' click on (1) and save as `webcam2.txt`.
|
||||
In Mainsail's user interface, go to 'Settings > Interface' and click on (1) and save as `webcam2.txt`.
|
||||
|
||||
:image:
|
||||
|
||||
Now you should have two identical files:
|
||||
You should now have two identical files with different names:
|
||||
1. `/home/pi/klipper_config/webcam.txt`
|
||||
2. `/home/pi/klipper_config/webcam2.txt`
|
||||
|
||||
## Editing the original configuration file for a specific camera
|
||||
Find out the path to the camera by ID. This makes it much easier to stop /dev/video0 and /dev/video1 from switching on you.
|
||||
## Edit the original configuration file for a specific camera
|
||||
Find the path to the camera by its ID. This makes it easier to stop `dev/video0` and `/dev/video1` from being switchedin the future.
|
||||
|
||||
Run `ls /dev/v4l/by-id`, copy your camera id and paste it into the editor in mainsail. For example:
|
||||
In a terminal, run the command `ls /dev/v4l/by-id`, copy your camera id and paste it into the editor in Mainsail. For example:
|
||||
|
||||
```bash
|
||||
$ ls /dev/v4l/by-id/
|
||||
```
|
||||
|
||||
returns
|
||||
|
||||
```
|
||||
usb-046d_0825_88C56B60-video-index0 usb-046d_0825_88C56B60-video-index1
|
||||
```
|
||||
I'll use the first one `usb-046d_0825_88C56B60-video-index0`
|
||||
This example will use the first one: `usb-046d_0825_88C56B60-video-index0`
|
||||
|
||||
|
||||
__Note__
|
||||
Not sure which device is which? You can run lsusb to match a name to an ID.
|
||||
Not sure which device is which? You can run `lsusb` to match a camera name to an ID.
|
||||
{: .info}
|
||||
|
||||
Then edit `/home/pi/klipper_config/webcam.txt` in by clicking on it in mainsail.
|
||||
Edit `/home/pi/klipper_config/webcam.txt` by clicking on it in Mainsail.
|
||||
|
||||
Set `camera="usb"` at the top, and the `camera_usb_options` line to indicate the device:
|
||||
Insert two lines at the beginning of `webcam.txt`:
|
||||
|
||||
`camera_usb_options="-r 640x480 -f 10 -d /dev/v4l/by-id/<device long id>"`
|
||||
```
|
||||
camera="usb"
|
||||
camera_usb_options="-r 640x480 -f 10 -d /dev/v4l/by-id/<device long id>"
|
||||
```
|
||||
|
||||
The `device long id` should match the camera name from running `lsusb`.
|
||||
|
||||
__Note__
|
||||
Using a Raspberry Pi camera? Set camera="raspi" at the top of the file, and you can ignore referencing the cameras by device ID.
|
||||
If you are using a Raspberry Pi branded camera, set camera="raspi" at the top of the file and you do not have to reference the cameras by device ID.
|
||||
|
||||
{: .info}
|
||||
|
||||
## 3. Editing the second configuration file
|
||||
There's two things that need adjusting here: the port mjpg_streamer will be running under, and the device again.
|
||||
When using a second camera, you must add the port `mjpg_streamer` runs under and the device.
|
||||
|
||||
__Note__
|
||||
Using 1 RPi camera and 1 USB camera? You don't need to reference them by ID, since camera="raspi" vs. camera="usb" is enough.
|
||||
If you are using one Raspberry Pi branded camera and a different USB camera you don't need to reference them by ID, as camera="raspi" and camera="usb" is enough.
|
||||
{: .info}
|
||||
|
||||
Find the long ID of the second camera, as you did for the first one.
|
||||
Similar to finding the first camera, run `ls` and copy the ID of the second camera:
|
||||
|
||||
Editing `/home/pi/klipper_config/webcam2.txt` like described above.
|
||||
```bash
|
||||
ls /dev/v4l/by-id/
|
||||
```
|
||||
|
||||
As above again, set camera="usb" and set camera_usb_options but this time using the ID for the second camera:
|
||||
Edit `/home/pi/klipper_config/webcam2.txt` as described above and add:
|
||||
`camera="usb"` and `set camera_usb_options` but this time using the ID for the second camera:
|
||||
|
||||
`camera_usb_options="-r 640x480 -f 10 -d /dev/v4l/by-id/<device long id>"`
|
||||
```bash
|
||||
camera_usb_options="-r 640x480 -f 10 -d /dev/v4l/by-id/<device long id>"
|
||||
```
|
||||
|
||||
Adjust the port, by editing camera_http_options:
|
||||
Adjust the port by editing `camera_http_options`:
|
||||
|
||||
`camera_http_options="-n -p 8081"`
|
||||
|
||||
@@ -93,23 +109,22 @@ webcam3.txt => -p 8083
|
||||
```
|
||||
|
||||
__INFO__
|
||||
mainsailOS comes already setup with four nginx reverse proxies for port 8080 to 8083, so you can configure 4 webcams easy with this guide,
|
||||
for more webcams you need to configure the nginx config, which we dont recommend!
|
||||
It includes editing nginx configuration, which is easy to mess up and having mainsail stop working as well.
|
||||
If you need more than four webcams, hop onto our [Discord](https://discord.gg/skWTwTD){:target="_blank"} and we will help you.
|
||||
MainsailOS comes setup with four nginx reverse proxies for port 8080 through 8083, so you can configure 4 webcams with this guide.
|
||||
For more webcams you will need to edit the nginx configuration, which is not recommended. It can be easy to make a mistake when editing nginx, which will also cause Mainsail to stop working.
|
||||
If you need more than four webcams, visit us on [Discord](https://discord.gg/skWTwTD){:target="_blank"} and we will help you.
|
||||
{: .warning}
|
||||
|
||||
## 4. Test it works
|
||||
Restart webcamd click the button,
|
||||
and try and find your second camera under `http://<your-ip>/webcam2/`.
|
||||
If it doesn't work, check in the webcam log under the filemanager log section for details.
|
||||
## 4. Test that it works
|
||||
Restart `webcamd` by clicking the power button icon in the upper right corner of Mainsail and click `Webcamd` to restart it.
|
||||
Find your second camera under `http://<your-ip>/webcam2/`.
|
||||
If it doesn't work, check in the webcam log in the filemanager log section for details.
|
||||
|
||||
If it works, you can use the URLs in mainsail:
|
||||
If it works, you can use the URLs in Mainsail:
|
||||
|
||||
Stream: `http://<your-ip>/webcam2/`
|
||||
|
||||
__DONE__
|
||||
Congratulations, you set up multi webcam with mainsailOS!
|
||||
If you want to add more, just follow the guide again and increment the webcam*.txt number i.e. webcam**3**.txt and so on.
|
||||
The webcams are easy accessible through your `http://<your-ip>/webcam`, `http://<your-ip>/webcam2` and so on.
|
||||
Congratulations, you set up multi webcam with Mainsail!
|
||||
If you want to add more, follow the guide again and increment the `webcam*.txt` number, i.e. `webcam**3**.txt` and so on.
|
||||
The webcams are accessible through your `http://<your-ip>/webcam`, `http://<your-ip>/webcam2`, etc.
|
||||
{: .success}
|
||||
@@ -16,16 +16,15 @@ In Mainsails interface settings you will find a section called "Preheat Presets"
|
||||
|
||||
### Preheat
|
||||
|
||||
Enter a name \(e.g. name, color and type of filament\) and the temperatures obtained. You can disable individual heaters and even specify a custom gcode for the preheat phase. The gcode will be executed after the selected temperatures are set.
|
||||
Enter a name for your preset, such as filament, color or other text and the temperature you wish to set the preset at. You can disable individual heaters and even specify a custom gcode for the preheat phase. The G-Code will be executed after the selected temperatures are set.
|
||||
|
||||

|
||||
|
||||
### Further Examples
|
||||
|
||||
#### Z-Offset
|
||||
You can add custom G-Code to make it easier to switch between different Z-Offsets. This makes it easier to work with different surfaces and flexplates.
|
||||
|
||||
To quickly switch between different Z-offsets \(flexplates with smooth and textured surfaces\), you can create presets and deactivate the heaters.
|
||||
|
||||
As G-Code you simply enter `SET_GCODE_OFFSET Z=0.2`, of course with your determined offset.
|
||||
To configure the G-Code enter `SET_GCODE_OFFSET Z=0.2`, and change `0.2` to the offset you need.
|
||||
|
||||

|
||||
@@ -11,26 +11,20 @@ description: >-
|
||||
{{ page.description }}
|
||||
|
||||
__Notice__
|
||||
This is not a complete guide with every single step in detail, but rather a recommendation of what to do and especially what not to do to get access to the printer from somewhere remote from your network.
|
||||
This guide does not include every step in detail, but is a recommendation for safe remote access.
|
||||
{: .info}
|
||||
|
||||
You have to decide if you ..
|
||||
- only want to have status messages on your smartphone
|
||||
- or you need full remote access to Mainsail from everywhere
|
||||
|
||||
Of course, you can also use a combination of both.
|
||||
You will need to decide if you want to receive status messages on your smartphone, have full remote access to Mainsail, or both.
|
||||
|
||||
## Status messages
|
||||
|
||||
For simple status messages there are a couple of additional tools that can be used:
|
||||
- __discord:__ Mooncord is a bot that sends you status messages over discord.
|
||||
[https://github.com/eliteSchwein/mooncord](https://github.com/eliteSchwein/mooncord)
|
||||
- __telegram:__ moonraker-telegram is a bot that sends you status messages over telegram.
|
||||
[https://github.com/Raabi91/moonraker-telegram](https://github.com/Raabi91/moonraker-telegram)
|
||||
For simple status messages there are a two additional tools that can be used:
|
||||
- __Discord:__ Mooncord is a bot that sends you status messages over Discord: [https://github.com/eliteSchwein/mooncord](https://github.com/eliteSchwein/mooncord)
|
||||
- __Telegram:__ moonraker-telegram is a bot that sends you status messages over the messaging application Telegram: [https://github.com/Raabi91/moonraker-telegram](https://github.com/Raabi91/moonraker-telegram)
|
||||
|
||||
These tools are installed on the local machine and send the status messages via the respective platforms. Thus, no access to your local network from outside is necessary.
|
||||
These tools are installed on the local machine and send status messages to their respective platforms. No changes are needed to externally access your local network.
|
||||
|
||||
For details, please refer to the projects instructions.
|
||||
For details, please refer to each project's instructions and documentation.
|
||||
|
||||
## Remote Access to Mainsail
|
||||
|
||||
@@ -45,9 +39,9 @@ What <b>not to do</b>:
|
||||
<div class="warning">
|
||||
What you <b>could do</b>:
|
||||
<ul>
|
||||
<li>Use an external service provider (e.g. tailscale) to gain access to your home network.
|
||||
<li>Use an external service provider such as Tailscale to gain access to your home network.
|
||||
<ul>
|
||||
<li>Con: you give the control out of your hand</li>
|
||||
<li>A potential downside is not having personal control of the connection.</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>Reverse Proxy</li>
|
||||
@@ -59,8 +53,8 @@ What you <b>could do</b>:
|
||||
<ul>
|
||||
<li>Set up your own secured VPN tunnel.
|
||||
<ul>
|
||||
<li>either in the router</li>
|
||||
<li>or your Pi</li>
|
||||
<li>In your router</li>
|
||||
<li>Or your Raspberry Pi</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
@@ -68,18 +62,15 @@ What you <b>could do</b>:
|
||||
|
||||
## Set up VPN
|
||||
|
||||
Several routers allow you to set up a VPN tunnel without much effort.
|
||||
After you have entered the login data into e.g. your smartphone, you will have secure access to your entire network, including Mainsail.
|
||||
Several routers allow you to set up a VPN tunnel. After you have configured the VPN and logged in from another device, you will have secure access to your entire network, including Mainsail.
|
||||
|
||||
If your router does not support this, you can also set up your own VPN, e.g. on your Pi.
|
||||
Therefore you could use: [OpenVPN](https://openvpn.net/), [WireGuard](https://www.wireguard.com/) or [PiVPN](https://www.pivpn.io/)
|
||||
If your router does not support this, you can also set up your own VPN, for example, using your Raspberry Pi.
|
||||
[OpenVPN](https://openvpn.net/), [WireGuard](https://www.wireguard.com/) or [PiVPN](https://www.pivpn.io/) are all options that could work.
|
||||
|
||||
To be able to reach your home network even with a non-static IP address, you should use a dynamic DNS service. This will forward a domain directly to your IP address. Often, these DynDNS services can also be set up directly in the router, so that the IP address gets automatically updated on a change.
|
||||
|
||||
Some free services: [DuckDNS](https://www.duckdns.org) or [FreeDNS ](https://freedns.afraid.org/)
|
||||
To be able to reach your home network even with a non-static IP address, you will need to use a Dynamic DNS service. This will forward a domain directly to your IP address. Often these DynDNS services can also be set up directly in your router so when your external IP address changes, your domain will be automatically updated. Free Dynamic DNS services include [DuckDNS](https://www.duckdns.org) or [FreeDNS ](https://freedns.afraid.org/)
|
||||
|
||||
__Notice__
|
||||
The devices that dial in via the VPN tunnel are assigned to a different address range. This address range must be configured in moonraker under _trusted_clients_ and _cors_domains_. [https://moonraker.readthedocs.io/en/latest/configuration/#authorization](https://moonraker.readthedocs.io/en/latest/configuration/#authorization) <br/><br/>
|
||||
The devices that you use to access VPN tunnel are assigned to a different address range. This address range must be configured in Moonraker under _trusted_clients_ and _cors_domains_. See also [Moonraker's documentation on network authorization.](https://moonraker.readthedocs.io/en/latest/configuration/#authorization) <br/><br/>
|
||||
For example:
|
||||
__192.168.1__.x _// devices on your regular LAN_
|
||||
__192.168.50__.x _// devices connected through your VPN tunnel_
|
||||
|
||||
@@ -9,27 +9,26 @@ description: >-
|
||||
|
||||
# {{ page.title }}
|
||||
{{ page.description }}
|
||||
Moonraker has compatibility with Octoprint's API. To enable octoprint api compatibility,
|
||||
add the following to your `moonraker.conf` and restart Moonraker.
|
||||
Moonraker is compatible with Octoprint's API. To enable Octoprint API compatibility, add the following to your `moonraker.conf` and restart Moonraker.
|
||||
|
||||
```
|
||||
[octoprint_compat]
|
||||
```
|
||||
|
||||
|
||||
### PrusaSlicer/SuperSlicer (prior to v2.3.0)
|
||||
### PrusaSlicer / SuperSlicer (PrusaSlicer v2.3.0 and up)
|
||||
Enable advanced or expert mode and change the options under `Printer Settings / General` as shown in the screenshot below. A "Physical Printer" must be configured in `Printer Settings / General`.
|
||||
|
||||
If not already been done, switch to advanced or expert mode and set the options under `Printer Settings / General` as shown in the screenshot below.
|
||||
### PrusaSlicer / SuperSlicer (prior to PrusaSlicer v2.3.0)
|
||||
|
||||
Enable advanced or expert mode and change the options under `Printer Settings / General` as shown in the screenshot below.
|
||||
For "API Key" you can type anything.
|
||||
|
||||

|
||||
|
||||
### PrusaSlicer/SuperSlicer (since v2.3.0)
|
||||
A "Physical Printer" must be defined to configure the settings from above.
|
||||
More detailed instructions will follow.
|
||||
|
||||
### Cura with OctoPrint-Connect
|
||||
Install the OctoPrint-Connection plugin via Marketplace. In `Settings > Printer > Manage Printers...`
|
||||
you can find the Button `Connect OctoPrint`. Add your printer and type anything in the `API Key` field.
|
||||
Install the OctoPrint-Connection plugin in Cura's Marketplace. In Cura go to `Settings > Printer > Manage Printers`
|
||||
and find the Button `Connect OctoPrint`. Add your printer and type anything in the `API Key` field.
|
||||
|
||||

|
||||
@@ -8,40 +8,49 @@ description: >-
|
||||
---
|
||||
|
||||
# {{ page.title }}
|
||||
{: .no_toc}
|
||||
{{ page.description }}
|
||||
|
||||

|
||||
|
||||
### PrusaSlicer (since v2.3.0)
|
||||
<details open markdown="block">
|
||||
<summary>
|
||||
Slicers
|
||||
</summary>
|
||||
{: .text-delta }
|
||||
1. TOC
|
||||
{:toc}
|
||||
</details>
|
||||
|
||||
## PrusaSlicer (since v2.3.0)
|
||||
|
||||
In "Expert" mode PrusaSlicer has an option in the "Printer Settings" tab to activate previews.
|
||||
Under `General / Firmware`, enter `32x32,400x300` as "G-code thumbnails".
|
||||
|
||||

|
||||
|
||||
### SuperSlicer (since v2.2.54.0)
|
||||
<div class="youtube-container">
|
||||
<iframe type="text/html" src="https://www.youtube.com/embed/4nFqfq8kikU" frameborder="0"></iframe>
|
||||
</div>
|
||||
|
||||
## SuperSlicer (since v2.2.54.0)
|
||||
|
||||
In "Expert" mode SuperSlicer has some very convenient options in the "Printer Settings" tab to activate and customize the previews.
|
||||
|
||||

|
||||
|
||||
### PrusaSlicer/SuperSlicer
|
||||
<div class="youtube-container">
|
||||
<iframe type="text/html" src="https://www.youtube.com/embed/xdOM5Uco9hM" frameborder="0"></iframe>
|
||||
</div>
|
||||
|
||||
To enable thumbnails, click on `Help > Show Configuration Folder` and navigate to your printer profiles inside the `printer` folder.
|
||||
Open your printer profile in a text editor and find `thumbnails =` and add the resolutions `32x32,400x300`. Save the file and restart your Slicer.
|
||||
|
||||

|
||||
|
||||
From now on the gcode files contain thumbnails displayed by mainsail.
|
||||
|
||||
### Cura
|
||||
## Cura
|
||||
|
||||
The Cura plugin "Cura2Moonraker" is required for this. You can find this plugin and a install guide
|
||||
here: [https://github.com/emtrax-ltd/Cura2MoonrakerPlugin](https://github.com/emtrax-ltd/Cura2MoonrakerPlugin)
|
||||
|
||||

|
||||
|
||||
### ideaMaker (since v4.2.1)
|
||||
## ideaMaker (since v4.2.1)
|
||||
|
||||
To enable thumbnails, open the `Advanced` tab in the `printer settings`, enable the `GCode Thumbnails for Octoprint and Mainsail` option and
|
||||
enter your prefered *square format* image size in the `Resolution` fields (e.g. `400 X 400`).
|
||||
|
||||
@@ -13,7 +13,7 @@ description: >-
|
||||
|
||||
## Moonraker.conf
|
||||
|
||||
Add the following section to your printers moonraker.conf:
|
||||
To enable updates in Mainsail's web interface, add the following section to your printer's `moonraker.conf`:
|
||||
|
||||
```yaml
|
||||
[update_manager]
|
||||
@@ -24,10 +24,10 @@ repo: mainsail-crew/mainsail
|
||||
path: ~/mainsail
|
||||
```
|
||||
|
||||
Once you have restarted the moonraker service, the Update Manager will appear in Mainsails machine settings.
|
||||
Restart the Moonraker service and the Update Manager will appear in Mainsail's machine settings.
|
||||
|
||||

|
||||
|
||||
|
||||
You can find further information on this topic by checking out the [Moonraker documentation](https://github.com/Arksine/moonraker/blob/master/docs/configuration.md#update_manager){:target="_blank"}.
|
||||
You can find further information on this topic by visiting the [Moonraker documentation](https://github.com/Arksine/moonraker/blob/master/docs/configuration.md#update_manager){:target="_blank"}.
|
||||
{: .info}
|
||||
@@ -9,18 +9,17 @@ has_toc: false
|
||||
# Setup Guides
|
||||
|
||||
## Local installation
|
||||
Decide which route you want to follow for the installation. There are several ways to install Mainsail on a Raspberry Pi:
|
||||
You will need to choose which way you want to install Mainsail on a Raspberry Pi:
|
||||
|
||||
- [MainsailOS](mainsail-os.md) <span class="label label-red">recommended</span>
|
||||
A prebuilt image for your Raspberry Pi. Flash it and you are almost ready to go.
|
||||
A prebuilt image for your Raspberry Pi. Preconfigured and requires the least amount of setup.
|
||||
- [KIAUH](kiauh.md) - _Klipper Installation And Update Helper_
|
||||
A script toolbox to install and keep Klipper, Moonraker and Mainsail up to date. It contains many additional features and is the way to go for multiprinter setups.
|
||||
A script toolbox to install and update Klipper, Moonraker and Mainsail. KIAUH contains additional features and is recommended for multi-printer setups.
|
||||
- [Manual Setup](manual-setup/index.md)
|
||||
The rocky road. If you want to know how everything is set up by hand, you will get all the information here.
|
||||
The rocky road for the daring. For those who want to know how everything is set up manually.
|
||||
|
||||
## Hosted
|
||||
|
||||
Setup [remote access](../quicktips/remote-access) without installing/configuring a web server!
|
||||
{: .info}
|
||||
You an also setup [remote access](/quicktips/remote-access) without installing or configuring a web server.
|
||||
|
||||
A hosted instance of Mainsail can be found and used at [my.mainsail.xyz](http://my.mainsail.xyz), check out the [documentation](mainsail-hosted) for usage and configuration.
|
||||
You can test and review a hosted version of Mainsail at [my.mainsail.xyz](http://my.mainsail.xyz). Please read the [documentation](/setup/mainsail-hosted) for usage and configuration.
|
||||
@@ -8,8 +8,8 @@ permalink: /setup/kiauh
|
||||
---
|
||||
# Installing Mainsail with KIAUH
|
||||
|
||||
[KIAUH](https://github.com/th33xitus/kiauh) is a handy tool that helps you install or upgrade Klipper, Moonraker, Mainsail and various other extensions easily and comfortably.
|
||||
[KIAUH](https://github.com/th33xitus/kiauh) is a tool that helps you install or upgrade Klipper, Moonraker, Mainsail, and other extensions.
|
||||
|
||||

|
||||
|
||||
For more information and get to the guide click [here](https://github.com/th33xitus/kiauh).
|
||||
You can visit [KIAUH on GitHub](https://github.com/th33xitus/kiauh) to learn more and view its documentation.
|
||||
@@ -13,25 +13,22 @@ permalink: /setup/mainsail-hosted
|
||||
Mainsail and MainsailOS respect [Data Privacy](../data-privacy).
|
||||
{: .info}
|
||||
|
||||
The hosted version of mainsail can be used:
|
||||
|
||||
* On the same (local) network as your printer.
|
||||
* On a remote (different) network to your printer (requires the configuration of [remote access](../quicktips/remote-access)).
|
||||
The hosted version of Mainsail can be used on the same local network with your printer or on a different remote to network and requires you to setup [remote access](../quicktips/remote-access).
|
||||
|
||||
## Requirements
|
||||
|
||||
- MainsailOS and KIAUH are preconfigured to meet the requirements for the hosted service to work.
|
||||
- If you have a manual installation, then the following requirements must be met:
|
||||
* Klipper must be installed.
|
||||
* Moonraker must be installed.
|
||||
* my.mainsail.xyz must be configured as a CORS domain in moonraker.conf.
|
||||
- MainsailOS and KIAUH are preconfigured to meet the requirements for the hosted service.
|
||||
- If you have a manual installation, the following requirements must be met:
|
||||
* Klipper
|
||||
* Moonraker
|
||||
* `my.mainsail.xyz` must be configured as a CORS domain in `moonraker.conf`.
|
||||
|
||||
## Editing moonraker.conf
|
||||
### Editing moonraker.conf for remote access
|
||||
|
||||
Further information can be found in the Moonraker [documentation](https://moonraker.readthedocs.io/en/latest/configuration/#authorization)
|
||||
You can learn more about editing Moonraker's authorization [configuration documentation here.](https://moonraker.readthedocs.io/en/latest/configuration/#authorization)
|
||||
{: .info}
|
||||
|
||||
To allow [my.mainsail.xyz](http://my.mainsail.xyz) to access your local installation, navigate to moonraker.conf open it and add the following code:
|
||||
To configure [my.mainsail.xyz](http://my.mainsail.xyz) for access with your local installation, open `moonraker.conf` and add the following `authorization` section:
|
||||
|
||||
```yml
|
||||
[authorization]
|
||||
|
||||
@@ -10,13 +10,13 @@ permalink: /setup/mainsail-os
|
||||
|
||||
# Installing MainsailOS
|
||||
|
||||
MainsailOS builds upon RaspberryOS-Lite by incorporating Klipper, Moonraker and Mainsail into one disc image, making them more accessible and quicker to setup than before.
|
||||
MainsailOS builds upon Raspberry Pi OS Lite by including Klipper, Moonraker, and Mainsail into the disc image, making setup quick and Mainsail easier to use with Klipper and Moonraker.
|
||||
|
||||
Complex/custom configurations may be better suited to a [manual](manual-setup/index.md) installation of Mainsail.
|
||||
Advanced users may want more complex and custom configurations and Mainsail can be [manually installed](manual-setup/index.md).
|
||||
|
||||
If you are familiar with the flashing process, then please use your preferred method as you normally would.
|
||||
If you are familiar with process to flash the firmware, then please use your preferred method as you normally would.
|
||||
|
||||
If however you are unfamiliar with the flashing process then we have documented two methods to flash MainsailOS to your SD card:
|
||||
If however you are unfamiliar with the flashing process we have documented two methods to flash MainsailOS to your SD card:
|
||||
|
||||
* [Raspberry Pi Imager](mainsailos/pi-imager) (cross-platform, easiest) <span class="label label-red">recommended</span>
|
||||
* [Balena Etcher](mainsailos/balena-etcher) (requires manual setup)
|
||||
@@ -47,6 +47,7 @@ balenaEtcher appearance may vary depending on the host OS.
|
||||

|
||||
|
||||
* Return the the main screen, and select 'Flash'. Accept any warnings to continue.
|
||||
|
||||
**FLASHING WILL DESTROY ALL DATA ON YOUR SD CARD AND CANNOT BE REVERSED**
|
||||
{: .alert}
|
||||
|
||||
|
||||
@@ -11,54 +11,55 @@ permalink: /setup/mainsailos/first-boot
|
||||
|
||||
# First boot
|
||||
|
||||
Insert the flashed SD card into your Pi and connect other desired/necessary hardware (ethernet, USB to 3D printer, webcam).
|
||||
Insert the flashed SD card into your Pi and connect any other hardware such a network cable, USB cable to the 3D printer, or a webcam.
|
||||
|
||||
Power on the Pi and leave it to boot.
|
||||
Power on the Pi and let it boot up.
|
||||
|
||||
**The initial boot of MainsailOS may take some time to expand your "root" filesystem. The larger the SD card, the longer the first boot will take.**
|
||||
{: .warning}
|
||||
|
||||
Initially the green LED on the Pi will be extremely active. After some time it will only intermittently flicker, indicating it has likely completed the boot sequence.
|
||||
|
||||
The web ui should now be ready to access on your local network:
|
||||
The web interface should now be ready to access on your local network:
|
||||
|
||||
```
|
||||
http://mainsailos.local
|
||||
http://<IP address of your pi>
|
||||
```
|
||||
or
|
||||
```
|
||||
http://<IP address of your Pi>
|
||||
```
|
||||
|
||||
## Mainsail.cfg
|
||||
|
||||
**Important:** Include the mainsail.cfg into your printer.cfg
|
||||
**Important:** Include `mainsail.cfg` in your printer.cfg file
|
||||
{: .warning}
|
||||
|
||||
Mainsail will not work unless Klipper is told to include its configuration. This can be achieved either by placing the contents of mainsail.cfg into your printer.cfg.
|
||||
Mainsail will not work correctly until `mainsail.cfg` is included in Klipper's configuration file. Open Klipper's default `printer.cfg` file in Mainsail's file manager located in `Settings > Machine`. If you do not have a `printer.cfg` file, you can create one. Add the following line to `printer.cfg`
|
||||
|
||||
To do this, open the default printer.cfg in the Mainsail web GUI:
|
||||
```
|
||||
[include mainsail.cfg]
|
||||
```
|
||||
|
||||

|
||||
|
||||

|
||||
|
||||
Add the following line:
|
||||
|
||||
```yml
|
||||
[include mainsail.cfg]
|
||||
```
|
||||
and click on the "Save & Restart" button.
|
||||
and click on the`Save & Restart` button.
|
||||
|
||||
## Updates
|
||||
|
||||
Once you've successfully navigated to the Mainsail web ui we _thoroughly_ recommend that you run updates.
|
||||
Once you've successfully navigated to the Mainsail's web interface it is _strongly_ recommend that you run any available updates.
|
||||
{: .info}
|
||||
|
||||
Klipper, Moonraker and Mainsail have fast development cycles and whilst we do our best to ensure MainsailOS ships as close to the bleeding edge as we can, there will always be a short delay before releases make it into the image.
|
||||
Klipper, Moonraker and Mainsail have fast development cycles and while we do our best to ensure MainsailOS ships as close to upstream as we can, there will always be a short delay before releases make it into MainsailOS' image.
|
||||
|
||||
We recommend that you enable and use the [built in update-manager](../../update/update-manager) to perform a system update, then update the stack components (Klipper, Moonraker, Mainsail)
|
||||
It is recommended that you enable and use the [built in update-manager](../../update/update-manager) to perform any system updates, then update Klipper, Moonraker, Mainsail as needed.
|
||||
|
||||

|
||||
|
||||
|
||||
MainsailOS is now configured, and we can get Klipper's [printer.cfg](klipper-setup) setup.
|
||||
MainsailOS is now configured, and Klipper's configuration file, [printer.cfg], can be setup.
|
||||
|
||||
---
|
||||
[< tool selection](../mainsail-os.md){: .btn } [next step >](klipper-setup){: .btn }
|
||||
|
||||
@@ -40,6 +40,6 @@ Before progressing to the next step, ensure that you have:
|
||||
|
||||
|
||||
---
|
||||
[< first boot](first-boot){: .btn } [next step >](pre-flight){: .btn }
|
||||
[< first boot](first-boot){: .btn } [next step >](../pre-flight){: .btn }
|
||||
|
||||
|
||||
@@ -181,7 +181,7 @@ Now it should be possible to open the interface: `http://<printer-ip>/`.
|
||||
|
||||
if you want to get the full experience with mainsail and klipper virtual_sdcard print, you should use these macros, or use them as templates for your own.
|
||||
|
||||
[Macro Link](../../necessary-cfg.md){: .btn target="_blank"}
|
||||
[Macro Link](../../configurations/necessary-cfg.md){: .btn target="_blank"}
|
||||
|
||||
|
||||
## Change the Hostname (optional)
|
||||
|
||||
@@ -5,19 +5,19 @@ parent: Setup Guides
|
||||
nav_order: 5
|
||||
has_children: false
|
||||
has_toc: false
|
||||
permalink: /setup/mainsailos/pre-flight
|
||||
permalink: /setup/pre-flight
|
||||
---
|
||||
|
||||
# Preflight Checklist
|
||||
|
||||
A quick run-through to check no important steps have been missed during installation and configuration.
|
||||
You may wish to review the list below to make sure you have not missed any important steps during the setup process.
|
||||
|
||||
| Installed software components: | Configured: | Performed: |
|
||||
| Installed software components: | Configured: | Completed: |
|
||||
| :-- | :-- | :-- |
|
||||
| ✅ MainsailOS<br> **OR** <br> ✅ Klipper<br> ✅ Moonraker<br> ✅ Mainsail<br> | ✅ Network<br> ✅ [Configured printer.cfg](k>
|
||||
| ✅ MainsailOS<br> **OR** <br> ✅ Klipper<br> ✅ Moonraker<br> ✅ Mainsail<br> | ✅ Network<br> ✅ [Configured printer.cfg](mainsailos/klipper-setup)<br> ✅ [Included mainsail.cfg](mainsailos/first-boot#mainsailcfg)| ✅ Updates<br> ✅ Klipper verification(s)|
|
||||
|
||||
# Time to print
|
||||
# Time to print!
|
||||
|
||||
If you've covered all the steps, you should now have a complete software stack ready to perform calibration prints!
|
||||
If you have performed all of the installation steps, your installation should be complete and you are ready to start calibrating and printing with your 3D printer.
|
||||
|
||||
**Thank you for choosing Mainsail**
|
||||
Vendored
+5
-7
@@ -11,29 +11,27 @@ description: >-
|
||||
# {{ page.title }}
|
||||
{{ page.description }}
|
||||
|
||||
There are two background images that can be used in Mainsail. The first is in the sidebar and the second is in the main section.
|
||||
|
||||
|
||||
At the moment there are two background images that can be set. In the sidebar- and mainview.
|
||||
|
||||
{:width="50%"}
|
||||
|
||||
For uploads you can use the built-in file manager. `(Settings > Machine)`
|
||||
You can upload a new background image using the file manager located in `Settings > Machine`.
|
||||
|
||||
<!--  -->
|
||||
|
||||
## Sidebar background image
|
||||
Just load a background image into your .theme folder and name it `sidebar-background.<extension>`.
|
||||
Load the background image into your .theme folder and name it `sidebar-background.<extension>`.
|
||||
|
||||
| Filename | sidebar-background |
|
||||
| Valid file extensions | .jpg, .png, .gif and .svg |
|
||||
| Recommended image size | 300x1000px |
|
||||
|
||||
## Mainview background image
|
||||
## Main background image
|
||||
Upload a background image into your .theme folder and name it `main-background.<extension>`.
|
||||
|
||||
| Filename | main-background |
|
||||
| Valid file extensions | .jpg, .png, .gif and .svg |
|
||||
|
||||
**Please note**: By default, the background image is stretched to the entire area.
|
||||
For example, if you want a repeating pattern, you also need to use custom css.
|
||||
**Please note**: The background image is stretched to cover the entire area by default. For example, if you want a repeating pattern, you will also need to use custom CSS to style it correctly.
|
||||
{: .info}
|
||||
Vendored
+12
-19
@@ -6,49 +6,42 @@ nav_order: 30
|
||||
permalink: /theming/custom-css
|
||||
---
|
||||
|
||||
# Custom-CSS
|
||||
# Custom CSS
|
||||
|
||||
The custom.css file allows you to customize the appearance of Mainsail
|
||||
without the need of rebuilding it. All you need to do is to place a file
|
||||
named "custom.css" into the configuration directory ".theme" and define
|
||||
your css rules in there.
|
||||
The `custom.css` file allows you to customize the appearance of Mainsail
|
||||
without the need of rebuilding it. Place a file named `custom.css` in the `.theme` folder of your Mainsail installation and define your custom **C**ascading **S**tyle **S**heets (CSS) rules inside the file.
|
||||
|
||||

|
||||
|
||||

|
||||
|
||||
|
||||
## How to CSS
|
||||
## Customizing the CSS
|
||||
|
||||
You need to be familiar with the CSS (**C**ascading **S**tyle **S**heets) syntax.
|
||||
There are many resources to learn CSS online, for example:
|
||||
You need to be familiar with the CSS syntax to customize Mainsail. There are many resources available to learn CSS online, for example:
|
||||
- https://www.w3schools.com/css/default.asp
|
||||
|
||||
### find the Element selector (example based on Chrome Browser)
|
||||
### Finding the Element to Customize
|
||||
|
||||
Use your browser's built-in developer tools to find the right selector of the element you want to add your own flair to.
|
||||
|
||||
Open the developer tools:
|
||||
|
||||
right click anywhere on the page and select "inspect" (or F12 on the keyboard)
|
||||
You will need to use your browser's built in developer tools to find the element you want to customize. You can do this by clicking the "Developer Tools" button in the browser's toolbar or by right clicking on the page and choosing `Inspect Element` or press `F12`.
|
||||
|
||||

|
||||
|
||||
1. Activate the "inspector"
|
||||
1. Activate the developer tools and inspector
|
||||
2. Select the desired element
|
||||
3. Find the selector
|
||||
4. Use the style editor and fiddle arround
|
||||
4. Use the style editor to customize the element. Play around to find the style you like!
|
||||
|
||||

|
||||
|
||||

|
||||
|
||||
When you have achieved your desired appearance copy the full "section" including selector and curly braces
|
||||
When you have achieved your desired appearance, copy the full "section", including the selector and curly braces.
|
||||
|
||||

|
||||
|
||||
Then copy it to the "custom.css" file (you can keep everything or only what you have added)
|
||||
Next copy it inside the "custom.css" file (you can keep everything or only what you have added)
|
||||
|
||||

|
||||
|
||||
NOTE: After saving, your browser may need a uncached reload to show the change (https://en.wikipedia.org/wiki/Wikipedia:Bypass_your_cache#Bypassing_cache)
|
||||
NOTE: After saving, your browser may need a uncached reload to show the change. Visit [Wikipedia to learn how.](https://en.wikipedia.org/wiki/Wikipedia:Bypass_your_cache#Bypassing_cache)
|
||||
Vendored
+7
-5
@@ -1,20 +1,22 @@
|
||||
---
|
||||
layout: default
|
||||
title: Logos/Icons
|
||||
title: Logos and Icons
|
||||
parent: Theming
|
||||
nav_order: 20
|
||||
permalink: /theming/favicons
|
||||
description: >-
|
||||
Replace the default logos/icons, to quickly recognize your printers.
|
||||
Replace the default logos and icons with your own.
|
||||
---
|
||||
|
||||
# {{ page.title }}
|
||||
{{ page.description }}
|
||||
|
||||
For uploads you can use the built-in file manager. `(Settings > Machine)`
|
||||
You can use the built in file manager in `Settings > Machine` to upload your own logos and icons. Customizing your icons can help identify your printers.
|
||||
|
||||
## Sidebar logo
|
||||
Just upload a logo into your .theme folder and name it `sidebar-logo.<extension>`.
|
||||
Upload a logo into your .theme folder and name it `sidebar-logo.<extension>`, where extension is one of the valid file types below.
|
||||
|
||||
For more information on creating and uploading to your `.theme` folder, please refer to the [Customizing your theme](/theming/prepare) chapter.
|
||||
|
||||
| Filename | sidebar-logo |
|
||||
| Valid file extensions | .svg, .jpg, .png and .gif |
|
||||
@@ -30,7 +32,7 @@ Upload favicons into your .theme folder and name them `favicon-32x32.png` *(requ
|
||||
| Valid file extensions | .png |
|
||||
| Recommended image size | 32x32px, 16x16px |
|
||||
|
||||
A hard browser refresh may be necessary (CTRL+SHIFT+F5 on windows or CMD+SHIFT+R on mac).
|
||||
A browser refresh may be necessary (CTRL+SHIFT+F5 on windows or CMD++SHIFT+R on macOS) to reload without the browser cache.
|
||||
{: .info}
|
||||
|
||||

|
||||
|
||||
Vendored
+5
-1
@@ -11,4 +11,8 @@ description: >-
|
||||
# {{ page.title }}
|
||||
{{ page.description }}
|
||||
|
||||
Start with [prepare](/theming/prepare) to create a basic structure for your own theme, or take a look in [themes](/theming/themes) to see if there are already suitable themes from the Mainsail community.
|
||||
Start with the [Prepare](/theming/prepare) section to create a basic structure for your own theme or take a look in [themes](/theming/themes) to see if there are themes from the Mainsail community you would like to use or customize.
|
||||
|
||||
<div class="youtube-container">
|
||||
<iframe type="text/html" src="https://www.youtube.com/embed/kbSfLQtl4tA" frameborder="0"></iframe>
|
||||
</div>
|
||||
Vendored
+6
-11
@@ -11,22 +11,17 @@ description: >-
|
||||
# {{ page.title }}
|
||||
{{ page.description }}
|
||||
|
||||
## Preparing your custom theme
|
||||
## .theme folder
|
||||
You only need to create a ".theme" folder in your config folder.
|
||||
There you will place all the files you need to personalize Mainsail.
|
||||
You can use Mainsail's built-in file manager (`Settings > Machine`) to create the `.theme` folder. Upload the files to this folder and edit your CSS files.
|
||||
|
||||
You can use Mainsail's built-in file manager `(Settings > Machine)` to create the .theme folder and upload all the files and edit your css-files.
|
||||
|
||||
The dot in the folder name means that it is a hidden folder. Therefore you have to activate "show hidden files".
|
||||
The dot in the folder name means that it is a hidden folder. You will need to activate "Show Hidden Files" in Mainsail's file manager.
|
||||
{: .info}
|
||||
|
||||

|
||||
|
||||
## directory structure
|
||||
We have prepared the following simple overview for you.
|
||||
Please refer to the separate instructions for details.
|
||||
|
||||
All listed files in the .theme folder are optional and will only be loaded if they are provided.
|
||||
## Directory structure
|
||||
The below directory and file structure provides an overview of files you could include. All listed files in the `.theme` folder are optional and will only be loaded if they are provided.
|
||||
{: .info}
|
||||
|
||||
```
|
||||
@@ -40,4 +35,4 @@ All listed files in the .theme folder are optional and will only be loaded if th
|
||||
| | |-- favicon-32x32.png
|
||||
| | |-- custom.css
|
||||
| | |-- ...
|
||||
```
|
||||
```
|
||||
Vendored
+1
-1
@@ -16,7 +16,7 @@ description: >-
|
||||
|
||||
## Setup Instructions
|
||||
{: .no_toc}
|
||||
Go to the repo of the theme and download it. Place the files according to [these instructions](/theming/prepare#directory-structure).
|
||||
Click on the URL link below to go to the theme's repository and download it. Place the files according to [the instructions in the Preparing your theme section](/theming/prepare#directory-structure).
|
||||
|
||||
[KIAUH](/setup/kiauh) has an integrated theme installer
|
||||
Go to `[Advanced] > [Theme installer]`, enter the desired theme <span class="key">id</span> and confirm with return.
|
||||
|
||||
@@ -7,9 +7,10 @@ permalink: /update/
|
||||
has_toc: false
|
||||
---
|
||||
|
||||
There are currently two methods to update either via the web interface, or manually.
|
||||
There are two methods to update Mainsail: from Mainsail's interface in your web browser or by manually updating.
|
||||
|
||||
- [Update Manager](update-manager) <span class="label label-red">recommended</span>
|
||||
A built in update utility found in the web ui, under the machine tab.
|
||||
- [Manual Update](manual-update)
|
||||
Guides on manual update methods for each component; Klipper, Moonraker and Mainsail.
|
||||
|
||||
- [Update Manager Guide](update-manager) <span class="label label-red">(Recommended)</span>
|
||||
Update Klipper, Moonraker and Mainsail in your web browser using Mainsail. This is the recommended method.
|
||||
- [Manual Update Guide](manual-update)
|
||||
Review the included guides on how to manually update each component, including Klipper, Moonraker, and Mainsail.
|
||||
@@ -8,16 +8,18 @@ permalink: /update/klipper
|
||||
|
||||
## Klipper
|
||||
### Update from Repository
|
||||
|
||||
To update Klipper directly from its repository, run the following command in a terminal:
|
||||
|
||||
```bash
|
||||
cd ~/klipper
|
||||
git pull
|
||||
```
|
||||
|
||||
Restart Klipper (`sudo service klipper restart`) and check the `klippy.log`, if Klipper starts
|
||||
correctly and then continue the guide.
|
||||
Restart Klipper using the command `sudo service klipper restart` and check the `klippy.log`. if Klipper started correctly without any errors you may continue.
|
||||
|
||||
### Klipper config changes
|
||||
If you have issues after update your Klipper instance, you can check config changes [here](https://github.com/KevinOConnor/klipper/blob/master/docs/Config_Changes.md).
|
||||
### Klipper configuration changes
|
||||
If you have any issues after updating your Klipper instance, you can check the configuration changes [here](https://github.com/KevinOConnor/klipper/blob/master/docs/Config_Changes.md).
|
||||
|
||||
---
|
||||
[< table of contents](index.md){: .btn } [next step >](moonraker.md){: .btn}
|
||||
@@ -6,20 +6,26 @@ nav_order: 4
|
||||
permalink: /update/mainsail
|
||||
---
|
||||
|
||||
## Mainsail
|
||||
## Updating Mainsail
|
||||
|
||||
To update Mainsail manually, run the commands below in your terminal:
|
||||
|
||||
```bash
|
||||
cd ~/mainsail
|
||||
rm -R ./*
|
||||
wget -q -O mainsail.zip https://github.com/mainsail-crew/mainsail/releases/latest/download/mainsail.zip && unzip mainsail.zip && rm mainsail.zip
|
||||
```
|
||||
|
||||
### Move gui.json from gcodes to klipper_config
|
||||
This is only necessary if you update from 0.2.2 to 0.2.3 or higher. If you use MainsailOS, the virtual_sdcard directory is `gcode_files` instead of `sdcard`.
|
||||
### Updating from 0.2.2 to 0.2.3 or higher
|
||||
|
||||
If you are updating from Mainsail version 0.2.2 to a newer version, you must move the file `gui.json` from the `gcodes` directory to the `klipper_config' directory.
|
||||
|
||||
This is only necessary when updating from 0.2.2 to 0.2.3 or higher. If you use MainsailOS, the virtual_sdcard directory is `gcode_files` instead of `sdcard`.
|
||||
```
|
||||
mv ~/sdcard/gui.json ~/klipper_config/
|
||||
```
|
||||
|
||||
Now it should be possible to open the interface: `http://<printer-ip>/`.
|
||||
You should now be able to open Mainsail in your web browser at `http://<printer-ip>/`.
|
||||
|
||||
---
|
||||
[< previous step](moonraker.md){: .btn }
|
||||
@@ -6,21 +6,26 @@ nav_order: 3
|
||||
permalink: /update/moonraker
|
||||
---
|
||||
|
||||
## Moonraker
|
||||
## Updating Moonraker
|
||||
|
||||
To update Moonraker directly from its repository, run the following command in a terminal:
|
||||
|
||||
```bash
|
||||
cd ~/moonraker
|
||||
git pull
|
||||
```
|
||||
|
||||
Restart Moonraker (`sudo service moonraker restart`) and open the url `http://<printer-ip>:7125/printer/info` in your browser.
|
||||
Restart Moonraker using the command `sudo service moonraker restart` and open the URL `http://<printer-ip>:7125/printer/info` in your browser.
|
||||
|
||||
If you see a content like this
|
||||
Your printer is updated and ready if you see the following message:
|
||||
```
|
||||
{"result": {"hostname": "voron250", "error_detected": false, "version": "v0.8.0-643-g528f9f25", "is_ready": true, "message": "Printer is ready", "cpu": "4 core ARMv7 Processor rev 4 (v7l)"}}
|
||||
```
|
||||
|
||||
### Add Moonraker update manager
|
||||
To use the update manager in Mainsail you have to add this in your moonraker.conf:
|
||||
### Add Moonraker to the update manager
|
||||
|
||||
If you want to update Moonraker using the update manager, you need to add the following section to your printer's `moonraker.conf`:
|
||||
|
||||
```
|
||||
[update_manager]
|
||||
|
||||
@@ -30,21 +35,21 @@ repo: mainsail-crew/mainsail
|
||||
path: ~/mainsail
|
||||
```
|
||||
|
||||
### Change Moonraker to systemd service (December 6th 2020)
|
||||
Moonraker is now installed as a systemd service. If `moonraker.conf` is not located in the home directory, the command will looks something like the following:
|
||||
### Moonraker as a systemd service
|
||||
As of December 2020, Moonraker is added as a systemd service during installation. If `moonraker.conf` is not located in the home directory, run this command in your terminal:
|
||||
```bash
|
||||
~/moonraker/scripts/install-moonraker.sh -f -c /home/pi/klipper_config/moonraker.conf
|
||||
```
|
||||
This allows logging to stdout which can be viewed with the `journalctl -u moonraker command`.
|
||||
This allows logging to `stdout` which can be viewed with the command `journalctl -u moonraker` in your terminal.
|
||||
|
||||
### Update Moonraker dependence
|
||||
This is only nessasary, if you see missing modules in the moonraker log.
|
||||
### Update Moonraker's dependencies
|
||||
Updating Moonraker's dependecencies manually is only needed if you see missing modules in the Moonraker log. You can run the following command to update Moonraker's dependencies:
|
||||
```bash
|
||||
~/moonraker/scripts/install-moonraker.sh -r
|
||||
```
|
||||
|
||||
### Moonraker config changes
|
||||
If you have issues after update your Moonraker instance, you can check config changes [here](https://github.com/Arksine/moonraker/blob/master/docs/user_changes.md).
|
||||
### Moonraker configuration changes
|
||||
If you have issues after updating Moonraker, please review the list of changes requiring user intervention [here](https://github.com/Arksine/moonraker/blob/master/docs/user_changes.md).
|
||||
|
||||
---
|
||||
[< previous step](klipper.md){: .btn } [next step >](mainsail.md){: .btn }
|
||||
@@ -9,18 +9,18 @@ permalink: /update/update-manager
|
||||
|
||||
# Update Manager
|
||||
|
||||
You can find further information on this topic by checking out the [Moonraker documentation](https://github.com/Arksine/moonraker/blob/master/docs/configuration.md#update_manager){:target="_blank"}.
|
||||
You can find further information on this topic in the [Moonraker documentation](https://github.com/Arksine/moonraker/blob/master/docs/configuration.md#update_manager){:target="_blank"}.
|
||||
{: .info}
|
||||
|
||||
## Enabling the feature
|
||||
## Enabling Update Manager
|
||||
|
||||
To use the built in Update Manager it must first be enabled by editing the moonraker.conf file:
|
||||
To use the built in Update Manager it must first be enabled by editing the `moonraker.conf` file. From a terminal navigate to Klipper's configuration directory and edit the configuration file:
|
||||
|
||||
```bash
|
||||
cd ~/klipper_config
|
||||
sudo nano moonraker.conf
|
||||
```
|
||||
Add the following section to your printers moonraker.conf:
|
||||
Add the following section to your printer's `moonraker.conf`:
|
||||
|
||||
```yaml
|
||||
[update_manager]
|
||||
@@ -36,18 +36,20 @@ Restart Moonraker:
|
||||
sudo systemctl restart moonraker
|
||||
```
|
||||
|
||||
## Using the Web UI
|
||||
## Using Mainsail to Update
|
||||
|
||||
With the manager enabled reload the web ui and select the 'machine' tab from the sidebar. You should now see the Update Manager panel.
|
||||
With the update manager enabled, reload your web browser and select the 'Machine' tab from the sidebar. You should now see the Update Manager panel.
|
||||
|
||||
Holding shift whilst clicking the browser's refresh button (or pressing ctrl+f5) will force it to reload the page fully (without the cache).
|
||||
Holding shift while clicking the browser's refresh button (or pressing Control + F5) will force it to reload the page fully without the cache.
|
||||
{: .info}
|
||||
|
||||
Typically the update order is top to bottom.
|
||||
The update order is top to bottom.
|
||||
|
||||

|
||||
|
||||
To update a component, click the  button.
|
||||
To update a component, click the 'UPDATE' button next to the component you wish to update:
|
||||
|
||||
A new window will launch and the component will be updated. When the update is finished, the window can be closed.
|
||||

|
||||
|
||||
A popover window will launch and the component will be updated. When the update is finished, you can close the window.
|
||||
|
||||
Generated
+3258
-4149
File diff suppressed because it is too large.
Load diff
+17
-13
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "mainsail",
|
||||
"version": "2.1.0-beta2",
|
||||
"version": "2.1.2",
|
||||
"private": true,
|
||||
"decription": "a klipper web interface",
|
||||
"author": {
|
||||
@@ -15,24 +15,26 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@codemirror/basic-setup": "^0.19.0",
|
||||
"@codemirror/highlight": "^0.19.2",
|
||||
"@codemirror/lang-javascript": "^0.19.1",
|
||||
"@codemirror/language": "^0.19.7",
|
||||
"@codemirror/highlight": "^0.19.6",
|
||||
"@codemirror/lang-javascript": "^0.19.3",
|
||||
"@codemirror/lang-json": "^0.19.1",
|
||||
"@codemirror/legacy-modes": "^0.19.0",
|
||||
"@codemirror/search": "^0.19.2",
|
||||
"@codemirror/state": "^0.19.1",
|
||||
"@codemirror/stream-parser": "^0.19.1",
|
||||
"@codemirror/view": "^0.19.1",
|
||||
"@sindarius/gcodeviewer": "^2.1.13",
|
||||
"@codemirror/search": "^0.19.4",
|
||||
"@codemirror/state": "^0.19.6",
|
||||
"@codemirror/stream-parser": "^0.19.2",
|
||||
"@codemirror/view": "^0.19.28",
|
||||
"@sindarius/gcodeviewer": "^2.1.17",
|
||||
"@types/overlayscrollbars": "^1.12.1",
|
||||
"axios": "^0.21.2",
|
||||
"core-js": "^3.16.0",
|
||||
"echarts": "^5.1.2",
|
||||
"echarts": "^5.2.2",
|
||||
"echarts-for-vue": "^1.4.1",
|
||||
"echarts-gl": "^2.0.7",
|
||||
"echarts-gl": "^2.0.8",
|
||||
"joi": "^17.4.1",
|
||||
"js-sha256": "^0.9.0",
|
||||
"object-assign-deep": "^0.4.0",
|
||||
"overlayscrollbars": "^1.13.1",
|
||||
"overlayscrollbars-vue": "^0.2.2",
|
||||
"sass-loader": "^10.2.0",
|
||||
"semver": "^7.3.5",
|
||||
@@ -50,7 +52,7 @@
|
||||
"vue-simple-upload": "^0.1.6",
|
||||
"vue-toast-notification": "^0.6.1",
|
||||
"vuedraggable": "^2.24.3",
|
||||
"vuetify": "^2.5.10",
|
||||
"vuetify": "^2.6.1",
|
||||
"vuex": "^3.6.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
@@ -70,7 +72,6 @@
|
||||
"eslint": "^6.8.0",
|
||||
"eslint-plugin-vue": "^6.2.2",
|
||||
"generate-file-webpack-plugin": "^1.0.1",
|
||||
"node-sass": "^6.0.1",
|
||||
"sass": "~1.32",
|
||||
"sw-precache-webpack-plugin": "^1.0.0",
|
||||
"typescript": "^4.3.5",
|
||||
@@ -91,5 +92,8 @@
|
||||
"browserslist": [
|
||||
"> 1%",
|
||||
"last 2 versions"
|
||||
]
|
||||
],
|
||||
"engines": {
|
||||
"node": "^16"
|
||||
}
|
||||
}
|
||||
+7
-4
@@ -114,11 +114,11 @@ export default class App extends Mixins(BaseMixin) {
|
||||
}
|
||||
|
||||
get logoColor(): string {
|
||||
return this.$store.state.gui.theme.logo
|
||||
return this.$store.state.gui.uiSettings.logo
|
||||
}
|
||||
|
||||
get primaryColor(): string {
|
||||
return this.$store.state.gui.theme.primary
|
||||
return this.$store.state.gui.uiSettings.primary
|
||||
}
|
||||
|
||||
get warningColor(): string {
|
||||
@@ -275,14 +275,17 @@ export default class App extends Mixins(BaseMixin) {
|
||||
}
|
||||
|
||||
appHeight() {
|
||||
const doc = document.documentElement
|
||||
doc.style.setProperty('--app-height', window.innerHeight+'px')
|
||||
this.$nextTick(() => {
|
||||
const doc = document.documentElement
|
||||
doc.style.setProperty('--app-height', window.innerHeight+'px')
|
||||
})
|
||||
}
|
||||
|
||||
mounted(): void {
|
||||
this.drawFavicon(this.print_percent)
|
||||
this.appHeight()
|
||||
window.addEventListener('resize', this.appHeight)
|
||||
window.addEventListener('orientationchange', this.appHeight)
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -13,4 +13,22 @@ $t('App.ThrottledStates.DescriptionTemperatureLimitActive')
|
||||
$t('App.ThrottledStates.DescriptionPreviouslyUnderVolted')
|
||||
$t('App.ThrottledStates.DescriptionPreviouslyFrequencyCapped')
|
||||
$t('App.ThrottledStates.DescriptionPreviouslyThrottled')
|
||||
$t('App.ThrottledStates.DescriptionPreviouslyTemperatureLimited')
|
||||
$t('App.ThrottledStates.DescriptionPreviouslyTemperatureLimited')
|
||||
$t('App.TopCornerMenu.Start')
|
||||
$t('App.TopCornerMenu.Restart')
|
||||
$t('App.TopCornerMenu.Stop')
|
||||
$t('App.TopCornerMenu.ConfirmationDialog.Title.KlipperRestart')
|
||||
$t('App.TopCornerMenu.ConfirmationDialog.Title.KlipperFirmwareRestart')
|
||||
$t('App.TopCornerMenu.ConfirmationDialog.Title.ServiceStart')
|
||||
$t('App.TopCornerMenu.ConfirmationDialog.Title.ServiceRestart')
|
||||
$t('App.TopCornerMenu.ConfirmationDialog.Title.ServiceStop')
|
||||
$t('App.TopCornerMenu.ConfirmationDialog.Title.HostReboot')
|
||||
$t('App.TopCornerMenu.ConfirmationDialog.Title.HostShutdown')
|
||||
$t('App.TopCornerMenu.ConfirmationDialog.Description.KlipperStop')
|
||||
$t('App.TopCornerMenu.ConfirmationDialog.Description.KlipperRestart')
|
||||
$t('App.TopCornerMenu.ConfirmationDialog.Description.KlipperFirmwareRestart')
|
||||
$t('App.TopCornerMenu.ConfirmationDialog.Description.ServiceStart')
|
||||
$t('App.TopCornerMenu.ConfirmationDialog.Description.ServiceRestart')
|
||||
$t('App.TopCornerMenu.ConfirmationDialog.Description.ServiceStop')
|
||||
$t('App.TopCornerMenu.ConfirmationDialog.Description.HostReboot')
|
||||
$t('App.TopCornerMenu.ConfirmationDialog.Description.HostShutdown')
|
||||
@@ -50,7 +50,7 @@ import ConnectionStatus from '@/components/ui/ConnectionStatus.vue'
|
||||
ConnectionStatus,
|
||||
}
|
||||
})
|
||||
export default class TheUpdateDialog extends Mixins(BaseMixin) {
|
||||
export default class TheConnectingDialog extends Mixins(BaseMixin) {
|
||||
counter = 0
|
||||
|
||||
get protocol() {
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
@close="close"
|
||||
@keydown.esc="escClose"
|
||||
>
|
||||
<panel card-class="editor-dialog" icon="mdi-file-document-edit-outline" :title="(filepath ? filepath.slice(1)+'/': '')+filename+' '+changed">
|
||||
<panel card-class="editor-dialog" :icon="(isWriteable ? ' mdi-file-document-edit-outline' : 'mdi-file-document-outline')" :title="(filepath ? filepath.slice(1)+'/': '')+filename+' '+(isWriteable ? changed : '('+$t('Editor.FileReadOnly')+')')">
|
||||
<template v-slot:buttons>
|
||||
<v-btn text tile href="https://www.klipper3d.org/Config_Reference.html" v-if="restartServiceName === 'klipper'" target="_blank" class="d-none d-md-flex"><v-icon small class="mr-1">mdi-help</v-icon>{{ $t('Editor.ConfigReference') }}</v-btn>
|
||||
<v-btn v-if="isWriteable" text tile :color="restartServiceName === null ? 'primary' : ''" @click="save(null)" ><v-icon small class="mr-1">mdi-content-save</v-icon><span class="d-none d-sm-inline">{{ $t('Editor.SaveClose') }}</span></v-btn>
|
||||
@@ -30,9 +30,14 @@
|
||||
{{ snackbarHeadline }}<br />
|
||||
<strong>{{ filename }}</strong>
|
||||
</div>
|
||||
<span v-if="loaderProgress.total > 1" class="mr-1">({{ formatFilesize(loaderProgress.loaded) }}/{{ formatFilesize(loaderProgress.total) }})</span>
|
||||
{{ Math.round(100 * loaderProgress.loaded / loaderProgress.total) }} % @ {{ loaderProgress.speed }}/s<br />
|
||||
<v-progress-linear class="mt-2" :value="100 * loaderProgress.loaded / loaderProgress.total"></v-progress-linear>
|
||||
<template v-if="loaderProgress.total > 0">
|
||||
<span class="mr-1">({{ formatFilesize(loaderProgress.loaded) }}/{{ formatFilesize(loaderProgress.total) }})</span>
|
||||
{{ Math.round(100 * loaderProgress.loaded / loaderProgress.total) }} % @ {{ loaderProgress.speed }}/s<br />
|
||||
<v-progress-linear class="mt-2" :value="100 * loaderProgress.loaded / loaderProgress.total"></v-progress-linear>
|
||||
</template>
|
||||
<template v-else>
|
||||
<v-progress-linear class="mt-2" indeterminate></v-progress-linear>
|
||||
</template>
|
||||
<template v-slot:action="{ attrs }">
|
||||
<v-btn
|
||||
color="red"
|
||||
|
||||
@@ -4,17 +4,17 @@
|
||||
|
||||
<template>
|
||||
<v-dialog v-model="showDialog" persistent :width="400">
|
||||
<panel card-class="select-printer-dialog" icon="mdi-connection" :title="panelTitle" :margin-bottom="false" toolbar-color="primary">
|
||||
<panel card-class="select-printer-dialog" icon="mdi-connection" :title="panelTitle" :margin-bottom="false" toolbar-color="toolbar">
|
||||
<template v-slot:buttons>
|
||||
<template v-if="!isConnecting && !connectingFailed">
|
||||
<template v-if="dialogEditPrinter.bool"><v-btn icon tile class="minwidth-0" @click="dialogEditPrinter.bool = false"><v-icon>mdi-close-thick</v-icon></v-btn></template>
|
||||
<template v-else-if="dialogAddPrinter.bool"><v-btn icon tile class="minwidth-0" v-if="dialogAddPrinter.bool" @click="dialogAddPrinter.bool = false"><v-icon>mdi-close-thick</v-icon></v-btn></template>
|
||||
<template v-else-if="printers.length > 0"><v-btn icon tile class="minwidth-0" @click="checkPrinters"><v-icon>mdi-sync</v-icon></v-btn></template>
|
||||
<template v-else-if="printers.length > 0"><v-btn icon tile class="minwidth-0" @click="checkPrinters" color="primary"><v-icon>mdi-sync</v-icon></v-btn></template>
|
||||
</template>
|
||||
</template>
|
||||
<template v-if="isConnecting">
|
||||
<v-card-text>
|
||||
<v-progress-linear color="white" indeterminate></v-progress-linear>
|
||||
<v-progress-linear color="primary" indeterminate></v-progress-linear>
|
||||
</v-card-text>
|
||||
</template>
|
||||
<template v-else-if="!isConnecting && connectingFailed">
|
||||
@@ -103,8 +103,9 @@
|
||||
<v-card-actions>
|
||||
<v-btn
|
||||
color="red"
|
||||
text
|
||||
class="minwidth-0"
|
||||
icon
|
||||
tile
|
||||
class="minwidth-0 rounded"
|
||||
@click="delPrinter"
|
||||
>
|
||||
<v-icon small>mdi-delete</v-icon>
|
||||
@@ -124,13 +125,15 @@
|
||||
<v-row v-if="printers.length">
|
||||
<v-col class="px-6">
|
||||
<v-row v-for="(printer, index) in printers" v-bind:key="index">
|
||||
<v-col class="rounded transition-swing secondary py-2 px-2 mb-2" style="cursor: pointer;" @click="connect(printer)">
|
||||
<v-col class="rounded transition-swing toolbar py-2 px-2 mb-2 overflow-hidden" style="cursor: pointer;" @click="connect(printer)">
|
||||
<v-row align="center">
|
||||
<v-col class="col-auto pr-0">
|
||||
<v-progress-circular
|
||||
indeterminate
|
||||
color="primary"
|
||||
v-if="printer.socket.isConnecting"
|
||||
size="24"
|
||||
width="2.5"
|
||||
></v-progress-circular>
|
||||
<v-icon
|
||||
:color="printer.socket.isConnected ? 'green' : 'red'"
|
||||
@@ -138,7 +141,7 @@
|
||||
>mdi-{{ printer.socket.isConnected ? 'checkbox-marked-circle' : 'cancel' }}</v-icon>
|
||||
</v-col>
|
||||
<v-col>{{ getPrinterName(printer.id) }}</v-col>
|
||||
<v-col class="col-auto"><v-btn small class="minwidth-0" v-on:click.stop.prevent="editPrinter(printer)"><v-icon small>mdi-pencil</v-icon></v-btn></v-col>
|
||||
<v-col class="col-auto pa-0"><v-btn tile text icon large class="mr-1" v-on:click.stop.prevent="editPrinter(printer)"><v-icon small>mdi-pencil</v-icon></v-btn></v-col>
|
||||
</v-row>
|
||||
</v-col>
|
||||
</v-row>
|
||||
@@ -153,7 +156,7 @@
|
||||
</v-row>
|
||||
<v-row>
|
||||
<v-col class="text-center mt-0">
|
||||
<v-btn @click="dialogAddPrinter.bool = true">{{ $t("SelectPrinterDialog.AddPrinter") }}</v-btn>
|
||||
<v-btn text color="primary" @click="dialogAddPrinter.bool = true">{{ $t("SelectPrinterDialog.AddPrinter") }}</v-btn>
|
||||
</v-col>
|
||||
</v-row>
|
||||
</v-card-text>
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<v-btn icon tile @click="showSettings = true">
|
||||
<v-icon>mdi-cogs</v-icon>
|
||||
</v-btn>
|
||||
<v-dialog v-model="showSettings" width="900" persistent :fullscreen="isMobile" @keydown.esc="showSettings = false">
|
||||
<v-dialog v-model="showSettings" width="900" persistent :fullscreen="isMobile" @keydown.esc="showSettings = false" scrollable>
|
||||
<panel :title="$t('Settings.InterfaceSettings')" icon="mdi-cogs" card-class="settings-menu-dialog" :margin-bottom="false" style="overflow: hidden;" :height="isMobile ? 0 : 548">
|
||||
<template v-slot:buttons>
|
||||
<v-btn icon tile @click="showSettings = false"><v-icon>mdi-close-thick</v-icon></v-btn>
|
||||
@@ -187,17 +187,18 @@ export default class TheSettingsMenu extends Mixins(BaseMixin) {
|
||||
|
||||
<style scoped>
|
||||
.settings-tabs {
|
||||
height: auto;
|
||||
max-height: calc(var(--app-height) - 96px);
|
||||
min-height: 100%;
|
||||
height: calc(var(--app-height) - 96px);
|
||||
}
|
||||
|
||||
.settings-tabs-bar {
|
||||
border-right: 1px solid rgba(255, 255, 255, 0.12);
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.settings-tabs-bar.height500,
|
||||
.settings-tabs.height500 {
|
||||
max-height: 500px;
|
||||
height: 500px;
|
||||
max-height: calc(var(--app-height) - 111px);
|
||||
}
|
||||
</style>
|
||||
|
||||
|
||||
+134
-49
@@ -2,24 +2,33 @@
|
||||
.nav-logo {
|
||||
height: 32px;
|
||||
}
|
||||
|
||||
.small-list-item {
|
||||
height: var(--sidebar-menu-item-height);
|
||||
}
|
||||
|
||||
.no-text-decoration {
|
||||
text-decoration: none;
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
.no-background:before {
|
||||
background-color: rgba(255, 255, 255, 0) !important;
|
||||
}
|
||||
|
||||
.no-border {
|
||||
border: 0 !important;
|
||||
}
|
||||
</style>
|
||||
<style scoped>
|
||||
.active-nav-item {
|
||||
border-right: 4px solid var(--v-primary-base);
|
||||
}
|
||||
|
||||
.menu-item-icon {
|
||||
opacity: .85;
|
||||
}
|
||||
|
||||
.menu-item-title {
|
||||
line-height: 30px;
|
||||
font-size: 14px;
|
||||
@@ -27,43 +36,78 @@
|
||||
text-transform: uppercase;
|
||||
opacity: .85;
|
||||
}
|
||||
|
||||
.nav-scrollbar {
|
||||
height: 100%;
|
||||
}
|
||||
</style>
|
||||
|
||||
<template>
|
||||
<v-navigation-drawer v-model="naviDrawer" :src="sidebarBackground" :mini-variant="(navigationStyle === 'iconsOnly')" :key="navigationStyle" :width="navigationWidth" clipped app>
|
||||
<v-list class="pr-0 pt-0 ml-0">
|
||||
<v-list-item-group active-class="active-nav-item">
|
||||
<template v-if="countPrinters">
|
||||
<v-list-item
|
||||
router to="/allPrinters"
|
||||
class="small-list-item mt-1"
|
||||
<v-navigation-drawer v-model="naviDrawer" :src="sidebarBackground" :mini-variant="(navigationStyle === 'iconsOnly')" :key="navigationStyle" :width="navigationWidth" :temporary="boolNaviTemp" clipped app :style="sidebarCssVars">
|
||||
<overlay-scrollbars class="nav-scrollbar">
|
||||
<v-list class="pr-0 pt-0 ml-0">
|
||||
<v-list-item-group active-class="active-nav-item">
|
||||
<v-list-item
|
||||
router to="/"
|
||||
:class="'sidebar-logo no-text-decoration no-background no-border ' + ((navigationStyle === 'iconsOnly') ? 'pa-0 justify-center' : '')"
|
||||
:style="'height: ' + topbarHeight + 'px'"
|
||||
:ripple="false"
|
||||
v-if="isMobile"
|
||||
>
|
||||
<v-list-item-icon class="my-3 mr-3 menu-item-icon">
|
||||
<v-icon>mdi-view-dashboard-outline</v-icon>
|
||||
</v-list-item-icon>
|
||||
<v-list-item-content>
|
||||
<v-list-item-title tile class="menu-item-title">{{ $t("App.Printers")}}</v-list-item-title>
|
||||
</v-list-item-content>
|
||||
<template v-if="sidebarLogo">
|
||||
<img :src="sidebarLogo" :style="logoCssVars" class="nav-logo" alt="Logo" />
|
||||
</template>
|
||||
<template v-else>
|
||||
<mainsail-logo :color="logoColor" :style="logoCssVars" class="nav-logo" :ripple="false"></mainsail-logo>
|
||||
</template>
|
||||
<template v-if="navigationStyle !== 'iconsOnly'">
|
||||
<span class="text-h6 font-weight-regular text-truncate"> {{ printerName }} </span>
|
||||
</template>
|
||||
</v-list-item>
|
||||
<template v-if="countPrinters">
|
||||
<v-tooltip right :open-delay="500" :disabled="navigationStyle !== 'iconsOnly'">
|
||||
<template v-slot:activator="{ on, attrs }">
|
||||
<v-list-item
|
||||
router to="/allPrinters"
|
||||
class="small-list-item mt-1"
|
||||
v-bind="attrs"
|
||||
v-on="on"
|
||||
>
|
||||
<v-list-item-icon class="my-3 mr-3 menu-item-icon">
|
||||
<v-icon>mdi-view-dashboard-outline</v-icon>
|
||||
</v-list-item-icon>
|
||||
<v-list-item-content>
|
||||
<v-list-item-title tile class="menu-item-title">{{ $t("App.Printers") }}</v-list-item-title>
|
||||
</v-list-item-content>
|
||||
|
||||
</v-list-item>
|
||||
<v-divider class="my-1"></v-divider>
|
||||
</template>
|
||||
<div v-for="(category, index) in naviPoints" :key="index">
|
||||
<v-list-item
|
||||
router :to="category.path"
|
||||
v-if="showInNavi(category)"
|
||||
class="small-list-item"
|
||||
>
|
||||
<v-list-item-icon class="my-3 mr-3 menu-item-icon">
|
||||
<v-icon>mdi-{{ category.icon }}</v-icon>
|
||||
</v-list-item-icon>
|
||||
<v-list-item-content>
|
||||
<v-list-item-title tile class="menu-item-title">{{ $t(`Router.${category.title}`) }}</v-list-item-title>
|
||||
</v-list-item-content>
|
||||
</v-list-item>
|
||||
</div>
|
||||
</v-list-item-group>
|
||||
</v-list>
|
||||
</v-list-item>
|
||||
</template>
|
||||
<span>{{ $t("App.Printers") }}</span>
|
||||
</v-tooltip>
|
||||
<v-divider class="my-1"></v-divider>
|
||||
</template>
|
||||
<div v-for="(category, index) in naviPoints" :key="index">
|
||||
<v-tooltip right :open-delay="500" :disabled="navigationStyle !== 'iconsOnly'">
|
||||
<template v-slot:activator="{ on, attrs }">
|
||||
<v-list-item
|
||||
router :to="category.path"
|
||||
class="small-list-item"
|
||||
v-bind="attrs"
|
||||
v-on="on"
|
||||
>
|
||||
<v-list-item-icon class="my-3 mr-3 menu-item-icon">
|
||||
<v-icon>mdi-{{ category.icon }}</v-icon>
|
||||
</v-list-item-icon>
|
||||
<v-list-item-content>
|
||||
<v-list-item-title tile class="menu-item-title">{{ $t(`Router.${category.title}`) }}</v-list-item-title>
|
||||
</v-list-item-content>
|
||||
</v-list-item>
|
||||
</template>
|
||||
<span>{{ $t(`Router.${category.title}`) }}</span>
|
||||
</v-tooltip>
|
||||
</div>
|
||||
</v-list-item-group>
|
||||
</v-list>
|
||||
</overlay-scrollbars>
|
||||
<template v-slot:append>
|
||||
<v-list-item class="small-list-item mb-2">
|
||||
<v-list-item-icon class="menu-item-icon">
|
||||
@@ -82,17 +126,20 @@ import BaseMixin from '@/components/mixins/base'
|
||||
import {PrinterStateKlipperConfig} from '@/store/printer/types'
|
||||
import TheSelectPrinterDialog from '@/components/TheSelectPrinterDialog.vue'
|
||||
import AboutModal from '@/components/modals/AboutModal.vue'
|
||||
import {navigationWidth} from '@/store/variables'
|
||||
import {navigationWidth, topbarHeight} from '@/store/variables'
|
||||
import MainsailLogo from '@/components/ui/MainsailLogo.vue'
|
||||
|
||||
@Component({
|
||||
components: {
|
||||
TheSelectPrinterDialog,
|
||||
AboutModal
|
||||
AboutModal,
|
||||
MainsailLogo
|
||||
}
|
||||
})
|
||||
|
||||
export default class TheSidebarAlt extends Mixins(BaseMixin) {
|
||||
export default class TheSidebar extends Mixins(BaseMixin) {
|
||||
navigationWidth = navigationWidth
|
||||
topbarHeight = topbarHeight
|
||||
|
||||
get naviDrawer(): boolean {
|
||||
return this.$store.state.naviDrawer
|
||||
@@ -103,7 +150,7 @@ export default class TheSidebarAlt extends Mixins(BaseMixin) {
|
||||
}
|
||||
|
||||
get navigationStyle() {
|
||||
return this.$store.state.gui.dashboard.navigationStyle
|
||||
return this.$store.state.gui.uiSettings.navigationStyle
|
||||
}
|
||||
|
||||
get sidebarBackground(): string {
|
||||
@@ -111,7 +158,9 @@ export default class TheSidebarAlt extends Mixins(BaseMixin) {
|
||||
}
|
||||
|
||||
get naviPoints(): AppRoute[] {
|
||||
return routes.filter((element) => element.showInNavi)
|
||||
return routes.filter((element) => {
|
||||
return element.showInNavi && this.showInNavi(element)
|
||||
})
|
||||
}
|
||||
|
||||
get klippy_state(): string {
|
||||
@@ -119,7 +168,7 @@ export default class TheSidebarAlt extends Mixins(BaseMixin) {
|
||||
}
|
||||
|
||||
get boolNaviWebcam(): boolean {
|
||||
return this.$store.state.gui.webcamSettings.boolNavi
|
||||
return this.$store.state.gui.uiSettings.boolWebcamNavi
|
||||
}
|
||||
|
||||
get moonrakerComponents(): string[] {
|
||||
@@ -138,22 +187,58 @@ export default class TheSidebarAlt extends Mixins(BaseMixin) {
|
||||
return this.$route.fullPath
|
||||
}
|
||||
|
||||
get isUpdateAvailable(): boolean {
|
||||
return this.$store.getters['server/updateManager/isUpdateAvailable']
|
||||
}
|
||||
|
||||
get countPrinters() {
|
||||
return this.$store.getters['farm/countPrinters']
|
||||
}
|
||||
|
||||
get boolNaviTemp(): boolean {
|
||||
if(!this.isMobile && this.$vuetify.breakpoint.mdAndDown) {
|
||||
return true
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
get sidebarCssVars(): any {
|
||||
if(this.boolNaviTemp){
|
||||
return {
|
||||
'top': `${topbarHeight}px !important`,
|
||||
'padding-bottom': `${topbarHeight}px`
|
||||
}
|
||||
}
|
||||
return {}
|
||||
}
|
||||
|
||||
get sidebarLogo(): string {
|
||||
return this.$store.getters['files/getSidebarLogo']
|
||||
}
|
||||
|
||||
get logoColor(): string {
|
||||
return this.$store.state.gui.uiSettings.logo
|
||||
}
|
||||
|
||||
get printerName():string {
|
||||
if (this.$store.state.gui.general.printername.length)
|
||||
return this.$store.state.gui.general.printername
|
||||
|
||||
return this.$store.state.printer.hostname
|
||||
}
|
||||
|
||||
get logoCssVars() {
|
||||
if(this.navigationStyle !== 'iconsOnly'){
|
||||
return {
|
||||
'margin-right': '16px'
|
||||
}
|
||||
}
|
||||
return {}
|
||||
}
|
||||
|
||||
showInNavi(route: AppRoute): boolean {
|
||||
if (['shutdown', 'error', 'disconnected'].includes(this.klippy_state) && !route.alwaysShow) return false
|
||||
|
||||
if (route.title === 'Webcam') return this.boolNaviWebcam
|
||||
|
||||
if (route.moonrakerComponent) return this.moonrakerComponents.includes(route.moonrakerComponent)
|
||||
if (route.registeredDirectory) return this.registeredDirectories.includes(route.registeredDirectory)
|
||||
if (route.klipperComponent) return (route.klipperComponent in this.klipperConfigfileSettings)
|
||||
else if (route.title === 'Webcam' && !this.boolNaviWebcam) return false
|
||||
else if (route.moonrakerComponent && !this.moonrakerComponents.includes(route.moonrakerComponent)) return false
|
||||
else if (route.registeredDirectory && !this.registeredDirectories.includes(route.registeredDirectory)) return false
|
||||
else if (route.klipperComponent && !(route.klipperComponent in this.klipperConfigfileSettings)) return false
|
||||
else if (route.klipperIsConnected && !this.klippyIsConnected) return false
|
||||
|
||||
return true
|
||||
}
|
||||
|
||||
@@ -15,13 +15,13 @@
|
||||
<v-list dense>
|
||||
<template v-if="klipperState !== 'disconnected'">
|
||||
<v-subheader class="" style="height: auto;">{{ $t("App.TopCornerMenu.KlipperControl") }}</v-subheader>
|
||||
<v-list-item class="minheight30 pr-2" link @click="klipperRestart()">
|
||||
<v-list-item class="minheight30 pr-2" link @click="checkDialog(klipperRestart, 'klipper', 'restart')">
|
||||
<v-list-item-title>{{ $t("App.TopCornerMenu.KlipperRestart") }}</v-list-item-title>
|
||||
<v-list-item-action class="my-0 d-flex flex-row" style="min-width: auto;">
|
||||
<v-icon class="mr-2" small>mdi-restart</v-icon>
|
||||
</v-list-item-action>
|
||||
</v-list-item>
|
||||
<v-list-item class="minheight30 pr-2" link @click="klipperFirmwareRestart()">
|
||||
<v-list-item class="minheight30 pr-2" link @click="checkDialog(klipperFirmwareRestart, 'klipper', 'firmwareRestart')">
|
||||
<v-list-item-title>{{ $t("App.TopCornerMenu.KlipperFirmwareRestart") }}</v-list-item-title>
|
||||
<v-list-item-action class="my-0 d-flex flex-row" style="min-width: auto;">
|
||||
<v-icon class="mr-2" small>mdi-restart</v-icon>
|
||||
@@ -41,9 +41,9 @@
|
||||
</v-tooltip>
|
||||
</v-list-item-title>
|
||||
<v-list-item-action class="my-0 d-flex flex-row" style="min-width: auto;">
|
||||
<v-btn icon small v-if="getServiceState(service) === 'inactive'" @click="serviceStart(service)"><v-icon small>mdi-play</v-icon></v-btn>
|
||||
<v-btn icon small v-else @click="serviceRestart(service)"><v-icon small>mdi-restart</v-icon></v-btn>
|
||||
<v-btn icon small :disabled="getServiceState(service) === 'inactive'" @click="serviceStop(service)"><v-icon small>mdi-stop</v-icon></v-btn>
|
||||
<v-btn icon small v-if="getServiceState(service) === 'inactive'" @click="checkDialog(serviceStart, service, 'start')"><v-icon small>mdi-play</v-icon></v-btn>
|
||||
<v-btn icon small v-else @click="checkDialog(serviceRestart, service, 'restart')"><v-icon small>mdi-restart</v-icon></v-btn>
|
||||
<v-btn icon small :disabled="getServiceState(service) === 'inactive' || service === 'moonraker'" @click="checkDialog(serviceStop, service, 'stop')" :style="service === 'moonraker' ? 'visibility: hidden;' : ''"><v-icon small>mdi-stop</v-icon></v-btn>
|
||||
</v-list-item-action>
|
||||
</v-list-item>
|
||||
</template>
|
||||
@@ -59,13 +59,13 @@
|
||||
</template>
|
||||
<v-divider class="mt-0"></v-divider>
|
||||
<v-subheader class="pt-2" style="height: auto;">{{ $t("App.TopCornerMenu.HostControl") }}</v-subheader>
|
||||
<v-list-item class="minheight30 pr-2" link @click="hostReboot()">
|
||||
<v-list-item class="minheight30 pr-2" link @click="checkDialog(hostReboot, 'host', 'reboot')">
|
||||
<v-list-item-title>{{ $t("App.TopCornerMenu.Reboot") }}</v-list-item-title>
|
||||
<v-list-item-action class="my-0 d-flex flex-row" style="min-width: auto;">
|
||||
<v-icon class="mr-2" small>mdi-power</v-icon>
|
||||
</v-list-item-action>
|
||||
</v-list-item>
|
||||
<v-list-item class="minheight30 pr-2" link @click="hostShutdown()">
|
||||
<v-list-item class="minheight30 pr-2" link @click="checkDialog(hostShutdown, 'host', 'shutdown')">
|
||||
<v-list-item-title>{{ $t("App.TopCornerMenu.Shutdown") }}</v-list-item-title>
|
||||
<v-list-item-action class="my-0 d-flex flex-row" style="min-width: auto;">
|
||||
<v-icon class="mr-2" small>mdi-power</v-icon>
|
||||
@@ -75,7 +75,7 @@
|
||||
</v-menu>
|
||||
<v-dialog v-model="dialogPowerDeviceChange.show" width="400" :fullscreen="isMobile">
|
||||
<v-card>
|
||||
<v-card-title class="headline">{{ $t(this.dialogPowerDeviceChange.value === 'off' ? 'PowerDeviceChangeDialog.TurnDeviceOn' : 'PowerDeviceChangeDialog.TurnDeviceOff', {'device': dialogPowerDeviceChange.device}) }}</v-card-title>
|
||||
<v-card-title class="headline">{{ this.dialogPowerDeviceChange.value === 'off' ? $t('PowerDeviceChangeDialog.TurnDeviceOn', {'device': dialogPowerDeviceChange.device}) : $t('PowerDeviceChangeDialog.TurnDeviceOff', {'device': dialogPowerDeviceChange.device}) }}</v-card-title>
|
||||
<v-card-text>{{ $t('PowerDeviceChangeDialog.AreYouSure') }}</v-card-text>
|
||||
<v-card-actions>
|
||||
<v-spacer></v-spacer>
|
||||
@@ -84,6 +84,29 @@
|
||||
</v-card-actions>
|
||||
</v-card>
|
||||
</v-dialog>
|
||||
<v-dialog v-model="dialogConfirmation.show" width="400" :fullscreen="isMobile">
|
||||
<panel card-class="confirm-top-corner-menu-dialog" icon="mdi-alert" :title="dialogConfirmation.title" :margin-bottom="false">
|
||||
<template v-slot:buttons>
|
||||
<v-btn icon tile @click="dialogConfirmation.show = false"><v-icon>mdi-close-thick</v-icon></v-btn>
|
||||
</template>
|
||||
<v-card-text class="pt-3">
|
||||
<v-row>
|
||||
<v-col>
|
||||
<p class="body-2">{{ dialogConfirmation.description }}</p>
|
||||
</v-col>
|
||||
</v-row>
|
||||
</v-card-text>
|
||||
<v-card-actions>
|
||||
<v-spacer></v-spacer>
|
||||
<v-btn text @click="dialogConfirmation.show = false">
|
||||
{{ $t('App.TopCornerMenu.Cancel') }}
|
||||
</v-btn>
|
||||
<v-btn text color="error" @click="executeDialog">
|
||||
{{ dialogConfirmation.actionButtonText }}
|
||||
</v-btn>
|
||||
</v-card-actions>
|
||||
</panel>
|
||||
</v-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -93,6 +116,7 @@ import Component from 'vue-class-component'
|
||||
import { Mixins } from 'vue-property-decorator'
|
||||
import BaseMixin from '@/components/mixins/base'
|
||||
import {ServerPowerStateDevice} from '@/store/server/power/types'
|
||||
import Panel from '@/components/ui/Panel.vue'
|
||||
|
||||
interface dialogPowerDeviceChange {
|
||||
show: boolean
|
||||
@@ -100,7 +124,18 @@ interface dialogPowerDeviceChange {
|
||||
value: string
|
||||
}
|
||||
|
||||
@Component
|
||||
interface dialogConfirmation {
|
||||
show: boolean
|
||||
serviceName: string | null
|
||||
executableFunction: any | null
|
||||
title: string
|
||||
description: string
|
||||
actionButtonText: string
|
||||
}
|
||||
|
||||
@Component({
|
||||
components: {Panel}
|
||||
})
|
||||
export default class TheTopCornerMenu extends Mixins(BaseMixin) {
|
||||
|
||||
showMenu = false
|
||||
@@ -110,6 +145,15 @@ export default class TheTopCornerMenu extends Mixins(BaseMixin) {
|
||||
value: ''
|
||||
}
|
||||
|
||||
dialogConfirmation: dialogConfirmation = {
|
||||
show: false,
|
||||
serviceName: null,
|
||||
executableFunction: null,
|
||||
title: '',
|
||||
description: '',
|
||||
actionButtonText: ''
|
||||
}
|
||||
|
||||
get services() {
|
||||
const services = this.$store.state.server.system_info?.available_services?.filter((name: string) => name !== 'klipper_mcu') ?? []
|
||||
services.sort()
|
||||
@@ -136,6 +180,38 @@ export default class TheTopCornerMenu extends Mixins(BaseMixin) {
|
||||
return null
|
||||
}
|
||||
|
||||
checkDialog(executableFunction: any, serviceName: string, action: string) {
|
||||
if (this.printerIsPrinting) {
|
||||
this.dialogConfirmation.executableFunction = executableFunction
|
||||
this.dialogConfirmation.serviceName = serviceName
|
||||
|
||||
const actionUppercase = action.trim().charAt(0).toUpperCase() + action.trim().slice(1)
|
||||
let titleKey = 'App.TopCornerMenu.ConfirmationDialog.Title.Service' + actionUppercase
|
||||
let descriptionKey = 'App.TopCornerMenu.ConfirmationDialog.Description.Service' + actionUppercase
|
||||
let buttonKey = 'App.TopCornerMenu.' + actionUppercase
|
||||
|
||||
if (serviceName === 'klipper' && ['stop', 'restart', 'firmwareRestart'].includes(action)){
|
||||
titleKey = 'App.TopCornerMenu.ConfirmationDialog.Title.' + (action !== 'stop' ? 'Klipper' : 'Service') + actionUppercase
|
||||
descriptionKey = 'App.TopCornerMenu.ConfirmationDialog.Description.Klipper' + actionUppercase
|
||||
|
||||
if (action === 'firmwareRestart') buttonKey = 'App.TopCornerMenu.KlipperFirmwareRestart'
|
||||
} else if (serviceName === 'host') {
|
||||
titleKey = 'App.TopCornerMenu.ConfirmationDialog.Title.Host' + actionUppercase
|
||||
descriptionKey = 'App.TopCornerMenu.ConfirmationDialog.Description.Host' + actionUppercase
|
||||
}
|
||||
|
||||
this.dialogConfirmation.title = this.$t(titleKey).toString()
|
||||
this.dialogConfirmation.description = this.$t(descriptionKey).toString()
|
||||
this.dialogConfirmation.actionButtonText = this.$t(buttonKey).toString()
|
||||
this.dialogConfirmation.show = true
|
||||
} else executableFunction(serviceName)
|
||||
}
|
||||
|
||||
executeDialog() {
|
||||
this.dialogConfirmation.executableFunction(this.dialogConfirmation.serviceName)
|
||||
this.dialogConfirmation.show = false
|
||||
}
|
||||
|
||||
klipperRestart() {
|
||||
this.showMenu = false
|
||||
this.$store.dispatch('server/addEvent', { message: 'RESTART', type: 'command' })
|
||||
@@ -167,11 +243,10 @@ export default class TheTopCornerMenu extends Mixins(BaseMixin) {
|
||||
this.dialogPowerDeviceChange.device = device.device
|
||||
this.dialogPowerDeviceChange.value = value
|
||||
|
||||
const confirmOnPowerDeviceChange = this.$store.state.gui.general.confirmOnPowerDeviceChange
|
||||
const confirmOnPowerDeviceChange = this.$store.state.gui.uiSettings.confirmOnPowerDeviceChange
|
||||
if (confirmOnPowerDeviceChange) {
|
||||
this.dialogPowerDeviceChange.show = true
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
this.powerDeviceToggle()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -15,6 +15,11 @@
|
||||
.topbar .v-btn.v-btn--icon {
|
||||
width: var(--topbar-icon-btn-width) !important;
|
||||
}
|
||||
@media (min-width: 768px) {
|
||||
header.topbar {
|
||||
z-index: 8 !important;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
<template>
|
||||
@@ -198,7 +203,7 @@ export default class TheTopbar extends Mixins(BaseMixin) {
|
||||
}
|
||||
|
||||
get boolWideNavDrawer() {
|
||||
return this.$store.state.gui.dashboard.boolWideNavDrawer ?? false
|
||||
return this.$store.state.gui.uiSettings.boolWideNavDrawer ?? false
|
||||
}
|
||||
|
||||
get countPrinters() {
|
||||
@@ -206,7 +211,7 @@ export default class TheTopbar extends Mixins(BaseMixin) {
|
||||
}
|
||||
|
||||
get boolHideUploadAndPrintButton() {
|
||||
return this.$store.state.gui.dashboard.boolHideUploadAndPrintButton ?? false
|
||||
return this.$store.state.gui.uiSettings.boolHideUploadAndPrintButton ?? false
|
||||
}
|
||||
|
||||
get sidebarLogo(): string {
|
||||
@@ -214,11 +219,11 @@ export default class TheTopbar extends Mixins(BaseMixin) {
|
||||
}
|
||||
|
||||
get logoColor(): string {
|
||||
return this.$store.state.gui.theme.logo
|
||||
return this.$store.state.gui.uiSettings.logo
|
||||
}
|
||||
|
||||
btnEmergencyStop() {
|
||||
const confirmOnEmergencyStop = this.$store.state.gui.general.confirmOnEmergencyStop
|
||||
const confirmOnEmergencyStop = this.$store.state.gui.uiSettings.confirmOnEmergencyStop
|
||||
if (confirmOnEmergencyStop) {
|
||||
this.showEmergencyStopDialog = true
|
||||
}
|
||||
|
||||
@@ -14,7 +14,7 @@ import { convertName } from '@/plugins/helpers'
|
||||
import Component from 'vue-class-component'
|
||||
import {Mixins, Watch} from 'vue-property-decorator'
|
||||
import BaseMixin from '../mixins/base'
|
||||
import {PrinterTempHistoryStateSerie} from '@/store/printer/tempHistory/types'
|
||||
import {PrinterTempHistoryStateSerie, PrinterTempHistoryStateSourceEntry} from '@/store/printer/tempHistory/types'
|
||||
|
||||
import { createComponent } from 'echarts-for-vue'
|
||||
import * as echarts from 'echarts'
|
||||
@@ -210,7 +210,7 @@ export default class TempChart extends Mixins(BaseMixin) {
|
||||
}
|
||||
|
||||
get autoscale() {
|
||||
return this.$store.state.gui.tempchart.autoscale ?? true
|
||||
return this.$store.state.gui.view.tempchart.autoscale ?? true
|
||||
}
|
||||
|
||||
get maxTemp() {
|
||||
@@ -243,15 +243,24 @@ export default class TempChart extends Mixins(BaseMixin) {
|
||||
updateChart() {
|
||||
if (this.chart && this.isVisible) {
|
||||
//const t0 = performance.now()
|
||||
const limitDate = new Date(Date.now() - this.maxHistory * 1000)
|
||||
let newSource = [...this.source].filter((entry: PrinterTempHistoryStateSourceEntry) => {
|
||||
return entry.date >= limitDate
|
||||
})
|
||||
|
||||
this.chart?.setOption({
|
||||
dataset: {
|
||||
source: this.source
|
||||
source: newSource
|
||||
},
|
||||
})
|
||||
|
||||
//const t1 = performance.now()
|
||||
//window.console.debug(t1-t0)
|
||||
//window.console.debug('calc chart', (t1-t0).toFixed(), newSource.length, this.source.length)
|
||||
|
||||
// reset tempHistory if working sources are smaller than 80%
|
||||
if (this.source.length > 0 && newSource.length < this.maxHistory * 0.8) {
|
||||
this.$socket.emit('server.temperature_store', {}, { action: 'printer/tempHistory/init' })
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -278,7 +287,19 @@ export default class TempChart extends Mixins(BaseMixin) {
|
||||
tooltipFormater(datasets: any) {
|
||||
let output = ''
|
||||
|
||||
const mainDatasets = datasets.filter((dataset: any) => !dataset.seriesName.includes('-') && dataset.seriesName !== 'date')
|
||||
const mainDatasets = datasets.filter((dataset: any) => {
|
||||
if (dataset.seriesName === 'date') return false
|
||||
if (dataset.seriesName.includes('-')) {
|
||||
if (dataset.seriesName.lastIndexOf('-') > -1) {
|
||||
const suffix = dataset.seriesName.slice(dataset.seriesName.lastIndexOf('-') + 1)
|
||||
return !['target', 'power'].includes(suffix)
|
||||
}
|
||||
|
||||
return true
|
||||
}
|
||||
|
||||
return true
|
||||
})
|
||||
if (datasets.length) {
|
||||
let outputTime = datasets[0]['axisValueLabel']
|
||||
outputTime = outputTime.substr(outputTime.indexOf(' '))
|
||||
|
||||
@@ -25,8 +25,8 @@
|
||||
|
||||
<template>
|
||||
<v-row :class="'ma-0 '+entryStyle">
|
||||
<v-col class="col-auto pr-0">{{ event.formatTime }}</v-col>
|
||||
<v-col :class="colorConsoleMessage(event)" v-html="event.formatMessage" @click.capture="commandClick"></v-col>
|
||||
<v-col class="col-auto pr-0 text--disabled console-time">{{ event.formatTime }}</v-col>
|
||||
<v-col :class="colorConsoleMessage(event) + ' ' + 'console-message'" v-html="event.formatMessage" @click.capture="commandClick"></v-col>
|
||||
</v-row>
|
||||
</template>
|
||||
|
||||
@@ -46,9 +46,9 @@ export default class ConsoleTableEntry extends Vue {
|
||||
}
|
||||
|
||||
colorConsoleMessage(item: ServerStateEvent): string {
|
||||
if (item.message.startsWith('!! ')) return 'red--text'
|
||||
if (item.message.startsWith('!! ')) return 'error--text'
|
||||
|
||||
return ''
|
||||
return 'text--primary'
|
||||
}
|
||||
|
||||
commandClick(event: Event) {
|
||||
|
||||
@@ -2,20 +2,39 @@
|
||||
<style>
|
||||
.viewer {
|
||||
width: 100%;
|
||||
height: calc(var(--app-height) - 250px);
|
||||
height: calc(var(--app-height) - 266px);
|
||||
border: 1px solid #3f3f3f;
|
||||
}
|
||||
|
||||
.slider-autoheight,
|
||||
.slider-autoheight .v-slider {
|
||||
height: calc(var(--app-height) - 250px);
|
||||
height: calc(var(--app-height) - 286px);
|
||||
}
|
||||
|
||||
@media (min-width: 600px) and (max-width: 959px) {
|
||||
.viewer {
|
||||
height: calc(var(--app-height) - 318px);
|
||||
}
|
||||
.slider-autoheight,
|
||||
.slider-autoheight .v-slider {
|
||||
height: calc(var(--app-height) - 338px);
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 599px) {
|
||||
.viewer {
|
||||
height: calc(var(--app-height) - 356px);
|
||||
}
|
||||
.slider-autoheight,
|
||||
.slider-autoheight .v-slider {
|
||||
height: calc(var(--app-height) - 376px);
|
||||
}
|
||||
}
|
||||
|
||||
.slider-autoheight .v-slider {
|
||||
margin-top: 0;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.slider-autoheight .v-input__slot {
|
||||
height: 100%;
|
||||
}
|
||||
@@ -63,70 +82,68 @@
|
||||
<v-col class="col-auto pr-6">
|
||||
<v-slider
|
||||
vertical
|
||||
:disabled="tracking"
|
||||
:disabled="loading || !loadedFile"
|
||||
:max="maxZSlider"
|
||||
:min="0"
|
||||
:value="zSlider"
|
||||
class="slider-autoheight"
|
||||
class="slider-autoheight mt-3"
|
||||
@input="updateZSlider"
|
||||
></v-slider>
|
||||
</v-col>
|
||||
</v-row>
|
||||
<v-row class="mt-0">
|
||||
<v-col>
|
||||
<v-select :items="colorModes" :label="$t('GCodeViewer.ColorMode')" item-text="text" dense v-model="colorMode" hide-details outlined></v-select>
|
||||
</v-col>
|
||||
<v-col class="text-center">
|
||||
<template v-if="loadedFile === null">
|
||||
<v-btn @click="loadCurrentFile" class="mr-3" v-if="sdCardFilePath !== '' && sdCardFilePath !== loadedFile">{{ $t("GCodeViewer.LoadCurrentFile")}}</v-btn>
|
||||
<v-btn @click="chooseFile">{{ $t("GCodeViewer.LoadLocal") }}</v-btn>
|
||||
</template>
|
||||
<template v-else>
|
||||
<v-btn @click="tracking=!tracking" v-if="showTrackingButton" class="mr-3"><v-icon v-html="tracking ? 'mdi-toggle-switch' : 'mdi-toggle-switch-off-outline'" class="mr-2"></v-icon>{{ $t("GCodeViewer.Tracking") }}</v-btn>
|
||||
<v-btn @click="clearLoadedFile">{{ $t("GCodeViewer.ClearLoadedFile") }}</v-btn>
|
||||
</template>
|
||||
</v-col>
|
||||
<v-row class="mt-0 d-flex align-top">
|
||||
<v-col>
|
||||
<v-row>
|
||||
<v-col>
|
||||
<v-select :items="renderQualities" :label="$t('GCodeViewer.RenderQuality')" item-text="label" dense v-model="renderQuality" hide-details outlined></v-select>
|
||||
<v-col order-md="2" class="d-flex align-content-space-around justify-center flex-wrap flex-md-nowrap col-12 col-md-4">
|
||||
<template v-if="loadedFile === null">
|
||||
<v-btn @click="loadCurrentFile" class="mr-3" v-if="sdCardFilePath !== '' && sdCardFilePath !== loadedFile">{{ $t("GCodeViewer.LoadCurrentFile")}}</v-btn>
|
||||
<v-btn @click="chooseFile">{{ $t("GCodeViewer.LoadLocal") }}</v-btn>
|
||||
</template>
|
||||
<template v-else>
|
||||
<v-btn @click="tracking=!tracking" class="mr-3" v-if="showTrackingButton"><v-icon v-html="tracking ? 'mdi-toggle-switch' : 'mdi-toggle-switch-off-outline'" class="mr-2"></v-icon>{{ $t("GCodeViewer.Tracking") }}</v-btn>
|
||||
<v-btn @click="clearLoadedFile">{{ $t("GCodeViewer.ClearLoadedFile") }}</v-btn>
|
||||
</template>
|
||||
</v-col>
|
||||
<v-col class="col-auto">
|
||||
<v-menu :offset-y="true" :offset-x="true" top :close-on-content-click="false" :title="$t('Files.SetupCurrentList')">
|
||||
<template v-slot:activator="{ on, attrs }">
|
||||
<v-btn class="minwidth-0 px-2" v-bind="attrs" v-on="on"><v-icon>mdi-cog</v-icon></v-btn>
|
||||
</template>
|
||||
<v-list>
|
||||
<v-list-item class="minHeight36">
|
||||
<v-checkbox class="mt-0" hide-details v-model="showCursor" :label="$t('GCodeViewer.ShowToolhead')"></v-checkbox>
|
||||
</v-list-item>
|
||||
<v-list-item class="minHeight36">
|
||||
<v-checkbox class="mt-0" hide-details v-model="showTravelMoves" :label="$t('GCodeViewer.ShowTravelMoves')"></v-checkbox>
|
||||
</v-list-item>
|
||||
<v-list-item class="minHeight36" v-if="loadedFile === sdCardFilePath && printing_objects.length > 1">
|
||||
<v-checkbox class="mt-0" hide-details v-model="showObjectSelection" :label="$t('GCodeViewer.ShowObjectSelection')"></v-checkbox>
|
||||
</v-list-item>
|
||||
<v-divider></v-divider>
|
||||
<v-list-item class="minHeight36">
|
||||
<v-checkbox class="mt-0" hide-details v-model="hdRendering" :label="$t('GCodeViewer.HDRendering')"></v-checkbox>
|
||||
</v-list-item>
|
||||
<v-list-item class="minHeight36">
|
||||
<v-checkbox class="mt-0" hide-details v-model="forceLineRendering" :label="$t('GCodeViewer.ForceLineRendering')"></v-checkbox>
|
||||
</v-list-item>
|
||||
<v-list-item class="minHeight36">
|
||||
<v-checkbox class="mt-0" hide-details v-model="transparency" :label="$t('GCodeViewer.Transparency')"></v-checkbox>
|
||||
</v-list-item>
|
||||
<v-list-item class="minHeight36">
|
||||
<v-checkbox class="mt-0" hide-details v-model="voxelMode" :label="$t('GCodeViewer.VoxelMode')"></v-checkbox>
|
||||
</v-list-item>
|
||||
<v-list-item class="minHeight36">
|
||||
<v-checkbox class="mt-0" hide-details v-model="specularLighting" :label="$t('GCodeViewer.SpecularLighting')"></v-checkbox>
|
||||
</v-list-item>
|
||||
</v-list>
|
||||
</v-menu>
|
||||
<v-col class="col-12 col-sm-6 col-md-4">
|
||||
<v-select :items="colorModes" :label="$t('GCodeViewer.ColorMode')" item-text="text" dense v-model="colorMode" hide-details outlined></v-select>
|
||||
</v-col>
|
||||
<v-col order-md="3" class="col-12 col-sm-6 col-md-4">
|
||||
<v-select :items="renderQualities" :label="$t('GCodeViewer.RenderQuality')" item-text="label" dense v-model="renderQuality" hide-details outlined></v-select>
|
||||
</v-col>
|
||||
</v-row>
|
||||
</v-col>
|
||||
<v-menu :offset-y="true" :offset-x="true" top :close-on-content-click="false" :title="$t('Files.SetupCurrentList')">
|
||||
<template v-slot:activator="{ on, attrs }">
|
||||
<v-btn class="minwidth-0 px-2 mr-3 mt-3" v-bind="attrs" v-on="on"><v-icon>mdi-cog</v-icon></v-btn>
|
||||
</template>
|
||||
<v-list>
|
||||
<v-list-item class="minHeight36">
|
||||
<v-checkbox class="mt-0" hide-details v-model="showCursor" :label="$t('GCodeViewer.ShowToolhead')"></v-checkbox>
|
||||
</v-list-item>
|
||||
<v-list-item class="minHeight36">
|
||||
<v-checkbox class="mt-0" hide-details v-model="showTravelMoves" :label="$t('GCodeViewer.ShowTravelMoves')"></v-checkbox>
|
||||
</v-list-item>
|
||||
<v-list-item class="minHeight36" v-if="loadedFile === sdCardFilePath && printing_objects.length > 1">
|
||||
<v-checkbox class="mt-0" hide-details v-model="showObjectSelection" :label="$t('GCodeViewer.ShowObjectSelection')"></v-checkbox>
|
||||
</v-list-item>
|
||||
<v-divider></v-divider>
|
||||
<v-list-item class="minHeight36">
|
||||
<v-checkbox class="mt-0" hide-details v-model="hdRendering" :label="$t('GCodeViewer.HDRendering')"></v-checkbox>
|
||||
</v-list-item>
|
||||
<v-list-item class="minHeight36">
|
||||
<v-checkbox class="mt-0" hide-details v-model="forceLineRendering" :label="$t('GCodeViewer.ForceLineRendering')"></v-checkbox>
|
||||
</v-list-item>
|
||||
<v-list-item class="minHeight36">
|
||||
<v-checkbox class="mt-0" hide-details v-model="transparency" :label="$t('GCodeViewer.Transparency')"></v-checkbox>
|
||||
</v-list-item>
|
||||
<v-list-item class="minHeight36">
|
||||
<v-checkbox class="mt-0" hide-details v-model="voxelMode" :label="$t('GCodeViewer.VoxelMode')"></v-checkbox>
|
||||
</v-list-item>
|
||||
<v-list-item class="minHeight36">
|
||||
<v-checkbox class="mt-0" hide-details v-model="specularLighting" :label="$t('GCodeViewer.SpecularLighting')"></v-checkbox>
|
||||
</v-list-item>
|
||||
</v-list>
|
||||
</v-menu>
|
||||
</v-row>
|
||||
<input :accept="'.g,.gcode,.gc,.gco,.nc,.ngc,.tap'" @change="fileSelected" hidden multiple ref="fileInput" type="file" />
|
||||
</v-card-text>
|
||||
@@ -144,11 +161,20 @@
|
||||
</template>
|
||||
</v-snackbar>
|
||||
<v-snackbar v-model="downloadSnackbar.status" :timeout="-1" :value="true" fixed right bottom dark>
|
||||
<div>
|
||||
{{ $t('GCodeViewer.Downloading') }} - {{ Math.round(downloadSnackbar.percent) }} % @ {{ formatFilesize(Math.round(downloadSnackbar.speed)) }}/s<br />
|
||||
<strong>{{ downloadSnackbar.filename }}</strong>
|
||||
</div>
|
||||
<v-progress-linear class="mt-2" :value="downloadSnackbar.percent"></v-progress-linear>
|
||||
<template v-if="downloadSnackbar.total > 0">
|
||||
<div>
|
||||
{{ $t('GCodeViewer.Downloading') }} - {{ Math.round(downloadSnackbar.percent) }} % @ {{ formatFilesize(Math.round(downloadSnackbar.speed)) }}/s<br />
|
||||
<strong>{{ downloadSnackbar.filename }}</strong>
|
||||
</div>
|
||||
<v-progress-linear class="mt-2" :value="downloadSnackbar.percent"></v-progress-linear>
|
||||
</template>
|
||||
<template v-else>
|
||||
<div>
|
||||
{{ $t('GCodeViewer.Downloading') }}<br />
|
||||
<strong>{{ downloadSnackbar.filename }}</strong>
|
||||
</div>
|
||||
<v-progress-linear class="mt-2" indeterminate></v-progress-linear>
|
||||
</template>
|
||||
<template v-slot:action="{ attrs }">
|
||||
<v-btn color="red" text v-bind="attrs" @click="cancelDownload" style="min-width: auto;" >
|
||||
<v-icon class="0">mdi-close</v-icon>
|
||||
@@ -234,6 +260,7 @@ export default class Viewer extends Mixins(BaseMixin) {
|
||||
|
||||
async mounted() {
|
||||
this.loadedFile = this.$store.state.gcodeviewer?.loadedFileBackup ?? null
|
||||
viewer = this.$store.state.gcodeviewer?.viewerBackup ?? null
|
||||
|
||||
await this.init()
|
||||
|
||||
@@ -244,6 +271,7 @@ export default class Viewer extends Mixins(BaseMixin) {
|
||||
if (viewer) {
|
||||
viewer.gcodeProcessor.loadingProgressCallback = null
|
||||
this.$store.dispatch('gcodeviewer/setLoadedFileBackup', this.loadedFile)
|
||||
this.$store.dispatch('gcodeviewer/setViewerBackup', viewer)
|
||||
}
|
||||
|
||||
window.removeEventListener('resize', this.eventListenerResize)
|
||||
@@ -258,7 +286,7 @@ export default class Viewer extends Mixins(BaseMixin) {
|
||||
}
|
||||
|
||||
get sdCardFilePath() {
|
||||
return this.$store.state.printer.print_stats.filename ?? ''
|
||||
return this.$store.state.printer.print_stats?.filename ?? ''
|
||||
}
|
||||
|
||||
get currentPosition() {
|
||||
@@ -277,6 +305,10 @@ export default class Viewer extends Mixins(BaseMixin) {
|
||||
return this.$store.state.printer.exclude_object?.excluded_objects ?? []
|
||||
}
|
||||
|
||||
get nozzle_diameter() {
|
||||
return this.$store.state.printer.configfile?.settings?.extruder?.nozzle_diameter ?? 0.4
|
||||
}
|
||||
|
||||
async init() {
|
||||
let canvasElement = this.$store.state.gcodeviewer?.canvasBackup ?? null
|
||||
|
||||
@@ -285,7 +317,12 @@ export default class Viewer extends Mixins(BaseMixin) {
|
||||
canvasElement.className = 'viewer'
|
||||
this.$refs.viewerCanvasContainer.appendChild(canvasElement)
|
||||
await this.$store.dispatch('gcodeviewer/setCanvasBackup', canvasElement)
|
||||
} else this.$refs.viewerCanvasContainer.appendChild(canvasElement)
|
||||
} else {
|
||||
this.$refs.viewerCanvasContainer.appendChild(canvasElement)
|
||||
if (viewer?.gcodeProcessor) {
|
||||
viewer.gcodeProcessor.updateFilePosition(viewer?.fileSize)
|
||||
}
|
||||
}
|
||||
|
||||
if (viewer === null) {
|
||||
await this.viewerInit(canvasElement)
|
||||
@@ -303,7 +340,8 @@ export default class Viewer extends Mixins(BaseMixin) {
|
||||
viewerInit(element: HTMLCanvasElement) {
|
||||
viewer = new GCodeViewer(element)
|
||||
viewer.init()
|
||||
viewer.setBackgroundColor('#121212')
|
||||
viewer.setBackgroundColor(this.backgroundColor)
|
||||
viewer.bed.setBedColor(this.gridColor)
|
||||
viewer.setCursorVisiblity(this.showCursor)
|
||||
viewer.setZClipPlane(1000000, -1000000)
|
||||
viewer.axes.show(this.showAxes)
|
||||
@@ -359,6 +397,7 @@ export default class Viewer extends Mixins(BaseMixin) {
|
||||
if (viewer) {
|
||||
viewer.clearScene(true)
|
||||
this.loadedFile = null
|
||||
this.tracking = false
|
||||
}
|
||||
}
|
||||
|
||||
@@ -373,7 +412,6 @@ export default class Viewer extends Mixins(BaseMixin) {
|
||||
this.zSlider = this.maxZSlider
|
||||
this.loading = false
|
||||
viewer.setCursorVisiblity(this.showCursor)
|
||||
viewer.gcodeProcessor.updateFilePosition(viewer.fileSize)
|
||||
|
||||
if (this.loadedFile === this.sdCardFilePath && this.printing_objects.length) {
|
||||
let objects: any = []
|
||||
@@ -393,6 +431,8 @@ export default class Viewer extends Mixins(BaseMixin) {
|
||||
viewer.buildObjects.loadObjectBoundaries(objects)
|
||||
viewer.buildObjects.showObjectSelection(this.showObjectSelection)
|
||||
}
|
||||
|
||||
viewer.gcodeProcessor.updateFilePosition(viewer.fileSize)
|
||||
}
|
||||
|
||||
async fileSelected(e: any) {
|
||||
@@ -521,7 +561,7 @@ export default class Viewer extends Mixins(BaseMixin) {
|
||||
if (newVal > 0 && this.printerIsPrinting && this.tracking && newVal > offset) {
|
||||
viewer.gcodeProcessor.updateFilePosition(newVal - offset)
|
||||
} else {
|
||||
viewer.gcodeProcessor.updateFilePosition(0)
|
||||
viewer.gcodeProcessor.updateFilePosition(viewer.fileSize)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -529,6 +569,8 @@ export default class Viewer extends Mixins(BaseMixin) {
|
||||
async trackingChanged(newVal: boolean) {
|
||||
if (!viewer) return
|
||||
if (newVal) {
|
||||
//Set zSlider to max value
|
||||
this.zSlider = this.maxZSlider
|
||||
//Force renderers reload.
|
||||
viewer.gcodeProcessor.updateFilePosition(0)
|
||||
viewer?.forceRender()
|
||||
@@ -688,8 +730,7 @@ export default class Viewer extends Mixins(BaseMixin) {
|
||||
if (viewer && colors.length) {
|
||||
viewer.gcodeProcessor.resetTools()
|
||||
colors.forEach((color: string) => {
|
||||
//Todo get nozzle size
|
||||
viewer.gcodeProcessor.addTool(color, 0.4) //Default the nozzle to 0.4 for now.
|
||||
viewer.gcodeProcessor.addTool(color, this.nozzle_diameter)
|
||||
})
|
||||
this.setReloadRequiredFlag()
|
||||
}
|
||||
@@ -709,11 +750,11 @@ export default class Viewer extends Mixins(BaseMixin) {
|
||||
{text: 'Feature', value: 2},
|
||||
]
|
||||
|
||||
get colorMode(): string {
|
||||
return this.$store.state.gui.gcodeViewer.colorMode ?? 2
|
||||
get colorMode(): number {
|
||||
return this.$store.state.gui.gcodeViewer?.colorMode ?? 2
|
||||
}
|
||||
|
||||
set colorMode(newVal: string) {
|
||||
set colorMode(newVal: number) {
|
||||
this.$store.dispatch('gui/saveSetting', {name: 'gcodeViewer.colorMode', value: newVal})
|
||||
|
||||
if (viewer) {
|
||||
@@ -725,7 +766,7 @@ export default class Viewer extends Mixins(BaseMixin) {
|
||||
}
|
||||
|
||||
get backgroundColor() {
|
||||
return this.$store.state.gui.gcodeViewer?.backgroundColor ?? '#000000'
|
||||
return this.$store.state.gui.gcodeViewer?.backgroundColor ?? '#121212'
|
||||
}
|
||||
|
||||
@Watch('backgroundColor')
|
||||
@@ -735,7 +776,7 @@ export default class Viewer extends Mixins(BaseMixin) {
|
||||
}
|
||||
|
||||
get gridColor() {
|
||||
return this.$store.state.gui.gcodeViewer?.gridColor ?? '#000000'
|
||||
return this.$store.state.gui.gcodeViewer?.gridColor ?? '#B3B3B3'
|
||||
}
|
||||
|
||||
@Watch('gridColor')
|
||||
|
||||
@@ -1,33 +1,73 @@
|
||||
<style scoped>
|
||||
._spin_button_group {
|
||||
width: 24px;
|
||||
margin: -6px -6px 0 -6px;
|
||||
}
|
||||
</style>
|
||||
|
||||
<template>
|
||||
<form v-on:submit.prevent="sendCmd">
|
||||
<v-text-field
|
||||
v-model="value"
|
||||
class="d-flex align-center"
|
||||
@click:append="resetLimit"
|
||||
@blur="value = target"
|
||||
:label="label"
|
||||
:suffix="unit"
|
||||
:append-icon="this.value !== this.defaultValue ? 'mdi-refresh' : ''"
|
||||
:error="this.value < 0"
|
||||
:append-icon="value !== defaultValue ? 'mdi-restart' : ''"
|
||||
:error="error = ((value < min) || ((value > max) && max !== null))"
|
||||
:step="step"
|
||||
:min="min"
|
||||
:max="max"
|
||||
:dec="dec"
|
||||
type="number"
|
||||
min="0"
|
||||
hide-spin-buttons
|
||||
hide-details
|
||||
outlined
|
||||
dense
|
||||
></v-text-field>
|
||||
>
|
||||
<template v-if="hasSpinner" v-slot:append-outer>
|
||||
<div class="_spin_button_group">
|
||||
<v-btn
|
||||
@click="increment"
|
||||
:disabled="((value >= max) && max !== null) || error"
|
||||
class="mt-n3"
|
||||
icon plain small
|
||||
>
|
||||
<v-icon>mdi-chevron-up</v-icon>
|
||||
</v-btn>
|
||||
<v-btn
|
||||
@click="decrement"
|
||||
:disabled="(value <= min) || error"
|
||||
class="mb-n3"
|
||||
icon plain small
|
||||
>
|
||||
<v-icon>mdi-chevron-down</v-icon>
|
||||
</v-btn>
|
||||
</div>
|
||||
</template>
|
||||
</v-text-field>
|
||||
</form>
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import Component from 'vue-class-component'
|
||||
import {Mixins, Prop, Watch} from 'vue-property-decorator'
|
||||
import {Debounce} from 'vue-debounce-decorator'
|
||||
import BaseMixin from '@/components/mixins/base'
|
||||
|
||||
@Component
|
||||
export default class FirmwareRetractionSettingsInput extends Mixins(BaseMixin) {
|
||||
private value: any = 0
|
||||
private value: number = 0
|
||||
private error: boolean | undefined
|
||||
|
||||
@Prop({ type: String, required: true }) readonly label!: string
|
||||
@Prop({ type: Number, required: false }) readonly step!: string
|
||||
@Prop({ type: Number, required: false , default: 1 }) readonly step!: number
|
||||
@Prop({ type: Boolean, required: false , default: false }) readonly hasSpinner!: number
|
||||
@Prop({ type: Number, required: false , default: 1 }) readonly spinnerFactor!: number
|
||||
@Prop({ type: Number, required: true , default: 0 }) readonly min!: number
|
||||
@Prop({ type: Number, default: null }) readonly max!: number | null
|
||||
@Prop({ type: Number, required: true , default: 0 }) readonly dec!: number
|
||||
@Prop({ type: Number, required: true, default: 0 }) readonly target!: number
|
||||
@Prop({ type: Number, required: true, default: 0 }) readonly defaultValue!: number
|
||||
@Prop({ type: String, required: true }) readonly attributeName!: string
|
||||
@@ -42,14 +82,25 @@ export default class FirmwareRetractionSettingsInput extends Mixins(BaseMixin) {
|
||||
this.value = this.target
|
||||
}
|
||||
|
||||
resetLimit() {
|
||||
resetLimit(): void {
|
||||
this.value = this.defaultValue
|
||||
|
||||
this.sendCmd()
|
||||
}
|
||||
|
||||
sendCmd() {
|
||||
const gcode = 'SET_RETRACTION ' + this.attributeName + '=' + Math.max(0, this.value).toFixed(2)
|
||||
decrement(): void {
|
||||
this.value = (this.value > this.min) ? Math.round((this.value - this.step * this.spinnerFactor) * (10 ** this.dec)) / (10 ** this.dec) : this.min
|
||||
this.sendCmd()
|
||||
}
|
||||
|
||||
increment(): void {
|
||||
this.value = (this.value < this.max! || this.max === null) ? Math.round((this.value + this.step * this.spinnerFactor) * (10 ** this.dec)) / (10 ** this.dec) : this.max
|
||||
this.sendCmd()
|
||||
}
|
||||
|
||||
@Debounce(500)
|
||||
sendCmd(): void {
|
||||
const gcode = 'SET_RETRACTION ' + this.attributeName + '=' + Math.max(this.min, this.value).toFixed(this.dec)
|
||||
this.$store.dispatch('server/addEvent', {message: gcode, type: 'command'})
|
||||
this.$socket.emit('printer.gcode.script', {script: gcode})
|
||||
}
|
||||
|
||||
@@ -47,6 +47,7 @@
|
||||
dense
|
||||
clearable
|
||||
clear-icon="mdi-refresh"
|
||||
@keyup.enter="sendWithParams"
|
||||
></v-text-field>
|
||||
</v-col>
|
||||
</v-row>
|
||||
@@ -68,7 +69,7 @@
|
||||
import Component from 'vue-class-component'
|
||||
import {Mixins, Prop, Watch} from 'vue-property-decorator'
|
||||
import BaseMixin from '@/components/mixins/base'
|
||||
import {GuiMacrogroupsStateMacrogroupMacro} from '@/store/gui/macrogroups/types'
|
||||
import {GuiMacrosStateMacrogroupMacro} from '@/store/gui/macros/types'
|
||||
|
||||
interface param {
|
||||
type: 'int' | 'double' | 'string' | null,
|
||||
@@ -85,7 +86,7 @@ export default class MacroButton extends Mixins(BaseMixin) {
|
||||
private paramArray: string[] = []
|
||||
private params: params = {}
|
||||
|
||||
@Prop({ required: true }) readonly macro!: GuiMacrogroupsStateMacrogroupMacro
|
||||
@Prop({ required: true }) readonly macro!: GuiMacrosStateMacrogroupMacro
|
||||
@Prop({ default: 'primary' }) readonly color!: string
|
||||
|
||||
get klipperMacro() {
|
||||
|
||||
@@ -106,11 +106,11 @@ export default class MiscellaneousSlider extends Mixins(BaseMixin) {
|
||||
}
|
||||
|
||||
get lockSliders() {
|
||||
return this.$store.state.gui.general.lockSlidersOnTouchDevices
|
||||
return this.$store.state.gui.uiSettings.lockSlidersOnTouchDevices
|
||||
}
|
||||
|
||||
get lockSlidersDelay() {
|
||||
return this.$store.state.gui.general.lockSlidersDelay
|
||||
return this.$store.state.gui.uiSettings.lockSlidersDelay
|
||||
}
|
||||
|
||||
@Debounce(500)
|
||||
|
||||
@@ -1,38 +1,75 @@
|
||||
<style scoped>
|
||||
|
||||
._spin_button_group {
|
||||
width: 24px;
|
||||
margin: -6px -6px 0 -6px;
|
||||
}
|
||||
</style>
|
||||
|
||||
<template>
|
||||
<form v-on:submit.prevent="sendCmd">
|
||||
<v-text-field
|
||||
v-model="value"
|
||||
class="d-flex align-center"
|
||||
@click:append="resetLimit"
|
||||
@blur="value = target"
|
||||
:label="label"
|
||||
:suffix="unit"
|
||||
v-model="value"
|
||||
:append-icon="value !== defaultValue ? 'mdi-restart' : ''"
|
||||
:error="error = ((value < min) || ((value > max) && max !== null))"
|
||||
:step="step"
|
||||
:min="min"
|
||||
:max="max"
|
||||
:dec="dec"
|
||||
type="number"
|
||||
hide-spin-buttons
|
||||
hide-details
|
||||
outlined
|
||||
dense
|
||||
:append-icon="this.value !== this.defaultValue ? 'mdi-refresh' : ''"
|
||||
:error="this.value <= 0"
|
||||
min="1"
|
||||
@click:append="resetLimit"
|
||||
hide-details
|
||||
></v-text-field>
|
||||
>
|
||||
<template v-if="hasSpinner" v-slot:append-outer>
|
||||
<div class="_spin_button_group">
|
||||
<v-btn
|
||||
@click="increment"
|
||||
:disabled="((value >= max) && max !== null) || error"
|
||||
class="mt-n3"
|
||||
icon plain small
|
||||
>
|
||||
<v-icon>mdi-chevron-up</v-icon>
|
||||
</v-btn>
|
||||
<v-btn
|
||||
@click="decrement"
|
||||
:disabled="(value <= min) || error"
|
||||
class="mb-n3"
|
||||
icon plain small
|
||||
>
|
||||
<v-icon>mdi-chevron-down</v-icon>
|
||||
</v-btn>
|
||||
</div>
|
||||
</template>
|
||||
</v-text-field>
|
||||
</form>
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import Component from 'vue-class-component'
|
||||
import {Mixins, Prop, Watch} from 'vue-property-decorator'
|
||||
import {Debounce} from 'vue-debounce-decorator'
|
||||
import BaseMixin from '@/components/mixins/base'
|
||||
|
||||
@Component
|
||||
export default class MotionSettingsInput extends Mixins(BaseMixin) {
|
||||
private value: any = 0
|
||||
private value: number = 0
|
||||
private error: boolean | undefined
|
||||
|
||||
@Prop({ type: String, required: true }) readonly label!: string
|
||||
@Prop({ type: Number, required: false , default: 1 }) readonly step!: number
|
||||
@Prop({ type: Boolean, required: false , default: false }) readonly hasSpinner!: number
|
||||
@Prop({ type: Number, required: false , default: 1 }) readonly spinnerFactor!: number
|
||||
@Prop({ type: Number, required: true , default: 0 }) readonly min!: number
|
||||
@Prop({ type: Number, default: null }) readonly max!: number | null
|
||||
@Prop({ type: Number, required: true , default: 0 }) readonly dec!: number
|
||||
@Prop({ type: Number, required: true, default: 0 }) readonly target!: number
|
||||
@Prop({ type: Number, required: true, default: 0 }) readonly defaultValue!: number
|
||||
@Prop({ type: Number, required: true, default: 100 }) readonly max!: number
|
||||
@Prop({ type: String, required: true }) readonly attributeName!: string
|
||||
@Prop({ type: String, required: true }) readonly unit!: string
|
||||
|
||||
@@ -45,14 +82,25 @@ export default class MotionSettingsInput extends Mixins(BaseMixin) {
|
||||
this.value = this.target
|
||||
}
|
||||
|
||||
resetLimit() {
|
||||
resetLimit(): void {
|
||||
this.value = this.defaultValue
|
||||
|
||||
this.sendCmd()
|
||||
}
|
||||
|
||||
sendCmd() {
|
||||
const gcode = 'SET_VELOCITY_LIMIT ' + this.attributeName + '=' + Math.max(1, this.value).toFixed(0)
|
||||
decrement(): void {
|
||||
this.value = (this.value > this.min) ? Math.round((this.value - this.step * this.spinnerFactor) * (10 ** this.dec)) / (10 ** this.dec) : this.min
|
||||
this.sendCmd()
|
||||
}
|
||||
|
||||
increment(): void {
|
||||
this.value = (this.value < this.max! || this.max === null) ? Math.round((this.value + this.step * this.spinnerFactor) * (10 ** this.dec)) / (10 ** this.dec) : this.max
|
||||
this.sendCmd()
|
||||
}
|
||||
|
||||
@Debounce(500)
|
||||
sendCmd(): void {
|
||||
const gcode = 'SET_VELOCITY_LIMIT ' + this.attributeName + '=' + Math.max(this.min, this.value).toFixed(this.dec)
|
||||
this.$store.dispatch('server/addEvent', {message: gcode, type: 'command'})
|
||||
this.$socket.emit('printer.gcode.script', {script: gcode})
|
||||
}
|
||||
|
||||
@@ -0,0 +1,111 @@
|
||||
<style scoped>
|
||||
._spin_button_group {
|
||||
width: 24px;
|
||||
margin: -6px -6px 0 -6px;
|
||||
}
|
||||
</style>
|
||||
|
||||
<template>
|
||||
<form v-on:submit.prevent="sendCmd">
|
||||
<v-text-field
|
||||
v-model="value"
|
||||
class="d-flex align-center"
|
||||
@click:append="resetLimit"
|
||||
@blur="value = target"
|
||||
:label="label"
|
||||
:suffix="unit"
|
||||
:append-icon="value !== defaultValue ? 'mdi-restart' : ''"
|
||||
:error="error = ((value < min) || ((value > max) && max !== null))"
|
||||
:step="step"
|
||||
:min="min"
|
||||
:max="max"
|
||||
:dec="dec"
|
||||
type="number"
|
||||
hide-spin-buttons
|
||||
hide-details
|
||||
outlined
|
||||
dense
|
||||
>
|
||||
<template v-if="hasSpinner" v-slot:append-outer>
|
||||
<div class="_spin_button_group">
|
||||
<v-btn
|
||||
@click="increment"
|
||||
:disabled="((value >= max) && max !== null) || error"
|
||||
class="mt-n3"
|
||||
icon plain small
|
||||
>
|
||||
<v-icon>mdi-chevron-up</v-icon>
|
||||
</v-btn>
|
||||
<v-btn
|
||||
@click="decrement"
|
||||
:disabled="(value <= min) || error"
|
||||
class="mb-n3"
|
||||
icon plain small
|
||||
>
|
||||
<v-icon>mdi-chevron-down</v-icon>
|
||||
</v-btn>
|
||||
</div>
|
||||
</template>
|
||||
</v-text-field>
|
||||
</form>
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import Component from 'vue-class-component'
|
||||
import {Mixins, Prop, Watch} from 'vue-property-decorator'
|
||||
import {Debounce} from 'vue-debounce-decorator'
|
||||
import BaseMixin from '@/components/mixins/base'
|
||||
|
||||
@Component
|
||||
export default class PressureAdvanceSettingsInput extends Mixins(BaseMixin) {
|
||||
private value: number = 0
|
||||
private error: boolean | undefined
|
||||
|
||||
@Prop({ type: String, required: true }) readonly label!: string
|
||||
@Prop({ type: Number, required: false , default: 1 }) readonly step!: number
|
||||
@Prop({ type: Boolean, required: false , default: false }) readonly hasSpinner!: number
|
||||
@Prop({ type: Number, required: false , default: 1 }) readonly spinnerFactor!: number
|
||||
@Prop({ type: Number, required: true , default: 0 }) readonly min!: number
|
||||
@Prop({ type: Number, default: null }) readonly max!: number | null
|
||||
@Prop({ type: Number, required: true , default: 0 }) readonly dec!: number
|
||||
@Prop({ type: Number, required: true, default: 0 }) readonly target!: number
|
||||
@Prop({ type: Number, required: true, default: 0 }) readonly defaultValue!: number
|
||||
@Prop({ type: String, required: true, default: 'extruder'}) readonly extruder!: string
|
||||
@Prop({ type: String, required: true }) readonly attributeName!: string
|
||||
@Prop({ type: String, required: true }) readonly unit!: string
|
||||
|
||||
@Watch('target')
|
||||
targetChanged(newVal: number): void {
|
||||
this.value = newVal
|
||||
}
|
||||
|
||||
created(): void {
|
||||
this.value = this.target
|
||||
}
|
||||
|
||||
resetLimit(): void {
|
||||
this.value = this.defaultValue
|
||||
|
||||
this.sendCmd()
|
||||
}
|
||||
|
||||
decrement(): void {
|
||||
this.value = (this.value > this.min) ? Math.round((this.value - this.step * this.spinnerFactor) * (10 ** this.dec)) / (10 ** this.dec) : this.min
|
||||
this.sendCmd()
|
||||
}
|
||||
|
||||
increment(): void {
|
||||
this.value = (this.value < this.max! || this.max === null) ? Math.round((this.value + this.step * this.spinnerFactor) * (10 ** this.dec)) / (10 ** this.dec) : this.max
|
||||
this.sendCmd()
|
||||
}
|
||||
|
||||
@Debounce(500)
|
||||
sendCmd(): void {
|
||||
const gcode = 'SET_PRESSURE_ADVANCE ' + 'EXTRUDER=' + this.extruder + ' '
|
||||
+ this.attributeName + '=' + Math.max(this.min, this.value).toFixed(this.dec)
|
||||
this.$store.dispatch('server/addEvent', {message: gcode, type: 'command'})
|
||||
this.$socket.emit('printer.gcode.script', {script: gcode})
|
||||
}
|
||||
|
||||
}
|
||||
</script>
|
||||
@@ -26,8 +26,13 @@
|
||||
:items="items"
|
||||
item-text="value"
|
||||
type="number"
|
||||
@change="setTemps"
|
||||
></v-combobox>
|
||||
@keyup.enter="setTemps"
|
||||
@keydown.tab="setTemps"
|
||||
@change="changeValue"
|
||||
@blur="onBlur"
|
||||
hide-spin-buttons
|
||||
>
|
||||
</v-combobox>
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
@@ -47,17 +52,30 @@ export default class ToolInput extends Mixins(BaseMixin) {
|
||||
@Prop({ type: String, required: true }) readonly attributeName!: string
|
||||
@Prop({ type: Array, default: [] }) items!: number[]
|
||||
|
||||
changeValue(newVal: any) {
|
||||
if (typeof newVal === 'object') {
|
||||
this.setTemps()
|
||||
}
|
||||
}
|
||||
|
||||
onBlur(event: any) {
|
||||
if ('target' in event && event.target && 'value' in event.target) {
|
||||
this.value = event.target.value ?? this.value
|
||||
this.setTemps()
|
||||
}
|
||||
}
|
||||
|
||||
setTemps(): void {
|
||||
if (typeof this.value === 'object') this.value = this.value.value ?? 0
|
||||
if (this.value === '') this.value = 0
|
||||
if (this.value === null) this.value = 0
|
||||
|
||||
if (this.value > this.max_temp) {
|
||||
this.value = { value: this.target, text: this.target }
|
||||
this.$toast.error('Temperature too high for '+this.name+'! (max: '+this.max_temp+')')
|
||||
this.$toast.error(this.$t('Panels.ToolsPanel.TempTooHigh', { name: this.name, max: this.max_temp })+'')
|
||||
} else if (this.value < this.min_temp && this.value != 0) {
|
||||
this.value = { value: this.target, text: this.target }
|
||||
this.$toast.error('Temperature too low for '+this.name+'! (min: '+this.min_temp+')')
|
||||
} else {
|
||||
this.$toast.error(this.$t('Panels.ToolsPanel.TempTooLow', { name: this.name, min: this.min_temp })+'')
|
||||
} else if (this.target !== parseFloat(this.value)) {
|
||||
const gcode = this.command+' '+this.attributeName+'='+this.name+' TARGET='+this.value
|
||||
this.$store.dispatch('server/addEvent', { message: gcode, type: 'command' })
|
||||
this.$socket.emit('printer.gcode.script', { script: gcode })
|
||||
|
||||
@@ -20,6 +20,9 @@
|
||||
{{ isLocked ? 'mdi-lock-outline' : 'mdi-lock-open-variant-outline' }}
|
||||
</v-icon>
|
||||
</v-btn>
|
||||
<v-icon small :class="'mr-2'">
|
||||
{{ icon }}
|
||||
</v-icon>
|
||||
<span>{{ label }}</span>
|
||||
<v-btn
|
||||
v-if="value !== defaultValue"
|
||||
@@ -80,6 +83,7 @@ export default class ToolSlider extends Mixins(BaseMixin) {
|
||||
@Prop({ type: String, required: true }) readonly command!: string
|
||||
@Prop({ type: String, default: '' }) readonly attributeName!: string
|
||||
@Prop({ type: String, default: '' }) readonly label!: string
|
||||
@Prop({ type: String, default: '' }) readonly icon!: string
|
||||
@Prop({ type: String, default: '%' }) readonly unit!: string
|
||||
@Prop({ type: Number, default: 1 }) readonly attributeScale!: number
|
||||
@Prop({ type: Number, default: 0 }) readonly min!: number
|
||||
@@ -115,11 +119,11 @@ export default class ToolSlider extends Mixins(BaseMixin) {
|
||||
}
|
||||
|
||||
get lockSliders() {
|
||||
return this.$store.state.gui.general.lockSlidersOnTouchDevices
|
||||
return this.$store.state.gui.uiSettings.lockSlidersOnTouchDevices
|
||||
}
|
||||
|
||||
get lockSlidersDelay() {
|
||||
return this.$store.state.gui.general.lockSlidersDelay
|
||||
return this.$store.state.gui.uiSettings.lockSlidersDelay
|
||||
}
|
||||
|
||||
get colorBar() {
|
||||
|
||||
@@ -41,7 +41,9 @@ export default class BaseMixin extends Vue {
|
||||
}
|
||||
|
||||
get printer_state(): string {
|
||||
return this.$store.state.printer.print_stats?.state ?? ''
|
||||
const printer_state = this.$store.state.printer.print_stats?.state ?? ''
|
||||
const timelapse_pause = this.$store.state.printer['gcode_macro TIMELAPSE_TAKE_FRAME']?.is_paused ?? false
|
||||
return (printer_state === 'paused' && timelapse_pause) ? 'printing' : printer_state
|
||||
}
|
||||
|
||||
get isMobile() {
|
||||
@@ -61,7 +63,8 @@ export default class BaseMixin extends Vue {
|
||||
}
|
||||
|
||||
get isTouchDevice() {
|
||||
return (('ontouchstart' in window) || (navigator.maxTouchPoints > 0))
|
||||
// ignore if browser reports maxTouchPoints === 256, can happen on Windows 10
|
||||
return (('ontouchstart' in window) || (navigator.maxTouchPoints > 0 && navigator.maxTouchPoints !== 256))
|
||||
}
|
||||
|
||||
get moonrakerComponents() {
|
||||
|
||||
@@ -13,11 +13,11 @@ export default class ControlMixin extends Vue {
|
||||
}
|
||||
|
||||
get feedrateXY() {
|
||||
return this.$store.state.gui.dashboard?.control?.feedrateXY ?? 100
|
||||
return this.$store.state.gui.control?.feedrateXY ?? 100
|
||||
}
|
||||
|
||||
get feedrateZ() {
|
||||
return this.$store.state.gui.dashboard?.control?.feedrateZ ?? 10
|
||||
return this.$store.state.gui.control?.feedrateZ ?? 10
|
||||
}
|
||||
|
||||
get existsQGL() {
|
||||
|
||||
@@ -2,17 +2,22 @@ import Component from 'vue-class-component'
|
||||
import BaseMixin from '@/components/mixins/base'
|
||||
import {allDashboardPanels} from '@/store/variables'
|
||||
import {capitalize} from '@/plugins/helpers'
|
||||
import {GuiMacrogroupsStateMacrogroup} from '@/store/gui/macrogroups/types'
|
||||
import {GuiMacrosStateMacrogroup} from '@/store/gui/macros/types'
|
||||
|
||||
@Component
|
||||
export default class DashboardMixin extends BaseMixin {
|
||||
|
||||
get macroMode() {
|
||||
return this.$store.state.gui.dashboard.macroManagement ?? 'simple'
|
||||
return this.$store.state.gui.macros.mode ?? 'simple'
|
||||
}
|
||||
|
||||
get macrogroups() {
|
||||
return this.$store.getters['gui/macrogroups/getAllMacrogroups'] ?? []
|
||||
return this.$store.getters['gui/macros/getAllMacrogroups'] ?? []
|
||||
}
|
||||
|
||||
|
||||
get webcams() {
|
||||
return this.$store.getters['gui/webcams/getWebcams'] ?? []
|
||||
}
|
||||
|
||||
get missingPanelsMobile() {
|
||||
@@ -55,19 +60,25 @@ export default class DashboardMixin extends BaseMixin {
|
||||
let allPanels = [...allDashboardPanels]
|
||||
const missingPanels: any[] = []
|
||||
|
||||
// remove macros panel and add macrogroups panels if macroMode === expert
|
||||
if (this.macroMode === 'expert') {
|
||||
this.macrogroups.forEach((group: GuiMacrogroupsStateMacrogroup) => {
|
||||
this.macrogroups.forEach((group: GuiMacrosStateMacrogroup) => {
|
||||
allPanels.push('macrogroup_'+group.id)
|
||||
})
|
||||
|
||||
allPanels = allPanels.filter((name) => name !== 'macros')
|
||||
}
|
||||
|
||||
// remove webcam panel, if no webcam exists
|
||||
if (this.webcams.length === 0) {
|
||||
allPanels = allPanels.filter((name) => name !== 'webcam')
|
||||
}
|
||||
|
||||
allPanels.forEach((panelname) => {
|
||||
if (!panels.find((panel) => panel.name === panelname))
|
||||
missingPanels.push({
|
||||
name: panelname,
|
||||
visable: true
|
||||
visible: true
|
||||
})
|
||||
})
|
||||
|
||||
@@ -77,7 +88,7 @@ export default class DashboardMixin extends BaseMixin {
|
||||
getPanelName(name: string) {
|
||||
if (name.startsWith('macrogroup_')) {
|
||||
const groupId = name.split('_')[1] ?? ''
|
||||
const group = this.macrogroups.find((group: GuiMacrogroupsStateMacrogroup) => group.id === groupId)
|
||||
const group = this.macrogroups.find((group: GuiMacrosStateMacrogroup) => group.id === groupId)
|
||||
|
||||
return (group) ? group.name : 'Macrogroup'
|
||||
}
|
||||
|
||||
@@ -52,7 +52,7 @@ import Panel from '@/components/ui/Panel.vue'
|
||||
})
|
||||
export default class ControlPanel extends Mixins(BaseMixin) {
|
||||
get controlStyle() {
|
||||
return this.$store.state.gui.dashboard.control.style ?? 'bars'
|
||||
return this.$store.state.gui.control.style ?? 'bars'
|
||||
}
|
||||
|
||||
get existsExtruder() {
|
||||
|
||||
@@ -55,19 +55,19 @@ import ControlMixin from '@/components/mixins/control'
|
||||
@Component
|
||||
export default class ControlPanelBarsControl extends Mixins(BaseMixin, ControlMixin) {
|
||||
get stepsXYsorted() {
|
||||
return [...this.$store.state.gui.dashboard.control.stepsXY].sort(function(a, b) { return b-a })
|
||||
return [...this.$store.state.gui.control.stepsXY].sort(function(a, b) { return b-a })
|
||||
}
|
||||
|
||||
get stepsXYsortedReverse() {
|
||||
return [...this.$store.state.gui.dashboard.control.stepsXY].sort(function(a, b) { return a-b })
|
||||
return [...this.$store.state.gui.control.stepsXY].sort(function(a, b) { return a-b })
|
||||
}
|
||||
|
||||
get stepsZsorted() {
|
||||
return [...this.$store.state.gui.dashboard.control.stepsZ].sort(function(a, b) { return b-a })
|
||||
return [...this.$store.state.gui.control.stepsZ].sort(function(a, b) { return b-a })
|
||||
}
|
||||
|
||||
get stepsZsortedReverse() {
|
||||
return [...this.$store.state.gui.dashboard.control.stepsZ].sort(function(a, b) { return a-b })
|
||||
return [...this.$store.state.gui.control.stepsZ].sort(function(a, b) { return a-b })
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -344,19 +344,19 @@ import ControlMixin from '@/components/mixins/control'
|
||||
@Component
|
||||
export default class ControlPanelCrossControl extends Mixins(BaseMixin, ControlMixin) {
|
||||
get reverseX() {
|
||||
return this.$store.state.gui.dashboard.control.reverseX
|
||||
return this.$store.state.gui.control.reverseX
|
||||
}
|
||||
|
||||
get reverseY() {
|
||||
return this.$store.state.gui.dashboard.control.reverseY
|
||||
return this.$store.state.gui.control.reverseY
|
||||
}
|
||||
|
||||
get reverseZ() {
|
||||
return this.$store.state.gui.dashboard.control.reverseZ
|
||||
return this.$store.state.gui.control.reverseZ
|
||||
}
|
||||
|
||||
get stepsXY() {
|
||||
const steps = this.$store.state.gui.dashboard?.control?.stepsCircleXY ?? []
|
||||
const steps = this.$store.state.gui.control?.stepsCircleXY ?? []
|
||||
|
||||
return Array.from(new Set([
|
||||
...(steps ?? []),
|
||||
@@ -364,7 +364,7 @@ export default class ControlPanelCrossControl extends Mixins(BaseMixin, ControlM
|
||||
}
|
||||
|
||||
get stepsZ() {
|
||||
const steps = this.$store.state.gui.dashboard?.control?.stepsCircleZ ?? []
|
||||
const steps = this.$store.state.gui.control?.stepsCircleZ ?? []
|
||||
|
||||
return Array.from(new Set([
|
||||
...(steps ?? []),
|
||||
|
||||
@@ -153,9 +153,9 @@
|
||||
</v-row>
|
||||
<v-row no-gutters class="mt-3">
|
||||
<v-col class="col-12">
|
||||
<v-btn-toggle v-if="stepsReversed.length > 0" dense no-gutters style="flex-wrap: nowrap; width: 100%;" v-model="selectedCrossStep">
|
||||
<v-btn dense class="btnMinWidthAuto flex-grow-1 px-0" v-for="steps of stepsReversed" :key="'all-'+steps">
|
||||
<span class="body-2">{{ steps }}</span>
|
||||
<v-btn-toggle v-if="stepsReversed.length > 0" dense no-gutters style="flex-wrap: nowrap; width: 100%;" v-model="selectedCrossStep" :key="'all-steps-'+stepsReversed.join('_')">
|
||||
<v-btn dense class="btnMinWidthAuto flex-grow-1 px-0" v-for="step of stepsReversed" :key="'step-'+step">
|
||||
<span class="body-2">{{ step }}</span>
|
||||
</v-btn>
|
||||
</v-btn-toggle>
|
||||
<div class="font-weight-bold warning rounded pa-2" v-else>
|
||||
@@ -177,27 +177,27 @@ export default class ControlPanelCrossControl extends Mixins(BaseMixin, ControlM
|
||||
private homeCols = 6
|
||||
|
||||
get selectedCrossStep() {
|
||||
return this.$store.state.gui.dashboard.control.selectedCrossStep
|
||||
return this.$store.state.gui.control.selectedCrossStep
|
||||
}
|
||||
|
||||
set selectedCrossStep(newVal) {
|
||||
this.$store.dispatch('gui/saveSetting', { name: 'dashboard.control.selectedCrossStep', value: newVal })
|
||||
this.$store.dispatch('gui/saveSetting', { name: 'control.selectedCrossStep', value: newVal })
|
||||
}
|
||||
|
||||
get reverseX() {
|
||||
return this.$store.state.gui.dashboard.control.reverseX
|
||||
return this.$store.state.gui.control.reverseX
|
||||
}
|
||||
|
||||
get reverseY() {
|
||||
return this.$store.state.gui.dashboard.control.reverseY
|
||||
return this.$store.state.gui.control.reverseY
|
||||
}
|
||||
|
||||
get reverseZ() {
|
||||
return this.$store.state.gui.dashboard.control.reverseZ
|
||||
return this.$store.state.gui.control.reverseZ
|
||||
}
|
||||
|
||||
get stepsAll() {
|
||||
return this.$store.state.gui.dashboard?.control?.stepsAll ?? []
|
||||
return this.$store.state.gui.control?.stepsAll ?? []
|
||||
}
|
||||
|
||||
get stepsReversed() {
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
<v-col class="col col-md-6 pt-2">
|
||||
<span class="text--disabled" style="font-size: .9em">{{ $t("Panels.ControlPanel.FeedrateIn") }} [mm/s]</span>
|
||||
<v-btn-toggle class="mt-1" dense no-gutters style="flex-wrap: nowrap; width: 100%;" >
|
||||
<v-tooltip top v-for="rate in feedratesSorted" v-bind:key="rate">
|
||||
<v-tooltip top v-for="rate in feedratesSorted" v-bind:key="rate" color="panel">
|
||||
<template v-slot:activator="{ on, attrs }">
|
||||
<v-btn v-bind="attrs" v-on="on" @click="setFeedrate(rate)" dense :class="(rate === currentFeedRate ? 'v-btn--active' : '') + ' btnMinWidthAuto flex-grow-1 px-0 _btnFeedrate'">{{ rate }}</v-btn>
|
||||
</template>
|
||||
@@ -48,8 +48,26 @@
|
||||
</v-row>
|
||||
<v-row class="">
|
||||
<v-col class="col text-center pt-0">
|
||||
<v-btn small @click="sendRetract()" class="mx-3" :loading="loadings.includes('btnRetract')" :disabled="!boolExtrudePossible"><v-icon small class="mr-1">mdi-arrow-up-bold</v-icon> {{ $t('Panels.ControlPanel.Retract') }}</v-btn>
|
||||
<v-btn small @click="sendDetract()" class="mx-3" :loading="loadings.includes('btnDetract')" :disabled="!boolExtrudePossible"><v-icon small class="mr-1">mdi-arrow-down-bold</v-icon> {{ $t('Panels.ControlPanel.Extrude') }}</v-btn>
|
||||
<v-tooltip top :disabled="boolExtrudePossible" color="panel">
|
||||
<template v-slot:activator="{ on }">
|
||||
<div v-on="on" class="d-inline-block">
|
||||
<v-btn small @click="sendRetract()" class="mx-3" :loading="loadings.includes('btnRetract')" :disabled="!boolExtrudePossible"><v-icon small class="mr-1">mdi-arrow-up-bold</v-icon> {{ $t('Panels.ControlPanel.Retract') }}</v-btn>
|
||||
</div>
|
||||
</template>
|
||||
<span>
|
||||
{{ $t("Panels.ControlPanel.HotendTooCold") }} {{ minExtrudeTemp }} °C
|
||||
</span>
|
||||
</v-tooltip>
|
||||
<v-tooltip top :disabled="boolExtrudePossible" color="panel">
|
||||
<template v-slot:activator="{ on }">
|
||||
<div v-on="on" class="d-inline-block">
|
||||
<v-btn small @click="sendDetract()" class="mx-3" :loading="loadings.includes('btnDetract')" :disabled="!boolExtrudePossible"><v-icon small class="mr-1">mdi-arrow-down-bold</v-icon> {{ $t('Panels.ControlPanel.Extrude') }}</v-btn>
|
||||
</div>
|
||||
</template>
|
||||
<span>
|
||||
{{ $t("Panels.ControlPanel.HotendTooCold") }} {{ minExtrudeTemp }} °C
|
||||
</span>
|
||||
</v-tooltip>
|
||||
</v-col>
|
||||
</v-row>
|
||||
</div>
|
||||
@@ -67,11 +85,11 @@ export default class ControlPanelExtruder extends Mixins(BaseMixin) {
|
||||
}
|
||||
|
||||
get feedamounts() {
|
||||
return this.$store.state.gui.dashboard?.extruder?.feedamounts ?? []
|
||||
return this.$store.state.gui.control.extruder?.feedamounts ?? []
|
||||
}
|
||||
|
||||
get feedrates() {
|
||||
return this.$store.state.gui.dashboard?.extruder?.feedrates ?? []
|
||||
return this.$store.state.gui.control.extruder?.feedrates ?? []
|
||||
}
|
||||
|
||||
get feedamountsSorted() {
|
||||
@@ -83,25 +101,29 @@ export default class ControlPanelExtruder extends Mixins(BaseMixin) {
|
||||
}
|
||||
|
||||
get currentFeedAmount() {
|
||||
return parseFloat(this.$store.state.gui.dashboard.extruder.feedamount)
|
||||
return parseFloat(this.$store.state.gui.control.extruder.feedamount)
|
||||
}
|
||||
|
||||
set currentFeedAmount(newVal) {
|
||||
this.$store.dispatch('gui/saveSetting', { name: 'dashboard.extruder.feedamount', value: newVal })
|
||||
this.$store.dispatch('gui/saveSetting', { name: 'control.extruder.feedamount', value: newVal })
|
||||
}
|
||||
|
||||
get currentFeedRate() {
|
||||
return parseFloat(this.$store.state.gui.dashboard.extruder.feedrate)
|
||||
return parseFloat(this.$store.state.gui.control.extruder.feedrate)
|
||||
}
|
||||
|
||||
set currentFeedRate(newVal) {
|
||||
this.$store.dispatch('gui/saveSetting', { name: 'dashboard.extruder.feedrate', value: newVal })
|
||||
this.$store.dispatch('gui/saveSetting', { name: 'control.extruder.feedrate', value: newVal })
|
||||
}
|
||||
|
||||
get boolExtrudePossible() {
|
||||
return this.$store.getters['printer/getExtrudePossible']
|
||||
}
|
||||
|
||||
get minExtrudeTemp() {
|
||||
return this.$store.state.printer.configfile.settings.extruder.min_extrude_temp
|
||||
}
|
||||
|
||||
doSend(gcode: string) {
|
||||
this.$store.dispatch('server/addEvent', { message: gcode, type: 'command' })
|
||||
this.$socket.emit('printer.gcode.script', { script: gcode })
|
||||
|
||||
@@ -33,8 +33,8 @@
|
||||
:loading="printer.socket.isConnecting"
|
||||
:toolbar-color="isCurrentPrinter ? 'primary' : ''"
|
||||
>
|
||||
<template v-slot:buttons v-if="printer.socket.isConnected && printer_webcams.length">
|
||||
<v-menu :offset-y="true" title="Webcam">
|
||||
<template v-slot:buttons>
|
||||
<v-menu :offset-y="true" title="Webcam" v-if="showWebcamSwitch">
|
||||
<template v-slot:activator="{ on, attrs }">
|
||||
<v-btn text v-bind="attrs" v-on="on">
|
||||
<v-icon small>mdi-webcam</v-icon>
|
||||
@@ -72,7 +72,7 @@
|
||||
>
|
||||
<div v-if="printer.socket.isConnected && currentCamId !== 'off' && currentWebcam" class="webcamContainer">
|
||||
<template v-if="'service' in currentWebcam && currentWebcam.service === 'mjpegstreamer'">
|
||||
<webcam-mjpegstreamer :cam-settings="currentWebcam"></webcam-mjpegstreamer>
|
||||
<webcam-mjpegstreamer :cam-settings="currentWebcam" :printer-url="printerUrl" :show-fps="false"></webcam-mjpegstreamer>
|
||||
</template>
|
||||
<template v-if="'service' in currentWebcam && currentWebcam.service === 'mjpegstreamer-adaptive'">
|
||||
<webcam-mjpegstreamer-adaptive :cam-settings="currentWebcam" :printer-url="printerUrl" :show-fps="false"></webcam-mjpegstreamer-adaptive>
|
||||
@@ -193,6 +193,10 @@ export default class FarmPrinterPanel extends Mixins(BaseMixin) {
|
||||
return this.$store.getters['farm/'+this.printer._namespace+'/getPrinterPreview']
|
||||
}
|
||||
|
||||
get showWebcamSwitch() {
|
||||
return (this.printer.socket.isConnected && this.printer_webcams.length > 0)
|
||||
}
|
||||
|
||||
get printer_webcams() {
|
||||
return this.$store.getters['farm/'+this.printer._namespace+'/getPrinterWebcams']
|
||||
}
|
||||
|
||||
@@ -16,10 +16,9 @@
|
||||
}
|
||||
|
||||
.dragzone {
|
||||
display: table;
|
||||
position: absolute;
|
||||
top: 0; left: 0;
|
||||
width: 100%; height: 100%;
|
||||
top: 0; left: 0; right: 0; bottom: 0;
|
||||
height: 100%;
|
||||
z-index: 9999999999;
|
||||
background-color: rgba(0, 0, 0, 0.5);
|
||||
transition: visibility 175ms, opacity 175ms;
|
||||
@@ -36,9 +35,7 @@
|
||||
}
|
||||
|
||||
.dragzone .textnode {
|
||||
display: table-cell;
|
||||
text-align: center;
|
||||
vertical-align: middle;
|
||||
transition: font-size 175ms;
|
||||
}
|
||||
</style>
|
||||
@@ -69,11 +66,11 @@
|
||||
style="max-width: 300px;"
|
||||
></v-text-field>
|
||||
<v-spacer></v-spacer>
|
||||
<input type="file" ref="fileUpload" style="display: none" multiple @change="uploadFile" />
|
||||
<input type="file" ref="fileUpload" :accept="validGcodeExtensions.join(', ')" style="display: none" multiple @change="uploadFile" />
|
||||
<v-btn @click="clickUploadButton" :title="$t('Files.UploadNewGcode')" class="primary--text px-2 minwidth-0 ml-3" :loading="loadings.includes('gcodeUpload')"><v-icon>mdi-upload</v-icon></v-btn>
|
||||
<v-btn @click="createDirectory" :title="$t('Files.CreateNewDirectory')" class="px-2 minwidth-0 ml-3"><v-icon>mdi-folder-plus</v-icon></v-btn>
|
||||
<v-btn @click="refreshFileList" :title="$t('Files.RefreshCurrentDirectory')" class="px-2 minwidth-0 ml-3"><v-icon>mdi-refresh</v-icon></v-btn>
|
||||
<v-menu :offset-y="true" :close-on-content-click="false" :title="$t('Files.SetupCurrentList')">
|
||||
<v-menu offset-y left :close-on-content-click="false" :title="$t('Files.SetupCurrentList')">
|
||||
<template v-slot:activator="{ on, attrs }">
|
||||
<v-btn class="px-2 minwidth-0 ml-3" v-bind="attrs" v-on="on"><v-icon>mdi-cog</v-icon></v-btn>
|
||||
</template>
|
||||
@@ -133,7 +130,7 @@
|
||||
:search="search"
|
||||
:custom-filter="advancedSearch"
|
||||
mobile-breakpoint="0"
|
||||
@pagination="refreshMetadata"
|
||||
@current-items="refreshMetadata"
|
||||
>
|
||||
|
||||
<template slot="items">
|
||||
@@ -212,6 +209,9 @@
|
||||
<td class="text-right" v-if="headers.find(header => header.value === 'modified').visible">{{ formatDate(item.modified) }}</td>
|
||||
<td class="text-no-wrap text-right" v-if="headers.find(header => header.value === 'object_height').visible">{{ item.object_height ? item.object_height.toFixed(2)+' mm' : '--' }}</td>
|
||||
<td class="text-no-wrap text-right" v-if="headers.find(header => header.value === 'layer_height').visible">{{ item.layer_height ? item.layer_height.toFixed(2)+' mm' : '--' }}</td>
|
||||
<td class="text-no-wrap text-right" v-if="headers.find(header => header.value === 'nozzle_diameter').visible">{{ item.nozzle_diameter ? item.nozzle_diameter.toFixed(2)+' mm' : '--' }}</td>
|
||||
<td class="text-no-wrap text-right" v-if="headers.find(header => header.value === 'filament_name').visible">{{ item.filament_name ? item.filament_name : '--' }}</td>
|
||||
<td class="text-no-wrap text-right" v-if="headers.find(header => header.value === 'filament_type').visible">{{ item.filament_type ? item.filament_type : '--' }}</td>
|
||||
<td class="text-no-wrap text-right" v-if="headers.find(header => header.value === 'filament_total').visible">{{ item.filament_total ? item.filament_total.toFixed()+' mm' : '--' }}</td>
|
||||
<td class="text-no-wrap text-right" v-if="headers.find(header => header.value === 'filament_weight_total').visible">{{ item.filament_weight_total ? item.filament_weight_total.toFixed(2)+' g' : '--' }}</td>
|
||||
<td class="text-no-wrap text-right" v-if="headers.find(header => header.value === 'estimated_time').visible">{{ formatPrintTime(item.estimated_time) }}</td>
|
||||
@@ -219,7 +219,7 @@
|
||||
</tr>
|
||||
</template>
|
||||
</v-data-table>
|
||||
<div class="dragzone" :style="'visibility: '+dropzone.visibility+'; opacity: '+dropzone.hidden">
|
||||
<div class="dragzone d-flex justify-center flex-column" :style="'visibility: '+dropzone.visibility+'; opacity: '+dropzone.hidden">
|
||||
<div class="textnode">{{ $t('Files.DropFilesToAddGcode')}}</div>
|
||||
</div>
|
||||
</panel>
|
||||
@@ -268,16 +268,16 @@
|
||||
<v-card-actions>
|
||||
<v-spacer></v-spacer>
|
||||
<v-btn color="" text @click="dialogPrintFile.show = false">{{ $t('Files.Cancel')}}</v-btn>
|
||||
<v-btn color="primary" text @click="startPrint(dialogPrintFile.item.filename)">{{$t('Files.StartPrint')}}</v-btn>
|
||||
<v-btn color="primary" text @click="startPrint(dialogPrintFile.item.filename)" :disabled="printerIsPrinting || !klipperReadyForGui">{{$t('Files.StartPrint')}}</v-btn>
|
||||
</v-card-actions>
|
||||
</v-card>
|
||||
</v-dialog>
|
||||
<v-menu v-model="contextMenu.shown" :position-x="contextMenu.x" :position-y="contextMenu.y" absolute offset-y>
|
||||
<v-list>
|
||||
<v-list-item @click="clickRow(contextMenu.item, true)" :disabled="['error', 'printing', 'paused'].includes(printer_state)" v-if="!contextMenu.item.isDirectory">
|
||||
<v-list-item @click="clickRow(contextMenu.item, true)" :disabled="printerIsPrinting || !klipperReadyForGui || !isGcodeFile(contextMenu.item)" v-if="!contextMenu.item.isDirectory">
|
||||
<v-icon class="mr-1">mdi-play</v-icon> {{ $t('Files.PrintStart')}}
|
||||
</v-list-item>
|
||||
<v-list-item @click="addToQueue(contextMenu.item)" v-if="!contextMenu.item.isDirectory && moonrakerComponents.includes('job_queue')">
|
||||
<v-list-item @click="addToQueue(contextMenu.item)" v-if="!contextMenu.item.isDirectory && moonrakerComponents.includes('job_queue')" :disabled="!isGcodeFile(contextMenu.item)">
|
||||
<v-icon class="mr-1">mdi-playlist-plus</v-icon> {{ $t('Files.AddToQueue')}}
|
||||
</v-list-item>
|
||||
<v-list-item
|
||||
@@ -292,6 +292,10 @@
|
||||
>
|
||||
<v-icon class="mr-1">mdi-fire</v-icon> {{ $t('Files.Preheat')}}
|
||||
</v-list-item>
|
||||
<v-list-item @click="view3D(contextMenu.item)" v-if="!contextMenu.item.isDirectory" :disabled="!isGcodeFile(contextMenu.item)">
|
||||
<v-icon class="mr-1">mdi-video-3d</v-icon>
|
||||
{{ $t('Files.View3D') }}
|
||||
</v-list-item>
|
||||
<v-list-item @click="downloadFile" v-if="!contextMenu.item.isDirectory">
|
||||
<v-icon class="mr-1">mdi-cloud-download</v-icon> {{ $t('Files.Download')}}
|
||||
</v-list-item>
|
||||
@@ -310,10 +314,6 @@
|
||||
<v-list-item @click="deleteDirectory(contextMenu.item)" v-if="contextMenu.item.isDirectory">
|
||||
<v-icon class="mr-1">mdi-delete</v-icon> {{ $t('Files.Delete')}}
|
||||
</v-list-item>
|
||||
<v-list-item @click="view3D(contextMenu.item)" v-if="!contextMenu.item.isDirectory">
|
||||
<v-icon class="mr-1">mdi-video-3d</v-icon>
|
||||
{{ $t('Files.View3D') }}
|
||||
</v-list-item>
|
||||
</v-list>
|
||||
</v-menu>
|
||||
<v-dialog v-model="dialogCreateDirectory.show" :max-width="400">
|
||||
@@ -470,7 +470,6 @@ export default class GcodefilesPanel extends Mixins(BaseMixin) {
|
||||
private search = ''
|
||||
private selected = []
|
||||
private hideHeaderColums = []
|
||||
private currentPath = 'gcodes'
|
||||
private dropzone = {
|
||||
visibility: 'hidden',
|
||||
opacity: 0,
|
||||
@@ -563,6 +562,14 @@ export default class GcodefilesPanel extends Mixins(BaseMixin) {
|
||||
(value: string) => value.indexOf(' ') === -1 || 'Name contains spaces!'
|
||||
]
|
||||
|
||||
get currentPath() {
|
||||
return this.$store.state.gui.view.gcodefiles.currentPath
|
||||
}
|
||||
|
||||
set currentPath(newVal) {
|
||||
this.$store.dispatch('gui/saveSettingWithoutUpload', { name: 'view.gcodefiles.currentPath', value: newVal })
|
||||
}
|
||||
|
||||
get headers() {
|
||||
const headers = [
|
||||
{ text: '', value: '', align: 'left', configable: false, visible: true, filterable: false },
|
||||
@@ -572,6 +579,9 @@ export default class GcodefilesPanel extends Mixins(BaseMixin) {
|
||||
{ text: this.$t('Files.LastModified'), value: 'modified', align: 'right', configable: true, visible: true },
|
||||
{ text: this.$t('Files.ObjectHeight'), value: 'object_height', align: 'right', configable: true, visible: true },
|
||||
{ text: this.$t('Files.LayerHeight'), value: 'layer_height', align: 'right', configable: true, visible: true },
|
||||
{ text: this.$t('Files.NozzleDiameter'), value: 'nozzle_diameter', align: 'right', configable: true, visible: true },
|
||||
{ text: this.$t('Files.FilamentName'), value: 'filament_name', align: 'right', configable: true, visible: true },
|
||||
{ text: this.$t('Files.FilamentType'), value: 'filament_type', align: 'right', configable: true, visible: true },
|
||||
{ text: this.$t('Files.FilamentUsage'), value: 'filament_total', align: 'right', configable: true, visible: true },
|
||||
{ text: this.$t('Files.FilamentWeight'), value: 'filament_weight_total', align: 'right', configable: true, visible: true },
|
||||
{ text: this.$t('Files.PrintTime'), value: 'estimated_time', align: 'right', configable: true, visible: true },
|
||||
@@ -628,55 +638,55 @@ export default class GcodefilesPanel extends Mixins(BaseMixin) {
|
||||
}
|
||||
|
||||
get hideMetadataColums() {
|
||||
return this.$store.state.gui.gcodefiles.hideMetadataColums
|
||||
return this.$store.state.gui.view.gcodefiles.hideMetadataColums
|
||||
}
|
||||
|
||||
set hideMetadataColums(newVal) {
|
||||
this.$store.dispatch('gui/saveSetting', { name: 'gcodefiles.hideMetadataColums', value: newVal })
|
||||
this.$store.dispatch('gui/saveSetting', { name: 'view.gcodefiles.hideMetadataColums', value: newVal })
|
||||
}
|
||||
|
||||
get showHiddenFiles() {
|
||||
return this.$store.state.gui.gcodefiles.showHiddenFiles
|
||||
return this.$store.state.gui.view.gcodefiles.showHiddenFiles
|
||||
}
|
||||
|
||||
set showHiddenFiles(newVal) {
|
||||
this.$store.dispatch('gui/saveSetting', { name: 'gcodefiles.showHiddenFiles', value: newVal })
|
||||
this.$store.dispatch('gui/saveSetting', { name: 'view.gcodefiles.showHiddenFiles', value: newVal })
|
||||
}
|
||||
|
||||
get showPrintedFiles() {
|
||||
return this.$store.state.gui.gcodefiles.showPrintedFiles
|
||||
return this.$store.state.gui.view.gcodefiles.showPrintedFiles
|
||||
}
|
||||
|
||||
set showPrintedFiles(newVal) {
|
||||
this.$store.dispatch('gui/saveSetting', { name: 'gcodefiles.showPrintedFiles', value: newVal })
|
||||
this.$store.dispatch('gui/saveSetting', { name: 'view.gcodefiles.showPrintedFiles', value: newVal })
|
||||
}
|
||||
|
||||
get sortBy() {
|
||||
return this.$store.state.gui.gcodefiles.sortBy
|
||||
return this.$store.state.gui.view.gcodefiles.sortBy
|
||||
}
|
||||
|
||||
set sortBy(newVal) {
|
||||
if (newVal === undefined) newVal = 'modified'
|
||||
|
||||
this.$store.dispatch('gui/saveSetting', { name: 'gcodefiles.sortBy', value: newVal })
|
||||
this.$store.dispatch('gui/saveSetting', { name: 'view.gcodefiles.sortBy', value: newVal })
|
||||
}
|
||||
|
||||
get sortDesc() {
|
||||
return this.$store.state.gui.gcodefiles.sortDesc
|
||||
return this.$store.state.gui.view.gcodefiles.sortDesc
|
||||
}
|
||||
|
||||
set sortDesc(newVal) {
|
||||
if (newVal === undefined) newVal = false
|
||||
|
||||
this.$store.dispatch('gui/saveSetting', { name: 'gcodefiles.sortDesc', value: newVal })
|
||||
this.$store.dispatch('gui/saveSetting', { name: 'view.gcodefiles.sortDesc', value: newVal })
|
||||
}
|
||||
|
||||
get countPerPage() {
|
||||
return this.$store.state.gui.gcodefiles.countPerPage
|
||||
return this.$store.state.gui.view.gcodefiles.countPerPage
|
||||
}
|
||||
|
||||
set countPerPage(newVal) {
|
||||
this.$store.dispatch('gui/saveSetting', { name: 'gcodefiles.countPerPage', value: newVal })
|
||||
this.$store.dispatch('gui/saveSetting', { name: 'view.gcodefiles.countPerPage', value: newVal })
|
||||
}
|
||||
|
||||
get timelapseEnabled() {
|
||||
@@ -727,11 +737,23 @@ export default class GcodefilesPanel extends Mixins(BaseMixin) {
|
||||
this.dropzone.opacity = 0
|
||||
|
||||
if (e.dataTransfer.files.length) {
|
||||
const files = [...e.dataTransfer.files].filter((file: File) => {
|
||||
const format = file.name.slice(file.name.lastIndexOf('.'))
|
||||
|
||||
if (!validGcodeExtensions.includes(format)) {
|
||||
this.$toast.error(this.$t('Files.WrongFileUploaded', { filename: file.name }).toString())
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
return true
|
||||
})
|
||||
|
||||
this.$store.dispatch('socket/addLoading', { name: 'gcodeUpload' })
|
||||
let successFiles = []
|
||||
this.uploadSnackbar.number = 0
|
||||
this.uploadSnackbar.max = e.dataTransfer.files.length
|
||||
for (const file of e.dataTransfer.files) {
|
||||
this.uploadSnackbar.max = files.length
|
||||
for (const file of files) {
|
||||
this.uploadSnackbar.number++
|
||||
const result = await this.doUploadFile(file)
|
||||
successFiles.push(result)
|
||||
@@ -879,14 +901,13 @@ export default class GcodefilesPanel extends Mixins(BaseMixin) {
|
||||
value.toString().toLowerCase().indexOf(search.toLowerCase()) !== -1
|
||||
}
|
||||
|
||||
refreshMetadata(data: any) {
|
||||
const items = sortFiles(this.files, [this.sortBy], [this.sortDesc])
|
||||
for (let i = data.pageStart; i < data.pageStop; i++) {
|
||||
if (items[i] && !items[i].isDirectory && !items[i].metadataPulled) {
|
||||
let filename = (this.currentPath+'/'+items[i].filename).substring(7)
|
||||
this.$socket.emit('server.files.metadata', { filename: filename }, { action: 'files/getMetadata' })
|
||||
}
|
||||
}
|
||||
refreshMetadata(data: FileStateFile[]) {
|
||||
const items = data.filter((file) => !file.isDirectory && !file.metadataRequested && !file.metadataPulled)
|
||||
items.forEach((file: FileStateFile) => {
|
||||
this.$store.dispatch('files/requestMetadata', {
|
||||
filename: (this.currentPath+'/'+file.filename)
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
created() {
|
||||
@@ -900,7 +921,9 @@ export default class GcodefilesPanel extends Mixins(BaseMixin) {
|
||||
thumb.height >= thumbnailSmallMin && thumb.height <= thumbnailSmallMax
|
||||
)
|
||||
|
||||
if (thumbnail && 'relative_path' in thumbnail) return this.apiUrl+'/server/files/'+this.currentPath+'/'+encodeURIComponent(thumbnail.relative_path)+'?timestamp='+item.modified.getTime()
|
||||
if (thumbnail && 'relative_path' in thumbnail) {
|
||||
return `${this.apiUrl}/server/files/${encodeURI(this.currentPath)}/${encodeURI(thumbnail.relative_path)}?timestamp=${item.modified.getTime()}`
|
||||
}
|
||||
}
|
||||
|
||||
return ''
|
||||
@@ -910,7 +933,9 @@ export default class GcodefilesPanel extends Mixins(BaseMixin) {
|
||||
if (item.thumbnails?.length) {
|
||||
const thumbnail = item.thumbnails.find(thumb => thumb.width >= thumbnailBigMin)
|
||||
|
||||
if (thumbnail && 'relative_path' in thumbnail) return this.apiUrl+'/server/files/'+this.currentPath+'/'+encodeURIComponent(thumbnail.relative_path)+'?timestamp='+item.modified.getTime()
|
||||
if (thumbnail && 'relative_path' in thumbnail) {
|
||||
return `${this.apiUrl}/server/files/${encodeURI(this.currentPath)}/${encodeURI(thumbnail.relative_path)}?timestamp=${item.modified.getTime()}`
|
||||
}
|
||||
}
|
||||
|
||||
return ''
|
||||
@@ -932,7 +957,7 @@ export default class GcodefilesPanel extends Mixins(BaseMixin) {
|
||||
|
||||
if (item.isDirectory) {
|
||||
this.currentPath += '/' + item.filename
|
||||
} else if (!['error', 'printing', 'paused'].includes(this.printer_state)) {
|
||||
} else if (!['error', 'printing', 'paused'].includes(this.printer_state) && this.isGcodeFile(item)) {
|
||||
this.dialogPrintFile.show = true
|
||||
this.dialogPrintFile.item = item
|
||||
}
|
||||
@@ -1008,13 +1033,14 @@ export default class GcodefilesPanel extends Mixins(BaseMixin) {
|
||||
root: 'gcodes',
|
||||
path: path !== '' ? '/'+path : '',
|
||||
filename: item.filename,
|
||||
size: item.size,
|
||||
permissions: item.permissions
|
||||
})
|
||||
}
|
||||
|
||||
downloadFile() {
|
||||
const filename = (this.currentPath+'/'+this.contextMenu.item.filename)
|
||||
const href = this.apiUrl + '/server/files/' + encodeURIComponent(filename)
|
||||
const href = this.apiUrl + '/server/files/' + encodeURI(filename)
|
||||
|
||||
window.open(href)
|
||||
}
|
||||
@@ -1100,6 +1126,12 @@ export default class GcodefilesPanel extends Mixins(BaseMixin) {
|
||||
})
|
||||
}
|
||||
|
||||
isGcodeFile(file: FileStateFile) {
|
||||
const format = file.filename.slice(file.filename.lastIndexOf('.'))
|
||||
|
||||
return validGcodeExtensions.includes(format)
|
||||
}
|
||||
|
||||
view3D(item: FileStateFile) {
|
||||
this.$router.push({path: '/viewer', query: {filename: this.currentPath + '/' + item.filename}})
|
||||
}
|
||||
|
||||
@@ -131,7 +131,7 @@
|
||||
<v-list-item @click="clickRow(contextMenu.item)">
|
||||
<v-icon class="mr-1">mdi-text-box-search</v-icon> {{ $t('History.Details') }}
|
||||
</v-list-item>
|
||||
<v-list-item @click="startPrint(contextMenu.item)" v-if="contextMenu.item.exists" :disabled="is_printing">
|
||||
<v-list-item @click="startPrint(contextMenu.item)" v-if="contextMenu.item.exists" :disabled="printerIsPrinting || !klipperReadyForGui">
|
||||
<v-icon class="mr-1">mdi-printer</v-icon> {{ $t('History.Reprint') }}
|
||||
</v-list-item>
|
||||
<v-list-item @click="deleteJob(contextMenu.item)">
|
||||
@@ -473,19 +473,19 @@ export default class HistoryListPanel extends Mixins(BaseMixin) {
|
||||
}
|
||||
|
||||
get countPerPage() {
|
||||
return this.$store.state.gui.history.countPerPage
|
||||
return this.$store.state.gui.view.historycountPerPage
|
||||
}
|
||||
|
||||
set countPerPage(newVal) {
|
||||
this.$store.dispatch('gui/saveSetting', { name: 'history.countPerPage', value: newVal })
|
||||
this.$store.dispatch('gui/saveSetting', { name: 'view.history.countPerPage', value: newVal })
|
||||
}
|
||||
|
||||
get hideColums() {
|
||||
return this.$store.state.gui.history.hideColums
|
||||
return this.$store.state.gui.view.history.hideColums
|
||||
}
|
||||
|
||||
set hideColums(newVal) {
|
||||
this.$store.dispatch('gui/saveSetting', { name: 'history.hideColums', value: newVal })
|
||||
this.$store.dispatch('gui/saveSetting', { name: 'view.history.hideColums', value: newVal })
|
||||
}
|
||||
|
||||
refreshHistory() {
|
||||
@@ -595,8 +595,9 @@ export default class HistoryListPanel extends Mixins(BaseMixin) {
|
||||
relative_url = item.filename.substr(0, item.filename.lastIndexOf('/')+1)
|
||||
}
|
||||
|
||||
if (thumbnail && 'relative_path' in thumbnail)
|
||||
return this.apiUrl+'/server/files/gcodes/'+relative_url+thumbnail.relative_path+'?timestamp='+item.metadata.modified
|
||||
if (thumbnail && 'relative_path' in thumbnail) {
|
||||
return `${this.apiUrl}/server/files/gcodes/${encodeURI(relative_url+thumbnail.relative_path)}?timestamp=${item.metadata.modified}`
|
||||
}
|
||||
}
|
||||
|
||||
return false
|
||||
@@ -616,7 +617,7 @@ export default class HistoryListPanel extends Mixins(BaseMixin) {
|
||||
}
|
||||
|
||||
if (thumbnail && 'relative_path' in thumbnail)
|
||||
return this.apiUrl+'/server/files/gcodes/'+relative_url+thumbnail.relative_path+'?timestamp='+item.metadata.modified
|
||||
return `${this.apiUrl}/server/files/gcodes/${encodeURI(relative_url+thumbnail.relative_path)}?timestamp=${item.metadata.modified}`
|
||||
}
|
||||
|
||||
return false
|
||||
|
||||
@@ -89,11 +89,11 @@ export default class HistoryStatisticsPanel extends Mixins(BaseMixin) {
|
||||
}
|
||||
|
||||
get toggleChart () {
|
||||
return this.$store.state.gui.history.toggleChartCol3
|
||||
return this.$store.state.gui.view.history.toggleChartCol3
|
||||
}
|
||||
|
||||
set toggleChart(newVal) {
|
||||
this.$store.dispatch('gui/saveSetting', { name: 'history.toggleChartCol3', value: newVal })
|
||||
this.$store.dispatch('gui/saveSetting', { name: 'view.history.toggleChartCol3', value: newVal })
|
||||
}
|
||||
|
||||
formatPrintTime(totalSeconds: number) {
|
||||
|
||||
@@ -8,17 +8,18 @@
|
||||
<template v-slot:buttons>
|
||||
<v-btn
|
||||
color="success"
|
||||
@click="resumeJobqueue"
|
||||
:loading="loadings.includes('resumeJobqueue')"
|
||||
@click="startJobqueue"
|
||||
:loading="loadings.includes('startJobqueue')"
|
||||
icon
|
||||
tile
|
||||
v-if="queueState === 'paused'"
|
||||
:disabled="!klipperReadyForGui"
|
||||
>
|
||||
<v-tooltip top>
|
||||
<template v-slot:activator="{ on, attrs }">
|
||||
<v-icon v-bind="attrs" v-on="on">mdi-play</v-icon>
|
||||
</template>
|
||||
<span>{{ $t('JobQueue.Resume') }}</span>
|
||||
<span>{{ $t('JobQueue.Start') }}</span>
|
||||
</v-tooltip>
|
||||
</v-btn>
|
||||
<v-btn
|
||||
@@ -136,11 +137,11 @@ export default class JobqueuePanel extends Mixins(BaseMixin) {
|
||||
}
|
||||
|
||||
get countPerPage() {
|
||||
return this.$store.state.gui.jobqueue.countPerPage
|
||||
return this.$store.state.gui.view.jobqueue.countPerPage
|
||||
}
|
||||
|
||||
set countPerPage(newVal) {
|
||||
this.$store.dispatch('gui/saveSetting', { name: 'jobqueue.countPerPage', value: newVal })
|
||||
this.$store.dispatch('gui/saveSetting', { name: 'view.jobqueue.countPerPage', value: newVal })
|
||||
}
|
||||
|
||||
refreshHistory() {
|
||||
@@ -190,8 +191,8 @@ export default class JobqueuePanel extends Mixins(BaseMixin) {
|
||||
this.$store.dispatch('server/jobQueue/deleteFromQueue', [item.job_id])
|
||||
}
|
||||
|
||||
resumeJobqueue() {
|
||||
this.$store.dispatch('server/jobQueue/resume')
|
||||
startJobqueue() {
|
||||
this.$store.dispatch('server/jobQueue/start')
|
||||
}
|
||||
|
||||
pauseJobqueue() {
|
||||
@@ -206,7 +207,7 @@ export default class JobqueuePanel extends Mixins(BaseMixin) {
|
||||
)
|
||||
const path = item.filename.lastIndexOf('/') !== -1 ? 'gcodes/'+item.filename.slice(0, item.filename.lastIndexOf('/')) : 'gcodes'
|
||||
|
||||
if (thumbnail && 'relative_path' in thumbnail) return this.apiUrl+'/server/files/'+path+'/'+encodeURIComponent(thumbnail.relative_path)+'?timestamp='+item.metadata?.modified.getTime()
|
||||
if (thumbnail && 'relative_path' in thumbnail) return this.apiUrl+'/server/files/'+path+'/'+encodeURI(thumbnail.relative_path)+'?timestamp='+item.metadata?.modified.getTime()
|
||||
}
|
||||
|
||||
return ''
|
||||
@@ -217,7 +218,7 @@ export default class JobqueuePanel extends Mixins(BaseMixin) {
|
||||
const thumbnail = item?.metadata?.thumbnails.find((thumb: any) => thumb.width >= thumbnailBigMin)
|
||||
const path = item.filename.lastIndexOf('/') !== -1 ? 'gcodes/'+item.filename.slice(0, item.filename.lastIndexOf('/')) : 'gcodes'
|
||||
|
||||
if (thumbnail && 'relative_path' in thumbnail) return this.apiUrl+'/server/files/'+path+'/'+encodeURIComponent(thumbnail.relative_path)+'?timestamp='+item.metadata?.modified.getTime()
|
||||
if (thumbnail && 'relative_path' in thumbnail) return this.apiUrl+'/server/files/'+path+'/'+encodeURI(thumbnail.relative_path)+'?timestamp='+item.metadata?.modified.getTime()
|
||||
}
|
||||
|
||||
return ''
|
||||
|
||||
@@ -6,9 +6,15 @@
|
||||
card-class="klippy-state-panel"
|
||||
>
|
||||
<template v-if="klippyIsConnected">
|
||||
<v-card-text class="py-1 mt-2">
|
||||
<v-card-text class="py-1 mt-2" v-if="klippy_message !== null">
|
||||
<pre style="white-space: pre-wrap;">{{ klippy_message }}</pre>
|
||||
</v-card-text>
|
||||
<v-card-text v-else class="text-center py-3">
|
||||
<v-progress-circular
|
||||
indeterminate
|
||||
color="primary"
|
||||
></v-progress-circular>
|
||||
</v-card-text>
|
||||
<v-divider class="mt-2"></v-divider>
|
||||
<v-card-actions class="justify-start">
|
||||
<v-btn small @click="restart" class="ml-2 error--text"><v-icon class="mr-sm-2">mdi-restart</v-icon>{{ $t('Panels.KlippyStatePanel.Restart') }}</v-btn>
|
||||
@@ -28,7 +34,7 @@
|
||||
|
||||
<script lang="ts">
|
||||
import Component from 'vue-class-component'
|
||||
import {Mixins, Watch} from 'vue-property-decorator'
|
||||
import {Mixins} from 'vue-property-decorator'
|
||||
import BaseMixin from '../mixins/base'
|
||||
import ConnectionStatus from '../ui/ConnectionStatus.vue'
|
||||
import Panel from '@/components/ui/Panel.vue'
|
||||
@@ -37,11 +43,10 @@ import Panel from '@/components/ui/Panel.vue'
|
||||
components: {Panel, ConnectionStatus}
|
||||
})
|
||||
export default class KlippyStatePanel extends Mixins(BaseMixin) {
|
||||
private timer: number | null = null
|
||||
|
||||
//private timer: number | null = null
|
||||
|
||||
get klippy_message() {
|
||||
return this.$store.state.server.klippy_message ?? ''
|
||||
return this.$store.state.server.klippy_message ?? null
|
||||
}
|
||||
|
||||
restart() {
|
||||
@@ -52,7 +57,7 @@ export default class KlippyStatePanel extends Mixins(BaseMixin) {
|
||||
this.$socket.emit('printer.firmware_restart', { }, { loading: 'firmwareRestart' })
|
||||
}
|
||||
|
||||
requestKlippyState() {
|
||||
/*requestKlippyState() {
|
||||
this.$socket.emit('printer.info', {}, { action: 'printer/getInfo' })
|
||||
}
|
||||
|
||||
@@ -68,6 +73,6 @@ export default class KlippyStatePanel extends Mixins(BaseMixin) {
|
||||
this.requestKlippyState()
|
||||
}, 2000)
|
||||
}
|
||||
}
|
||||
}*/
|
||||
}
|
||||
</script>
|
||||
@@ -16,6 +16,7 @@
|
||||
hide-details
|
||||
dense
|
||||
@change="changeRoot"
|
||||
attach
|
||||
></v-select>
|
||||
</v-col>
|
||||
<v-col class="col col-lg-auto pl-lg-0 text-right">
|
||||
@@ -34,7 +35,7 @@
|
||||
<span>{{ button.text }}</span>
|
||||
</v-tooltip>
|
||||
</v-btn>
|
||||
<v-menu :offset-y="true" :title="$t('Machine.ConfigFilesPanel.SetupCurrentList')">
|
||||
<v-menu offset-y left :title="$t('Machine.ConfigFilesPanel.SetupCurrentList')" attach>
|
||||
<template v-slot:activator="{ on, attrs }">
|
||||
<v-btn class="px-2 minwidth-0 ml-3" v-bind="attrs" v-on="on"><v-icon>mdi-cog</v-icon></v-btn>
|
||||
</template>
|
||||
@@ -293,6 +294,7 @@ import {formatDate, formatFilesize, sortFiles} from '@/plugins/helpers'
|
||||
import {FileStateFile} from '@/store/files/types'
|
||||
import axios from 'axios'
|
||||
import Panel from '@/components/ui/Panel.vue'
|
||||
import {hiddenRootDirectories} from '@/store/variables'
|
||||
|
||||
interface contextMenu {
|
||||
shown: boolean
|
||||
@@ -363,8 +365,6 @@ export default class ConfigFilesPanel extends Mixins(BaseMixin) {
|
||||
private selected = []
|
||||
private options = { }
|
||||
private currentPage = 1
|
||||
private currentPath = ''
|
||||
private root = 'config'
|
||||
private contextMenu: contextMenu = {
|
||||
shown: false,
|
||||
isDirectory: false,
|
||||
@@ -531,51 +531,67 @@ export default class ConfigFilesPanel extends Mixins(BaseMixin) {
|
||||
}
|
||||
|
||||
get countPerPage() {
|
||||
return this.$store.state.gui.settings.configfiles.countPerPage
|
||||
return this.$store.state.gui.view.configfiles.countPerPage
|
||||
}
|
||||
|
||||
set countPerPage(newVal) {
|
||||
this.$store.dispatch('gui/saveSetting', { name: 'settings.configfiles.countPerPage', value: newVal })
|
||||
this.$store.dispatch('gui/saveSetting', { name: 'view.configfiles.countPerPage', value: newVal })
|
||||
}
|
||||
|
||||
get showHiddenFiles() {
|
||||
return this.$store.state.gui.settings.configfiles.showHiddenFiles
|
||||
return this.$store.state.gui.view.configfiles.showHiddenFiles
|
||||
}
|
||||
|
||||
set showHiddenFiles(newVal) {
|
||||
this.$store.dispatch('gui/saveSetting', { name: 'settings.configfiles.showHiddenFiles', value: newVal })
|
||||
this.$store.dispatch('gui/saveSetting', { name: 'view.configfiles.showHiddenFiles', value: newVal })
|
||||
}
|
||||
|
||||
get hideBackupFiles() {
|
||||
return this.$store.state.gui.settings.configfiles.hideBackupFiles
|
||||
return this.$store.state.gui.view.configfiles.hideBackupFiles
|
||||
}
|
||||
|
||||
set hideBackupFiles(newVal) {
|
||||
this.$store.dispatch('gui/saveSetting', { name: 'settings.configfiles.hideBackupFiles', value: newVal })
|
||||
this.$store.dispatch('gui/saveSetting', { name: 'view.configfiles.hideBackupFiles', value: newVal })
|
||||
}
|
||||
|
||||
get sortBy() {
|
||||
return this.$store.state.gui.settings.configfiles.sortBy
|
||||
return this.$store.state.gui.view.configfiles.sortBy
|
||||
}
|
||||
|
||||
set sortBy(newVal) {
|
||||
if (newVal === undefined) newVal = 'filename'
|
||||
|
||||
this.$store.dispatch('gui/saveSetting', { name: 'settings.configfiles.sortBy', value: newVal })
|
||||
this.$store.dispatch('gui/saveSetting', { name: 'view.configfiles.sortBy', value: newVal })
|
||||
}
|
||||
|
||||
get sortDesc() {
|
||||
return this.$store.state.gui.settings.configfiles.sortDesc
|
||||
return this.$store.state.gui.view.configfiles.sortDesc
|
||||
}
|
||||
|
||||
set sortDesc(newVal) {
|
||||
if (newVal === undefined) newVal = false
|
||||
|
||||
this.$store.dispatch('gui/saveSetting', { name: 'settings.configfiles.sortDesc', value: newVal })
|
||||
this.$store.dispatch('gui/saveSetting', { name: 'view.configfiles.sortDesc', value: newVal })
|
||||
}
|
||||
|
||||
get registeredDirectories() {
|
||||
return this.$store.state.server.registered_directories.filter((dir: string) => dir !== 'gcodes').sort()
|
||||
return this.$store.state.server.registered_directories.filter((dir: string) => !hiddenRootDirectories.includes(dir)).sort()
|
||||
}
|
||||
|
||||
get root() {
|
||||
return this.$store.state.gui.view.configfiles.rootPath
|
||||
}
|
||||
|
||||
set root(newVal) {
|
||||
this.$store.dispatch('gui/saveSettingWithoutUpload', { name: 'view.configfiles.rootPath', value: newVal })
|
||||
}
|
||||
|
||||
get currentPath() {
|
||||
return this.$store.state.gui.view.configfiles.currentPath
|
||||
}
|
||||
|
||||
set currentPath(newVal) {
|
||||
this.$store.dispatch('gui/saveSettingWithoutUpload', { name: 'view.configfiles.currentPath', value: newVal })
|
||||
}
|
||||
|
||||
refreshFileList() {
|
||||
@@ -610,6 +626,7 @@ export default class ConfigFilesPanel extends Mixins(BaseMixin) {
|
||||
root: this.root,
|
||||
path: this.currentPath,
|
||||
filename: item.filename,
|
||||
size: item.size,
|
||||
permissions: item.permissions
|
||||
})
|
||||
}
|
||||
@@ -640,7 +657,7 @@ export default class ConfigFilesPanel extends Mixins(BaseMixin) {
|
||||
|
||||
downloadFile() {
|
||||
const filename = (this.absolutePath+'/'+this.contextMenu.item.filename)
|
||||
const href = this.apiUrl + '/server/files' + filename
|
||||
const href = `${this.apiUrl}/server/files${encodeURI(filename)}`
|
||||
window.open(href)
|
||||
}
|
||||
|
||||
|
||||
@@ -60,7 +60,14 @@ export default class EndstopPanel extends Mixins(BaseMixin) {
|
||||
public sortEndstops: any = {}
|
||||
|
||||
get endstops() {
|
||||
return this.$store.state.printer.endstops ?? {}
|
||||
const endstops = this.$store.state.printer.endstops ?? {}
|
||||
|
||||
return Object.keys(endstops).sort().reduce(
|
||||
(obj: any, key: string) => {
|
||||
obj[key] = endstops[key]
|
||||
return obj
|
||||
}, {}
|
||||
)
|
||||
}
|
||||
|
||||
get existProbe () {
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
</style>
|
||||
|
||||
<template>
|
||||
<div>
|
||||
<div v-if="klipperReadyForGui">
|
||||
<panel :title="$t('Machine.SystemPanel.SystemLoad')" icon="mdi-memory" card-class="machine-systemload-panel" :collapsible="true">
|
||||
<v-card-text class="px-0 py-2">
|
||||
<div v-for="(mcu, index) of mcus" v-bind:key="mcu.name">
|
||||
@@ -62,6 +62,7 @@
|
||||
<br />
|
||||
<span v-if="hostStats.version">{{ $t('Machine.SystemPanel.Version') }}: {{ hostStats.version }}<br /></span>
|
||||
<span v-if="hostStats.os">{{ $t('Machine.SystemPanel.Os') }}: {{ hostStats.os }}<br /></span>
|
||||
<span v-if="hostStats.release_info && hostStats.release_info.name !== '0.'">{{ $t('Machine.SystemPanel.Distro') }}: {{ hostStats.release_info.name }} {{ hostStats.release_info.version_id }} <span v-if="hostStats.release_info.codename">({{ hostStats.release_info.codename }})</span><br /></span>
|
||||
<span>{{ $t('Machine.SystemPanel.Load') }}: {{ hostStats.load }}</span>
|
||||
<span v-if="hostStats.memoryFormat">, {{ $t('Machine.SystemPanel.Memory') }}: {{ hostStats.memoryFormat }}</span>
|
||||
<template v-if="hostStats.tempSensor">
|
||||
@@ -172,6 +173,7 @@
|
||||
import {Component, Mixins} from 'vue-property-decorator'
|
||||
import BaseMixin from '../../mixins/base'
|
||||
import Panel from '@/components/ui/Panel.vue'
|
||||
import {caseInsensitiveSort} from '@/plugins/helpers'
|
||||
@Component({
|
||||
components: {Panel}
|
||||
})
|
||||
@@ -191,7 +193,9 @@ export default class SystemPanel extends Mixins(BaseMixin) {
|
||||
}
|
||||
|
||||
get mcus() {
|
||||
return this.$store.getters['printer/getMcus'] ?? []
|
||||
const mcus = this.$store.getters['printer/getMcus'] ?? []
|
||||
|
||||
return caseInsensitiveSort(mcus, 'name')
|
||||
}
|
||||
|
||||
get hostStats() {
|
||||
|
||||
@@ -314,6 +314,8 @@ export default class UpdatePanel extends Mixins(BaseMixin) {
|
||||
semver.gt(object.remote_version, object.version)
|
||||
) return 'primary'
|
||||
|
||||
if ((object.commits_behind ?? []).length) return 'primary'
|
||||
|
||||
if (
|
||||
'version' in object &&
|
||||
'remote_version' in object && (
|
||||
@@ -346,6 +348,8 @@ export default class UpdatePanel extends Mixins(BaseMixin) {
|
||||
semver.gt(object.remote_version, object.version)
|
||||
) return this.$t('Machine.UpdatePanel.Update')
|
||||
|
||||
if ((object.commits_behind ?? []).length) return this.$t('Machine.UpdatePanel.Update')
|
||||
|
||||
if (
|
||||
'version' in object &&
|
||||
'remote_version' in object && (
|
||||
@@ -378,6 +382,8 @@ export default class UpdatePanel extends Mixins(BaseMixin) {
|
||||
semver.gt(object.remote_version, object.version)
|
||||
) return 'progress-upload'
|
||||
|
||||
if ((object.commits_behind ?? []).length) return 'progress-upload'
|
||||
|
||||
if (
|
||||
'version' in object &&
|
||||
'remote_version' in object && (
|
||||
@@ -398,6 +404,8 @@ export default class UpdatePanel extends Mixins(BaseMixin) {
|
||||
if ('is_dirty' in object && object.is_dirty) return false
|
||||
|
||||
if (typeof object === 'object' && object !== false) {
|
||||
if ((object.commits_behind ?? []).length) return false
|
||||
|
||||
if (
|
||||
'version' in object &&
|
||||
'remote_version' in object &&
|
||||
@@ -411,8 +419,9 @@ export default class UpdatePanel extends Mixins(BaseMixin) {
|
||||
}
|
||||
|
||||
getVersionOutput(object: any) {
|
||||
const local_version = 'version' in object ? object.version : '?'
|
||||
const remote_version = 'remote_version' in object ? object.remote_version : '?'
|
||||
const local_version = object.version ?? '?'
|
||||
const remote_version = object.remote_version ?? '?'
|
||||
const commits_behind = object.commits_behind ?? []
|
||||
|
||||
let output = ''
|
||||
if ('remote_alias' in object && object.remote_alias !== 'origin') output += object.remote_alias
|
||||
@@ -425,6 +434,8 @@ export default class UpdatePanel extends Mixins(BaseMixin) {
|
||||
|
||||
if (semver.valid(remote_version) && semver.valid(local_version) && semver.gt(remote_version, local_version))
|
||||
output += local_version+' > '+remote_version
|
||||
else if (commits_behind.length)
|
||||
output += local_version+' > '+ this.$tc('Machine.UpdatePanel.CommitsAvailabe', commits_behind.length, { count: commits_behind.length })
|
||||
else if ('full_version_string' in object && object.full_version_string !== '?')
|
||||
output += object.full_version_string
|
||||
else
|
||||
|
||||
@@ -1,42 +1,64 @@
|
||||
<template>
|
||||
<v-card-text>
|
||||
<v-row>
|
||||
<v-col class="col-6">
|
||||
<v-col class="col-12 col-md-6">
|
||||
<firmware-retraction-settings-input
|
||||
:label="$t('Panels.MachineSettingsPanel.FirmwareRetractionSettings.RetractLength')"
|
||||
:label="$t('Panels.MachineSettingsPanel.FirmwareRetractionSettings.RetractLength').toString()"
|
||||
:target="current_retract_length"
|
||||
:default-value="config_retract_length"
|
||||
:hasSpinner="true"
|
||||
:spinnerFactor="10"
|
||||
:step="0.01"
|
||||
:min="0"
|
||||
:max="null"
|
||||
:dec="2"
|
||||
unit="mm"
|
||||
attribute-name="RETRACT_LENGTH"
|
||||
></firmware-retraction-settings-input>
|
||||
</v-col>
|
||||
<v-col class="col-6">
|
||||
<v-col class="col-12 col-md-6">
|
||||
<firmware-retraction-settings-input
|
||||
:label="$t('Panels.MachineSettingsPanel.FirmwareRetractionSettings.RetractSpeed')"
|
||||
:label="$t('Panels.MachineSettingsPanel.FirmwareRetractionSettings.RetractSpeed').toString()"
|
||||
:target="current_retract_speed"
|
||||
:default-value="config_retract_speed"
|
||||
:hasSpinner="true"
|
||||
:spinnerFactor="5"
|
||||
:step="1"
|
||||
:min="1"
|
||||
:max="null"
|
||||
:dec="0"
|
||||
unit="mm/s"
|
||||
attribute-name="RETRACT_SPEED"
|
||||
></firmware-retraction-settings-input>
|
||||
</v-col>
|
||||
</v-row>
|
||||
<v-row>
|
||||
<v-col class="col-6">
|
||||
<v-col class="col-12 col-md-6">
|
||||
<firmware-retraction-settings-input
|
||||
:label="$t('Panels.MachineSettingsPanel.FirmwareRetractionSettings.UnretractExtraLength')"
|
||||
:label="$t('Panels.MachineSettingsPanel.FirmwareRetractionSettings.UnretractExtraLength').toString()"
|
||||
:target="current_unretract_extra_length"
|
||||
:default-value="config_unretract_extra_length"
|
||||
:hasSpinner="true"
|
||||
:spinnerFactor="10"
|
||||
:step="0.01"
|
||||
:min="0"
|
||||
:max="null"
|
||||
:dec="2"
|
||||
unit="mm"
|
||||
attribute-name="UNRETRACT_EXTRA_LENGTH"
|
||||
></firmware-retraction-settings-input>
|
||||
</v-col>
|
||||
<v-col class="col-6">
|
||||
<v-col class="col-12 col-md-6">
|
||||
<firmware-retraction-settings-input
|
||||
:label="$t('Panels.MachineSettingsPanel.FirmwareRetractionSettings.UnretractSpeed')"
|
||||
:label="$t('Panels.MachineSettingsPanel.FirmwareRetractionSettings.UnretractSpeed').toString()"
|
||||
:target="current_unretract_speed"
|
||||
:default-value="config_unretract_speed"
|
||||
:hasSpinner="true"
|
||||
:spinnerFactor="5"
|
||||
:step="1"
|
||||
:min="1"
|
||||
:max="null"
|
||||
:dec="0"
|
||||
unit="mm/s"
|
||||
attribute-name="UNRETRACT_SPEED"
|
||||
></firmware-retraction-settings-input>
|
||||
@@ -56,36 +78,36 @@ import FirmwareRetractionSettingsInput from '@/components/inputs/FirmwareRetract
|
||||
})
|
||||
export default class FirmwareRetractionSettings extends Mixins(BaseMixin) {
|
||||
|
||||
get current_retract_length() {
|
||||
return this.$store.state.printer?.firmware_retraction?.retract_length ?? 0
|
||||
get current_retract_length(): number {
|
||||
return Math.floor((this.$store.state.printer?.firmware_retraction?.retract_length ?? 0) * 100) / 100
|
||||
}
|
||||
|
||||
get current_retract_speed() {
|
||||
return this.$store.state.printer?.firmware_retraction?.retract_speed ?? 20
|
||||
get current_retract_speed(): number {
|
||||
return Math.trunc(this.$store.state.printer?.firmware_retraction?.retract_speed ?? 20)
|
||||
}
|
||||
|
||||
get current_unretract_extra_length() {
|
||||
return this.$store.state.printer?.firmware_retraction?.unretract_extra_length ?? 0
|
||||
get current_unretract_extra_length(): number {
|
||||
return Math.floor((this.$store.state.printer?.firmware_retraction?.unretract_extra_length ?? 0) * 100) / 100
|
||||
}
|
||||
|
||||
get current_unretract_speed() {
|
||||
return this.$store.state.printer?.firmware_retraction?.unretract_speed ?? 10
|
||||
get current_unretract_speed(): number {
|
||||
return Math.trunc(this.$store.state.printer?.firmware_retraction?.unretract_speed ?? 10)
|
||||
}
|
||||
|
||||
get config_retract_length() {
|
||||
return this.$store.state.printer?.configfile?.settings?.firmware_retraction?.retract_length ?? 0
|
||||
get config_retract_length(): number {
|
||||
return Math.floor((this.$store.state.printer?.configfile?.settings?.firmware_retraction?.retract_length ?? 0) * 100) / 100
|
||||
}
|
||||
|
||||
get config_retract_speed() {
|
||||
return this.$store.state.printer?.configfile?.settings?.firmware_retraction?.retract_speed ?? 20
|
||||
get config_retract_speed(): number {
|
||||
return Math.trunc(this.$store.state.printer?.configfile?.settings?.firmware_retraction?.retract_speed ?? 20)
|
||||
}
|
||||
|
||||
get config_unretract_extra_length() {
|
||||
return this.$store.state.printer?.configfile?.settings?.firmware_retraction?.unretract_extra_length ?? 0
|
||||
get config_unretract_extra_length(): number {
|
||||
return Math.floor((this.$store.state.printer?.configfile?.settings?.firmware_retraction?.unretract_extra_length ?? 0) * 100) / 100
|
||||
}
|
||||
|
||||
get config_unretract_speed() {
|
||||
return this.$store.state.printer?.configfile?.settings?.firmware_retraction?.unretract_speed ?? 10
|
||||
get config_unretract_speed(): number {
|
||||
return Math.trunc(this.$store.state.printer?.configfile?.settings?.firmware_retraction?.unretract_speed ?? 0)
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -2,21 +2,26 @@
|
||||
<panel
|
||||
v-if="klipperReadyForGui"
|
||||
icon="mdi-engine"
|
||||
:title="$t('Panels.MachineSettingsPanel.Headline')"
|
||||
:title="$t('Panels.MachineSettingsPanel.Headline').toString()"
|
||||
:collapsible="true"
|
||||
card-class="machine-settings-panel"
|
||||
>
|
||||
<motion-settings v-if="!existsFirmwareRetraction"></motion-settings>
|
||||
|
||||
<div v-if="existsFirmwareRetraction">
|
||||
<div>
|
||||
<sub-panel
|
||||
:title="$t('Panels.MachineSettingsPanel.MotionSettings.Motion')"
|
||||
:title="$t('Panels.MachineSettingsPanel.MotionSettings.Motion').toString()"
|
||||
sub-panel-class="motion-settings-subpanel"
|
||||
>
|
||||
<motion-settings></motion-settings>
|
||||
</sub-panel>
|
||||
<sub-panel
|
||||
:title="$t('Panels.MachineSettingsPanel.FirmwareRetractionSettings.FirmwareRetraction')"
|
||||
:title="$t('Panels.MachineSettingsPanel.PressureAdvanceSettings.PressureAdvance').toString()"
|
||||
sub-panel-class="pressure-advance-settings-subpanel"
|
||||
>
|
||||
<pressure-advance-settings></pressure-advance-settings>
|
||||
</sub-panel>
|
||||
<sub-panel
|
||||
v-if="existsFirmwareRetraction"
|
||||
:title="$t('Panels.MachineSettingsPanel.FirmwareRetractionSettings.FirmwareRetraction').toString()"
|
||||
sub-panel-class="firmware-retraction-settings-subpanel"
|
||||
>
|
||||
<firmware-retraction-settings></firmware-retraction-settings>
|
||||
@@ -31,6 +36,7 @@ import BaseMixin from '@/components/mixins/base'
|
||||
import Panel from '@/components/ui/Panel.vue'
|
||||
import SubPanel from '@/components/ui/SubPanel.vue'
|
||||
import MotionSettings from '@/components/panels/MachineSettings/MotionSettings.vue'
|
||||
import PressureAdvanceSettings from '@/components/panels/MachineSettings/PressureAdvanceSettings.vue'
|
||||
import FirmwareRetractionSettings from '@/components/panels/MachineSettings/FirmwareRetractionSettings.vue'
|
||||
|
||||
@Component({
|
||||
@@ -38,6 +44,7 @@ import FirmwareRetractionSettings from '@/components/panels/MachineSettings/Firm
|
||||
Panel,
|
||||
SubPanel,
|
||||
MotionSettings,
|
||||
PressureAdvanceSettings,
|
||||
FirmwareRetractionSettings
|
||||
}
|
||||
})
|
||||
|
||||
@@ -1,44 +1,63 @@
|
||||
<template>
|
||||
<v-card-text>
|
||||
<v-row>
|
||||
<v-col class="col-6">
|
||||
<v-col class="col-12 col-md-6">
|
||||
<motion-settings-input
|
||||
:label="$t('Panels.MachineSettingsPanel.MotionSettings.Velocity')"
|
||||
:label="$t('Panels.MachineSettingsPanel.MotionSettings.Velocity').toString()"
|
||||
:target="current_velocity"
|
||||
:max="max_velocity"
|
||||
:default-value="max_velocity"
|
||||
:hasSpinner="true"
|
||||
:spinnerFactor="5"
|
||||
:step="1"
|
||||
:min="1"
|
||||
:max="null"
|
||||
:dec="0"
|
||||
unit="mm/s"
|
||||
attribute-name="VELOCITY"
|
||||
></motion-settings-input>
|
||||
</v-col>
|
||||
<v-col class="col-6">
|
||||
<v-col class="col-12 col-md-6">
|
||||
<motion-settings-input
|
||||
:label="$t('Panels.MachineSettingsPanel.MotionSettings.SquareCornerVelocity')"
|
||||
:label="$t('Panels.MachineSettingsPanel.MotionSettings.SquareCornerVelocity').toString()"
|
||||
:target="current_square_corner_velocity"
|
||||
:max="max_square_corner_velocity"
|
||||
:default-value="max_square_corner_velocity"
|
||||
:hasSpinner="true"
|
||||
:step="0.1"
|
||||
:min="0.1"
|
||||
:max="null"
|
||||
:dec="1"
|
||||
unit="mm/s"
|
||||
attribute-name="SQUARE_CORNER_VELOCITY"
|
||||
></motion-settings-input>
|
||||
</v-col>
|
||||
</v-row>
|
||||
<v-row>
|
||||
<v-col class="col-6">
|
||||
<v-col class="col-12 col-md-6">
|
||||
<motion-settings-input
|
||||
:label="$t('Panels.MachineSettingsPanel.MotionSettings.Acceleration')"
|
||||
:label="$t('Panels.MachineSettingsPanel.MotionSettings.Acceleration').toString()"
|
||||
:target="current_accel"
|
||||
:max="max_accel"
|
||||
:default-value="max_accel"
|
||||
:hasSpinner="true"
|
||||
:spinnerFactor="100"
|
||||
:step="1"
|
||||
:min="1"
|
||||
:max="null"
|
||||
:dec="0"
|
||||
unit="mm/s²"
|
||||
attribute-name="ACCEL"
|
||||
></motion-settings-input>
|
||||
</v-col>
|
||||
<v-col class="col-6">
|
||||
<v-col class="col-12 col-md-6">
|
||||
<motion-settings-input
|
||||
:label="$t('Panels.MachineSettingsPanel.MotionSettings.Deceleration')"
|
||||
:label="$t('Panels.MachineSettingsPanel.MotionSettings.MaxAccelToDecel').toString()"
|
||||
:target="current_accel_to_decel"
|
||||
:max="max_accel_to_decel"
|
||||
:default-value="max_accel_to_decel"
|
||||
:hasSpinner="true"
|
||||
:spinnerFactor="100"
|
||||
:step="1"
|
||||
:min="1"
|
||||
:max="null"
|
||||
:dec="0"
|
||||
unit="mm/s²"
|
||||
attribute-name="ACCEL_TO_DECEL"
|
||||
></motion-settings-input>
|
||||
@@ -58,36 +77,36 @@ import MotionSettingsInput from '@/components/inputs/MotionSettingsInput.vue'
|
||||
})
|
||||
export default class MotionSettings extends Mixins(BaseMixin) {
|
||||
|
||||
get current_velocity() {
|
||||
return this.$store.state.printer?.toolhead?.max_velocity ?? 300
|
||||
get current_velocity(): number {
|
||||
return Math.trunc(this.$store.state.printer?.toolhead?.max_velocity ?? 300)
|
||||
}
|
||||
|
||||
get current_accel() {
|
||||
return this.$store.state.printer?.toolhead?.max_accel ?? 3000
|
||||
get current_accel(): number {
|
||||
return Math.trunc(this.$store.state.printer?.toolhead?.max_accel ?? 3000)
|
||||
}
|
||||
|
||||
get current_accel_to_decel() {
|
||||
return this.$store.state.printer?.toolhead?.max_accel_to_decel ?? 1500
|
||||
get current_accel_to_decel(): number {
|
||||
return Math.trunc(this.$store.state.printer?.toolhead?.max_accel_to_decel ?? 1500)
|
||||
}
|
||||
|
||||
get current_square_corner_velocity() {
|
||||
return this.$store.state.printer?.toolhead?.square_corner_velocity ?? 8
|
||||
get current_square_corner_velocity(): number {
|
||||
return Math.floor((this.$store.state.printer?.toolhead?.square_corner_velocity ?? 8) * 10) / 10
|
||||
}
|
||||
|
||||
get max_velocity() {
|
||||
return this.$store.state.printer?.configfile?.settings?.printer?.max_velocity ?? 300
|
||||
get max_velocity(): number {
|
||||
return Math.trunc(this.$store.state.printer?.configfile?.settings?.printer?.max_velocity ?? 300)
|
||||
}
|
||||
|
||||
get max_accel() {
|
||||
return this.$store.state.printer?.configfile?.settings?.printer?.max_accel ?? 3000
|
||||
get max_accel(): number {
|
||||
return Math.trunc(this.$store.state.printer?.configfile?.settings?.printer?.max_accel ?? 3000)
|
||||
}
|
||||
|
||||
get max_accel_to_decel() {
|
||||
return this.$store.state.printer?.configfile?.settings?.printer?.max_accel_to_decel ?? 1500
|
||||
get max_accel_to_decel(): number {
|
||||
return Math.trunc(this.$store.state.printer?.configfile?.settings?.printer?.max_accel_to_decel ?? 1500)
|
||||
}
|
||||
|
||||
get max_square_corner_velocity() {
|
||||
return this.$store.state.printer?.configfile?.settings?.printer?.square_corner_velocity ?? 8
|
||||
get max_square_corner_velocity(): number {
|
||||
return Math.floor((this.$store.state.printer?.configfile?.settings?.printer?.square_corner_velocity ?? 8) * 10) / 10
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -0,0 +1,108 @@
|
||||
<template>
|
||||
<v-card-text>
|
||||
<v-row>
|
||||
<v-col v-if="this.all_extruders.length > 1" class="col-12 col-xl-4">
|
||||
<div class="d-flex align-center">
|
||||
<v-btn
|
||||
v-if="this.selectedExtruder !== this.active_extruder"
|
||||
@click="resetToActiveExtruder"
|
||||
class="mr-2"
|
||||
icon
|
||||
plain
|
||||
><v-icon>mdi-restart</v-icon>
|
||||
</v-btn>
|
||||
<v-select
|
||||
v-model="selectedExtruder"
|
||||
:label="$t('Panels.MachineSettingsPanel.PressureAdvanceSettings.Extruder').toString()"
|
||||
:items="all_extruders"
|
||||
:value="active_extruder"
|
||||
hide-details
|
||||
outlined
|
||||
dense
|
||||
></v-select>
|
||||
</div>
|
||||
</v-col>
|
||||
<v-col :class="(this.all_extruders.length > 1) ? 'col-12 col-md-6 col-xl-4' : 'col-12 col-md-6'">
|
||||
<pressure-advance-settings-input
|
||||
:label="$t('Panels.MachineSettingsPanel.PressureAdvanceSettings.Advance').toString()"
|
||||
:target="current_pressure_advance"
|
||||
:default-value="default_pressure_advance"
|
||||
:extruder="selectedExtruder"
|
||||
:hasSpinner="true"
|
||||
:min="0"
|
||||
:max="null"
|
||||
:step="0.001"
|
||||
:dec="3"
|
||||
unit="mm/s"
|
||||
attribute-name="ADVANCE"
|
||||
></pressure-advance-settings-input>
|
||||
</v-col>
|
||||
<v-col :class="(this.all_extruders.length > 1) ? 'col-12 col-md-6 col-xl-4' : 'col-12 col-md-6'">
|
||||
<pressure-advance-settings-input
|
||||
:label="$t('Panels.MachineSettingsPanel.PressureAdvanceSettings.SmoothTime').toString()"
|
||||
:target="current_smooth_time"
|
||||
:default-value="default_smooth_time"
|
||||
:extruder="selectedExtruder"
|
||||
:hasSpinner="true"
|
||||
:min="0"
|
||||
:max="0.2"
|
||||
:step="0.001"
|
||||
:spinnerFactor="10"
|
||||
:dec="3"
|
||||
unit="s"
|
||||
attribute-name="SMOOTH_TIME"
|
||||
></pressure-advance-settings-input>
|
||||
</v-col>
|
||||
</v-row>
|
||||
</v-card-text>
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import { Component, Mixins } from 'vue-property-decorator'
|
||||
import BaseMixin from '@/components/mixins/base'
|
||||
import Panel from '@/components/ui/Panel.vue'
|
||||
import PressureAdvanceSettingsInput from '@/components/inputs/PressureAdvanceSettingsInput.vue'
|
||||
|
||||
@Component({
|
||||
components: {Panel, PressureAdvanceSettingsInput}
|
||||
})
|
||||
export default class PressureAdvanceSettings extends Mixins(BaseMixin) {
|
||||
private extruders: string[] = []
|
||||
private selectedExtruder = ''
|
||||
|
||||
resetToActiveExtruder(): void {
|
||||
this.selectedExtruder = this.$store.state.printer.toolhead?.extruder
|
||||
}
|
||||
|
||||
get all_extruders(): string[] {
|
||||
Object.keys(this.$store.state.printer).forEach((e) => {
|
||||
if (e.startsWith('extruder') && !this.extruders.includes(e)) this.extruders.push(e)
|
||||
})
|
||||
this.extruders.length === 1 ? this.resetToActiveExtruder() : {}
|
||||
|
||||
return this.extruders
|
||||
}
|
||||
|
||||
get active_extruder(): string {
|
||||
this.resetToActiveExtruder()
|
||||
return this.$store.state.printer.toolhead?.extruder
|
||||
}
|
||||
|
||||
get current_pressure_advance(): number {
|
||||
return Math.floor((this.$store.state.printer?.[this.selectedExtruder]?.pressure_advance ?? 0) * 1000) / 1000
|
||||
}
|
||||
|
||||
get current_smooth_time(): number {
|
||||
return Math.floor((this.$store.state.printer?.[this.selectedExtruder]?.smooth_time ?? 0.04) * 1000) / 1000
|
||||
}
|
||||
|
||||
get default_pressure_advance(): number {
|
||||
return Math.floor((this.$store.state.printer.configfile?.settings?.[this.selectedExtruder]?.pressure_advance ?? 0) * 1000) / 1000
|
||||
}
|
||||
|
||||
get default_smooth_time(): number {
|
||||
return Math.floor((this.$store.state.printer.configfile?.settings?.[this.selectedExtruder]?.pressure_advance_smooth_time ?? 0.04) * 1000) / 1000
|
||||
}
|
||||
|
||||
}
|
||||
</script>
|
||||
@@ -31,7 +31,7 @@ import BaseMixin from '../mixins/base'
|
||||
import Panel from '@/components/ui/Panel.vue'
|
||||
import MacroButton from '@/components/inputs/MacroButton.vue'
|
||||
import {PrinterStateMacro} from '@/store/printer/types'
|
||||
import {GuiMacrogroupsStateMacrogroupMacro} from '@/store/gui/macrogroups/types'
|
||||
import {GuiMacrosStateMacrogroupMacro} from '@/store/gui/macros/types'
|
||||
@Component({
|
||||
components: {MacroButton, Panel}
|
||||
})
|
||||
@@ -40,17 +40,17 @@ export default class MacrogroupPanel extends Mixins(BaseMixin) {
|
||||
@Prop({ required: true }) panelId!: string
|
||||
|
||||
get macrogroup() {
|
||||
return this.$store.getters['gui/macrogroups/getMacrogroup'](this.panelId)
|
||||
return this.$store.getters['gui/macros/getMacrogroup'](this.panelId)
|
||||
}
|
||||
|
||||
get allMacros() {
|
||||
return this.$store.getters['printer/getMacros'] ?? []
|
||||
return this.$store.getters['printer/getAllMacros'] ?? []
|
||||
}
|
||||
|
||||
get macros() {
|
||||
let macros = this.macrogroup?.macros ?? []
|
||||
|
||||
macros = macros.filter((macro: GuiMacrogroupsStateMacrogroupMacro) => {
|
||||
macros = macros.filter((macro: GuiMacrosStateMacrogroupMacro) => {
|
||||
if (!this.allMacros.find((existMacro: PrinterStateMacro) => existMacro.name.toLowerCase() === macro.name.toLowerCase())) return false
|
||||
|
||||
return (
|
||||
@@ -60,7 +60,7 @@ export default class MacrogroupPanel extends Mixins(BaseMixin) {
|
||||
)
|
||||
})
|
||||
|
||||
return macros.sort((a: GuiMacrogroupsStateMacrogroupMacro, b: GuiMacrogroupsStateMacrogroupMacro) => a.pos - b.pos)
|
||||
return macros.sort((a: GuiMacrosStateMacrogroupMacro, b: GuiMacrosStateMacrogroupMacro) => a.pos - b.pos)
|
||||
}
|
||||
|
||||
get macrogroupStatus() {
|
||||
@@ -71,7 +71,7 @@ export default class MacrogroupPanel extends Mixins(BaseMixin) {
|
||||
)
|
||||
}
|
||||
|
||||
getColor(macro: GuiMacrogroupsStateMacrogroupMacro) {
|
||||
getColor(macro: GuiMacrosStateMacrogroupMacro) {
|
||||
if (macro.color === 'group') {
|
||||
if (this.macrogroup.color === 'custom') return this.macrogroup.colorCustom
|
||||
else return this.macrogroup.color
|
||||
|
||||
@@ -29,6 +29,9 @@
|
||||
<v-list-item class="minHeight36">
|
||||
<v-checkbox class="mt-0" v-model="hideWaitTemperatures" hide-details :label="$t('Panels.MiniconsolePanel.HideTemperatures')"></v-checkbox>
|
||||
</v-list-item>
|
||||
<v-list-item class="minHeight36" v-if="moonrakerComponents.includes('timelapse')">
|
||||
<v-checkbox class="mt-0" v-model="hideTlCommands" hide-details :label="$t('Panels.MiniconsolePanel.HideTimelapse')"></v-checkbox>
|
||||
</v-list-item>
|
||||
<v-list-item class="minHeight36" v-for="(filter, index) in customFilters" v-bind:key="index">
|
||||
<v-checkbox class="mt-0" v-model="filter.bool" @change="toggleFilter(filter)" hide-details :label="filter.name"></v-checkbox>
|
||||
</v-list-item>
|
||||
@@ -104,7 +107,6 @@ export default class MiniconsolePanel extends Mixins(BaseMixin) {
|
||||
}
|
||||
|
||||
private gcode = ''
|
||||
private lastCommands: string[] = []
|
||||
private lastCommandNumber: number | null = null
|
||||
private items = [];
|
||||
private cmdListSearch: string | null = null
|
||||
@@ -143,14 +145,26 @@ export default class MiniconsolePanel extends Mixins(BaseMixin) {
|
||||
this.$store.dispatch('gui/saveSetting', { name: 'console.hideWaitTemperatures', value: newVal })
|
||||
}
|
||||
|
||||
get hideTlCommands(): boolean {
|
||||
return this.$store.state.gui.console.hideTlCommands
|
||||
}
|
||||
|
||||
set hideTlCommands(newVal) {
|
||||
this.$store.dispatch('gui/saveSetting', { name: 'console.hideTlCommands', value: newVal })
|
||||
}
|
||||
|
||||
get customFilters(): any[] {
|
||||
return this.$store.state.gui.console.customFilters
|
||||
return this.$store.state.gui.console.consolefilters
|
||||
}
|
||||
|
||||
get rows(): number {
|
||||
return this.gcode?.split('\n').length ?? 1
|
||||
}
|
||||
|
||||
get lastCommands(): string[] {
|
||||
return this.$store.state.gui.gcodehistory.entries ?? []
|
||||
}
|
||||
|
||||
commandClick(msg: string): void {
|
||||
this.gcode = msg
|
||||
|
||||
@@ -163,7 +177,7 @@ export default class MiniconsolePanel extends Mixins(BaseMixin) {
|
||||
if (!cmd.shiftKey) {
|
||||
if (this.gcode !== '') {
|
||||
this.$store.dispatch('printer/sendGcode', this.gcode)
|
||||
this.lastCommands.push(this.gcode)
|
||||
this.$store.dispatch('gui/gcodehistory/addToHistory', this.gcode)
|
||||
this.gcode = ''
|
||||
this.lastCommandNumber = null
|
||||
setTimeout(() => {
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
>
|
||||
<tool-slider
|
||||
:label="$t('Panels.PrintsettingsPanel.SpeedFactor')"
|
||||
icon="mdi-speedometer"
|
||||
:target="speed_factor"
|
||||
:max="200"
|
||||
:multi="100"
|
||||
@@ -24,6 +25,7 @@
|
||||
<v-divider></v-divider>
|
||||
<tool-slider
|
||||
:label="$t('Panels.PrintsettingsPanel.ExtrusionFactor')"
|
||||
icon="mdi-printer-3d-nozzle-outline"
|
||||
:target="extrude_factor"
|
||||
:max="200"
|
||||
:multi="100"
|
||||
@@ -36,13 +38,16 @@
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
|
||||
import {Component, Mixins} from 'vue-property-decorator'
|
||||
import BaseMixin from '@/components/mixins/base'
|
||||
import ToolSlider from '@/components/inputs/ToolSlider.vue'
|
||||
import Panel from '@/components/ui/Panel.vue'
|
||||
import ToolSlider from '@/components/inputs/ToolSlider.vue'
|
||||
|
||||
@Component({
|
||||
components: {Panel, ToolSlider}
|
||||
components: {
|
||||
Panel,
|
||||
ToolSlider
|
||||
}
|
||||
})
|
||||
export default class PrintsettingsPanel extends Mixins(BaseMixin) {
|
||||
|
||||
|
||||
@@ -376,6 +376,13 @@ export default class StatusPanel extends Mixins(BaseMixin) {
|
||||
loadingName: 'statusPrintResume',
|
||||
status: ['paused'],
|
||||
click: this.btnResumeJob
|
||||
}, {
|
||||
text: this.$t('Panels.StatusPanel.CancelPrint'),
|
||||
color: 'error',
|
||||
icon: 'mdi-stop',
|
||||
loadingName: 'statusPrintCancel',
|
||||
status: this.$store.state.gui.uiSettings.displayCancelPrint ? ['paused', 'printing'] : ['paused'],
|
||||
click: this.btnCancelJob
|
||||
}, {
|
||||
text: this.$t('Panels.StatusPanel.ExcludeObject.ExcludeObject'),
|
||||
color: 'warning',
|
||||
@@ -383,13 +390,6 @@ export default class StatusPanel extends Mixins(BaseMixin) {
|
||||
loadingName: '',
|
||||
status: this.printing_objects.length ? ['paused', 'printing'] : [],
|
||||
click: this.btnExcludeObject
|
||||
}, {
|
||||
text: this.$t('Panels.StatusPanel.CancelPrint'),
|
||||
color: 'error',
|
||||
icon: 'mdi-stop',
|
||||
loadingName: 'statusPrintCancel',
|
||||
status: this.$store.state.gui.general.displayCancelPrint ? ['paused', 'printing'] : ['paused'],
|
||||
click: this.btnCancelJob
|
||||
}, {
|
||||
text: this.$t('Panels.StatusPanel.ClearPrintStats'),
|
||||
color: 'primary',
|
||||
@@ -513,8 +513,9 @@ export default class StatusPanel extends Mixins(BaseMixin) {
|
||||
relative_url = this.current_file.filename.substr(0, this.current_file.filename.lastIndexOf('/')+1)
|
||||
}
|
||||
|
||||
if (thumbnail && 'relative_path' in thumbnail)
|
||||
return this.apiUrl+'/server/files/gcodes/'+relative_url+thumbnail.relative_path+'?timestamp='+this.current_file.modified
|
||||
if (thumbnail && 'relative_path' in thumbnail) {
|
||||
return `${this.apiUrl}/server/files/gcodes/${encodeURI(relative_url+thumbnail.relative_path)}?timestamp=${this.current_file.modified}`
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -534,8 +535,9 @@ export default class StatusPanel extends Mixins(BaseMixin) {
|
||||
relative_url = this.current_file.filename.substr(0, this.current_file.filename.lastIndexOf('/')+1)
|
||||
}
|
||||
|
||||
if (thumbnail && 'relative_path' in thumbnail)
|
||||
return this.apiUrl+'/server/files/gcodes/'+relative_url+thumbnail.relative_path+'?timestamp='+this.current_file.modified
|
||||
if (thumbnail && 'relative_path' in thumbnail) {
|
||||
return `${this.apiUrl}/server/files/gcodes/${encodeURI(relative_url+thumbnail.relative_path)}?timestamp=${this.current_file.modified}`
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -573,7 +575,7 @@ export default class StatusPanel extends Mixins(BaseMixin) {
|
||||
}
|
||||
|
||||
get boolBigThumbnail() {
|
||||
const setting = this.$store.state.gui.dashboard.boolBigThumbnail ?? true
|
||||
const setting = this.$store.state.gui.uiSettings.boolBigThumbnail ?? true
|
||||
|
||||
return this.current_filename && setting && this.thumbnailBig
|
||||
}
|
||||
|
||||
@@ -4,15 +4,17 @@
|
||||
|
||||
<template>
|
||||
<div v-if="['printing', 'paused'].includes(printer_state) && printing_objects.length">
|
||||
<v-container>
|
||||
<v-row>
|
||||
<v-col class="py-2">
|
||||
<span class="subtitle-2 d-block px-0 text--disabled"><v-icon class="mr-2" small>mdi-printer-3d-nozzle</v-icon>{{ current_object !== null ? current_object : '--' }}</span>
|
||||
</v-col>
|
||||
<v-col class="col-auto py-2">
|
||||
<v-icon class="text--disabled cursor-pointer" @click="openCancelObjectDialog(current_object)" small v-if="current_object !== null">mdi-close-circle</v-icon>
|
||||
</v-col>
|
||||
</v-row>
|
||||
<v-container class="py-0">
|
||||
<div class="d-flex flex-row flex-nowrap justify-space-between">
|
||||
<div class="py-2" style="width: calc(100% - 25px);">
|
||||
<span class="subtitle-2 d-block px-0 text--disabled text-truncate">
|
||||
<v-icon class="mr-2" small>mdi-printer-3d-nozzle</v-icon>{{ current_object !== null ? current_object : '--' }}
|
||||
</span>
|
||||
</div>
|
||||
<div class="py-2 pl-0">
|
||||
<v-icon class="text--disabled cursor-pointer" @click="openCancelObjectDialog(current_object)" small v-if="current_object !== null">mdi-selection-remove</v-icon>
|
||||
</div>
|
||||
</div>
|
||||
</v-container>
|
||||
<v-divider class="mt-0 mb-0" ></v-divider>
|
||||
<v-dialog v-model="boolShowExcludeObjectDialog" max-width="400">
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
@update:hoverName="updateHoverObjectDialogName"
|
||||
:exclude-object-dialog-bool.sync="excludeObjectDialogBool"
|
||||
@update:bool="updateExcludeObjectDialogBool"
|
||||
:hover-name="hoverName"
|
||||
></status-panel-exclude-object-dialog-list>
|
||||
</v-col>
|
||||
</v-row>
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
<template>
|
||||
<div>
|
||||
<template v-for="object in printing_objects">
|
||||
<v-row v-bind:key="'div_'+object.name" class="py-3 d-flex" @mouseover="mouseOverObject(object.name)" @mouseleave="mouseOverObject('')">
|
||||
<v-col class="py-2 subtitle-2 text--disabled text-truncate">
|
||||
<v-row v-bind:key="'div_'+object.name" class="py-3 d-flex" @click="mouseOverObject(object.name)" @mouseover="mouseOverObject(object.name)" @mouseleave="mouseOverObject('')">
|
||||
<v-col :class="'py-2 subtitle-2 text-truncate '+(hoverName === object.name ? 'text--white' : 'text--disabled')">
|
||||
{{ object.name }}
|
||||
</v-col>
|
||||
<v-col class="col-auto py-2">
|
||||
@@ -21,11 +21,13 @@
|
||||
|
||||
<script lang="ts">
|
||||
import Component from 'vue-class-component'
|
||||
import {Mixins} from 'vue-property-decorator'
|
||||
import {Mixins, Prop} from 'vue-property-decorator'
|
||||
import BaseMixin from '@/components/mixins/base'
|
||||
|
||||
@Component
|
||||
export default class StatusPanelObjectsDialogList extends Mixins(BaseMixin) {
|
||||
@Prop({ required: false, default: '' }) readonly hoverName!: string
|
||||
|
||||
get printing_objects() {
|
||||
return this.$store.state.printer.exclude_object?.objects ?? []
|
||||
}
|
||||
|
||||
@@ -65,6 +65,7 @@
|
||||
import Component from 'vue-class-component'
|
||||
import {Mixins, Prop} from 'vue-property-decorator'
|
||||
import BaseMixin from '@/components/mixins/base'
|
||||
import {defaultPrimaryColor} from '@/store/variables'
|
||||
|
||||
@Component
|
||||
export default class StatusPanelObjectsDialogMap extends Mixins(BaseMixin) {
|
||||
@@ -142,7 +143,7 @@ export default class StatusPanelObjectsDialogMap extends Mixins(BaseMixin) {
|
||||
}
|
||||
|
||||
get primaryColor() {
|
||||
return this.$store.state.gui.theme.primary
|
||||
return this.$store.state.gui.theme?.primary ?? defaultPrimaryColor
|
||||
}
|
||||
|
||||
convertX(x: number) {
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
<v-card-text>
|
||||
<v-row>
|
||||
<v-col class="col-12 py-2 d-flex align-center">
|
||||
<span><b>{{ $t('Timelapse.CurrentPath') }}:</b> {{ this.currentPath !== 'timelapse' ? "/"+this.currentPath.substring(7) : "/" }}</span>
|
||||
<span><b>{{ $t('Timelapse.CurrentPath') }}:</b> {{ this.currentPath !== 'timelapse' ? "/"+this.currentPath.substring(10) : "/" }}</span>
|
||||
<v-spacer></v-spacer>
|
||||
<template v-if="this.disk_usage !== null">
|
||||
<v-tooltip top>
|
||||
@@ -82,7 +82,7 @@
|
||||
</template>
|
||||
|
||||
<template #no-data>
|
||||
<div class="text-center">{{ $t('Timelapse.Empty') }}</div>
|
||||
<div class="text-center font-italic">{{ $t('Timelapse.Empty') }}</div>
|
||||
</template>
|
||||
|
||||
<template slot="body.prepend" v-if="(currentPath !== 'timelapse')">
|
||||
@@ -284,7 +284,6 @@ export default class TimelapseFilesPanel extends Mixins(BaseMixin) {
|
||||
}
|
||||
|
||||
private search = ''
|
||||
private currentPath = 'timelapse'
|
||||
private boolVideoDialog = false
|
||||
private videoDialogFilename = ''
|
||||
|
||||
@@ -370,31 +369,31 @@ export default class TimelapseFilesPanel extends Mixins(BaseMixin) {
|
||||
}
|
||||
|
||||
get sortBy() {
|
||||
return this.$store.state.gui.timelapse.sortBy ?? 'modified'
|
||||
return this.$store.state.gui.view.gcodefiles.sortBy ?? 'modified'
|
||||
}
|
||||
|
||||
set sortBy(newVal) {
|
||||
if (newVal === undefined) newVal = 'modified'
|
||||
|
||||
this.$store.dispatch('gui/saveSetting', { name: 'timelapse.sortBy', value: newVal })
|
||||
this.$store.dispatch('gui/saveSetting', { name: 'view.timelapse.sortBy', value: newVal })
|
||||
}
|
||||
|
||||
get sortDesc() {
|
||||
return this.$store.state.gui.timelapse.sortDesc ?? true
|
||||
return this.$store.state.gui.view.gcodefiles.sortDesc ?? true
|
||||
}
|
||||
|
||||
set sortDesc(newVal) {
|
||||
if (newVal === undefined) newVal = false
|
||||
|
||||
this.$store.dispatch('gui/saveSetting', { name: 'timelapse.sortDesc', value: newVal })
|
||||
this.$store.dispatch('gui/saveSetting', { name: 'view.timelapse.sortDesc', value: newVal })
|
||||
}
|
||||
|
||||
get countPerPage() {
|
||||
return this.$store.state.gui.timelapse?.countPerPage ?? 10
|
||||
return this.$store.state.gui.view.gcodefiles?.countPerPage ?? 10
|
||||
}
|
||||
|
||||
set countPerPage(newVal) {
|
||||
this.$store.dispatch('gui/saveSetting', { name: 'timelapse.countPerPage', value: newVal })
|
||||
this.$store.dispatch('gui/saveSetting', { name: 'view.timelapse.countPerPage', value: newVal })
|
||||
}
|
||||
|
||||
get displayFiles() {
|
||||
@@ -405,6 +404,14 @@ export default class TimelapseFilesPanel extends Mixins(BaseMixin) {
|
||||
}) ?? []
|
||||
}
|
||||
|
||||
get currentPath() {
|
||||
return this.$store.state.gui.view.timelapse.currentPath
|
||||
}
|
||||
|
||||
set currentPath(newVal) {
|
||||
this.$store.dispatch('gui/saveSettingWithoutUpload', { name: 'view.timelapse.currentPath', value: newVal })
|
||||
}
|
||||
|
||||
createDirectory() {
|
||||
this.dialogCreateDirectory.name = ''
|
||||
this.dialogCreateDirectory.show = true
|
||||
@@ -436,7 +443,7 @@ export default class TimelapseFilesPanel extends Mixins(BaseMixin) {
|
||||
const filename = item.filename.slice(0, item.filename.lastIndexOf('.'))
|
||||
const preview = this.files?.find((file) => file.filename === filename+'.jpg')
|
||||
if (preview) {
|
||||
return this.apiUrl+'/server/files/'+this.currentPath+'/'+preview.filename+'?timestamp='+preview.modified.getTime()
|
||||
return `${this.apiUrl}/server/files/${encodeURI(this.currentPath)}/${encodeURI(preview.filename)}?timestamp=${preview.modified.getTime()}`
|
||||
}
|
||||
|
||||
return ''
|
||||
@@ -450,7 +457,7 @@ export default class TimelapseFilesPanel extends Mixins(BaseMixin) {
|
||||
else if (item.filename.endsWith('zip')) {
|
||||
this.downloadFile(item.filename)
|
||||
} else if (item.filename.endsWith('mp4')) {
|
||||
this.videoDialogFilename = this.currentPath + '/' + item.filename
|
||||
this.videoDialogFilename = encodeURI(`${this.currentPath}/${item.filename}`)
|
||||
this.boolVideoDialog = true
|
||||
}
|
||||
}
|
||||
@@ -537,6 +544,11 @@ export default class TimelapseFilesPanel extends Mixins(BaseMixin) {
|
||||
}
|
||||
|
||||
removeFile() {
|
||||
const filename = this.contextMenu.item.filename.slice(0, this.contextMenu.item.filename.lastIndexOf('.'))
|
||||
const previewFilename = filename+'.jpg'
|
||||
const previewExists = (this.files.findIndex((file) => file.filename === previewFilename) !== -1)
|
||||
|
||||
if(previewExists) this.$socket.emit('server.files.delete_file', { path: this.currentPath+'/'+previewFilename }, { action: 'files/getDeleteFile' })
|
||||
this.$socket.emit('server.files.delete_file', { path: this.currentPath+'/'+this.contextMenu.item.filename }, { action: 'files/getDeleteFile' })
|
||||
}
|
||||
|
||||
@@ -546,8 +558,6 @@ export default class TimelapseFilesPanel extends Mixins(BaseMixin) {
|
||||
}
|
||||
|
||||
deleteDirectoryAction() {
|
||||
//TODO: delete all files (mp4, jpg, zip)
|
||||
|
||||
this.dialogDeleteDirectory.show = false
|
||||
this.$socket.emit('server.files.delete_directory', { path: this.currentPath+'/'+this.contextMenu.item.filename, force: true }, { action: 'files/getDeleteDir' })
|
||||
}
|
||||
|
||||
@@ -24,47 +24,43 @@
|
||||
</v-row>
|
||||
</v-card-text>
|
||||
</v-col>
|
||||
<v-col class="col-12 col-sm-6 col-md-12 pt-3 pt-md-0 text--secondary" align-self="center">
|
||||
<v-col class="col-12 col-sm-6 col-md-12 pt-3 pt-md-0 text--secondary" align-self="center" v-if="framesCount > 0">
|
||||
<v-card-text :class="framesCount ? 'pt-0' : ''">
|
||||
<v-row v-if="framesCount > 0">
|
||||
<v-col>
|
||||
<template v-if="framesCount > 0">
|
||||
<settings-row :title="$t('Timelapse.Frames')">
|
||||
{{ framesCount }}
|
||||
</settings-row>
|
||||
<v-divider class="my-2"></v-divider>
|
||||
<settings-row :title="$t('Timelapse.EstimatedLength')" :dynamicSlotWidth="true">
|
||||
{{ estimatedVideoLength }}
|
||||
</settings-row>
|
||||
</template>
|
||||
<template v-if="['printing', 'paused'].includes(printer_state)">
|
||||
<v-divider class="my-2"></v-divider>
|
||||
<settings-row :title="$t('Timelapse.Enabled')" :dynamicSlotWidth="true">
|
||||
<v-switch v-model="enabled" hide-details class="mt-0"></v-switch>
|
||||
</settings-row>
|
||||
<template v-if="enabled">
|
||||
<v-divider class="my-2" v-if="framesCount > 0"></v-divider>
|
||||
<settings-row :title="$t('Timelapse.Autorender')" :dynamicSlotWidth="true">
|
||||
<v-switch v-model="autorender" hide-details class="mt-0"></v-switch>
|
||||
</settings-row>
|
||||
</template>
|
||||
</template>
|
||||
<template v-if="framesCount > 0 && !['printing', 'paused'].includes(printer_state)">
|
||||
<v-divider class="mt-2 mb-4"></v-divider>
|
||||
<v-row>
|
||||
<v-col class="text-center">
|
||||
<v-btn text color="primary" :disabled="disableRenderButton" @click="boolDialogRendersettings = true">{{ $t('Timelapse.Render') }}</v-btn>
|
||||
<v-btn text color="primary" @click="saveFrames" :loading="loadings.includes('timelapse_saveframes')">{{ $t('Timelapse.SaveFrames') }}</v-btn>
|
||||
</v-col>
|
||||
</v-row>
|
||||
</template>
|
||||
</v-col>
|
||||
</v-row>
|
||||
<v-row v-else>
|
||||
<v-col>
|
||||
<p class="text-center my-0 font-italic">{{ $t('Timelapse.NoActiveTimelapse') }}</p>
|
||||
</v-col>
|
||||
</v-row>
|
||||
<template v-if="framesCount > 0">
|
||||
<settings-row :title="$t('Timelapse.Frames')">
|
||||
{{ framesCount }}
|
||||
</settings-row>
|
||||
<v-divider class="my-2"></v-divider>
|
||||
<settings-row :title="$t('Timelapse.EstimatedLength')" :dynamicSlotWidth="true">
|
||||
{{ estimatedVideoLength }}
|
||||
</settings-row>
|
||||
</template>
|
||||
<template v-if="['printing', 'paused'].includes(printer_state)">
|
||||
<v-divider class="my-2"></v-divider>
|
||||
<settings-row :title="$t('Timelapse.Enabled')" :dynamicSlotWidth="true">
|
||||
<v-switch v-model="enabled" hide-details class="mt-0"></v-switch>
|
||||
</settings-row>
|
||||
<template v-if="enabled">
|
||||
<v-divider class="my-2" v-if="framesCount > 0"></v-divider>
|
||||
<settings-row :title="$t('Timelapse.Autorender')" :dynamicSlotWidth="true">
|
||||
<v-switch v-model="autorender" hide-details class="mt-0"></v-switch>
|
||||
</settings-row>
|
||||
</template>
|
||||
</template>
|
||||
<template v-if="framesCount > 0 && !['printing', 'paused'].includes(printer_state)">
|
||||
<v-divider class="mt-2 mb-4"></v-divider>
|
||||
<v-row>
|
||||
<v-col class="text-center">
|
||||
<v-btn text color="primary" :disabled="disableRenderButton" @click="boolDialogRendersettings = true">{{ $t('Timelapse.Render') }}</v-btn>
|
||||
<v-btn text color="primary" @click="saveFrames" :loading="loadings.includes('timelapse_saveframes')">{{ $t('Timelapse.SaveFrames') }}</v-btn>
|
||||
</v-col>
|
||||
</v-row>
|
||||
</template>
|
||||
</v-card-text>
|
||||
</v-col>
|
||||
<v-col class="col-12 text--secondary" align-self="center" v-else>
|
||||
<v-card-text class="pt-0 pt-md-3">
|
||||
<p class="text-center my-0 font-italic">{{ $t('Timelapse.NoActiveTimelapse') }}</p>
|
||||
</v-card-text>
|
||||
</v-col>
|
||||
</v-row>
|
||||
@@ -84,6 +80,7 @@
|
||||
outlined
|
||||
dense
|
||||
hide-details
|
||||
attach
|
||||
></v-select>
|
||||
</v-col>
|
||||
<v-col class="col-4">
|
||||
@@ -95,6 +92,7 @@
|
||||
outlined
|
||||
dense
|
||||
hide-details
|
||||
hide-spin-buttons
|
||||
></v-text-field>
|
||||
<v-text-field
|
||||
:label="$t('Timelapse.MaxFramerate')"
|
||||
@@ -103,6 +101,7 @@
|
||||
outlined
|
||||
dense
|
||||
hide-details
|
||||
hide-spin-buttons
|
||||
class="mt-3"
|
||||
></v-text-field>
|
||||
<v-text-field
|
||||
@@ -112,6 +111,7 @@
|
||||
outlined
|
||||
dense
|
||||
hide-details
|
||||
hide-spin-buttons
|
||||
class="mt-3"
|
||||
></v-text-field>
|
||||
</template>
|
||||
@@ -123,6 +123,7 @@
|
||||
outlined
|
||||
dense
|
||||
hide-details
|
||||
hide-spin-buttons
|
||||
></v-text-field>
|
||||
</template>
|
||||
<v-text-field
|
||||
@@ -132,6 +133,7 @@
|
||||
outlined
|
||||
dense
|
||||
hide-details
|
||||
hide-spin-buttons
|
||||
class="mt-3"
|
||||
></v-text-field>
|
||||
</v-col>
|
||||
|
||||
@@ -303,19 +303,19 @@ export default class ToolsPanel extends Mixins(BaseMixin) {
|
||||
}
|
||||
|
||||
get boolTempchart(): boolean {
|
||||
return this.$store.state.gui.dashboard?.boolTempchart ?? false
|
||||
return this.$store.state.gui.view.tempchart.boolTempchart ?? false
|
||||
}
|
||||
|
||||
set boolTempchart(newVal: boolean) {
|
||||
this.$store.dispatch('gui/saveSetting', { name: 'dashboard.boolTempchart', value: newVal })
|
||||
this.$store.dispatch('gui/saveSetting', { name: 'view.tempchart.boolTempchart', value: newVal })
|
||||
}
|
||||
|
||||
get autoscaleTempchart(): boolean {
|
||||
return this.$store.state.gui.tempchart.autoscale ?? false
|
||||
return this.$store.state.gui.view.tempchart.autoscale ?? false
|
||||
}
|
||||
|
||||
set autoscaleTempchart(newVal: boolean) {
|
||||
this.$store.dispatch('gui/saveSetting', { name: 'tempchart.autoscale', value: newVal })
|
||||
this.$store.dispatch('gui/saveSetting', { name: 'view.tempchart.autoscale', value: newVal })
|
||||
}
|
||||
|
||||
get heaters(): PrinterStateHeater[] {
|
||||
@@ -377,12 +377,12 @@ export default class ToolsPanel extends Mixins(BaseMixin) {
|
||||
const serieName = 'bool'+type.charAt(0).toUpperCase() + type.slice(1)
|
||||
const value = this.editHeater[serieName]
|
||||
|
||||
const name = 'tempchart.datasetSettings.'+this.editHeater.name+'.'+type
|
||||
const name = 'view.tempchart.datasetSettings.'+this.editHeater.name+'.'+type
|
||||
this.$store.dispatch('gui/saveSetting', { name, value })
|
||||
}
|
||||
|
||||
setVisibleAdditionalSensor(sensor: string): void {
|
||||
const name = 'tempchart.datasetSettings.'+this.editHeater.name+'.additionalSensors.'+sensor
|
||||
const name = 'view.tempchart.datasetSettings.'+this.editHeater.name+'.additionalSensors.'+sensor
|
||||
this.$store.dispatch('gui/saveSetting', { name, value: this.editHeater.additionSensors[sensor].bool })
|
||||
}
|
||||
|
||||
@@ -391,7 +391,7 @@ export default class ToolsPanel extends Mixins(BaseMixin) {
|
||||
if (typeof value === 'object' && 'hex' in value) value = value.hex
|
||||
this.$store.commit('printer/tempHistory/setColor', { name: this.editHeater.name, value: value })
|
||||
|
||||
const name = 'tempchart.datasetSettings.'+this.editHeater.name+'.color'
|
||||
const name = 'view.tempchart.datasetSettings.'+this.editHeater.name+'.color'
|
||||
this.$store.dispatch('gui/saveSetting', { name, value })
|
||||
}
|
||||
|
||||
|
||||
@@ -98,7 +98,7 @@ export default class WebcamPanel extends Mixins(BaseMixin) {
|
||||
get currentCamId(): string {
|
||||
if (this.webcams.length === 1) return this.webcams[0].id ?? 'all'
|
||||
|
||||
let currentCamId = this.$store.state.gui.webcamSettings.currentCam[this.viewport ?? ''] ?? 'all'
|
||||
let currentCamId = this.$store.state.gui.view.webcam.currentCam[this.viewport ?? ''] ?? 'all'
|
||||
if (this.webcams.findIndex((webcam: GuiWebcamStateWebcam) => webcam.id === currentCamId) !== -1)
|
||||
return currentCamId
|
||||
else if (currentCamId !== undefined && this.webcams.length === 1)
|
||||
|
||||
Loaded 100 of 204 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user