Compare commits

..
51 Commits
Author SHA1 Message Date
Stefan Dej 460714e775 update links
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2020-11-28 02:40:38 +01:00
Stefan Dej b668fb6b48 typos docs
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2020-11-28 02:34:32 +01:00
Stefan Dej 8f11d50915 update docs
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2020-11-28 02:31:38 +01:00
lixxbox d13642cfd2 renamed: docs/about.md -> docs/about.md.draft
modified:   docs/index.md
2020-11-27 23:28:52 +01:00
lixxbox 94858b9340 new file: docs/_config.yml
new file:   docs/_sass/color_schemes/mainsail-dark.scss
	new file:   docs/_sass/color_schemes/mainsail.scss
	new file:   docs/about.md
	new file:   docs/additional-support/index.md
	new file:   docs/additional-support/shares.md.draft
	new file:   docs/additional-support/slicer-upload.md
	new file:   docs/additional-support/thumbnails.md
	new file:   docs/additional-support/webcam.md.draft
	new file:   docs/assets/img/additional/FileUpload-PrusaSlicer-2.2.0.png
	new file:   docs/assets/img/additional/PrusaSlicer-thumbnails.png
	new file:   docs/assets/img/additional/SuperSlicer-thumbnails.png
	new file:   docs/assets/img/additional/large-preview.png
	new file:   docs/assets/img/logo-mainsail-light.png
	renamed:    docs/images/logo-mainsail.png -> docs/assets/img/logo-mainsail.png
	new file:   docs/assets/img/logo.png
	new file:   docs/assets/img/logo.svg
	new file:   docs/assets/img/screenshot.png
	deleted:    docs/images/screenshot-dashboard.png
	deleted:    docs/images/screenshot-gcode-thumbnail.png
	deleted:    docs/images/superslicer-upload.png
	new file:   docs/index.md
	new file:   docs/necessary-cfg.md
	new file:   docs/setup-guide/index.md
	new file:   docs/setup-guide/klipper.md
	new file:   docs/setup-guide/mainsail.md
	new file:   docs/setup-guide/moonraker.md
	new file:   docs/setup-guide/operating-system.md
2020-11-27 23:28:52 +01:00
Stefan Dej 605c6ee05e bugfix: PWA maskable icons
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2020-11-27 22:21:20 +01:00
Stefan Dej 31667347f9 bugfix: temperature_sensor target temp in chart
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2020-11-27 20:00:04 +01:00
Stefan Dej 99529defb8 bugfix: change printer name
bugfix: favicon percent icon

Signed-off-by: Stefan Dej <meteyou@gmail.com>
2020-11-27 18:48:37 +01:00
Stefan Dej 188bce0aa4 bugfixes
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2020-11-26 23:00:27 +01:00
Stefan Dej 98f50790c0 bugfixes: missing config update to vuex models, ControlPanel.vue buttons equal width, ConfigFilesPanel.vue default path
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2020-11-22 20:02:17 +01:00
meteyou 1e2c2d15e6 voron clean & update favicon, icons & pwa
Signed-off-by: meteyou <meteyou@gmail.com>
2020-11-22 01:35:27 +01:00
meteyou cb602518f0 feature: redesign panel headers
Signed-off-by: meteyou <meteyou@gmail.com>
2020-11-21 22:52:54 +01:00
meteyou 8f363ec1c1 feature: dynamic temperature-sensor icons + header minimize from temperature panel
Signed-off-by: meteyou <meteyou@gmail.com>
2020-11-21 18:20:58 +01:00
meteyou f26aff2085 feature: update PowerControlPanel.vue > new moonraker version of power plugin
Signed-off-by: meteyou <meteyou@gmail.com>
2020-11-21 17:30:28 +01:00
meteyou fcae508d19 bugfix: update to smaller header
Signed-off-by: meteyou <meteyou@gmail.com>
2020-11-21 16:51:53 +01:00
meteyou d9b5486346 bugfix: update to smaller header
Signed-off-by: meteyou <meteyou@gmail.com>
2020-11-21 16:49:27 +01:00
meteyou a333b8afa6 bugfix: upload new navi background
Signed-off-by: meteyou <meteyou@gmail.com>
2020-11-21 10:37:18 +01:00
meteyou 672c6b3f32 bugfix: background color on scroll
Signed-off-by: meteyou <meteyou@gmail.com>
2020-11-21 10:13:41 +01:00
meteyou ebaab6324d feature: save countPerPage from gcode files & config files in gui.json
Signed-off-by: meteyou <meteyou@gmail.com>
2020-11-20 20:28:21 +01:00
meteyou 6c01fc04f8 bugfix: fixed updaten heaters in ToolPanel
Signed-off-by: meteyou <meteyou@gmail.com>
2020-11-20 20:27:21 +01:00
meteyou 7756362a58 bugfix: fixed toastr bg colors and font
Signed-off-by: meteyou <meteyou@gmail.com>
2020-11-20 20:26:37 +01:00
meteyou 601d49fc4e bugfix: reprogramming button loadings
Signed-off-by: meteyou <meteyou@gmail.com>
2020-11-20 00:47:58 +01:00
meteyou 7b2d257db3 optimize console view
Signed-off-by: meteyou <meteyou@gmail.com>
2020-11-19 22:41:06 +01:00
meteyou 3fd3862bc5 renew dashboard sizes
feature: new estimated times

Signed-off-by: meteyou <meteyou@gmail.com>
2020-11-19 22:14:39 +01:00
meteyou e9179e5bcd feature: new estimate time calculation
move getters to printer/getters

Signed-off-by: meteyou <meteyou@gmail.com>
2020-11-19 00:29:59 +01:00
meteyou f068a2ef21 update packages
Signed-off-by: meteyou <meteyou@gmail.com>
2020-11-18 22:17:28 +01:00
meteyou 6da293b494 feature: debug .env.development.local.example for moonraker connection
Signed-off-by: meteyou <meteyou@gmail.com>
2020-11-18 21:21:43 +01:00
meteyou fe385d1558 bugfix: dashboard > tempchart
Signed-off-by: meteyou <meteyou@gmail.com>
2020-11-18 11:05:39 +01:00
meteyou d4785c0b27 bugfix: dashbaord > print settings > steps +/- buttons
Signed-off-by: meteyou <meteyou@gmail.com>
2020-11-18 11:04:38 +01:00
meteyou 894ef6912b bugfix: dashboard > MiniconsolePanel.vue > empty message line-height
Signed-off-by: meteyou <meteyou@gmail.com>
2020-11-18 09:15:34 +01:00
meteyou 3997c8b3a1 bugfix: machine limits -> max 0 on startup
Signed-off-by: meteyou <meteyou@gmail.com>
2020-11-17 22:22:48 +01:00
meteyou 5a4dfb492b bugfix: save gcodefiles settings
Signed-off-by: meteyou <meteyou@gmail.com>
2020-11-17 20:47:54 +01:00
meteyou 49c79c9eae bugfix: tool input number buttons hidden
bugfix: UFP thumbnail (only 300px)
bugfix: moonraker > websocket subscription
bugfix: miniconsole > different line baseline
bugfix: new metadata push > redirect to current file
feature: show/hide colums in gcode-files
feature: show/hide hidden files/dir
feature: display missing config sections
feature: display klippy-state in settings > machinies

Signed-off-by: meteyou <meteyou@gmail.com>
2020-11-17 00:35:59 +01:00
meteyou 2bcf08e5ab typo: wikipedia -> wiki
Signed-off-by: meteyou <meteyou@gmail.com>
2020-11-13 21:17:08 +01:00
meteyou ce6843cf49 feature: Missing config panel on Dashboard.vue
Signed-off-by: meteyou <meteyou@gmail.com>
2020-11-09 23:17:52 +01:00
meteyou cf7cb122d1 move docs to github wiki
Signed-off-by: meteyou <meteyou@gmail.com>
2020-11-09 20:42:46 +01:00
meteyou a56050ca1c move docs to github wiki
Signed-off-by: meteyou <meteyou@gmail.com>
2020-11-09 20:41:48 +01:00
meteyou 39fdb75a96 move docs to github wiki
Signed-off-by: meteyou <meteyou@gmail.com>
2020-11-09 20:40:39 +01:00
meteyou f6687a944d feature: show klippy state panel in settings > machine & rename SystemPanel.vue to LogfilesPanel.vue.
Signed-off-by: meteyou <meteyou@gmail.com>
2020-11-08 21:56:44 +01:00
meteyou c513a7ca51 bugfix: print metadata by direct upload & print form slicer
Signed-off-by: meteyou <meteyou@gmail.com>
2020-11-08 21:28:13 +01:00
meteyou 616f84edbe feature: show/hide columns in G-Code-Files
Signed-off-by: meteyou <meteyou@gmail.com>
2020-11-08 18:29:31 +01:00
meteyou fefabb1ef7 delete error toasts
Signed-off-by: meteyou <meteyou@gmail.com>
2020-11-08 00:33:38 +01:00
meteyou 189fd3ddd7 update update.md for moonraker dep.
Signed-off-by: meteyou <meteyou@gmail.com>
2020-11-07 23:22:26 +01:00
Leonard Freimuth e796b27145 Update App.vue 2020-11-05 21:31:41 +01:00
Stefan Dej ac32eca665 fix mini console
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2020-10-27 23:27:12 +01:00
Stefan Dej f94402b94b update version number, installation.md, update.md to 0.2.6
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2020-10-27 23:06:48 +01:00
Stefan Dej 91f2e9b6d8 feature: modify dashboard console for more message space
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2020-10-27 23:05:42 +01:00
Stefan Dej 0f955fbeb4 bugfix: machine-limits expander
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2020-10-27 22:44:11 +01:00
Randell L Hodges 6282356ddd clear fileupload after uploading 2020-10-27 19:50:27 +01:00
Randell L Hodges 9057bea653 Modified times now come as unix times 2020-10-27 19:45:21 +01:00
Stefan Dej d19bf2ee05 Update update.md and installation.md
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2020-10-25 00:21:46 +02:00
139 changed files with 23819 additions and 4877 deletions

No files matched your search

+8
View File
@@ -0,0 +1,8 @@
# hostname or ip from the moonraker instance
VUE_APP_HOSTNAME=printer.local
# port from the moonraker instance
VUE_APP_PORT=7125
# reconnect interval in ms
VUE_APP_RECONNECT_INTERVAL=5000
+1
View File
@@ -10,3 +10,4 @@ temp
.versions
.changelog
package-lock.json
*.local
+3 -3
View File
@@ -2,14 +2,14 @@
Mainsail is a lightweight & responsive web interface for the [Klipper](https://github.com/KevinOConnor/klipper)
3D printer firmware. It communicates with the [Moonraker (Klipper-API)](https://github.com/arksine/moonraker) from [Arksine](https://github.com/arksine).
![screenshot-dashboard](docs/images/screenshot-dashboard.png)
![screenshot-dashboard](docs/assets/img/screenshot.png)
To begin using Mainsail start by [installing](docs/installation.md) it or read the [documentation](docs/README.md) for more informations.
To begin using Mainsail start by [installing](https://meteyou.github.io/mainsail/setup/) it or read the [pages](https://meteyou.github.io/mainsail/) for more informations.
## Credit, sources and inspiration
* [Kevin O'Connor](https://github.com/KevinOConnor) for the awesome 3D printer firmware [Klipper](https://github.com/KevinOConnor/klipper)
* [Eric Callahan (arksine)](https://github.com/Arksine) for [Moonraker (Klipper API)](https://github.com/Arksine/moonraker). Without Moonraker, Mainsail would not be possible.
* [lixxbox](https://github.com/lixxbox) for the Mainsail logo
* [lixxbox](https://github.com/lixxbox) for the Mainsail logo & Docs
* [Vue.js](https://vuejs.org/): The Progressive JavaScript Framework
* [Vuetify](https://vuetifyjs.com/): Material Design Component Framework for Vue.js
+1 -7
View File
@@ -1,7 +1 @@
# Overview
- [Installation](installation.md)
- [Update](update.md)
- [Macros](macros.md)
- [Slicer upload](slicer-upload.md)
- [Gcode thumbnails (PrusaSlicer & SuperSlicer only)](gcode-thumbnails.md)
Welcome to the Mainsail documentation. The [index](http://meteyou.github.io/mainsail) of the docs is here.
+6
View File
@@ -0,0 +1,6 @@
title: "Mainsail"
logo: "/assets/img/logo-mainsail.png"
description: A web interface for Klipper
remote_theme: pmarsceill/just-the-docs
color_scheme: "mainsail"
search_enabled: true
@@ -0,0 +1,17 @@
$body-background-color: darken($grey-dk-300, 3%);
$sidebar-color: $grey-dk-300;
$border-color: $grey-dk-200;
$body-text-color: $grey-lt-300;
$body-heading-color: $grey-lt-000;
$nav-child-link-color: $grey-dk-000;
$search-result-preview-color: $grey-dk-000;
$link-color: $red-300;
$btn-primary-color: $blue-200;
$base-button-color: $grey-dk-250;
$code-background-color: $grey-dk-250;
$search-background-color: $grey-dk-250;
$table-background-color: $grey-dk-250;
$feedback-color: darken($sidebar-color, 3%);
+1
View File
@@ -0,0 +1 @@
$link-color: $red-300;
+10
View File
@@ -0,0 +1,10 @@
---
layout: default
title: About
nav_order: 100
has_children: false
permalink: /about
---
# About Mainsail
trollolol
+7
View File
@@ -0,0 +1,7 @@
---
layout: default
title: Additional Support
nav_order: 5
has_children: true
permalink: /additional
---
+44
View File
@@ -0,0 +1,44 @@
---
layout: default
title: Samba shares
parent: Additional Support
nav_order: 1
permalink: /additional/shares
---
## Samba shares
``sudo apt-get update``
``sudo apt-get install samba samba-common-bin``
> _passwort setzen - wird der schritt benötigt?_
``sudo smbpasswd -a pi​``
``sudo chmod -R 777 /home/pi/klipper_config``
``sudo chmod -R 777 /home/pi/sdcard``
``sudo nano /etc/samba/smb.conf``
```ini
[klipper_config]
comment = klipper config
path = /home/pi/klipper_config
writeable = Yes
only guest = Yes
create mask = 0777
directory mask = 0777
browseable = Yes
public = yes
[virtual_sdcard]
comment = virtual sdcard
path = /home/pi/sdcard
writeable = yes
only guest = yes
create mask = 0777
directory mask = 0777
browseable = yes
public = yes
```
``sudo service smbd restart``
+21
View File
@@ -0,0 +1,21 @@
---
layout: default
title: Slicer upload
parent: Additional Support
nav_order: 1
permalink: /additional/slicer-upload
---
## Upload from Slicer
### PrusaSlicer/SuperSlicer (prior to v2.3.0)
You can upload your GCode-files from your Slicer. Moonraker simulates the octoprint-upload function.
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.
For "API Key" you can type anything.
![screenshot](../assets/img/additional/FileUpload-PrusaSlicer-2.2.0.png)
### PrusaSlicer/SuperSlicer (since v2.3.0)
A "Physical Printer" must be defined to configure the settings from above.
More detailed instructions will follow.
+28
View File
@@ -0,0 +1,28 @@
---
layout: default
title: Thumbnails
parent: Additional Support
nav_order: 1
permalink: /additional/thumbnails
---
## Thumbnails
Mainsail can display thumbnails in the file browser and as previews in the print status.
![preview](../assets/img/additional/large-preview.png)
### 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.
![SuperSlicer](../assets/img/additional/SuperSlicer-thumbnails.png)
### PrusaSlicer/SuperSlicer
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.
![PrusaSlicer](../assets/img/additional/PrusaSlicer-thumbnails.png)
From now on the gcode files contain thumbnails displayed by mainsail.
+7
View File
@@ -0,0 +1,7 @@
---
layout: default
title: Webcam
parent: Additional Support
nav_order: 1
permalink: /additional/webcam
---
Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.8 KiB

File renamed without changes.

Before

Width:  |  Height:  |  Size: 6.9 KiB

After

Width:  |  Height:  |  Size: 6.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

+27
View File
@@ -0,0 +1,27 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Generator: Adobe Illustrator 25.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 599.38 523.11" style="enable-background:new 0 0 599.38 523.11;" xml:space="preserve">
<style type="text/css">
.st0{fill:#E30613;stroke:#009640;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;}
.st1{fill:#D41216;}
.st2{fill:#D41216;stroke:#009640;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;}
.st3{fill:none;stroke:#009640;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;}
.st4{display:none;}
.st5{display:inline;fill:#E73D26;}
.st6{display:inline;fill:none;}
</style>
<g id="Ebene_2">
<g>
<path class="st0" d="M382.29,142.98"/>
<path class="st1" d="M382.29,142.98L132.98,522.82L0,522.68L344.3,0l0,0C352.18,49.06,365.2,97.68,382.29,142.98"/>
<path class="st2" d="M413.28,213.54L208.5,522.92l132.94,0.19l135.03-206.33l0,0C452.69,284.29,431.53,249.77,413.28,213.54 L413.28,213.54"/>
<path class="st3" d="M599.38,447.69"/>
<path class="st3" d="M518.6,369.16"/>
<path class="st1" d="M599.38,447.69l-49.25,75.42L417,522.82l101.6-153.67l0,0C543.48,397.35,570.49,423.61,599.38,447.69 L599.38,447.69z"/>
</g>
</g>
<g id="Ebene_1" class="st4">
<path class="st5" d="M-45.42,426.29c0.34,0.34,97.62,1.14,107.04,0.94c0.94-0.07,1.75-0.74,2.29-2.08 c0.47-1.14,1.08-2.02,1.41-2.02s0.61-0.34,0.61-0.67c0-0.81,2.76-4.91,3.56-5.24c0.27-0.13,0.47-0.61,0.47-1.08 c0-0.74,0.61-1.61,3.29-4.84c0.34-0.47,0.47-1.01,0.27-1.21c-0.27-0.2-0.07-0.4,0.34-0.4c0.47,0,0.81-0.47,0.81-1.01 c0-0.47,0.47-1.21,1.08-1.55c0.61-0.34,1.08-0.87,1.08-1.21c0.07-0.54,3.09-5.58,3.9-6.32c0.2-0.2,0.94-1.41,1.61-2.69 c0.74-1.28,1.48-2.49,1.68-2.69c0.61-0.54,3.43-4.64,3.43-4.98c0-0.2,1.95-3.23,4.37-6.72s4.37-6.66,4.37-7.06 c0-0.34,0.2-0.74,0.54-0.87c0.54-0.27,3.5-4.37,3.5-4.91c0-0.2,0.34-0.74,0.74-1.21c0.34-0.47,2.22-3.23,4.17-6.19 c1.88-2.96,3.56-5.51,3.83-5.71c0.2-0.2,0.74-1.14,1.28-2.15c0.54-1.01,1.48-2.49,2.22-3.16c0.67-0.74,1.21-1.55,1.21-1.68 c0-0.61,12.98-20.17,13.65-20.64c0.34-0.2,0.47-0.61,0.34-0.81c-0.07-0.27,0.27-1.01,0.87-1.68c0.61-0.67,1.61-2.22,2.35-3.36 c0.67-1.21,1.48-2.15,1.82-2.15c0.27,0,0.4-0.27,0.13-0.61c-0.2-0.34,0.07-1.01,0.54-1.55c1.48-1.48,5.18-7.13,5.18-7.87 c0-0.4,0.34-0.74,0.67-0.74c0.4,0,0.67-0.47,0.67-1.01c0-0.54,0.34-1.01,0.67-1.01c0.4,0,0.67-0.4,0.67-0.94 c0-0.54,0.27-1.08,0.54-1.21c0.27-0.13,1.28-1.41,2.15-2.89c0.87-1.48,1.88-3.03,2.15-3.36c1.01-1.21,9.28-13.92,9.28-14.19 c0-0.34,4.24-6.45,5.18-7.46c0.4-0.47,1.01-1.48,1.21-2.22c0.2-0.74,0.67-1.34,1.01-1.34c0.27,0,0.67-0.54,0.94-1.21 c0.4-1.14,1.82-3.56,2.49-4.17c0.2-0.2,2.15-3.16,4.37-6.66c2.15-3.43,4.5-6.86,5.11-7.53c0.67-0.74,1.08-1.28,0.87-1.28 c-0.2,0,0.74-1.48,2.02-3.36c1.28-1.82,2.35-3.63,2.35-4.03c0-0.34,0.2-0.67,0.54-0.67c0.27,0,1.21-1.34,2.15-3.03 c0.94-1.68,1.88-3.03,2.15-3.03c0.34,0,0.54-0.4,0.54-0.87c0-0.54,0.61-1.48,1.34-2.15c0.74-0.67,1.34-1.61,1.34-2.15 c0-0.47,0.34-0.87,0.67-0.87c0.4,0,0.67-0.34,0.67-0.67c0-0.74,3.16-5.85,4.5-7.26c0.4-0.4,1.01-1.41,1.21-2.15 s0.67-1.34,0.94-1.34c0.34,0,0.94-0.87,1.41-2.02c0.47-1.14,1.08-2.02,1.34-2.02c0.27,0,0.87-0.87,1.34-2.02 c0.47-1.14,1.08-2.02,1.34-2.02c0.27,0,0.87-0.94,1.34-2.02c0.47-1.14,1.14-2.02,1.48-2.02s0.4-0.34,0.2-0.67 c-0.2-0.4-0.2-0.67,0.13-0.67c0.27,0,1.41-1.55,2.55-3.36c1.08-1.88,2.22-3.36,2.55-3.36c0.27,0,0.4-0.27,0.2-0.61 c-0.2-0.27,0.2-1.08,0.94-1.75c0.74-0.67,1.34-1.55,1.34-1.95c0-0.4,0.74-1.61,1.68-2.62c0.94-1.01,1.55-1.82,1.41-1.82 c-0.34,0,8.87-14.19,10.35-15.93c0.34-0.47,0.67-1.14,0.67-1.55c0-0.34,0.34-0.67,0.67-0.67c0.4,0,0.67-0.47,0.67-1.01 s0.34-1.01,0.67-1.01c0.4,0,0.67-0.34,0.67-0.67c0-0.4,1.08-2.22,2.35-4.03s2.35-3.5,2.35-3.7s0.61-1.01,1.34-1.82 c0.74-0.81,1.34-1.88,1.34-2.35s0.34-0.87,0.74-0.87c0.34,0,0.54-0.27,0.34-0.54c-0.2-0.34,0.27-0.94,0.94-1.48 c0.67-0.54,1.14-1.14,1.01-1.34c-0.2-0.27,0.27-1.01,1.01-1.68c0.74-0.67,1.34-1.48,1.34-1.75c0-0.27,2.35-4.1,5.24-8.47 c2.96-4.37,8.27-12.51,11.9-18.02c3.63-5.58,6.93-10.29,7.33-10.56c0.4-0.27,0.47-0.54,0.13-0.54c-0.34,0-0.13-0.54,0.4-1.21 c1.01-1.21,1.08-1.75,0.2-3.83c-2.89-6.93-5.04-12.77-5.04-13.51c0-0.54-0.27-0.94-0.67-0.94c-0.34,0-0.61-0.2-0.54-0.54 c0.2-0.87-1.75-6.52-2.42-6.99c-0.4-0.27-0.47-0.67-0.2-0.94s0.2-0.81-0.13-1.21c-0.47-0.67-3.97-10.62-4.37-12.71 c-0.13-0.47-0.4-1.34-0.61-2.02c-0.27-0.61-0.67-1.68-0.94-2.35c-0.2-0.61-0.47-1.61-0.61-2.15c-0.27-1.34-1.61-5.98-2.42-8.14 c-0.34-0.94-0.67-2.35-0.74-3.16c-0.07-0.81-0.27-1.48-0.47-1.48c-0.27,0-0.47-0.4-0.54-0.87c0-0.4-0.2-1.41-0.4-2.15 c-0.2-0.74-1.01-3.9-1.68-7.06c-0.74-3.16-1.34-5.78-1.41-5.92c-0.13-0.07-0.2-0.34-0.27-0.67c-0.34-1.34-1.28-5.92-1.41-6.52 c-0.07-0.4-0.2-0.81-0.27-1.01c-0.2-0.4-0.54-2.22-0.94-5.38c-0.2-1.28-0.54-2.82-0.74-3.43c-0.27-0.61-0.4-1.34-0.34-1.68 c0.07-0.34,0-0.74-0.07-0.94c-0.27-0.67-0.67-3.09-0.94-5.38c-0.13-1.28-0.34-2.35-0.4-2.35c-0.13,0-0.61-3.36-0.74-5.92 c-0.07-1.01-0.4-2.02-0.74-2.22s-0.27-0.81,0.13-1.28c1.48-1.75-0.54-1.61-2.08,0.2l0,0c-0.87,1.01-2.22,2.96-2.96,4.37 c-0.74,1.48-1.95,3.29-2.69,4.1c-0.74,0.81-1.95,2.62-2.69,4.03c-0.74,1.34-1.82,3.03-2.42,3.63c-0.54,0.61-1.61,2.22-2.35,3.5 c-1.48,2.69-1.68,2.96-3.97,5.78c-0.94,1.21-1.68,2.35-1.68,2.55c0,0.47-6.66,10.56-7.33,11.16c-0.2,0.2-1.01,1.41-1.68,2.69 c-0.74,1.28-1.48,2.49-1.68,2.69c-0.47,0.4-8.27,12.03-8.81,13.11 M294.17,171.07c-0.74,1.14-1.82,2.76-2.35,3.56 c-0.54,0.81-1.68,2.55-2.49,3.83c-1.88,2.82-2.22,3.36-5.58,8.2c-1.48,2.15-2.69,4.03-2.69,4.24s-0.34,0.67-0.74,1.14 c-0.34,0.47-4.24,6.25-8.67,12.91c-4.37,6.66-8.27,12.44-8.67,12.91c-0.4,0.47-0.74,0.94-0.74,1.14c0,0.61-4.3,6.79-4.84,6.99 c-0.27,0.13-0.54,0.67-0.54,1.21s-0.34,0.94-0.74,0.94c-0.34,0-0.54,0.27-0.34,0.61c0.27,0.34,0.2,0.74-0.07,0.87 c-0.81,0.34-4.91,6.39-4.91,7.19c0,0.34-0.54,1.01-1.14,1.34c-0.67,0.4-0.94,0.74-0.67,0.74s-0.07,0.67-0.87,1.48 c-0.74,0.81-1.34,1.88-1.34,2.35s-0.2,0.87-0.47,0.87c-0.34,0-1.41,1.55-2.55,3.43c-1.08,1.88-2.29,3.77-2.69,4.24 c-1.34,1.61-3.7,5.04-3.7,5.45c0,0.27-0.4,0.87-0.81,1.34c-1.95,2.15-2.49,2.89-2.22,3.16c0.13,0.13-0.47,1.14-1.34,2.15 c-0.94,1.08-1.68,2.15-1.68,2.42s-0.61,1.14-1.34,2.02s-1.34,1.95-1.34,2.49s-0.27,0.81-0.61,0.61c-0.34-0.2-0.81,0.34-1.01,1.28 cLine truncated
<line class="st6" x1="108.71" y1="523.11" x2="108.7" y2="523.11"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 382 KiB

-11
View File
@@ -1,11 +0,0 @@
# Gcode-thumbnails with PrusaSlicer and SuperSlicer
Mainsail can display these thumbnails in the gcode filemanager. To enable the thumbnails,
open your slicer (PrusaSlicer or SuperSlicer) click on `Help > Show Configuration Folder`
and then inside the `printers` sub-folder you’ll find your printer profiles.
Open your desired printer profile in your favorite text editor and find the `thumbnails =`
section and add the resolutions `32x32,400x300`. Save the file and restart your slicer.
Now you should see a preview in the filemanager and if you will start a new job.
![Screenshot gcode thumbnail](images/screenshot-gcode-thumbnail.png)
Binary file not shown.

Before

Width:  |  Height:  |  Size: 734 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 74 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 31 KiB

+15
View File
@@ -0,0 +1,15 @@
---
layout: default
title: Welcome
nav_order: 1
has_children: false
---
# Welcome to the Mainsail docs!
Mainsail is a lightweight & responsive web interface for the Klipper 3D printer firmware. It communicates with Moonraker (Klipper-API) from Arksine.
[Setup Guide](/setup-guide/index.md){: .btn}
## Screenshots
![Dashboard](assets/img/screenshot.png)
+42 -8
View File
@@ -1,10 +1,38 @@
# Useful macros for Moonraker/Mainsail
---
layout: default
title: Necessary Configuration
nav_order: 4
has_children: false
permalink: /necessary-configuration
---
## pause / resume / cancel
Mainsail requires a minimum configuration to function properly. It should give you a warning at startup if the required parts are not found in your configuration.
## Required configuration
### virtual_sdcard
This allows gcode file uploads.
```yaml
[virtual_sdcard]
path: ~/sdcard
```
#is required to load the pause_resume module in klipper
[pause_resume]
### display_status
This is required for messages in your status panel, if you don't have a `[display]` in your configuration.
```yaml
[display_status]
```
### pause / resume / cancel
This enables pause / resume in mainsail.
```yaml
[pause_resume]
```
## Macros
### for pause /resume / cancel functionality
These should be modified to your own needs.
```yaml
[gcode_macro PAUSE]
rename_existing: BASE_PAUSE
default_parameter_X: 230 #edit to your park position
@@ -19,7 +47,9 @@ gcode:
G1 Z{Z}
G90
G1 X{X} Y{Y} F6000
```
```yaml
[gcode_macro RESUME]
rename_existing: BASE_RESUME
default_parameter_E: 1 #edit to your retract length
@@ -29,7 +59,9 @@ gcode:
G90
RESTORE_GCODE_STATE NAME=PAUSE_state MOVE=1
BASE_RESUME
```
```yaml
[gcode_macro CANCEL_PRINT]
rename_existing: BASE_CANCEL_PRINT
gcode:
@@ -39,9 +71,11 @@ gcode:
BASE_CANCEL_PRINT
```
## customize klipper default commands
for example, if you want to adjust the BED_MESH_CALIBRATE command, which will execute under "heightmap > calibrate".
```
## Optional
### customize klipper default commands
for example, if you want to adjust the `BED_MESH_CALIBRATE` command, which you can run from "heightmap > calibrate".
```yaml
[gcode_macro BED_MESH_CALIBRATE]
rename_existing: BASE_BED_MESH_CALIBRATE
gcode:
@@ -52,4 +86,4 @@ gcode:
#the original gcode
BASE_BED_MESH_CALIBRATE
#after the original gcode
```
```
+8
View File
@@ -0,0 +1,8 @@
---
layout: default
title: Setup Guide
nav_order: 2
has_children: true
permalink: /setup/
---
This is a guide to setting up Klipper, Moonraker & Mainsail on a Raspberry Pi with Raspberry Pi OS. Other SBCs and/or Linux distributions might work, but may require a customized installation script or configs.
+63
View File
@@ -0,0 +1,63 @@
---
layout: default
title: Klipper
parent: Setup Guide
nav_order: 3
permalink: /setup/klipper
---
## Klipper
### Installation
The following commands will clone Klipper to an appropriate directory in HOME and run the setup script.
```bash
cd ~
git clone https://github.com/KevinOConnor/klipper
cd ~/klipper
./scripts/install-octopi.sh
```
### Configuration
After Klipper is installed, you will need to change the default location of the printer.cfg and add the UDS (unix domain socket). This is defined in the file `/etc/default/klipper`
To edit this file type:
```bash
sudo nano /etc/default/klipper
```
find the following line:
```
KLIPPY_ARGS="/home/pi/klipper/klippy/klippy.py /home/pi/printer.cfg -l /tmp/klippy.log"
```
and change the config location to `/home/pi/klipper_config/printer.cfg` and add `-a /tmp/klippy_uds` to define UDS.
```
KLIPPY_ARGS="/home/pi/klipper/klippy/klippy.py /home/pi/klipper_config/printer.cfg -l /tmp/klippy.log -a /tmp/klippy_uds"
```
Save the file with `CTRL+O` and close the editor with `CTRL+X`.
You have to create the directories for your klipper configuration and the virtual_sdcard directory:
```bash
mkdir ~/klipper_config
mkdir ~/sdcard
```
Move your printer.cfg to ~/klipper_config and check if the following entries are present in the config.
```ini
[virtual_sdcard]
# for gcode upload
path: ~/sdcard
[display_status]
# for display messages in status panel
[pause_resume]
# for pause/resume functionality.
# Mainsail needs gcode macros for `PAUSE`, `RESUME` and `CANCEL_PRINT` to make the buttons work.
```
> ℹ️ **These entries are very important.**
For the full functionality of mainsail, you should also define gcode macros for `PAUSE`, `RESUME` and `CANCEL_PRINT`. You'll find further information in [this](../necessary-cfg.md){: target="_blank"} document.
After your config is in place, restart klipper with `sudo service klipper restart`. Check the `/tmp/klippy.log` for errors, if Klipper starts correctly you can continue the guide.
---
[< previous step](operating-system.md){: .btn } [next step >](moonraker.md){: .btn}
@@ -1,124 +1,19 @@
# Installation
This document provides a guide on how to install Moonraker & Mainsail on a Raspberry
Pi running Raspian/Rasperry Pi OS. Other SBCs and/or linux distributions
may work, however they may need a custom install script.
---
layout: default
title: Mainsail
parent: Setup Guide
nav_order: 5
permalink: /setup/mainsail
---
**Please don't use a octopi image!!!**
## Installing operation system image
It's recommend to use a clean Raspberry Pi OS 32-bit Lite (previosly called Raspbian)
image. You can download it [here](https://downloads.raspberrypi.org/raspios_lite_armhf_latest).
More information about the installtion of Raspberry Pi OS are
[here](https://www.raspberrypi.org/documentation/installation/installing-images/).
**If you have finished the installation and connected via ssh, you can continue.**
## Install Requirements
```
sudo apt update && sudo apt upgrade
sudo apt install git dfu-util unzip
```
## Install Klipper
In this step, we install klipper.
```
cd ~
git clone https://github.com/KevinOConnor/klipper
cd ~/klipper
./scripts/install-octopi.sh
```
After you install Klipper with its dependencies you have to change the location
of the `printer.cfg` and add the UDS. This is definied in the `/etc/default/klipper` file.
To edit this file type:
```
sudo nano /etc/default/klipper
```
and then change:
```
KLIPPY_ARGS="/home/pi/klipper/klippy/klippy.py /home/pi/printer.cfg -l /tmp/klippy.log"
```
to:
```
KLIPPY_ARGS="/home/pi/klipper/klippy/klippy.py /home/pi/klipper_config/printer.cfg -l /tmp/klippy.log -a /tmp/klippy_uds"
```
Save the file with `CTRL+O` and close the editor with `CTRL+X`.
At least you have to create the config and the virtual_sdcard directory with:
```
mkdir ~/klipper_config
mkdir ~/sdcard
```
and copy your `printer.cfg` in the `~/klipper_config` directory and restart klipper with
`sudo service klipper restart`. Please check the `klippy.log`, if Klipper starts
correctly and then continue the guide.
and check if you have following lines in your `printer.cfg`:
```
[virtual_sdcard]
path: ~/sdcard
[pause_resume]
[display_status]
```
## Install Moonraker (API)
You can now install the Moonraker application:
```
cd ~
git clone https://github.com/Arksine/moonraker.git
```
Finally, run Moonraker's install script:
```
cd ~/moonraker/scripts
./install-moonraker.sh
```
When the script completes it should start both Moonraker and Klipper. In
`klippy.log` you should find the following entry:\
`Moonraker: server connection detected`
### Configure Moonraker
A basic configuration that authorizes clients on a range
from 192.168.1.1 - 192.168.1.254 is as follows.
Create the configfile with `nano ~/moonraker.conf` and add the following lines:
```
[server]
host: 0.0.0.0
config_path: ~/klipper_config
[authorization]
enabled: true
trusted_clients:
192.168.1.0/24
```
Note that the above configuration can differ! Make sure you determine your local IP and replace the IP from the example configuration above with the one from your own network.
Restart Moonraker (`sudo service moonraker restart`) and open the url `http://<printer-ip>:7125/printer/info` in your browser.
If you see a content like this
```
{"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)"}}
```
your API is working!
For more informations about the Moonraker installation or configuration
look at the Repository from Arksine:
[Moonraker Repository install Documentation](https://github.com/Arksine/moonraker/blob/master/docs/installation.md)
## Install Mainsail (webinterface)
## Mainsail
### Install webserver & reverse proxy (nginx)
nginx is important to mount all components on port 80 and host the static files from Mainsail.
To install nginx you only need to execute:
```
sudo apt install nginx
```
nginx is important to mount all components on port 80 and host the static files from Mainsail. To install nginx you only need to execute:
`sudo apt install nginx`
now we create the config files with:
@@ -131,6 +26,7 @@ sudo touch /etc/nginx/conf.d/common_vars.conf
Each file can be filled with the following content:
`sudo nano /etc/nginx/conf.d/upstreams.conf`
```
# /etc/nginx/conf.d/upstreams.conf
@@ -146,6 +42,8 @@ upstream mjpgstreamer {
server 127.0.0.1:8081;
}
```
Save the file with `CTRL+O` and close the editor with `CTRL+X`.
`sudo nano /etc/nginx/conf.d/common_vars.conf`
@@ -157,6 +55,7 @@ map $http_upgrade $connection_upgrade {
'' close;
}
```
Save the file with `CTRL+O` and close the editor with `CTRL+X`.
`sudo nano /etc/nginx/sites-available/mainsail`
@@ -249,8 +148,10 @@ server {
}
}
```
Save the file with `CTRL+O` and close the editor with `CTRL+X`.
Create directory for static files and active nginx config:
```
mkdir ~/mainsail
sudo rm /etc/nginx/sites-enabled/default
@@ -258,8 +159,8 @@ sudo ln -s /etc/nginx/sites-available/mainsail /etc/nginx/sites-enabled/
sudo service nginx restart
```
Now you can check again the API if it works with the reverse proxy.
Open the url `http://<printer-ip>/printer/info` in your browser. if you see a content like this:
Now you can check again the API if it works with the reverse proxy. Open the url http://<printer-ip>/printer/info in your browser. if you see a content like this:
```
{"result": {"hostname": "voron250", "error_detected": false, "version": "v0.8.0-479-gd586fb06", "is_ready": true, "message": "Printer is ready", "cpu": "4 core ARMv7 Processor rev 4 (v7l)"}}
```
@@ -267,28 +168,35 @@ Open the url `http://<printer-ip>/printer/info` in your browser. if you see a co
Now we can install Mainsail (static httpdocs).
### Install httpdocs
Now you can download the current mainsail static data
```
cd ~/mainsail
wget -q -O mainsail.zip https://github.com/meteyou/mainsail/releases/download/v0.2.4/mainsail-beta-0.2.4.zip && unzip mainsail.zip && rm mainsail.zip
wget -q -O mainsail.zip https://github.com/meteyou/mainsail/releases/download/latest/mainsail.zip && unzip mainsail.zip && rm mainsail.zip
```
Now it should be possible to open the interface: `http://<printer-ip>/`.
### Important macros
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.
[Link to the macros doc](macros.md)
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"}
### Change the Hostname (optional)
to use the hostname instate of the ip, you can install the avahi-daemon:
```
sudo apt install avahi-daemon
```
`sudo apt install avahi-daemon`
and you can config your hostname:
```
sudo raspi-config
```
in 2 Network Options > N1 Hostname you can edit your hostname of your raspberry pi.
After a reboot you can use `http://<hostname>.local/` to open the webinterface.
`sudo raspi-config`
in 2 Network Options > N1 Hostname you can edit your hostname of your raspberry pi. After a reboot you can use http://<hostname>.local/ to open the webinterface.
---
[< previous step](moonraker.md){: .btn }
+80
View File
@@ -0,0 +1,80 @@
---
layout: default
title: Moonraker
parent: Setup Guide
nav_order: 4
permalink: /setup/moonraker
---
## Moonraker
Moonraker is a web server that exposes APIs which lets Mainsail interact with Klipper.
### Installation
Clone Moonraker into your HOME directory:
```bash
cd ~
git clone https://github.com/Arksine/moonraker.git
```
Run Moonrakers install script:
```bash
cd ~/moonraker/scripts
./install-moonraker.sh
```
Once the script is finished, both Moonraker and Klipper should be started.
In `/tmp/klippy.log` the following entry should appear: `Moonraker: server connection detected`
### Configuration
> ⚠️ **Please pay attention to the following steps!**
Misconfigured trusted_clients are a very common source of failure.
For Moonraker you'll need to create a separate config file.
`nano ~/moonraker.conf`
Insert the following part and modify `trusted_clients` according to arksines description below.
Also consider further IP ranges, e.g. when connecting via VPN. To determine your local ip `ip a` and `ifconfig -a` are common ways to do so on Linux and `ipconfig` on Windows.
> ℹ️ **This is a very basic config**
For more options and detailed explanations you should follow [arksines instructions](https://github.com/Arksine/moonraker/blob/master/docs/installation.md).
```
[server]
host: 0.0.0.0
config_path: ~/klipper_config
[authorization]
enabled: true
trusted_clients:
192.168.1.0/24
```
> 🔥 **trusted_clients - read carefully** 🔥
A list of newline separated ip addresses and/or ip ranges that are
trusted. Trusted clients are given full access to the API. Both IPv4
and IPv6 addresses and ranges are supported. Ranges must be expressed
in CIDR notation (see http://ip.sb/cidr for more info).
For example, an entry of 192.168.1.0/24 will authorize IPs in the range of 192.168.1.1 -
192.168.1.254. Note that when specifying IPv4 ranges the last segment
of the ip address must be 0. The default is no clients or ranges are
trusted.
Save the file with `CTRL+O` and close the editor with `CTRL+X`.
Restart Moonraker
```bash
sudo service moonraker restart
```
Open the following url with your printers IP in your browser
```
http://<printer-ip>:7125/printer/info
```
If everything has been set up successfully, a message like this should appear:
```
{"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)"}}
```
---
[< previous step](klipper.md){: .btn } [next step >](mainsail.md){: .btn }
+30
View File
@@ -0,0 +1,30 @@
---
layout: default
title: Operating System
parent: Setup Guide
nav_order: 2
permalink: /setup/operating-systen
---
## Operation System
> ⚠️ **Please don't use an OctoPi image!**
It can cause unforeseeable events, like rips in the space-time continuum. So be aware!
It is recommended to use a clean Raspberry Pi OS 32-bit Lite image (previously called Raspbian). You can download it [here](https://downloads.raspberrypi.org/raspios_lite_armhf_latest){:target="_blank"}.
For more information about installing Raspberry Pi OS click [here](https://www.raspberrypi.org/documentation/installation/installing-images/){:target="_blank"}. Don't forget to enable ssh.
Once you have finished the installation and are connected via ssh, you can continue.
### Requirements
```bash
sudo apt update && sudo apt upgrade
sudo apt install git dfu-util unzip
```
> ⚠️ **Moonraker requires Python 3.7 or greater,** verify that your distribution's Python 3 packages meet this requirement.
```
python3 --version
```
---
[< table of contents](index.md){: .btn } [next step >](klipper.md){: .btn }
-7
View File
@@ -1,7 +0,0 @@
# Upload Gcodes from your Slicer
You can upload your gcode-files from your slicer. Moonraker simulate the octoprint-upload.
Just set the slicer to octoprint, enter the hostname or ip and fill in the API-Key field
with something.
![superslicer-upload](images/superslicer-upload.png)
+9
View File
@@ -0,0 +1,9 @@
---
layout: default
title: Update Guide
nav_order: 3
has_children: true
permalink: /update/
---
This is a guide to update up Klipper, Moonraker & Mainsail on your Raspberry Pi.
+24
View File
@@ -0,0 +1,24 @@
---
layout: default
title: Klipper
parent: Update Guide
nav_order: 2
permalink: /update/klipper
---
## Klipper
### Update from Repository
```bash
cd ~/klipper
git fetch
git checkout origin/master
```
Restart Klipper (`sudo service klipper restart`) and check the `klippy.log`, if Klipper starts
correctly and then continue the guide.
### 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).
---
[< table of contents](index.md){: .btn } [next step >](moonraker.md){: .btn}
+25
View File
@@ -0,0 +1,25 @@
---
layout: default
title: Mainsail
parent: Update Guide
nav_order: 4
permalink: /update/mainsail
---
## Mainsail
```bash
cd ~/mainsail
rm -R ./*
wget -q -O mainsail.zip https://github.com/meteyou/mainsail/releases/download/latest/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`.
```
mv ~/sdcard/gui.json ~/klipper_config/
```
Now it should be possible to open the interface: `http://<printer-ip>/`.
---
[< previous step](moonraker.md){: .btn }
+33
View File
@@ -0,0 +1,33 @@
---
layout: default
title: Moonraker
parent: Update Guide
nav_order: 3
permalink: /update/moonraker
---
## Moonraker
```bash
cd ~/moonraker
git fetch
git checkout origin/master
```
Restart Moonraker (`sudo service moonraker restart`) and open the url `http://<printer-ip>:7125/printer/info` in your browser.
If you see a content like this
```
{"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)"}}
```
### Update Moonraker dependence
This is only nessasary, if your Moonraker version is older than 31. october 2020.
```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).
---
[< previous step](klipper.md){: .btn } [next step >](mainsail.md){: .btn }
-47
View File
@@ -1,47 +0,0 @@
# Update Mainsail
## Update Klipper
```
cd ~/klipper
git fetch
git checkout origin/master
```
Please check the location of the `~/klipper_config/printer.cfg` and the UDS (`-a /tmp/klippy_uds`) in the `/etc/default/klipper` file. This
should look like:
```
KLIPPY_ARGS="/home/pi/klipper/klippy/klippy.py /home/pi/klipper_config/printer.cfg -l /tmp/klippy.log -a /tmp/klippy_uds"
```
If you have to change the location of `printer.cfg` in `/etc/default/klipper`
please create the directory `~/klipper_config` and move your config files in this directory.
Restart Klipper (`sudo service klipper restart`) and check the `klippy.log`, if Klipper starts
correctly and then continue the guide.
## Update Moonraker (API)
```
cd ~/moonraker
git fetch
git checkout origin/master
```
Restart Moonraker (`sudo service moonraker restart`) and open the url `http://<printer-ip>:7125/printer/info` in your browser.
If you see a content like this
```
{"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)"}}
```
## Update Mainsail (webinterface)
```
cd ~/mainsail
rm -R ./*
wget -q -O mainsail.zip https://github.com/meteyou/mainsail/releases/download/v0.2.4/mainsail-beta-0.2.4.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`.
```
mv ~/sdcard/gui.json ~/klipper_config/
```
Now it should be possible to open the interface: `http://<printer-ip>/`.
+20320 -2137
View File
File diff suppressed because it is too large. Load diff
+22 -21
View File
@@ -1,6 +1,6 @@
{
"name": "mainsail",
"version": "0.2.5",
"version": "0.3.0",
"private": true,
"scripts": {
"serve": "vue-cli-service serve",
@@ -8,39 +8,40 @@
"lint": "vue-cli-service lint"
},
"dependencies": {
"axios": "^0.19.2",
"chart.js": "^2.9.3",
"core-js": "^3.6.5",
"axios": "^0.21.0",
"chart.js": "^2.9.4",
"core-js": "^3.7.0",
"object-assign-deep": "^0.4.0",
"prismjs": "^1.21.0",
"vue": "^2.6.11",
"vue-chartjs": "^3.5.0",
"prismjs": "^1.22.0",
"vue": "^2.6.12",
"vue-chartjs": "^3.5.1",
"vue-context": "^6.0.0",
"vue-headful": "^2.1.0",
"vue-plotly": "^1.1.0",
"vue-prism-editor": "^1.2.0",
"vue-prism-editor": "^1.2.2",
"vue-resource": "^1.5.1",
"vue-simple-upload": "^0.1.6",
"vue-toast-notification": "^0.5.0",
"vuetify": "^2.3.8",
"vue-toast-notification": "^0.6.0",
"vuetify": "^2.3.18",
"vuex": "^3.5.1"
},
"devDependencies": {
"@mdi/font": "^5.5.55",
"@vue/cli-plugin-babel": "^4.5.3",
"@mdi/font": "^5.8.55",
"@vue/cli-plugin-babel": "^4.5.9",
"@vue/cli-plugin-eslint": "^4.5.3",
"@vue/cli-plugin-pwa": "^4.5.6",
"@vue/cli-service": "^4.5.3",
"@vue/cli-plugin-pwa": "^4.5.9",
"@vue/cli-service": "^4.5.9",
"babel-eslint": "^10.1.0",
"css-loader": "^4.2.1",
"eslint": "^7.6.0",
"eslint-plugin-vue": "^6.2.2",
"sass": "^1.26.10",
"sass-loader": "^9.0.3",
"css-loader": "^5.0.1",
"eslint": "^7.13.0",
"eslint-plugin-vue": "^7.1.0",
"sass": "^1.29.0",
"sass-loader": "^10.1.0",
"sw-precache-webpack-plugin": "^1.0.0",
"vue-cli-plugin-route": "0.0.7",
"vue-cli-plugin-vuetify": "^2.0.7",
"vue-router": "^3.4.3",
"vue-template-compiler": "^2.6.11",
"vue-router": "^3.4.9",
"vue-template-compiler": "^2.6.12",
"vuetify-loader": "^1.6.0"
},
"eslintConfig": {
+2 -6
View File
@@ -1,7 +1,3 @@
{
"socket": {
"hostname": "voron250.local",
"port": 80,
"metadataRequestDelay": 2000
}
}
}
Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.5 KiB

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 374 B

After

Width:  |  Height:  |  Size: 456 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 668 B

After

Width:  |  Height:  |  Size: 912 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.5 KiB

After

Width:  |  Height:  |  Size: 43 KiB

-2
View File
@@ -1,2 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="16" height="16" fill="none" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><path class="cls-1" d="m9.2411 1.0308a.90423.90423 0 00-.09715.14352.71122.71122 0 01-.08832.13469.76405.76405 0 00-.08832.13248.69069.69069 0 01-.07949.11924.92241.92241 0 00-.07728.11482.9138.9138 0 01-.13027.18989.39392.39392 0 00-.0552.08391 3.9975 3.9975 0 01-.24068.36653.5964.5964 0 00-.0552.08832.88907.88907 0 01-.0552.08832c-.01546.01325-.27159.39524-.28925.43057a2.5009 2.5009 0 01-.1656.24509.88792.88792 0 00-.06624.10378c-.02429.04416-.05078.0817-.05962.0817-.01104 0-.01766.01546-.01766.03312 0 .01767-.0088.03312-.02208.03312a.021784.021784 0 00-.02208.01987c0 .01546-.39082.61604-.41953.64254a.76017.76017 0 00-.08611.14352.21433.21433 0 01-.0552.07507.092211.092211 0 00-.03533.05078.17286.17286 0 01-.04416.06624.16667.16667 0 00-.04416.07728c0 .01546-.0088.02871-.01766.02871-.01987 0-.08832.1104-.08832.14132a.041564.041564 0 01-.02208.03312c-.03091.01987-.18106.24068-.18106.26717a.02006.02006 0 01-.01767.02208c-.0088 0-.03533.03754-.05962.0817a.88791.88791 0 01-.06624.10378 1.2079 1.2079 0 00-.09715.14352 1.3047 1.3047 0 01-.09715.14573c-.02208.02429-.12144.17223-.22522.34004-.09274.14794-.28925.43498-.3025.4394a.017424.017424 0 00-.0044.0287c.0066.01105.0022.01987-.0066.01987-.01104 0-.03754.03533-.05962.07728-.02429.04195-.05078.07728-.06182.07728-.01105 0-.01546.0088-.0066.01987a.028289.028289 0 01-.0088.03533c-.03091.01766-.15677.20756-.15677.23405a.019789.019789 0 01-.01987.01987c-.01104 0-.0287.01987-.03533.04416a.19727.19727 0 01-.03974.07066 1.4846 1.4846 0 00-.10378.15015c-.04195.06624-.0817.12586-.08832.13248-.0066.0066-.04637.06624-.08832.13248a.7894.7894 0 01-.09274.12806.041497.041497 0 00-.01766.03754.041497.041497 0 01-.01766.03754.69037.69037 0 00-.09274.12806c-.04195.06624-.08391.13028-.09495.14352-.0088.01105-.08832.13248-.17664.26717-.33341.51226-.37316.57188-.39303.57851a.034023.034023 0 00-.01987.0287c0 .02429-.1921.32016-.2473.38199a.15037.15037 0 00-.03974.07286.049837.049837 0 01-.03313.04196c-.01766.0088-.02871.02208-.02208.03091.0044.0088-.0088.03312-.03312.0552a.1275.1275 0 00-.04416.07066.027147.027147 0 01-.02429.02871.012177.012177 0 00-.01105.01987.018592.018592 0 01-.0044.02871c-.01105.0022-.10819.14131-.21639.30471-.10819.1634-.20314.3025-.21197.30471a.031827.031827 0 00-.01766.0287.61327.61327 0 01-.07728.13027.55743.55743 0 00-.07728.13248.021809.021809 0 01-.01767.02208c-.01104 0-.03312.0265-.05079.05962a.46019.46019 0 01-.04195.07286c-.0066.0066-.05299.07507-.10598.15456-.05078.07949-.10819.16339-.12365.18768-.09936.13911-.18989.28263-.18989.30029a.020388.020388 0 01-.02208.01987c-.01104 0-.02208.01546-.02208.03312s-.0088.03312-.02208.03312c-.01105 0-.02208.01546-.02208.03312s-.0088.03312-.02208.03312c-.01104 0-.02208.01325-.02208.03091a.047875.047875 0 01-.01545.03974.47797.47797 0 00-.11703.17223.022127.022127 0 01-.02208.02208c-.01104 0-.02208.01546-.02208.03312s-.0088.03312-.02208.03312a.023745.023745 0 00-.02208.02208c0 .02429-.07507.13911-.12586.19431a.10617.10617 0 00-.0287.06182c0 .01766-.0088.03091-.01766.03091-.01104 0-.03754.03533-.06183.07728-.02208.04195-.04858.07728-.05741.07728a.018034.018034 0 00-.01766.01987 1.772 1.772 0 01-.14352.23405 1.6281 1.6281 0 00-.14352.23405.019467.019467 0 01-.01766.01987c-.01104 0-.03312.0265-.05078.05962a.31022.31022 0 01-.04416.07287 1.3771 1.3771 0 00-.15235.24509.020389.020389 0 01-.02208.01987c-.01105 0-.03533.03533-.05299.07728s-.04416.07728-.05741.07728-.01987.0088-.01325.01767c.0066.01104-.01546.04637-.04858.0817s-.05741.06845-.05299.07066a1.358 1.358 0 01-.12807.20535c-.01325.01325-.13911.20093-.15456.23184-.03091.06403-.58513.88322-.60059.88984a.036489.036489 0 00-.01766.0287 1.5134 1.5134 0 01-.12144.19872c-.06845.09936-.11923.18548-.11261.18989.01105.01104 3.2061.03754 3.5152.03091.03091-.0022.05741-.02429.07507-.06845.01546-.03754.03533-.06624.04637-.06624a.021784.021784 0 00.01987-.02208.47797.47797 0 01.11703-.17223.041375.041375 0 00.01546-.03533c0-.02429.01987-.05299.10819-.15898.01104-.01546.01546-.03312.0088-.03974-.0088-.0066-.0022-.01325.01104-.01325a.030189.030189 0 00.0265-.03312.070728.070728 0 01.03533-.05079c.01987-.01104.03533-.0287.03533-.03974a1.1528 1.1528 0 01.12807-.20756.66369.66369 0 00.05299-.08832.88877.88877 0 01.0552-.08832 1.0397 1.0397 0 00.11261-.1634 2.5726 2.5726 0 01.14352-.2208 1.5398 1.5398 0 00.14352-.23184.031825.031825 0 01.01766-.02871.67267.67267 0 00.11482-.16119.10351.10351 0 01.02429-.03974c.01105-.01546.07287-.10598.1369-.20314.06182-.09715.11702-.18106.12586-.18768a.52117.52117 0 00.04195-.07066.45731.45731 0 01.07287-.10378.2209.2209 0 00.03974-.0552c0-.01987.42615-.66241.44823-.67787.01104-.0066.01546-.01987.01104-.0265a.091934.091934 0 01.0287-.0552 1.1468 1.1468 0 00.07728-.1104c.02208-.03974.04858-.07066.05962-.07066.0088 0 .01325-.0088.0044-.01987-.0066-.01104.0022-.03312.01766-.05079.04858-.04858.17002-.23405.17002-.25834a.024184.024184 0 01.022Line truncated

Before

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.6 KiB

+55 -61
View File
@@ -1,23 +1,26 @@
<style>
@import './assets/styles/fonts.css';
@import './assets/styles/toastr.css';
.button-min-width-auto {
min-width: auto !important;
}
#page-container {
max-width: 1400px;
}
</style>
<template>
<v-app>
<vue-headful
:title="getTitle"
/>
<vue-headful :title="getTitle" />
<v-navigation-drawer
class="sidebar-wrapper" persistent v-model="drawer" enable-resize-watcher fixed app
:src="require('./assets/bg-navi.jpg')"
:src="require('./assets/bg-navi.png')"
>
<div id="nav-header">
<img :src="require('./assets/logo.svg')" />
<v-toolbar-title>{{ printername != "" ? printername : hostname }}</v-toolbar-title>
<v-toolbar-title>{{ printername !== "" ? printername : hostname }}</v-toolbar-title>
</div>
<ul class="navi" :expand="$vuetify.breakpoint.mdAndUp">
<li v-for="(category, index) in routes" :key="index" :prepend-icon="category.icon"
@@ -55,20 +58,11 @@
<v-app-bar app elevate-on-scroll>
<v-app-bar-nav-icon @click.stop="drawer = !drawer"></v-app-bar-nav-icon>
<v-spacer></v-spacer>
<v-btn color="primary" class="mr-5" v-if="isConnected && save_config_pending" :loading="loadingConfigChanged" @click="clickSaveConfig">SAVE CONFIG</v-btn>
<v-btn color="error" class="button-min-width-auto px-3" v-if="isConnected" :loading="loadingEmergencyStop" @click="clickEmergencyStop"><v-icon class="mr-sm-2">mdi-alert-circle-outline</v-icon><span class="d-none d-sm-flex">Emergency Stop</span></v-btn>
<v-menu
bottom
left
:offset-y="true"
>
<v-btn color="primary" class="mr-5 d-none d-sm-flex" v-if="isConnected && save_config_pending" :loading="loadings.includes['topbarSaveConfig']" @click="clickSaveConfig">SAVE CONFIG</v-btn>
<v-btn color="error" class="button-min-width-auto px-3" v-if="isConnected" :loading="loadings.includes['topbarEmergencyStop']" @click="clickEmergencyStop"><v-icon class="mr-sm-2">mdi-alert-circle-outline</v-icon><span class="d-none d-sm-flex">Emergency Stop</span></v-btn>
<v-menu bottom left :offset-y="true">
<template v-slot:activator="{ on, attrs }">
<v-btn
dark
icon
v-bind="attrs"
v-on="on"
>
<v-btn dark icon v-bind="attrs" v-on="on">
<v-icon>mdi-dots-vertical</v-icon>
</v-btn>
</template>
@@ -80,6 +74,7 @@
<v-list-item link @click="doFirmwareRestart()">
<v-list-item-title><v-icon class="mr-3">mdi-sync</v-icon>FW Restart</v-list-item-title>
</v-list-item>
<v-divider></v-divider>
<v-list-item link @click="doHostReboot()">
<v-list-item-title><v-icon class="mr-3">mdi-power</v-icon>Reboot Host</v-list-item-title>
</v-list-item>
@@ -92,7 +87,7 @@
<v-main id="content">
<v-scroll-y-transition>
<v-container fluid id="page-container" class="container">
<v-container fluid id="page-container" class="container px-sm-6 px-3 mx-auto">
<keep-alive>
<router-view></router-view>
</keep-alive>
@@ -100,7 +95,7 @@
</v-scroll-y-transition>
</v-main>
<v-dialog v-model="isConnecting" persistent width="300">
<v-dialog v-model="overlayDisconnect" persistent width="300">
<v-card color="primary" dark >
<v-card-text class="pt-2">
Connecting...
@@ -111,8 +106,7 @@
<v-footer app class="d-block">
<span>v{{ getVersion }}</span>
<span v-if="version" class="d-none d-sm-inline"> - {{ version }}</span>
<span class="float-right">Made with <img src="/img/heart.png" height="15" title="love" alt="heard" /> by <a href="http://www.vorondesign.com/" target="_blank"><img src="/img/voron.png" height="15" title="VoronDesign" alt="Logo - VoronDesign" /></a></span>
<span class="float-right d-none d-sm-inline" v-if="version">{{ version }}</span>
</v-footer>
</v-app>
</template>
@@ -129,17 +123,14 @@ export default {
},
data: () => ({
overlayDisconnect: true,
drawer: null,
activeClass: 'active',
routes: routes,
//is_ready: false,
boolNaviHeightmap: false,
loadingEmergencyStop: false,
loadingConfigChanged: false,
}),
created () {
this.$vuetify.theme.dark = true;
//this.is_ready = (this.klippy_state === "ready") ? true : false;
this.boolNaviHeightmap = (typeof(this.config.bed_mesh) !== "undefined");
},
computed: {
@@ -147,41 +138,46 @@ export default {
return this.$route.fullPath;
},
...mapState({
toolhead: state => state.printer.toolhead,
hostname: state => state.printer.hostname,
printername: state => state.gui.general.printername,
version: state => state.printer.software_version,
isConnected: state => state.socket.isConnected,
isConnecting: state => !state.socket.isConnected,
hostname: state => state.printer.hostname,
version: state => state.printer.software_version,
klippy_state: state => state.server.klippy_state,
loadings: state => state.socket.loadings,
toolhead: state => state.printer.toolhead,
printername: state => state.gui.general.printername,
virtual_sdcard: state => state.printer.virtual_sdcard,
current_file: state => state.printer.print_stats.filename,
boolNaviWebcam: state => state.gui.webcam.bool,
klippy_state: state => state.printer.webhooks.state,
loadings: state => state.loadings,
config: state => state.printer.configfile.config,
save_config_pending: state => state.printer.configfile.save_config_pending,
}),
...mapGetters([
'getTitle',
'getVersion'
])
]),
print_percent: {
get() {
return this.$store.getters["printer/getPrintPercent"];
}
}
},
methods: {
clickEmergencyStop: function() {
this.$store.commit('setLoading', { name: 'btnEmergencyStop' });
this.$socket.sendObj('printer.emergency_stop', {});
this.$store.commit('socket/addLoading', { name: 'topbarEmergencyStop' });
this.$socket.sendObj('printer.emergency_stop', {}, 'socket/removeLoading',{ name: 'topbarEmergencyStop' });
},
clickSaveConfig: function() {
this.$store.commit('addGcodeResponse', "SAVE_CONFIG");
this.$store.commit('setLoading', { name: 'btnSaveConfig' });
this.$socket.sendObj('printer.gcode.script', { script: "SAVE_CONFIG" });
this.$store.commit('server/addEvent', "SAVE_CONFIG");
this.$store.commit('socket/addLoading', { name: 'topbarSaveConfig' });
this.$socket.sendObj('printer.gcode.script', { script: "SAVE_CONFIG" }, 'socket/removeLoading', { name: 'topbarSaveConfig' });
},
doRestart: function() {
this.$store.commit('addGcodeResponse', "RESTART");
this.$store.commit('server/addEvent', "RESTART");
this.$socket.sendObj('printer.gcode.script', { script: "RESTART" });
},
doFirmwareRestart: function() {
this.$store.commit('addGcodeResponse', "FIRMWARE_RESTART");
this.$store.commit('server/addEvent', "FIRMWARE_RESTART");
this.$socket.sendObj('printer.gcode.script', { script: "FIRMWARE_RESTART" });
},
doHostReboot: function() {
@@ -191,8 +187,9 @@ export default {
this.$socket.sendObj('machine.shutdown', { });
},
drawFavicon(val) {
let favicon16 = document.querySelector("link[rel*='icon'][sizes='16x16']");
let favicon32 = document.querySelector("link[rel*='icon'][sizes='32x32']");
let favicon16 = document.querySelector("link[rel*='icon'][sizes='16x16']")
let favicon32 = document.querySelector("link[rel*='icon'][sizes='32x32']")
if (val > 0 && val < 100) {
let faviconSize = 64;
@@ -231,47 +228,44 @@ export default {
context.fillStyle = "#e41313";
context.fill();
favicon16.href = canvas.toDataURL('image/png');
favicon32.href = canvas.toDataURL('image/png');
favicon16.href = canvas.toDataURL('image/png')
favicon32.href = canvas.toDataURL('image/png')
} else {
favicon16.href = "/img/icon/favicon-16x16.png"
favicon32.href = "/img/icon/favicon-32x32.png"
favicon16.href = "/img/icons/favicon-16x16.png"
favicon32.href = "/img/icons/favicon-32x32.png"
}
}
},
watch: {
virtual_sdcard: {
deep: true,
handler: function(val) {
let progress = (val && val.progress) ? val.progress : 0;
this.drawFavicon(progress);
}
print_percent() {
this.drawFavicon(this.print_percent);
},
current_file: {
handler: function(newVal) {
this.$socket.sendObj("server.files.metadata", { filename: newVal }, "getMetadataCurrentFile");
this.$socket.sendObj("server.files.metadata", { filename: newVal }, "files/getMetadataCurrentFile");
}
},
config() {
this.boolNaviHeightmap = (typeof(this.config.bed_mesh) !== "undefined");
},
loadings: function(loadings) {
this.loadingEmergencyStop = loadings.includes('btnEmergencyStop');
this.loadingConfigChanged = loadings.includes('btnSaveConfig');
isConnected(newVal) {
this.overlayDisconnect = !newVal;
}
},
}
</script>
<style>
.sidebar-wrapper:before {
body {
background: #121212;
}
/*.sidebar-wrapper:before {
position: absolute;
content: ' ';
top: 0; right: 0; bottom: 0; left: 0;
background: #000;
opacity: .7;
}
opacity: .5;
}*/
#nav-header {
text-align: center;
Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.9 KiB

+120 -1
View File
@@ -1 +1,120 @@
<svg id="Ebene_1" data-name="Ebene 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 385.66987 338.2562"><defs><style>.cls-1{fill:#e73d26;}</style></defs><title>logo</title><path class="cls-1" d="M222.75337,1.14007a21.79586,21.79586,0,0,0-2.34182,3.45951,17.14349,17.14349,0,0,1-2.12893,3.24662,18.41685,18.41685,0,0,0-2.12893,3.19339,16.64854,16.64854,0,0,1-1.916,2.87406,22.23421,22.23421,0,0,0-1.86282,2.76761,22.02646,22.02646,0,0,1-3.14017,4.5772,9.49513,9.49513,0,0,0-1.33058,2.02248,96.35724,96.35724,0,0,1-5.80133,8.83506,14.37578,14.37578,0,0,0-1.33058,2.12893,21.43049,21.43049,0,0,1-1.33058,2.12893c-.37257.31934-6.54646,9.527-6.97225,10.37854a60.28212,60.28212,0,0,1-3.99175,5.90778,21.40279,21.40279,0,0,0-1.5967,2.5015c-.58546,1.06446-1.22413,1.96926-1.437,1.96926-.26612,0-.42578.37256-.42578.79834s-.21289.79835-.53223.79835a.52508.52508,0,0,0-.53224.479c0,.37256-9.42052,14.84929-10.11242,15.488a18.32335,18.32335,0,0,0-2.0757,3.45951,5.16638,5.16638,0,0,1-1.33058,1.80959,2.22269,2.22269,0,0,0-.85158,1.22414,4.16658,4.16658,0,0,1-1.06446,1.59669,4.0175,4.0175,0,0,0-1.06447,1.86282c0,.37256-.21289.6919-.42578.6919-.479,0-2.12893,2.66117-2.12893,3.40629a1.00188,1.00188,0,0,1-.53223.79835c-.74512.479-4.36431,5.80133-4.36431,6.44a.48353.48353,0,0,1-.42578.53224c-.21289,0-.85158.90479-1.437,1.96926a21.40243,21.40243,0,0,1-1.5967,2.50149,29.11642,29.11642,0,0,0-2.34182,3.45951,31.44916,31.44916,0,0,1-2.34182,3.51274c-.53223.58546-2.92727,4.15141-5.42877,8.19638-2.23539,3.566-6.97225,10.485-7.2916,10.59142a.42.42,0,0,0-.10645.6919c.15966.26611.05323.479-.15966.479-.26612,0-.90481.85158-1.437,1.86282-.58546,1.01124-1.22413,1.86281-1.49024,1.86281s-.37257.21289-.15967.479a.68189.68189,0,0,1-.21289.85157c-.74512.42578-3.77885,5.003-3.77885,5.64167a.477.477,0,0,1-.479.479c-.26611,0-.6919.479-.85157,1.06446a4.75513,4.75513,0,0,1-.958,1.70315,35.78571,35.78571,0,0,0-2.50149,3.61918c-1.01124,1.5967-1.96926,3.03373-2.12893,3.1934s-1.1177,1.59669-2.12894,3.19339a19.02787,19.02787,0,0,1-2.23537,3.08694,1.00027,1.00027,0,0,0-.42579.90481,1.00025,1.00025,0,0,1-.42579.9048,16.6409,16.6409,0,0,0-2.23537,3.08694c-1.01124,1.5967-2.02249,3.14017-2.2886,3.45951-.21289.26612-2.12893,3.1934-4.25786,6.44-8.03672,12.3478-8.99473,13.78482-9.47375,13.9445a.82011.82011,0,0,0-.479.6919c0,.58546-4.63042,7.71737-5.961,9.20761a3.62456,3.62456,0,0,0-.958,1.75636A1.20128,1.20128,0,0,1,93.208,196.363c-.42579.21289-.69191.53224-.53224.74513.10645.21289-.21289.79834-.79835,1.33058a3.07335,3.07335,0,0,0-1.06446,1.70315.65437.65437,0,0,1-.58546.69189.29353.29353,0,0,0-.26612.479.44816.44816,0,0,1-.10644.6919c-.26612.05322-2.60794,3.40628-5.21588,7.3448s-4.89654,7.29159-5.10944,7.3448a.76717.76717,0,0,0-.42579.6919,14.78244,14.78244,0,0,1-1.86281,3.14017,13.43644,13.43644,0,0,0-1.86281,3.19339.52569.52569,0,0,1-.42579.53224c-.26612,0-.79835.63868-1.22414,1.437A11.09249,11.09249,0,0,1,72.717,227.4453c-.15967.15966-1.27735,1.80959-2.55472,3.72563-1.22413,1.916-2.60793,3.93852-2.9805,4.524-2.395,3.35306-4.5772,6.81257-4.5772,7.23835a.49145.49145,0,0,1-.53223.479c-.26612,0-.53224.37257-.53224.79835s-.21289.79835-.53223.79835c-.26611,0-.53223.37257-.53223.79835s-.2129.79835-.53223.79835c-.26612,0-.53224.31932-.53224.74513a1.154,1.154,0,0,1-.37256.958,11.52107,11.52107,0,0,0-2.82083,4.1514.53335.53335,0,0,1-.53223.53224c-.26612,0-.53224.37257-.53224.79835s-.21289.79834-.53223.79834a.57236.57236,0,0,0-.53223.53224c0,.58544-1.80959,3.35306-3.03373,4.68364a2.55908,2.55908,0,0,0-.6919,1.49024c0,.42578-.21289.74514-.42579.74514-.26611,0-.90479.85156-1.49025,1.86281-.53223,1.01126-1.17091,1.86282-1.38381,1.86282a.43471.43471,0,0,0-.42578.479,42.71364,42.71364,0,0,1-3.45951,5.64165,39.24326,39.24326,0,0,0-3.45952,5.64166.46923.46923,0,0,1-.42578.479c-.26612,0-.79835.63868-1.22414,1.437a7.47774,7.47774,0,0,1-1.06447,1.75636,33.19489,33.19489,0,0,0-3.6724,5.90777.49146.49146,0,0,1-.53223.479c-.26612,0-.85158.85155-1.27736,1.86281s-1.06447,1.86281-1.38381,1.86281-.479.21291-.31934.42578c.15968.26612-.37256,1.11768-1.17091,1.96927s-1.3838,1.64991-1.27736,1.70315a32.7331,32.7331,0,0,1-3.087,4.94976c-.31933.31932-3.35306,4.8433-3.72562,5.58844-.74513,1.54349-14.10417,21.2893-14.47673,21.449a.87955.87955,0,0,0-.42579.69189,36.48,36.48,0,0,1-2.92728,4.7901c-1.64992,2.395-2.874,4.47076-2.71438,4.57718.26611.26612,77.28017.90481,84.73143.74514.74512-.05321,1.3838-.58544,1.80958-1.64991.37257-.9048.85158-1.59669,1.1177-1.59669a.52508.52508,0,0,0,.479-.53224,11.5211,11.5211,0,0,1,2.82084-4.1514.99732.99732,0,0,0,.37256-.85156c0-.58545.479-1.27737,2.60793-3.83208.26612-.37257.37256-.79835.21289-.958-.21289-.15966-.05322-.31932.26612-.31932a.72768.72768,0,0,0,.63868-.79835,1.70485,1.70485,0,0,1,.85157-1.22413c.479-.26612.85158-.6919.85158-.958a27.78833,27.78833,0,0,1,3.087-5.003,15.99793,15.99793,0,0,0,1.27735-2.12893,21.42328,21.42328,0,0,1,1.33059-2.12893,25.061,25.061,0,0,0,2.71438-3.93854,62.00982,62.00982,0,0,1,3.45952-5.32232,37.11582,37.11582,0,0,0,3.45951-5.58845.Line truncated
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 25.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 599.38 523.11" style="enable-background:new 0 0 599.38 523.11;" xml:space="preserve">
<style type="text/css">
.st0{fill:#E30613;stroke:#009640;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;}
.st1{fill:#D41216;}
.st2{fill:#D41216;stroke:#009640;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;}
.st3{fill:none;stroke:#009640;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;}
.st4{display:none;}
.st5{display:inline;fill:#E73D26;}
.st6{display:inline;fill:none;}
</style>
<g id="Ebene_2">
<g>
<path class="st0" d="M382.29,142.98"/>
<path class="st1" d="M382.29,142.98L132.98,522.82L0,522.68L344.3,0l0,0C352.18,49.06,365.2,97.68,382.29,142.98"/>
<path class="st2" d="M413.28,213.54L208.5,522.92l132.94,0.19l135.03-206.33l0,0C452.69,284.29,431.53,249.77,413.28,213.54
L413.28,213.54"/>
<path class="st3" d="M599.38,447.69"/>
<path class="st3" d="M518.6,369.16"/>
<path class="st1" d="M599.38,447.69l-49.25,75.42L417,522.82l101.6-153.67l0,0C543.48,397.35,570.49,423.61,599.38,447.69
L599.38,447.69z"/>
</g>
</g>
<g id="Ebene_1" class="st4">
<path class="st5" d="M-45.42,426.29c0.34,0.34,97.62,1.14,107.04,0.94c0.94-0.07,1.75-0.74,2.29-2.08
c0.47-1.14,1.08-2.02,1.41-2.02s0.61-0.34,0.61-0.67c0-0.81,2.76-4.91,3.56-5.24c0.27-0.13,0.47-0.61,0.47-1.08
c0-0.74,0.61-1.61,3.29-4.84c0.34-0.47,0.47-1.01,0.27-1.21c-0.27-0.2-0.07-0.4,0.34-0.4c0.47,0,0.81-0.47,0.81-1.01
c0-0.47,0.47-1.21,1.08-1.55c0.61-0.34,1.08-0.87,1.08-1.21c0.07-0.54,3.09-5.58,3.9-6.32c0.2-0.2,0.94-1.41,1.61-2.69
c0.74-1.28,1.48-2.49,1.68-2.69c0.61-0.54,3.43-4.64,3.43-4.98c0-0.2,1.95-3.23,4.37-6.72s4.37-6.66,4.37-7.06
c0-0.34,0.2-0.74,0.54-0.87c0.54-0.27,3.5-4.37,3.5-4.91c0-0.2,0.34-0.74,0.74-1.21c0.34-0.47,2.22-3.23,4.17-6.19
c1.88-2.96,3.56-5.51,3.83-5.71c0.2-0.2,0.74-1.14,1.28-2.15c0.54-1.01,1.48-2.49,2.22-3.16c0.67-0.74,1.21-1.55,1.21-1.68
c0-0.61,12.98-20.17,13.65-20.64c0.34-0.2,0.47-0.61,0.34-0.81c-0.07-0.27,0.27-1.01,0.87-1.68c0.61-0.67,1.61-2.22,2.35-3.36
c0.67-1.21,1.48-2.15,1.82-2.15c0.27,0,0.4-0.27,0.13-0.61c-0.2-0.34,0.07-1.01,0.54-1.55c1.48-1.48,5.18-7.13,5.18-7.87
c0-0.4,0.34-0.74,0.67-0.74c0.4,0,0.67-0.47,0.67-1.01c0-0.54,0.34-1.01,0.67-1.01c0.4,0,0.67-0.4,0.67-0.94
c0-0.54,0.27-1.08,0.54-1.21c0.27-0.13,1.28-1.41,2.15-2.89c0.87-1.48,1.88-3.03,2.15-3.36c1.01-1.21,9.28-13.92,9.28-14.19
c0-0.34,4.24-6.45,5.18-7.46c0.4-0.47,1.01-1.48,1.21-2.22c0.2-0.74,0.67-1.34,1.01-1.34c0.27,0,0.67-0.54,0.94-1.21
c0.4-1.14,1.82-3.56,2.49-4.17c0.2-0.2,2.15-3.16,4.37-6.66c2.15-3.43,4.5-6.86,5.11-7.53c0.67-0.74,1.08-1.28,0.87-1.28
c-0.2,0,0.74-1.48,2.02-3.36c1.28-1.82,2.35-3.63,2.35-4.03c0-0.34,0.2-0.67,0.54-0.67c0.27,0,1.21-1.34,2.15-3.03
c0.94-1.68,1.88-3.03,2.15-3.03c0.34,0,0.54-0.4,0.54-0.87c0-0.54,0.61-1.48,1.34-2.15c0.74-0.67,1.34-1.61,1.34-2.15
c0-0.47,0.34-0.87,0.67-0.87c0.4,0,0.67-0.34,0.67-0.67c0-0.74,3.16-5.85,4.5-7.26c0.4-0.4,1.01-1.41,1.21-2.15
s0.67-1.34,0.94-1.34c0.34,0,0.94-0.87,1.41-2.02c0.47-1.14,1.08-2.02,1.34-2.02c0.27,0,0.87-0.87,1.34-2.02
c0.47-1.14,1.08-2.02,1.34-2.02c0.27,0,0.87-0.94,1.34-2.02c0.47-1.14,1.14-2.02,1.48-2.02s0.4-0.34,0.2-0.67
c-0.2-0.4-0.2-0.67,0.13-0.67c0.27,0,1.41-1.55,2.55-3.36c1.08-1.88,2.22-3.36,2.55-3.36c0.27,0,0.4-0.27,0.2-0.61
c-0.2-0.27,0.2-1.08,0.94-1.75c0.74-0.67,1.34-1.55,1.34-1.95c0-0.4,0.74-1.61,1.68-2.62c0.94-1.01,1.55-1.82,1.41-1.82
c-0.34,0,8.87-14.19,10.35-15.93c0.34-0.47,0.67-1.14,0.67-1.55c0-0.34,0.34-0.67,0.67-0.67c0.4,0,0.67-0.47,0.67-1.01
s0.34-1.01,0.67-1.01c0.4,0,0.67-0.34,0.67-0.67c0-0.4,1.08-2.22,2.35-4.03s2.35-3.5,2.35-3.7s0.61-1.01,1.34-1.82
c0.74-0.81,1.34-1.88,1.34-2.35s0.34-0.87,0.74-0.87c0.34,0,0.54-0.27,0.34-0.54c-0.2-0.34,0.27-0.94,0.94-1.48
c0.67-0.54,1.14-1.14,1.01-1.34c-0.2-0.27,0.27-1.01,1.01-1.68c0.74-0.67,1.34-1.48,1.34-1.75c0-0.27,2.35-4.1,5.24-8.47
c2.96-4.37,8.27-12.51,11.9-18.02c3.63-5.58,6.93-10.29,7.33-10.56c0.4-0.27,0.47-0.54,0.13-0.54c-0.34,0-0.13-0.54,0.4-1.21
c1.01-1.21,1.08-1.75,0.2-3.83c-2.89-6.93-5.04-12.77-5.04-13.51c0-0.54-0.27-0.94-0.67-0.94c-0.34,0-0.61-0.2-0.54-0.54
c0.2-0.87-1.75-6.52-2.42-6.99c-0.4-0.27-0.47-0.67-0.2-0.94s0.2-0.81-0.13-1.21c-0.47-0.67-3.97-10.62-4.37-12.71
c-0.13-0.47-0.4-1.34-0.61-2.02c-0.27-0.61-0.67-1.68-0.94-2.35c-0.2-0.61-0.47-1.61-0.61-2.15c-0.27-1.34-1.61-5.98-2.42-8.14
c-0.34-0.94-0.67-2.35-0.74-3.16c-0.07-0.81-0.27-1.48-0.47-1.48c-0.27,0-0.47-0.4-0.54-0.87c0-0.4-0.2-1.41-0.4-2.15
c-0.2-0.74-1.01-3.9-1.68-7.06c-0.74-3.16-1.34-5.78-1.41-5.92c-0.13-0.07-0.2-0.34-0.27-0.67c-0.34-1.34-1.28-5.92-1.41-6.52
c-0.07-0.4-0.2-0.81-0.27-1.01c-0.2-0.4-0.54-2.22-0.94-5.38c-0.2-1.28-0.54-2.82-0.74-3.43c-0.27-0.61-0.4-1.34-0.34-1.68
c0.07-0.34,0-0.74-0.07-0.94c-0.27-0.67-0.67-3.09-0.94-5.38c-0.13-1.28-0.34-2.35-0.4-2.35c-0.13,0-0.61-3.36-0.74-5.92
c-0.07-1.01-0.4-2.02-0.74-2.22s-0.27-0.81,0.13-1.28c1.48-1.75-0.54-1.61-2.08,0.2l0,0c-0.87,1.01-2.22,2.96-2.96,4.37
c-0.74,1.48-1.95,3.29-2.69,4.1c-0.74,0.81-1.95,2.62-2.69,4.03c-0.74,1.34-1.82,3.03-2.42,3.63c-0.54,0.61-1.61,2.22-2.35,3.5
c-1.48,2.69-1.68,2.96-3.97,5.78c-0.94,1.21-1.68,2.35-1.68,2.55c0,0.47-6.66,10.56-7.33,11.16c-0.2,0.2-1.01,1.41-1.68,2.69
c-0.74,1.28-1.48,2.49-1.68,2.69c-0.47,0.4-8.27,12.03-8.81,13.11 M294.17,171.07c-0.74,1.14-1.82,2.76-2.35,3.56
c-0.54,0.81-1.68,2.55-2.49,3.83c-1.88,2.82-2.22,3.36-5.58,8.2c-1.48,2.15-2.69,4.03-2.69,4.24s-0.34,0.67-0.74,1.14
c-0.34,0.47-4.24,6.25-8.67,12.91c-4.37,6.66-8.27,12.44-8.67,12.91c-0.4,0.47-0.74,0.94-0.74,1.14c0,0.61-4.3,6.79-4.84,6.99
c-0.27,0.13-0.54,0.67-0.54,1.21s-0.34,0.94-0.74,0.94c-0.34,0-0.54,0.27-0.34,0.61c0.27,0.34,0.2,0.74-0.07,0.87
c-0.81,0.34-4.91,6.39-4.91,7.19c0,0.34-0.54,1.01-1.14,1.34c-0.67,0.4-0.94,0.74-0.67,0.74s-0.07,0.67-0.87,1.48
c-0.74,0.81-1.34,1.88-1.34,2.35s-0.2,0.87-0.47,0.87c-0.34,0-1.41,1.55-2.55,3.43c-1.08,1.88-2.29,3.77-2.69,4.24
c-1.34,1.61-3.7,5.04-3.7,5.45c0,0.27-0.4,0.87-0.81,1.34c-1.95,2.15-2.49,2.89-2.22,3.16c0.13,0.13-0.47,1.14-1.34,2.15
c-0.94,1.08-1.68,2.15-1.68,2.42s-0.61,1.14-1.34,2.02s-1.34,1.95-1.34,2.49s-0.27,0.81-0.61,0.61c-0.34-0.2-0.81,0.34-1.01,1.28
c-0.27,0.94-0.74,1.68-1.08,1.68c-0.4,0-0.67,0.34-0.67,0.67c0,0.81-2.76,4.91-3.5,5.24c-0.34,0.13-0.54,0.54-0.54,0.81
c0,0.81-4.17,6.99-4.84,7.26c-0.27,0.13-0.54,0.54-0.54,0.94c0,0.74-4.1,6.79-4.84,7.13c-0.34,0.13-0.54,0.54-0.54,0.87
c0,0.94-4.91,8-5.58,8c-0.27,0-0.4,0.27-0.13,0.61c0.2,0.34-0.07,1.01-0.47,1.55c-0.47,0.47-2.55,3.43-4.57,6.59
c-2.02,3.16-3.83,5.85-4.03,6.05c-0.4,0.4-2.89,4.03-3.36,5.04c-1.01,1.95-31.26,47.13-31.87,47.53c-0.4,0.27-0.47,0.54-0.13,0.54
c0.34,0,0.07,0.67-0.67,1.48c-1.61,1.82-4.77,6.72-4.84,7.46c0,0.34-0.74,1.14-1.55,1.88c-0.81,0.67-1.21,1.28-0.94,1.28
c0.34,0-0.13,0.74-1.01,1.68s-1.28,1.68-0.94,1.68s0.27,0.27-0.07,0.54c-0.94,0.67-3.83,4.77-4.98,6.99
c-0.54,1.08-1.21,1.88-1.55,1.88c-0.27,0-0.54,0.27-0.54,0.67c0,0.34-1.01,2.08-2.22,3.83c-1.28,1.82-2.49,3.77-2.69,4.37
c-0.27,0.67-0.74,1.21-1.14,1.21c-0.34,0-0.67,0.47-0.67,1.01c0,0.54-0.27,1.01-0.67,1.01c-0.34,0-0.67,0.27-0.67,0.61
c0,0.4-2.29,4.03-5.11,8.14c-2.76,4.17-4.91,7.66-4.77,7.87c0.34,0.27,33.68,0.67,83.44,0.87c22.79,0.13,24.14,0.07,25.21-1.14
c1.21-1.48,2.55-3.43,3.23-4.91c0.27-0.54,1.01-1.61,1.68-2.29c0.61-0.67,1.01-1.55,0.81-1.88c-0.2-0.27-0.07-0.54,0.34-0.54
s1.21-1.01,1.82-2.22c0.61-1.14,1.34-2.29,1.61-2.49c0.2-0.2,1.48-2.08,2.76-4.24c1.21-2.08,2.49-3.83,2.76-3.83
c0.34,0,0.54-0.47,0.54-1.01c0-0.54,0.34-1.01,0.74-1.01c0.34,0,0.54-0.27,0.34-0.61c-0.27-0.34-0.2-0.74,0.07-0.87
c0.81-0.34,3.56-4.44,3.56-5.24c0-0.34,0.34-0.67,0.67-0.67c0.4,0,0.67-0.47,0.67-1.01c0-0.54,0.27-1.01,0.54-1.01
c0.34,0,0.94-0.67,1.41-1.55c0.4-0.81,1.34-2.42,2.08-3.5c0.74-1.14,1.68-2.69,2.08-3.56c0.47-0.81,1.08-1.48,1.41-1.48
c0.27,0,0.54-0.4,0.54-0.87c0-0.47,0.54-1.48,1.21-2.22c0.61-0.67,1.55-2.08,2.08-3.09c0.54-1.01,1.61-2.55,2.35-3.36
c0.81-0.81,1.41-1.68,1.34-1.88c-0.07-0.47,6.05-9.68,6.66-9.95c0.27-0.13,0.47-0.54,0.47-0.87c0-0.54,5.85-9.88,6.72-10.69
c0.2-0.2,1.41-2.02,2.69-4.03c1.28-2.02,2.62-3.9,3.03-4.17c0.34-0.27,0.4-0.54,0.13-0.54c-0.34,0-0.13-0.47,0.34-1.01
c2.08-2.29,2.42-2.89,2.08-3.29c-0.27-0.2-0.07-0.4,0.34-0.4c0.47,0,0.81-0.4,0.81-0.94c0-0.54,0.27-1.08,0.54-1.21
c0.34-0.13,1.95-2.35,3.56-4.91c1.61-2.62,3.16-4.84,3.43-4.91c0.27-0.13,0.54-0.54,0.54-0.87c0-0.34,1.08-2.15,2.35-3.97
c1.28-1.82,2.35-3.5,2.35-3.77c0-0.2,0.4-0.74,0.87-1.28c0.4-0.47,2.89-4.17,5.51-8.2c2.55-3.97,4.91-7.4,5.18-7.46
c0.34-0.13,0.4-0.54,0.13-0.87c-0.2-0.34,0.13-0.81,0.67-1.01c0.61-0.2,1.08-0.74,1.08-1.08c0-0.4,1.08-2.22,2.35-3.97
c1.28-1.82,2.35-3.43,2.35-3.5c0-0.27,11.16-17.28,11.97-18.29c0.27-0.4,1.14-1.75,1.88-3.03c0.67-1.28,1.68-2.62,2.15-2.89
c0.4-0.27,0.81-0.87,0.81-1.21c0-0.4,0.74-1.68,1.68-2.89c0.94-1.21,1.68-2.55,1.68-2.96c0-0.47,0.27-0.81,0.54-0.81
c0.34,0,0.94-0.74,1.34-1.61c0.61-1.34,0.34-2.02-1.95-5.04c-1.41-1.88-2.35-3.43-2.08-3.43s0.13-0.27-0.27-0.54
c-0.87-0.54-6.99-9.48-6.99-10.22c0-0.27-0.61-1.01-1.34-1.68c-0.74-0.67-1.34-1.61-1.34-2.15c0-0.47-0.27-0.87-0.67-0.87
c-0.34,0-0.67-0.4-0.67-0.94c0-0.54-0.27-1.08-0.54-1.21c-0.54-0.2-6.19-9.01-6.19-9.61c0-0.2-0.61-1.01-1.34-1.82
c-0.74-0.81-1.34-1.88-1.34-2.35s-0.27-0.87-0.67-0.87c-0.34,0-0.67-0.27-0.67-0.61c0-0.4-0.87-2.02-2.02-3.63
c-1.08-1.68-2.02-3.36-2.02-3.77c0-0.4-0.27-0.74-0.61-0.74s-0.74-0.54-0.94-1.21c-0.4-1.14-2.49-4.84-3.16-5.51
c-0.2-0.2-1.08-1.68-1.95-3.36c-0.94-1.68-1.82-3.16-2.02-3.36c-0.27-0.2-0.81-1.08-1.21-2.02c-0.47-0.94-2.22-4.1-3.9-7.06
c-1.75-2.96-3.29-5.92-3.5-6.59c-0.2-0.61-0.61-1.14-0.87-1.14c-0.54,0-2.29-3.97-2.08-4.91
C296.66,168.25,295.38,169.19,294.17,171.07L294.17,171.07z M379.36,300.09c-0.81,1.08-1.48,2.22-1.41,2.42
c0,0.27-0.2,0.67-0.54,0.87c-0.94,0.67-8.94,12.71-8.94,13.51c0,0.34-0.2,0.67-0.47,0.67c-0.34,0-1.61,1.82-2.89,4.03
s-2.55,4.03-2.82,4.03c-0.34,0-0.54,0.4-0.54,0.94c0,0.54-0.2,1.08-0.47,1.21c-0.74,0.27-4.24,5.71-4.24,6.52
c0,0.34-0.47,0.74-1.01,1.01c-0.54,0.2-1.01,0.81-1.01,1.34c0,0.54-0.2,1.08-0.54,1.21c-0.27,0.07-1.55,1.88-2.82,3.9
c-1.28,2.02-2.49,3.83-2.69,4.03s-1.14,1.55-2.02,3.03c-0.87,1.48-2.02,3.09-2.42,3.56c-0.47,0.4-1.08,1.41-1.28,2.15
c-0.2,0.74-0.74,1.34-1.14,1.34c-0.4,0-0.61,0.2-0.34,0.4c0.2,0.27,0.07,0.81-0.4,1.28c-0.47,0.47-1.21,1.41-1.61,2.08
c-0.47,0.74-2.22,3.36-3.9,5.85c-1.68,2.55-3.03,4.91-3.03,5.24c0,0.34-0.27,0.61-0.54,0.61c-0.34,0-1.01,0.81-1.55,1.82
c-0.54,1.08-1.14,2.02-1.34,2.22s-3.36,4.84-6.99,10.42c-3.63,5.51-6.86,10.22-7.13,10.29c-0.34,0.13-0.47,0.54-0.2,0.87
c0.2,0.34,0,0.61-0.34,0.61c-0.4,0-0.74,0.47-0.74,1.01c0,0.61-0.47,1.21-1.01,1.41c-0.54,0.27-0.81,0.67-0.61,1.01
c0.2,0.34,0,0.61-0.34,0.61c-0.4,0-0.74,0.34-0.74,0.74s-0.54,1.41-1.14,2.29c-1.41,1.82-1.41,1.82-8.2,12.1
c-2.96,4.44-5.71,8.47-6.12,8.94c-0.54,0.61,0.4,0.81,4.5,0.87c13.31,0.13,60.58,0.54,80.81,0.61l22.39,0.13l1.61-1.88
c0.87-1.08,1.55-2.22,1.61-2.49c0-0.27,0.61-1.14,1.34-1.95c0.74-0.81,1.34-1.88,1.34-2.35s0.34-0.87,0.74-0.87
c0.34,0,0.54-0.27,0.34-0.54c-0.2-0.34,0.27-0.94,0.94-1.48c0.67-0.54,1.14-1.14,1.01-1.34c-0.2-0.27,0.27-1.01,1.01-1.68
c0.74-0.67,1.34-1.55,1.34-1.88c0-0.4,0.74-1.68,1.68-2.82c0.87-1.21,1.41-2.35,1.21-2.62c-0.27-0.2-0.13-0.4,0.27-0.4
c0.4,0,2.89-3.5,5.58-7.73c2.69-4.24,5.51-8.34,6.19-9.08s1.08-1.34,0.94-1.34c-0.54,0,7.73-12.3,8.61-12.91
c0.4-0.27,0.47-0.54,0.2-0.54c-0.34,0,0.07-0.81,0.81-1.75c0.81-1.01,1.41-2.22,1.41-2.76c0-0.81-3.03-4.24-11.56-13.11
c-1.82-1.82-3.23-3.43-3.23-3.56c0-0.13-0.67-1.01-1.48-1.82c-1.48-1.48-6.19-6.86-11.36-12.91c-1.28-1.41-2.89-3.23-3.63-4.03
c-1.08-1.14-4.57-5.18-9.41-10.89c-1.01-1.21-4.17-5.04-11.43-14.05C380.23,296.93,381.11,297.67,379.36,300.09L379.36,300.09z"/>
<line class="st6" x1="108.71" y1="523.11" x2="108.7" y2="523.11"/>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 17 KiB

After

Width:  |  Height:  |  Size: 12 KiB

+15
View File
@@ -0,0 +1,15 @@
.v-toast__item--error {
background-color: #F56565 !important;
}
.v-toast__item--success {
background-color: #38A169 !important;
}
.v-toast__item--warning {
background-color: #ED8936 !important;
}
.v-toast__text {
font-family: "Roboto", sans-serif;
}
+39 -33
View File
@@ -1,4 +1,4 @@
import store from '../store'
//import store from '../store'
import { Line, mixins } from 'vue-chartjs'
const { reactiveProp } = mixins;
@@ -14,33 +14,32 @@ export default {
return {
timer: '',
options: {
events: ['click'],
events: [],
animation: {
duration: 0 // general animation time
},
hover: {
animationDuration: 0 // duration of animations when hovering an item
},
elements: {
line: {
tension: 0.4, // disable bezier curves
borderDash: undefined,
tension: 0,
borderWidth: 1,
},
point: {
radius: 0,
hoverRadius: 0,
}
},
showLines: true,
legend: {
labels: {
fontColor: 'rgb(203, 203, 203)',
fontFamily: 'Roboto,sans-serif',
//fontFamily: 'Roboto,sans-serif',
filter: function(item) {
return !item.text.includes('_target');
if (item && item.text) return !item.text.includes('_target');
}
},
onClick: function(e, legendItem) {
window.console.log(e)
window.console.log(legendItem)
let ci = this.chart;
let index = legendItem.datasetIndex;
let index_target = ci.data.datasets.findIndex(dataset => dataset.label === legendItem.text+'_target');
@@ -53,12 +52,18 @@ export default {
meta_target.hidden = meta.hidden;
}
store.dispatch('setHeaterChartVisibility', { name: legendItem.text, hidden: meta.hidden });
//store.dispatch('gui/setHeaterChartVisibility', { name: legendItem.text, hidden: meta.hidden });
ci.update();
}
},
tooltips: {
enabled: false
},
hover: {
mode:undefined
},
/*tooltips: {
enabled: false,
mode: 'nearest',
caretPadding: 20,
@@ -68,15 +73,15 @@ export default {
let date = new Date(tooltipItem[0].label);
return date.getHours()+":"+(date.getMinutes() < 10 ? "0" : "")+date.getMinutes()+":"+(date.getSeconds() < 10 ? "0" : "")+date.getSeconds();
},
label: function (tooltipItem/*, data*/) {
/*let label_target = data['datasets'][tooltipItem.datasetIndex].label+"_target";
label: function (tooltipItem/!*, data*!/) {
/!*let label_target = data['datasets'][tooltipItem.datasetIndex].label+"_target";
let target_dataset = data['datasets'].find(dataset => dataset.label === label_target);
if (target_dataset !== undefined && target_dataset.data[tooltipItem.index] !== undefined) return tooltipItem.value+" / "+target_dataset.data[tooltipItem.index].y;*/
if (target_dataset !== undefined && target_dataset.data[tooltipItem.index] !== undefined) return tooltipItem.value+" / "+target_dataset.data[tooltipItem.index].y;*!/
return tooltipItem.value;
},
}
},
},*/
maintainAspectRatio: false,
responsive: true,
responsiveAnimationDuration: 0, // animation duration after a resize
@@ -129,25 +134,26 @@ export default {
}
},
created () {
this.timer = setInterval(this.update, 500);
this.timer = setInterval(() => {
if (
this.$data._chart.config &&
this.$data._chart.config.options &&
this.$data._chart.config.options.scales &&
this.$data._chart.config.options.scales.xAxes &&
this.$data._chart.config.options.scales.xAxes.length &&
this.$data._chart.config.options.scales.xAxes[0].ticks &&
this.$data._chart.config.options.scales.yAxes &&
this.$data._chart.config.options.scales.yAxes.length &&
this.$data._chart.config.options.scales.yAxes[0].ticks
) {
this.$data._chart.config.options.scales.yAxes[0].ticks.max = defaultMaxTemperature
this.$data._chart.config.options.scales.xAxes[0].ticks.min = new Date() - maxSampleTime
this.$data._chart.config.options.scales.xAxes[0].ticks.max = new Date()
this.$data._chart.update()
}
}, 1000)
},
mounted () {
this.renderChart(this.chartData, this.options);
this.renderChart(this.chartData, this.options)
},
methods: {
update() {
this.$data._chart.config.options.scales.yAxes[0].ticks.max = defaultMaxTemperature;
this.$data._chart.config.options.scales.xAxes[0].ticks.min = new Date() - maxSampleTime;
this.$data._chart.config.options.scales.xAxes[0].ticks.max = new Date();
this.$data._chart.update();
}
},
watch: {
chartData: function(newData, oldData) {
window.console.log("watch chartData");
window.console.log(newData);
window.console.log(oldData);
this.$data._chart.reset();
}
}
}
+65 -68
View File
@@ -1,59 +1,66 @@
<style>
.btnHomeAxis {
width: 36px;
min-width: 36px !important;
}
.btnMinWidthAuto {
min-width: auto !important;
}
</style>
<template>
<v-card>
<v-row class="" v-if="['standby', 'complete', 'error'].includes(printer_state)">
<v-col class="col-12 pb-0 text-center">
<div class="d-inline-block mx-2 my-1"><v-btn @click="doHome" :loading="loadingHomeAll" :color="homedAxes.includes('xyz') ? 'primary' : 'warning'" class=""><v-icon class="mr-1">mdi-home</v-icon><span class="d-none d-sm-inline">Home </span>all</v-btn></div>
<div class="d-inline-block mx-2 my-1" v-if="config.hasOwnProperty('quad_gantry_level')"><v-btn @click="doQGL" :loading="loadingQGL" color="primary">QGL</v-btn></div>
<div class="d-inline-block mx-2 my-1" v-if="config.hasOwnProperty('z_tilt')"><v-btn @click="doZtilt" :loading="loadingZTilt" color="primary">Z Tilt</v-btn></div>
<v-btn small @click="doHome" :loading="loadings.includes('homeAll')" :color="homedAxes.includes('xyz') ? 'primary' : 'warning'"><v-icon class="mr-1">mdi-home</v-icon><span class="d-none d-sm-inline">Home </span>all</v-btn>
<v-btn small @click="doQGL" :loading="loadings.includes('qgl')" color="primary" class="ml-2" v-if="'quad_gantry_level' in config">QGL</v-btn>
<v-btn small @click="doZtilt" :loading="loadings.includes('zTilt')" color="primary" class="ml-2" v-if="'z_tilt' in config">Z Tilt</v-btn>
</v-col>
</v-row>
<v-row class="mt-3" v-if="['standby', 'complete', 'error'].includes(printer_state)">
<v-col class="col-12 py-0 px-6 text-center">
<v-btn-toggle borderless no-gutters style="flex-wrap: nowrap; width: 100%;" >
<v-btn @click="doSendMove('X-100')" cols="1" class="flex-grow-1 flex-shrink-0 d-none d-sm-flex"><v-icon left class="d-sm-flex">mdi-chevron-left</v-icon><span class="body-2">X-100</span></v-btn>
<v-btn @click="doSendMove('X-10')" cols="1" class="flex-grow-1 flex-shrink-0"><v-icon left class="d-none d-sm-flex">mdi-chevron-left</v-icon><span class="body-2">X-10</span></v-btn>
<v-btn @click="doSendMove('X-1')" cols="1" class="flex-grow-1 flex-shrink-0"><v-icon left class="d-none d-sm-flex">mdi-chevron-left</v-icon><span class="body-2">X-1</span></v-btn>
<v-btn @click="doHomeX" :color="homedAxes.includes('x') ? 'primary' : 'warning'" :loading="loadingHomeX"><v-icon class="mdi mdi-home"></v-icon></v-btn>
<v-btn @click="doSendMove('X+1')" cols="1" class="flex-grow-1 flex-shrink-0"><span class="body-2">X+1</span><v-icon right class="d-none d-sm-flex">mdi-chevron-right</v-icon></v-btn>
<v-btn @click="doSendMove('X+10')" cols="1" class="flex-grow-1 flex-shrink-0"><span class="body-2">X+10</span><v-icon right class="d-none d-sm-flex">mdi-chevron-right</v-icon></v-btn>
<v-btn @click="doSendMove('X+100')" cols="1" class="flex-grow-1 flex-shrink-0 d-none d-sm-flex"><span class="body-2">X+100</span><v-icon right class="d-none d-sm-flex">mdi-chevron-right</v-icon></v-btn>
<v-btn-toggle dense no-gutters class="row mx-auto" style="flex-wrap: nowrap;" >
<v-btn @click="doSendMove('X-100')" class="btnMinWidthAuto col"><span class="body-2">-100</span></v-btn>
<v-btn @click="doSendMove('X-10')" class="btnMinWidthAuto col"><span class="body-2">-10</span></v-btn>
<v-btn @click="doSendMove('X-1')" class="btnMinWidthAuto col"><span class="body-2">-1</span></v-btn>
<v-btn @click="doHomeX" :color="homedAxes.includes('x') ? 'primary' : 'warning'" :loading="loadings.includes('homeX')" class="font-weight-bold btnHomeAxis">X</v-btn>
<v-btn @click="doSendMove('X+1')" class="btnMinWidthAuto col"><span class="body-2">+1</span></v-btn>
<v-btn @click="doSendMove('X+10')" class="btnMinWidthAuto col"><span class="body-2">+10</span></v-btn>
<v-btn @click="doSendMove('X+100')" class="btnMinWidthAuto col"><span class="body-2">+100</span></v-btn>
</v-btn-toggle>
</v-col>
</v-row>
<v-row class="mt-3" v-if="['standby', 'complete', 'error'].includes(printer_state)">
<v-col class="col-12 py-0 px-6 text-center">
<v-btn-toggle borderless no-gutters style="flex-wrap: nowrap; width: 100%;" >
<v-btn @click="doSendMove('Y-100')" cols="1" class="flex-grow-1 flex-shrink-0 d-none d-sm-flex"><v-icon left class="d-none d-sm-flex">mdi-chevron-left</v-icon><span class="body-2">Y-100</span></v-btn>
<v-btn @click="doSendMove('Y-10')" cols="1" class="flex-grow-1 flex-shrink-0"><v-icon left class="d-none d-sm-flex">mdi-chevron-left</v-icon><span class="body-2">Y-10</span></v-btn>
<v-btn @click="doSendMove('Y-1')" cols="1" class="flex-grow-1 flex-shrink-0"><v-icon left class="d-none d-sm-flex">mdi-chevron-left</v-icon><span class="body-2">Y-1</span></v-btn>
<v-btn @click="doHomeY" :color="homedAxes.includes('y') ? 'primary' : 'warning'" :loading="loadingHomeY"><v-icon class="mdi mdi-home"></v-icon></v-btn>
<v-btn @click="doSendMove('Y+1')" cols="1" class="flex-grow-1 flex-shrink-0"><span class="body-2">Y+1</span><v-icon right class="d-none d-sm-flex">mdi-chevron-right</v-icon></v-btn>
<v-btn @click="doSendMove('Y+10')" cols="1" class="flex-grow-1 flex-shrink-0"><span class="body-2">Y+10</span><v-icon right class="d-none d-sm-flex">mdi-chevron-right</v-icon></v-btn>
<v-btn @click="doSendMove('Y+100')" cols="1" class="flex-grow-1 flex-shrink-0 d-none d-sm-flex"><span class="body-2">Y+100</span><v-icon right class="d-none d-sm-flex">mdi-chevron-right</v-icon></v-btn>
<v-btn-toggle dense no-gutters class="row mx-auto" style="flex-wrap: nowrap;" >
<v-btn @click="doSendMove('Y-100')" class="btnMinWidthAuto col"><span class="body-2">-100</span></v-btn>
<v-btn @click="doSendMove('Y-10')" class="btnMinWidthAuto col"><span class="body-2">-10</span></v-btn>
<v-btn @click="doSendMove('Y-1')" class="btnMinWidthAuto col"><span class="body-2">-1</span></v-btn>
<v-btn @click="doHomeY" :color="homedAxes.includes('y') ? 'primary' : 'warning'" :loading="loadings.includes('homeY')" class="font-weight-bold btnHomeAxis">Y</v-btn>
<v-btn @click="doSendMove('Y+1')" class="btnMinWidthAuto col"><span class="body-2">+1</span></v-btn>
<v-btn @click="doSendMove('Y+10')" class="btnMinWidthAuto col"><span class="body-2">+10</span></v-btn>
<v-btn @click="doSendMove('Y+100')" class="btnMinWidthAuto col"><span class="body-2">+100</span></v-btn>
</v-btn-toggle>
</v-col>
</v-row>
<v-row class="mt-3" v-if="['standby', 'complete', 'error'].includes(printer_state)">
<v-col class="col-12 py-0 px-6 text-center">
<v-btn-toggle borderless no-gutters style="flex-wrap: nowrap; width: 100%;" >
<v-btn @click="doSendMove('Z-25')" cols="1" class="flex-grow-1 flex-shrink-0"><v-icon left class="d-none d-sm-flex">mdi-chevron-left</v-icon><span class="body-2">Z-25</span></v-btn>
<v-btn @click="doSendMove('Z-1')" cols="1" class="flex-grow-1 flex-shrink-0"><v-icon left class="d-none d-sm-flex">mdi-chevron-left</v-icon><span class="body-2">Z-1</span></v-btn>
<v-btn @click="doSendMove('Z-0.1')" cols="1" class="flex-grow-1 flex-shrink-0 d-none d-sm-flex"><v-icon left class="d-none d-sm-flex">mdi-chevron-left</v-icon><span class="body-2">Z-0.1</span></v-btn>
<v-btn @click="doHomeZ" :color="homedAxes.includes('z') ? 'primary' : 'warning'" :loading="loadingHomeZ"><v-icon class="mdi mdi-home"></v-icon></v-btn>
<v-btn @click="doSendMove('Z+0.1')" cols="1" class="flex-grow-1 flex-shrink-0 d-none d-sm-flex"><span class="body-2">Z+0.1</span><v-icon right class="d-none d-sm-flex">mdi-chevron-right</v-icon></v-btn>
<v-btn @click="doSendMove('Z+1')" cols="1" class="flex-grow-1 flex-shrink-0"><span class="body-2">Z+1</span><v-icon right class="d-none d-sm-flex">mdi-chevron-right</v-icon></v-btn>
<v-btn @click="doSendMove('Z+25')" cols="1" class="flex-grow-1 flex-shrink-0"><span class="body-2">Z+25</span><v-icon right class="d-none d-sm-flex">mdi-chevron-right</v-icon></v-btn>
<v-btn-toggle dense no-gutters class="row mx-auto" style="flex-wrap: nowrap;" >
<v-btn @click="doSendMove('Z-25')" dense class="btnMinWidthAuto col"><span class="body-2">-25</span></v-btn>
<v-btn @click="doSendMove('Z-1')" dense class="btnMinWidthAuto col"><span class="body-2">-1</span></v-btn>
<v-btn @click="doSendMove('Z-0.1')" dense class="btnMinWidthAuto col"><span class="body-2">-0.1</span></v-btn>
<v-btn @click="doHomeZ" :color="homedAxes.includes('z') ? 'primary' : 'warning'" :loading="loadings.includes('homeZ')" class="font-weight-bold btnHomeAxis">Z</v-btn>
<v-btn @click="doSendMove('Z+0.1')" dense class="btnMinWidthAuto col"><span class="body-2">+0.1</span></v-btn>
<v-btn @click="doSendMove('Z+1')" dense class="btnMinWidthAuto col"><span class="body-2">+1</span></v-btn>
<v-btn @click="doSendMove('Z+25')" dense class="btnMinWidthAuto col"><span class="body-2">+25</span></v-btn>
</v-btn-toggle>
</v-col>
</v-row>
<v-row class="" v-if="getMacros.length > 0">
<v-row class="" v-if="this['printer/getMacros'].length > 0">
<v-col class="col-12 px-4 py-2 text-center">
<div v-for="(macro, index) in getMacros" v-bind:key="index+99" class="d-inline-block mx-1 my-1">
<v-btn color="primary" class="mx-1 my-1" @click="doSend(macro.name)">{{ macro.name.replace(/_/g, " ") }}</v-btn>
<div v-for="(macro, index) in this['printer/getMacros']" v-bind:key="index+99" class="d-inline-block mx-1 my-1">
<v-btn small color="primary" class="mx-1 my-1" :loading="loadings.includes('macro_'+macro.name)" @click="doSendMacro(macro.name)">{{ macro.name.replace(/_/g, " ") }}</v-btn>
</div>
</v-col>
</v-row>
@@ -70,55 +77,50 @@
},
data: function() {
return {
loadingHomeAll: false,
loadingHomeX: false,
loadingHomeY: false,
loadingHomeZ: false,
loadingQGL: false,
loadingZTilt: false,
}
},
computed: {
...mapState({
homedAxes: state => state.printer.toolhead.homed_axes,
config: state => state.printer.configfile.config,
loadings: state => state.loadings,
loadings: state => state.socket.loadings,
printer_state: state => state.printer.print_stats.state
}),
...mapGetters([
'getMacros',
'printer/getMacros',
])
},
methods: {
doHome() {
this.$store.commit('addGcodeResponse', "G28");
this.$store.commit('setLoading', { name: 'controlHomeAll' });
this.$socket.sendObj('printer.gcode.script', { script: "G28" }, "responseHome");
this.$store.commit('server/addEvent', "G28");
this.$store.commit('socket/addLoading', { name: 'homeAll' });
this.$socket.sendObj('printer.gcode.script', { script: "G28" }, "socket/removeLoading", { name: 'homeAll' });
},
doHomeX() {
this.$store.commit('addGcodeResponse', "G28 X");
this.$store.commit('setLoading', { name: 'controlHomeX' });
this.$socket.sendObj('printer.gcode.script', { script: "G28 X" }, "responseHomeX");
this.$store.commit('server/addEvent', "G28 X");
this.$store.commit('socket/addLoading', { name: 'homeX' });
this.$socket.sendObj('printer.gcode.script', { script: "G28 X" }, "socket/removeLoading", { name: 'homeX' });
},
doHomeY() {
this.$store.commit('addGcodeResponse', "G28 Y");
this.$store.commit('setLoading', { name: 'controlHomeY' });
this.$socket.sendObj('printer.gcode.script', { script: "G28 Y" }, "responseHomeY");
this.$store.commit('server/addEvent', "G28 Y");
this.$store.commit('socket/addLoading', { name: 'homeY' });
this.$socket.sendObj('printer.gcode.script', { script: "G28 Y" }, "socket/removeLoading", { name: 'homeY' });
},
doHomeZ() {
this.$store.commit('addGcodeResponse', "G28 Z");
this.$store.commit('setLoading', { name: 'controlHomeZ' });
this.$socket.sendObj('printer.gcode.script', { script: "G28 Z" }, "responseHomeZ");
this.$store.commit('server/addEvent', "G28 Z");
this.$store.commit('socket/addLoading', { name: 'homeZ' });
this.$socket.sendObj('printer.gcode.script', { script: "G28 Z" }, "socket/removeLoading", { name: 'homeZ' });
},
doQGL() {
this.$store.commit('addGcodeResponse', "QUAD_GANTRY_LEVEL");
this.$store.commit('setLoading', { name: 'controlQGL' });
this.$socket.sendObj('printer.gcode.script', { script: "QUAD_GANTRY_LEVEL" }, "responseQGL");
this.$store.commit('server/addEvent', "QUAD_GANTRY_LEVEL");
this.$store.commit('socket/addLoading', { name: 'qgl' });
this.$socket.sendObj('printer.gcode.script', { script: "QUAD_GANTRY_LEVEL" }, "socket/removeLoading", { name: 'qgl' });
},
doZtilt() {
this.$store.commit('addGcodeResponse', "Z_TILT_ADJUST");
this.$store.commit('setLoading', { name: 'controlZTilt' });
this.$socket.sendObj('printer.gcode.script', { script: "Z_TILT_ADJUST" }, "responseZTilt");
this.$store.commit('server/addEvent', "Z_TILT_ADJUST");
this.$store.commit('socket/addLoading', { name: 'zTilt' });
this.$socket.sendObj('printer.gcode.script', { script: "Z_TILT_ADJUST" }, "socket/removeLoading", { name: 'zTilt' });
},
doSendMove(gcode) {
gcode = "G91" + "\n" +
@@ -128,19 +130,14 @@
this.doSend(gcode);
},
doSend(gcode) {
this.$store.commit('addGcodeResponse', gcode);
Vue.prototype.$socket.sendObj('printer.gcode.script', { script: gcode }, "sendGcode");
this.$store.commit('server/addEvent', gcode);
Vue.prototype.$socket.sendObj('printer.gcode.script', { script: gcode }, "server/getGcodeRespond");
},
doSendMacro(gcode) {
this.$store.commit('server/addEvent', gcode);
this.$store.commit('socket/addLoading', { name: 'macro_'+gcode });
Vue.prototype.$socket.sendObj('printer.gcode.script', { script: gcode }, "socket/removeLoading", { name: 'macro_'+gcode });
},
},
watch: {
loadings: function(loadings) {
this.loadingHomeAll = loadings.includes('controlHomeAll');
this.loadingHomeX = loadings.includes('controlHomeX');
this.loadingHomeY = loadings.includes('controlHomeY');
this.loadingHomeZ = loadings.includes('controlHomeZ');
this.loadingQGL = loadings.includes('controlQGL');
this.loadingZTilt = loadings.includes('controlZTilt');
}
}
}
</script>
+16 -25
View File
@@ -7,21 +7,21 @@
<v-row class="px-3">
<v-col class="col-12 col-md-6">
<v-label>Feed amount in mm:</v-label>
<v-btn-toggle class="mt-2" no-gutters style="flex-wrap: nowrap; width: 100%;" >
<v-btn v-for="amount in feedAmounts" v-bind:key="amount" @click="setFeedAmount(amount)" cols="1" :class="(amount === feedAmount ? 'v-btn--active' : '') + ' flex-grow-1'">{{ amount }}</v-btn>
<v-btn-toggle class="mt-2" dense no-gutters style="flex-wrap: nowrap; width: 100%;" >
<v-btn v-for="amount in feedAmounts" v-bind:key="amount" @click="setFeedAmount(amount)" dense :class="(amount === feedAmount ? 'v-btn--active' : '') + ' btnMinWidthAuto flex-grow-1 px-0 _btnFeedrate'">{{ amount }}</v-btn>
</v-btn-toggle>
</v-col>
<v-col class="col-12 col-md-6">
<v-label>Feedrate in mm/s:</v-label>
<v-btn-toggle class="mt-2" no-gutters style="flex-wrap: nowrap; width: 100%;" >
<v-btn v-for="rate in feedrates" v-bind:key="rate" @click="setFeedrate(rate)" cols="1" :class="(feedrate === rate ? 'v-btn--active' : '') + ' flex-grow-1'">{{ rate }}</v-btn>
<v-btn-toggle class="mt-2" dense no-gutters style="flex-wrap: nowrap; width: 100%;" >
<v-btn v-for="rate in feedrates" v-bind:key="rate" @click="setFeedrate(rate)" dense :class="(feedrate === rate ? 'v-btn--active' : '') + ' btnMinWidthAuto flex-grow-1 px-0 _btnFeedrate'">{{ rate }}</v-btn>
</v-btn-toggle>
</v-col>
</v-row>
<v-row class="px-3">
<v-col class="col-12 text-center">
<v-btn @click="sendRetract()" class="mx-2" :loading="loadingRetract" :disabled="!(config !== undefined && config.extruder !== null && (config.extruder.min_extrude_temp < extruder.temperature || !config.extruder.min_extrude_temp))"><v-icon>mdi-arrow-up-bold</v-icon> Retract</v-btn>
<v-btn @click="sendDetract()" class="mx-2" :loading="loadingDetract" :disabled="!(config !== undefined && config.extruder !== null && (config.extruder.min_extrude_temp < extruder.temperature || !config.extruder.min_extrude_temp))"><v-icon>mdi-arrow-down-bold</v-icon> Extrude</v-btn>
<v-btn small @click="sendRetract()" class="mx-2" :loading="loadings.includes('btnRetract')" :disabled="!this['printer/getExtrudePossible']"><v-icon small class="mr-1">mdi-arrow-up-bold</v-icon> Retract</v-btn>
<v-btn small @click="sendDetract()" class="mx-2" :loading="loadings.includes('btnDetract')" :disabled="!this['printer/getExtrudePossible']"><v-icon small class="mr-1">mdi-arrow-down-bold</v-icon> Extrude</v-btn>
</v-col>
</v-row>
</v-card>
@@ -37,24 +37,21 @@
},
data: function() {
return {
feedAmount: 20,
feedAmount: 25,
feedrate: 5,
feedAmounts: [ 100, 50, 20, 10, 5, 1 ],
feedAmounts: [ 100, 25, 10, 5, 1 ],
feedrates: [ 60, 30, 15, 5, 1 ],
loadingRetract: false,
loadingDetract: false,
}
},
computed: {
...mapState({
loadings: state => state.loadings,
loadings: state => state.socket.loadings,
printer_state: state => state.printer.print_stats.state,
extruder: state => state.printer.extruder,
config: state => state.printer.configfile.config
}),
...mapGetters([
'getMacros',
'getCurrentExtruder',
'printer/getExtrudePossible',
]),
},
methods: {
@@ -66,21 +63,15 @@
},
sendRetract() {
let gcode = "M83\nG1 E-"+this.feedAmount+" F"+(this.feedrate * 60);
this.$store.commit('setLoading', { name: 'extruderRetract' });
this.$store.commit('addGcodeResponse', gcode);
Vue.prototype.$socket.sendObj('printer.gcode.script', { script: gcode }, "respondeExtruderRetract");
this.$store.commit('server/addEvent', gcode);
this.$store.commit('socket/addLoading', { name: 'btnRetract' });
Vue.prototype.$socket.sendObj('printer.gcode.script', { script: gcode }, "socket/removeLoading", { name: 'btnRetract' });
},
sendDetract() {
let gcode = "M83\nG1 E"+this.feedAmount+" F"+(this.feedrate * 60);
this.$store.commit('setLoading', { name: 'extruderDetract' });
this.$store.commit('addGcodeResponse', gcode);
Vue.prototype.$socket.sendObj('printer.gcode.script', { script: gcode }, "respondeExtruderDetract");
},
},
watch: {
loadings: function(loadings) {
this.loadingRetract = loadings.includes('extruderRetract');
this.loadingDetract = loadings.includes('extruderDetract');
this.$store.commit('server/addEvent', gcode);
this.$store.commit('socket/addLoading', { name: 'btnDetract' });
Vue.prototype.$socket.sendObj('printer.gcode.script', { script: gcode }, "socket/removeLoading", { name: 'btnDetract' });
},
}
}
+18 -57
View File
@@ -1,18 +1,13 @@
<template>
<v-card>
<v-list-item>
<v-list-item-avatar color="grey">
<v-icon dark>mdi-alert-circle</v-icon>
</v-list-item-avatar>
<v-list-item-content>
<v-list-item-title class="headline">Klippy-Status</v-list-item-title>
<v-list-item-title class="subtitle-1">{{ state }}</v-list-item-title>
</v-list-item-content>
</v-list-item>
<v-divider class="my-2" ></v-divider>
<v-card-text class="px-0 pt-0 pb-2 content">
<v-toolbar flat dense >
<v-toolbar-title>
<span class="subheading"><v-icon left>mdi-alert-circle</v-icon>Klippy-State: {{ klippy_state}}</span>
</v-toolbar-title>
</v-toolbar>
<v-card-text class="py-0">
<v-layout wrap class=" text-center">
<v-flex col class="text-left" v-if="klippy_connected"><pre>{{ state_message }}</pre></v-flex>
<v-flex col class="text-left" v-if="klippy_connected"><pre style="white-space: pre-wrap;">{{ klippy_message }}</pre></v-flex>
<v-flex col class="text-left" v-if="!klippy_connected">
<p>Moonraker can't connect to Klippy!<br />Please check if the Klipper service is running and an UDS (Unix Domain Socket) is configured.</p>
</v-flex>
@@ -20,66 +15,32 @@
</v-card-text>
<v-divider class="my-2" v-if="klippy_connected" ></v-divider>
<v-card-text class="px-4 pt-2 pb-4 content text-center text-lg-left" v-if="klippy_connected">
<v-btn @click="doRestart" :loading="loadingRestart" color="error" class=""><v-icon class="mr-sm-2">mdi-cached</v-icon>Restart</v-btn>
<v-btn @click="doRestartFirmware" :loading="loadingRestartFirmware" class="ml-4" color="error"><v-icon class="mr-sm-2">mdi-cached</v-icon>FIRMWARE_Restart</v-btn>
<v-btn small @click="doRestart" color="error" class=""><v-icon class="mr-sm-2">mdi-cached</v-icon>Restart</v-btn>
<v-btn small @click="doRestartFirmware" class="ml-4" color="error"><v-icon class="mr-sm-2">mdi-cached</v-icon>FIRMWARE Restart</v-btn>
</v-card-text>
</v-card>
</template>
<script>
import {mapMutations, mapState} from 'vuex';
import { mapState } from 'vuex';
export default {
computed: {
...mapState({
state: state => state.printer.webhooks.state,
state_message: state => state.printer.webhooks.state_message,
loadingRestart: state => state.socket.loadingRestart,
loadingRestartFirmware: state => state.socket.loadingRestartFirmware,
klippy_connected: state => state.socket.klippy_connected,
klippy_connected: state => state.server.klippy_connected,
klippy_state: state => state.server.klippy_state,
klippy_message: state => state.server.klippy_message,
}),
...mapMutations([
'setLoadingRestart',
'setLoadingRestartFirmware',
]),
},
methods: {
doRestart() {
this.$store.commit('setLoadingRestart', true);
this.$socket.sendObj('printer.restart', { }, "responseRestart");
this.$store.commit('socket/addLoading', { name: 'restart' });
this.$socket.sendObj('printer.restart', { }, 'socket/removeLoading', { name: 'restart' });
},
doRestartFirmware() {
this.$store.commit('setLoadingRestartFirmware', true);
this.$socket.sendObj('printer.firmware_restart', { }, "responseRestartFirmware");
this.$store.commit('socket/addLoading', { name: 'firmwareRestart' });
this.$socket.sendObj('printer.firmware_restart', { }, 'socket/removeLoading', { name: 'firmwareRestart' });
},
},
}
</script>
<style scoped>
.equal-width {
flex-basis: 0;
}
.category-header {
flex: 0 0 100px;
}
a:not(:hover) {
color: inherit;
}
.content span,
.content strong {
padding-left: 8px;
padding-right: 8px;
white-space: pre-wrap;
}
.probe-span {
border-radius: 5px;
}
.probe-span:not(:last-child) {
margin-right: 8px;
}
</style>
</script>
@@ -0,0 +1,94 @@
<template>
<v-card
class="mb-6"
v-if="
!boolVirtualSdcard ||
!boolPauseResume ||
!boolDisplayStatus ||
!boolMacroPause ||
!boolMacroResume ||
!boolMacroCancelPrint
">
<v-toolbar flat dense>
<v-toolbar-title>
<span class="subheading">
<v-icon class="mdi mdi-alert-circle" left></v-icon>Missing configuration
</span>
</v-toolbar-title>
</v-toolbar>
<v-card-text class="px-0 pt-0 pb-2 content">
<v-layout wrap class=" text-center">
<v-flex col class="text-left">
<p v-if="!boolVirtualSdcard"><code>virtual_sdcard</code> is not defined in config.</p>
<p v-if="!boolPauseResume"><code>pause_resume</code> is not defined in config.</p>
<p v-if="!boolDisplayStatus"><code>display_status</code> is not defined in config.</p>
<p v-if="!boolMacroPause"><code>gcode_macro PAUSE</code> is not defined in config.</p>
<p v-if="!boolMacroResume"><code>gcode_macro RESUME</code> is not defined in config.</p>
<p v-if="!boolMacroCancelPrint"><code>gcode_macro CANCEL_PRINT</code> is not defined in config.</p>
<p class="mb-0"><a href="https://meteyou.github.io/mainsail/necessary-configuration" target="_blank">Here you will find more information.</a></p>
</v-flex>
</v-layout>
</v-card-text>
</v-card>
</template>
<script>
import { mapMutations, mapState, mapGetters } from 'vuex';
export default {
data: () => ({
boolVirtualSdcard: false,
boolPauseResume: false,
boolDisplayStatus: false,
boolMacroPause: false,
boolMacroResume: false,
boolMacroCancelPrint: false,
}),
computed: {
...mapState({
config: state => state.printer.configfile.config,
}),
...mapMutations([
]),
...mapGetters([
'printer/checkConfigVirtualSdcard',
'printer/checkConfigPauseResume',
'printer/checkConfigDisplayStatus',
'printer/checkConfigMacroPause',
'printer/checkConfigMacroResume',
'printer/checkConfigMacroCancel',
]),
},
created() {
this.refreshConfig();
},
methods: {
refreshConfig() {
this.boolVirtualSdcard = this['printer/checkConfigVirtualSdcard'];
this.boolPauseResume = this['printer/checkConfigPauseResume'];
this.boolDisplayStatus = this['printer/checkConfigDisplayStatus'];
this.boolMacroPause = this['printer/checkConfigMacroPause'];
this.boolMacroResume = this['printer/checkConfigMacroResume'];
this.boolMacroCancelPrint = this['printer/checkConfigMacroCancel'];
}
},
watch: {
config: {
deep: true,
handler() {
this.refreshConfig();
}
}
}
}
</script>
<style scoped>
.content span,
.content strong {
padding-left: 8px;
padding-right: 8px;
white-space: pre-wrap;
}
</style>
+57 -36
View File
@@ -1,48 +1,58 @@
<style>
.minievent-table {
max-height: 250px;
max-height: 350px;
overflow-y: auto;
}
.miniConsole .title-cell {
white-space: nowrap;
}
.miniConsole.v-data-table > .v-data-table__wrapper > table > tbody > tr > td {
height: auto;
}
.miniConsole .content-cell {
width: 100%;
}
</style>
<template>
<v-card>
<v-list-item>
<v-list-item-avatar color="grey"><v-icon dark>mdi-console-line</v-icon></v-list-item-avatar>
<v-list-item-content>
<v-list-item-title class="headline">Console</v-list-item-title>
</v-list-item-content>
</v-list-item>
<v-divider class="mt-2"></v-divider>
<v-toolbar flat dense>
<v-toolbar-title>
<span class="subheading"><v-icon left>mdi-console-line</v-icon>Console</span>
</v-toolbar-title>
</v-toolbar>
<v-card-text class="px-0 py-0 content">
<v-data-table
:headers="headers"
:options="options"
:items="events"
item-key="date"
hide-default-footer
hide-default-header
disable-pagination
class="minievent-table"
:custom-sort="customSort"
sort-by="date"
>
<template #no-data>
<div class="text-center">empty</div>
</template>
<v-data-table
:headers="headers"
:options="options"
:items="events"
item-key="date"
hide-default-footer
hide-default-header
disable-pagination
class="minievent-table miniConsole"
:custom-sort="customSort"
sort-by="date"
>
<template #no-data>
<div class="py-2">empty</div>
</template>
<template #item="{ item }">
<tr>
<td class="log-cell title-cell">
{{ item.date.toLocaleString() }}
</td>
<td class="log-cell content-cell" colspan="2">
<span v-if="item.message" class="message" v-html="formatMessage(item.message)"></span>
</td>
</tr>
</template>
</v-data-table>
<template #item="{ item }">
<tr>
<td class="log-cell title-cell py-2">
{{ formatTime(item.date)}}
</td>
<td class="log-cell content-cell pl-0 py-2" colspan="2" style="width:100%;">
<span v-if="item.message" class="message" v-html="formatMessage(item.message)"></span>
</td>
</tr>
</template>
</v-data-table>
</v-card-text>
</v-card>
</template>
@@ -77,11 +87,22 @@
},
computed: {
...mapState({
events: state => state.events,
events: state => state.server.events,
})
},
methods: {
formatTime(date) {
let hours = date.getHours();
if (hours < 10) hours = "0"+hours.toString();
let minutes = date.getMinutes();
if (minutes < 10) minutes = "0"+minutes.toString();
let seconds = date.getSeconds();
if (seconds < 10) seconds = "0"+seconds.toString();
return hours+":"+minutes+":"+seconds;
},
formatMessage(message) {
message = message.replace(/(?:\r\n|\r|\n)/g, '<br>');
@@ -104,4 +125,4 @@
}
}
}
</script>
</script>
+17 -36
View File
@@ -17,48 +17,38 @@
<template>
<div>
<v-card v-if="fan">
<v-card v-if="this['printer/getFans'].length">
<v-toolbar flat dense >
<v-toolbar-title>
<span class="subheading"><v-icon :class="fan.speed > 0 ? 'mdi mdi-fan icon-rotate' : 'mdi mdi-fan'" left></v-icon>Tool Fan</span>
<span class="subheading"><v-icon :class="'mdi mdi-fan '+(this['printer/getPartFanSpeed'] ? 'icon-rotate' : '')" left></v-icon>Fans</span>
</v-toolbar-title>
</v-toolbar>
<v-card-text class="pb-0">
<tool-slider :target="fan.speed" :multi="100" command="M106" attribute-name="S" :attribute-scale="2.55" ></tool-slider>
</v-card-text>
<div v-for="(fan, index) of this['printer/getFans']" v-bind:key="index">
<v-divider v-if="index"></v-divider>
<fan-slider :name="fan.name" :type="fan.type" :target="fan.speed" :controllable="fan.controllable" :multi="100" class="py-0" ></fan-slider>
</div>
</v-card>
<v-card class="mt-6" v-if="['printing', 'paused'].includes(printer_state)">
<v-toolbar flat dense >
<v-toolbar-title>
<span class="subheading"><v-icon class="mdi mdi-timer" left></v-icon>Speed Factor</span>
<span class="subheading"><v-icon class="mdi mdi-printer-3d" left></v-icon>Print Settings</span>
</v-toolbar-title>
</v-toolbar>
<v-card-text class="pb-0">
<tool-slider :target="speed_factor" :max="200" :multi="100" command="M220" attribute-name="S" ></tool-slider>
</v-card-text>
</v-card>
<v-card class="mt-6" v-if="['printing', 'paused'].includes(printer_state)">
<v-toolbar flat dense >
<v-toolbar-title>
<span class="subheading"><v-icon class="mdi mdi-texture" left></v-icon>Extrusion Factor</span>
</v-toolbar-title>
</v-toolbar>
<v-card-text class="pb-0">
<tool-slider :target="extrude_factor" :max="200" :multi="100" command="M221" attribute-name="S" ></tool-slider>
</v-card-text>
<tool-slider label="Speed factor" :target="speed_factor" :max="200" :multi="100" :step="5" command="M220" attribute-name="S" ></tool-slider>
<v-divider></v-divider>
<tool-slider label="Extrusion factor" :target="extrude_factor" :max="200" :multi="100" :step="1" command="M221" attribute-name="S" ></tool-slider>
</v-card>
</div>
</template>
<script>
import {mapGetters, mapState} from 'vuex'
import { mapState, mapGetters } from 'vuex'
import FanSlider from '../../inputs/FanSlider'
import ToolSlider from '../../inputs/ToolSlider'
export default {
components: {
FanSlider,
ToolSlider
},
data () {
@@ -73,18 +63,9 @@
printer_state: state => state.printer.print_stats.state,
}),
...mapGetters([
'fan',
'is_printing'
])
'printer/getFans',
'printer/getPartFanSpeed',
]),
},
methods: {
},
mounted () {
},
watch: {
}
}
</script>
</script>
+17 -25
View File
@@ -12,24 +12,21 @@
</v-toolbar-title>
</v-toolbar>
<v-card-text class="pb-0">
<div v-for="(device, index) in devices" v-bind:key="index">
<v-divider class="my-2" v-if="index > 0"></v-divider>
<v-row class="pl-2 pr-2 pb-2">
<v-col class="col-auto py-0 vertical_align_center col-6">{{ device.name }}</v-col>
<v-col class="col-auto py-0 vertical_align_center col-6">
<v-btn
:disabled="device.status === 1"
v-on="device.status === 0 ? { click: () => setPower(index,1) } : {}"
>On</v-btn>
<v-btn
:disabled="device.status === 0"
v-on="device.status === 1 ? { click: () => setPower(index,0) } : {}"
>Off</v-btn>
<div v-for="(device, index) in devices" v-bind:key="index">
<v-divider class="mt-0" v-if="index > 0"></v-divider>
<v-card-text class="py-2">
<v-row>
<v-col class="py-0 pt-1">{{ device.device }}</v-col>
<v-col class="py-0 text-right">
<v-btn-toggle v-model="device.status">
<v-btn small v-if="device.status === 'error'" disabled>Error</v-btn>
<v-btn small v-if="device.status !== 'error'" :disabled="device.status === 'on'" @click="setPower(device,1)">On</v-btn>
<v-btn small v-if="device.status !== 'error'" :disabled="device.status === 'off'" @click="setPower(device,0)">Off</v-btn>
</v-btn-toggle>
</v-col>
</v-row>
</div>
</v-card-text>
</v-card-text>
</div>
</v-card>
</div>
</template>
@@ -43,18 +40,13 @@ export default {
computed: {
...mapState({
devices: (state) => state.power.devices,
devices: (state) => state.server.power.devices,
}),
},
methods: {
setPower(index, value) {
let rpc = value === 1 ? "machine.gpio_power.on" : "machine.gpio_power.off";
let deviceId = this.devices[index].id;
Vue.prototype.$socket.sendObj(
rpc,
{ [deviceId]: "" },
"responsePowerToggle"
);
setPower(device, value) {
let rpc = value === 1 ? "machine.device_power.on" : "machine.device_power.off";
Vue.prototype.$socket.sendObj(rpc,{ [device.device]: null },"server/power/responseToggle");
},
},
};
@@ -30,9 +30,13 @@
<v-card-title>
Config Files
<v-spacer></v-spacer>
<v-btn color=" ml-4" v-if="currentPath !== '' && currentPath !== '/config_examples'" @click="createFile"><v-icon>mdi-file-plus</v-icon></v-btn>
<v-btn color=" ml-4" v-if="currentPath !== '' && currentPath !== '/config_examples'" @click="createFolder"><v-icon>mdi-folder-plus</v-icon></v-btn>
<v-btn color="primary ml-4" :loading="loadingConfigRefresh" @click="refreshFileList"><v-icon>mdi-refresh</v-icon></v-btn>
<input type="file" ref="fileUpload" style="display: none" @change="uploadFile" />
<v-item-group class="v-btn-toggle">
<v-btn color="" v-if="currentPath !== '' && currentPath !== '/config_examples'" @click="uploadFileButton" :loading="loadings.includes['configFileUpload']"><v-icon>mdi-file-upload</v-icon></v-btn>
<v-btn color="" v-if="currentPath !== '' && currentPath !== '/config_examples'" @click="createFile"><v-icon>mdi-file-plus</v-icon></v-btn>
<v-btn color="" v-if="currentPath !== '' && currentPath !== '/config_examples'" @click="createFolder"><v-icon>mdi-folder-plus</v-icon></v-btn>
<v-btn color="primary" @click="refreshFileList"><v-icon>mdi-refresh</v-icon></v-btn>
</v-item-group>
</v-card-title>
<v-card-subtitle>Current path: {{ this.currentPath === "" ? "/" : this.currentPath }}</v-card-subtitle>
<v-data-table
@@ -44,16 +48,15 @@
:custom-sort="sortFiles"
:sort-by.sync="sortBy"
:sort-desc.sync="sortDesc"
:items-per-page="countPerPage"
:items-per-page.sync="countPerPage"
item-key="name">
<template #no-data>
<div class="text-center">empty</div>
</template>
<template v-slot:body.prepend>
<tr
v-if="(currentPath !== '')"
<template slot="body.prepend" v-if="(currentPath !== '')">
<tr
class="file-list-cursor"
@click="clickRowGoBack">
<td class=" "><v-icon>mdi-folder-upload</v-icon></td>
@@ -195,8 +198,7 @@
},
currentPage: 1,
files: [],
currentPath: '',
loadingConfigRefresh: false,
currentPath: '/config',
editor: {
show: false,
showLoader: false,
@@ -231,30 +233,32 @@
},
computed: {
...mapState({
config_examples: state => state.filetree.config_examples,
config: state => state.filetree.config,
filetree: state => state.filetree,
countPerPage: state => state.gui.settings.configfiles.countPerPage,
filetree: state => state.files.filetree,
hostname: state => state.socket.hostname,
port: state => state.socket.port,
})
loadings: state => state.socket.loadings,
}),
countPerPage: {
get: function() {
return this.$store.state.gui.settings.configfiles.countPerPage
},
set: function(newVal) {
return this.$store.dispatch("gui/setSettings", { settings: { configfiles: { countPerPage: newVal } } });
}
},
},
created() {
this.loadPath();
},
methods: {
highlighter(code) {
//return highlight(code, languages.editorconfig); //returns html
return highlight(code, languages.ini); //returns html
},
refreshFileList: function() {
window.console.log(this.currentPath.substring(1));
this.$store.commit('setLoading', { name: 'loadingConfigRefresh' });
if (this.currentPath === "") {
this.$socket.sendObj('server.files.get_directory', { path: 'config' }, 'getDirectory');
this.$socket.sendObj('server.files.get_directory', { path: 'config_examples' }, 'getDirectory');
} else this.$socket.sendObj('server.files.get_directory', { path: this.currentPath.substring(1) }, 'getDirectory');
this.$socket.sendObj('server.files.get_directory', { path: 'config' }, 'files/getDirectory');
this.$socket.sendObj('server.files.get_directory', { path: 'config_examples' }, 'files/getDirectory');
} else this.$socket.sendObj('server.files.get_directory', { path: this.currentPath.substring(1) }, 'files/getDirectory');
},
formatDate(date) {
let tmp2 = new Date(date);
@@ -385,7 +389,7 @@
this.$socket.sendObj('server.files.post_directory', {
path: this.currentPath.substring(1)+"/"+this.dialogCreateFolder.name
}, 'getPostDirectory');
}, 'files/getCreateDir');
},
createFile() {
this.dialogCreateFile.name = "";
@@ -420,7 +424,7 @@
this.$socket.sendObj('server.files.move', {
source: this.currentPath+"/"+this.dialogRenameFile.item.filename,
dest: this.currentPath+"/"+this.dialogRenameFile.newName
}, 'getPostFileMove');
}, 'files/getMove');
},
removeFile() {
let filename = (this.currentPath+"/"+this.contextMenu.item.filename);
@@ -433,7 +437,35 @@
});
},
deleteDirectoryAction: function() {
this.$socket.sendObj('server.files.delete_directory', { path: this.currentPath+"/"+this.contextMenu.item.filename }, 'getDeleteDirectory');
this.$socket.sendObj('server.files.delete_directory', { path: this.currentPath+"/"+this.contextMenu.item.filename }, 'files/getDeleteDir');
},
uploadFileButton: function() {
this.$refs.fileUpload.click()
},
uploadFile: function() {
if (this.$refs.fileUpload.files.length) {
this.doUploadFile(this.$refs.fileUpload.files[0]).finally(() => {
this.$refs.fileUpload.value = ''
})
}
},
doUploadFile: function(file) {
let toast = this.$toast;
let formData = new FormData();
let filename = file.name.replace(" ", "_");
formData.append('root', 'config');
formData.append('file', file, (this.currentPath+"/"+filename).substring(7));
this.$store.commit('socket/addLoading', { name: 'configFileUpload' });
return axios.post('//' + this.hostname + ':' + this.port + '/server/files/upload',
formData, { headers: { 'Content-Type': 'multipart/form-data' } }
).then((result) => {
this.$store.commit('socket/removeLoading', { name: 'configFileUpload' });
toast.success("Upload of "+result.data.result+" successful!");
}).catch(() => {
this.$store.commit('socket/removeLoading', { name: 'configFileUpload' });
toast.error("Cannot upload the file!");
});
},
},
watch: {
@@ -453,7 +485,7 @@
handler() {
this.loadPath();
}
},
}
}
}
</script>
@@ -6,26 +6,24 @@
<template>
<v-card>
<v-list-item>
<v-list-item-avatar color="grey"><v-icon dark>mdi-view-dashboard</v-icon></v-list-item-avatar>
<v-list-item-content>
<v-list-item-title class="headline">Dashboard</v-list-item-title>
</v-list-item-content>
</v-list-item>
<v-divider class="my-2"></v-divider>
<v-card-text class="px-0 pt-3 content">
<v-toolbar flat dense >
<v-toolbar-title>
<span class="subheading"><v-icon left>mdi-view-dashboard</v-icon>Dashbaord</span>
</v-toolbar-title>
</v-toolbar>
<v-card-text class="py-3">
<v-row>
<v-col class="px-10 py-0">
<v-col class="py-0">
<v-switch v-model="boolShowWebcamOnDashboard" label="Webcam" class="settings_dashboard_switch mt-0"></v-switch>
</v-col>
</v-row>
<v-row>
<v-col class="px-10 py-0">
<v-col class="py-0">
<v-switch v-model="boolShowTempchartOnDashboard" label="Tempchart" class="settings_dashboard_switch mt-0"></v-switch>
</v-col>
</v-row>
<v-row>
<v-col class="px-10 py-0">
<v-col class="py-0">
<v-switch v-model="boolShowConsoleOnDashboard" label="Console" class="settings_dashboard_switch mt-0"></v-switch>
</v-col>
</v-row>
@@ -49,7 +47,7 @@
return this.$store.state.gui.dashboard.boolWebcam;
},
set(status) {
return this.$store.dispatch('setSettings', { gui: { dashboard: { boolWebcam: status } } });
return this.$store.dispatch('gui/setSettings', { dashboard: { boolWebcam: status } });
}
},
boolShowTempchartOnDashboard: {
@@ -57,7 +55,7 @@
return this.$store.state.gui.dashboard.boolTempchart;
},
set(status) {
return this.$store.dispatch('setSettings', { gui: { dashboard: { boolTempchart: status } } });
return this.$store.dispatch('gui/setSettings', { dashboard: { boolTempchart: status } });
}
},
boolShowConsoleOnDashboard: {
@@ -65,7 +63,7 @@
return this.$store.state.gui.dashboard.boolConsole;
},
set(status) {
return this.$store.dispatch('setSettings', { gui: { dashboard: { boolConsole: status } } });
return this.$store.dispatch('gui/setSettings', { dashboard: { boolConsole: status } });
}
},
},
+15 -18
View File
@@ -1,31 +1,28 @@
<template>
<v-card>
<v-list-item>
<v-list-item-avatar color="grey"><v-icon dark>mdi-arrow-expand-vertical</v-icon></v-list-item-avatar>
<v-list-item-content>
<v-list-item-title class="headline">Endstops</v-list-item-title>
</v-list-item-content>
</v-list-item>
<v-divider class="my-2"></v-divider>
<v-card-text class="px-0 pt-0 pb-2 content">
<v-toolbar flat dense >
<v-toolbar-title>
<span class="subheading"><v-icon left>mdi-arrow-expand-vertical</v-icon>Endstops</span>
</v-toolbar-title>
</v-toolbar>
<v-card-text class="pb-0">
<div v-for="(status, index) of sortEndstops" v-bind:key="index">
<v-row class="px-6" >
<v-col sm-12>
<v-row>
<v-col class="py-2">
<label class="mt-1 d-inline-block">Endstop <b>{{ index.toUpperCase() }}</b></label>
<v-chip class="float-right" :color="status === 'open' ? 'green' : 'red' " text-color="white">{{ status }}</v-chip>
</v-col>
</v-row>
</div>
<v-row class="px-6" v-if="(Object.keys(endstops).length === 0 && endstops.constructor === Object)" >
<v-col sm-12>
<v-row v-if="(Object.keys(endstops).length === 0 && endstops.constructor === Object)" >
<v-col class="py-0">
<p>Press the sync-button on the right-bottom to load the current endstop status.</p>
</v-col>
</v-row>
</v-card-text>
<v-card-actions>
<v-spacer></v-spacer>
<v-btn icon @click="syncEndstops" :loading="loading">
<v-btn icon @click="syncEndstops" :loading="loadings.includes('queryEndstops')">
<v-icon>mdi-sync</v-icon>
</v-btn>
</v-card-actions>
@@ -41,12 +38,12 @@
},
data: function() {
return {
sortEndstops: {}
sortEndstops: {},
}
},
computed: {
...mapState({
loading: state => state.socket.loadingEndstopStatus,
loadings: state => state.socket.loadings,
endstops: state => state.printer.endstops,
})
},
@@ -55,8 +52,8 @@
},
methods: {
syncEndstops() {
this.$store.commit('setLoadingEndstopStatus', true);
this.$socket.sendObj('printer.query_endstops.status', { }, "responseEndstopStatus");
this.$store.commit('socket/addLoading', { name: 'queryEndstops' });
this.$socket.sendObj('printer.query_endstops.status', { }, "printer/getEndstopStatus");
},
getEndstops() {
this.sortEndstops = {};
@@ -6,16 +6,14 @@
<template>
<v-card>
<v-list-item>
<v-list-item-avatar color="grey"><v-icon dark>mdi-cog</v-icon></v-list-item-avatar>
<v-list-item-content>
<v-list-item-title class="headline">General</v-list-item-title>
</v-list-item-content>
</v-list-item>
<v-divider class="my-2"></v-divider>
<v-card-text class="px-0 pb-0 pt-3 content">
<v-toolbar flat dense >
<v-toolbar-title>
<span class="subheading"><v-icon left>mdi-cog</v-icon>General</span>
</v-toolbar-title>
</v-toolbar>
<v-card-text class="py-0">
<v-row>
<v-col class="px-10 py-0">
<v-col class="pt-2 pb-0">
<v-text-field
v-model="printerName"
label="Printer Name"
@@ -42,7 +40,7 @@
return this.$store.state.gui.general.printername;
},
set(newName) {
return this.$store.dispatch('setSettings', { gui: { general: { printername: newName } } });
return this.$store.dispatch('gui/setSettings', { general: { printername: newName } });
}
},
},
+26 -27
View File
@@ -1,48 +1,47 @@
<template>
<v-card>
<v-list-item>
<v-list-item-avatar color="grey"><v-icon dark>mdi-exclamation-thick</v-icon></v-list-item-avatar>
<v-list-item-content>
<v-list-item-title class="headline">Machine Limits</v-list-item-title>
</v-list-item-content>
</v-list-item>
<v-divider class="my-2"></v-divider>
<v-card-text class="px-0 pt-0 pb-2 content">
<v-row class="px-6" >
<v-col sm-12>
<toolSlider label="VELOCITY" v-bind:target="max_velocity" :max="200" :extender="true" :extender-steps="100" command="SET_VELOCITY_LIMIT" attribute-name="VELOCITY=" class="mt-5" ></toolSlider>
<toolSlider label="ACCEL" v-bind:target="max_accel" :max="5000" :extender="true" :extender-steps="500" command="SET_VELOCITY_LIMIT" attribute-name="ACCEL=" class="mt-5" ></toolSlider>
<toolSlider label="DECEL" v-bind:target="max_accel_to_decel" :max="5000" :extender="true" :extender-steps="500" command="SET_VELOCITY_LIMIT" attribute-name="ACCEL_TO_DECEL=" class="mt-5" ></toolSlider>
<toolSlider label="SCV" v-bind:target="square_corner_velocity" :max="10" :extender="true" :extender-steps="5" command="SET_VELOCITY_LIMIT" attribute-name="SQUARE_CORNER_VELOCITY=" class="mt-5" ></toolSlider>
</v-col>
</v-row>
</v-card-text>
<v-toolbar flat dense >
<v-toolbar-title>
<span class="subheading"><v-icon left>mdi-speedometer</v-icon>Machine Limits</span>
</v-toolbar-title>
</v-toolbar>
<tool-slider label="Velocity" unit="mm/s" :target="current_velocity" :max="max_velocity" command="SET_VELOCITY_LIMIT" attribute-name="VELOCITY=" ></tool-slider>
<v-divider></v-divider>
<tool-slider label="Acceleration" unit="mm/s²" :target="current_accel" :max="max_accel" command="SET_VELOCITY_LIMIT" attribute-name="ACCEL=" ></tool-slider>
<v-divider></v-divider>
<tool-slider label="Deceleration" unit="mm/s²" :target="current_accel_to_decel" :max="max_accel_to_decel" command="SET_VELOCITY_LIMIT" attribute-name="ACCEL_TO_DECEL=" ></tool-slider>
<v-divider></v-divider>
<tool-slider label="Square corner velocity" unit="mm/s" :target="current_square_corner_velocity" :max="max_square_corner_velocity" command="SET_VELOCITY_LIMIT" attribute-name="SQUARE_CORNER_VELOCITY=" ></tool-slider>
</v-card>
</template>
<script>
import { mapState } from 'vuex'
import toolSlider from '../../../inputs/ToolSlider'
import ToolSlider from '../../../inputs/ToolSlider'
export default {
components: {
toolSlider
ToolSlider
},
data: function() {
return {
}
},
computed: {
...mapState({
max_velocity: state => state.printer.toolhead.max_velocity,
max_accel: state => state.printer.toolhead.max_accel,
max_accel_to_decel: state => state.printer.toolhead.max_accel_to_decel,
square_corner_velocity: state => state.printer.toolhead.square_corner_velocity,
})
current_velocity: state => state.printer.toolhead.max_velocity,
current_accel: state => state.printer.toolhead.max_accel,
current_accel_to_decel: state => state.printer.toolhead.max_accel_to_decel,
current_square_corner_velocity: state => state.printer.toolhead.square_corner_velocity,
config: state => state.printer.configfile.config,
max_velocity: state => parseInt(state.printer.configfile.config.printer.max_velocity) || 0,
max_accel: state => parseInt(state.printer.configfile.config.printer.max_accel) || 0,
max_accel_to_decel: state => parseInt(state.printer.configfile.config.printer.max_accel_to_decel) || parseInt(state.printer.configfile.config.printer.max_accel) / 2,
max_square_corner_velocity: state => parseInt(state.printer.configfile.config.printer.square_corner_velocity) || 5,
}),
},
methods: {
watch: {
}
}
</script>
</script>
@@ -0,0 +1,41 @@
<template>
<v-card>
<v-toolbar flat dense >
<v-toolbar-title>
<span class="subheading"><v-icon left>mdi-file-document-edit</v-icon>Logfiles</span>
</v-toolbar-title>
</v-toolbar>
<v-card-text :class="'text-center text-lg-left py-0'">
<v-row>
<v-col :class="'col-12' +(klippy_state !== 'ready' ? 'col-md-6' : 'col-md-12')+ ''">
<v-btn :href="'//'+hostname+':'+port+'/server/files/klippy.log'" block color="primary"><v-icon class="mr-2">mdi-download</v-icon>Klipper</v-btn>
</v-col>
<v-col :class="'col-12 pt-0 ' +(klippy_state !== 'ready' ? 'col-md-6 mt-md-3 ' : 'col-md-12')+ ''">
<v-btn :href="'//'+hostname+':'+port+'/server/files/moonraker.log'" block color="primary"><v-icon class="mr-2">mdi-download</v-icon>Moonraker</v-btn>
</v-col>
</v-row>
</v-card-text>
</v-card>
</template>
<script>
import { mapState } from 'vuex'
export default {
components: {
},
data: function() {
return {
}
},
computed: {
...mapState({
hostname: state => state.socket.hostname,
port: state => state.socket.port,
klippy_state: state => state.server.klippy_state,
}),
},
}
</script>
+9 -12
View File
@@ -1,17 +1,15 @@
<template>
<v-card>
<v-list-item>
<v-list-item-avatar color="grey"><v-icon dark>mdi-code-tags</v-icon></v-list-item-avatar>
<v-list-item-content>
<v-list-item-title class="headline">Macros</v-list-item-title>
</v-list-item-content>
</v-list-item>
<v-divider class="my-2"></v-divider>
<v-card-text class="px-0 pb-3 pt-3 content">
<div v-for="(macro, index) in getAllMacros" v-bind:key="index">
<v-toolbar flat dense >
<v-toolbar-title>
<span class="subheading"><v-icon left>mdi-code-tags</v-icon>Macros</span>
</v-toolbar-title>
</v-toolbar>
<v-card-text class="py-3">
<div v-for="(macro, index) in this['printer/getAllMacros']" v-bind:key="index">
<v-row>
<v-col class="px-10 py-0">
<v-col class="py-0">
<settings-macro-switch :name="macro.name"></settings-macro-switch>
</v-col>
</v-row>
@@ -27,7 +25,6 @@
export default {
components: {
SettingsMacroSwitch
},
data: function() {
return {
@@ -39,7 +36,7 @@
hiddenMacros: state => state.gui.dashboard.hiddenMacros,
}),
...mapGetters([
'getAllMacros',
'printer/getAllMacros',
])
},
methods: {
@@ -1,6 +1,6 @@
<template>
<div>
<div v-for="(runout, index) of getFilamentSwitchSensors" v-bind:key="index">
<div v-for="(runout, index) of this['printer/getFilamentSwitchSensors']" v-bind:key="index">
<v-card class="mt-6">
<v-list-item>
<v-list-item-avatar color="grey"><v-icon dark>mdi-printer-3d-nozzle-alert</v-icon></v-list-item-avatar>
@@ -10,7 +10,7 @@
</v-list-item>
<v-divider class="my-2"></v-divider>
<v-card-text class="px-0 pt-0 pb-2 content">
<settings-runout-switch :name="runout.name "></settings-runout-switch>
<settings-runout-switch :name="runout.name" :enabled="runout.enabled" :filament_detected="runout.filament_detected"></settings-runout-switch>
</v-card-text>
</v-card>
</div>
@@ -32,7 +32,7 @@
},
computed: {
...mapGetters([
'getFilamentSwitchSensors'
'printer/getFilamentSwitchSensors'
])
},
methods: {
@@ -1,78 +0,0 @@
<template>
<v-card>
<v-list-item>
<v-list-item-avatar color="grey"><v-icon dark>mdi-cpu-64-bit</v-icon></v-list-item-avatar>
<v-list-item-content>
<v-list-item-title class="headline">System</v-list-item-title>
</v-list-item-content>
</v-list-item>
<v-divider class="my-2"></v-divider>
<v-card-text class=" text-center text-lg-left">
<div><v-btn :href="'//'+hostname+':'+port+'/server/files/klippy.log'" block color="primary"><v-icon class="mr-2">mdi-download</v-icon>Klipper Log</v-btn></div>
<div><v-btn :href="'//'+hostname+':'+port+'/server/files/moonraker.log'" block color="mt-3 primary"><v-icon class="mr-2">mdi-download</v-icon>Moonraker Log</v-btn></div>
<div><v-btn @click="doRestart" block :loading="loadingRestart" color="error" class="mt-3"><v-icon class="mr-2">mdi-cached</v-icon>Restart</v-btn></div>
<div><v-btn @click="doRestartFirmware" block :loading="loadingRestartFirmware" class="mt-3" color="error"><v-icon class="mr-2">mdi-cached</v-icon>FW <span class="d-none d-sm-block">Restart</span></v-btn></div>
<div><v-btn @click="doRebootHost" block :loading="loadingRebootHost" class="mt-3" color="error"><v-icon class="mr-2">mdi-cached</v-icon><span class="d-none d-sm-block">Host</span> Reboot</v-btn></div>
<div><v-btn @click="doShutdownHost" block :loading="loadingShutdownHost" class="mt-3" color="error"><v-icon class="mr-2">mdi-power</v-icon><span class="d-none d-sm-block">Host</span> Shutdown</v-btn></div>
</v-card-text>
</v-card>
</template>
<script>
import {mapMutations, mapState} from 'vuex'
export default {
components: {
},
data: function() {
return {
}
},
computed: {
...mapState({
hostname: state => state.socket.hostname,
port: state => state.socket.port,
loadingRestart: state => state.socket.loadingRestart,
loadingRestartFirmware: state => state.socket.loadingRestartFirmware,
loadingRebootHost: state => state.socket.loadingRebootHost,
loadingShutdownHost: state => state.socket.loadingShutdownHost,
}),
...mapMutations([
'setLoadingRestart',
'setLoadingRestartFirmware',
]),
},
methods: {
doRestart() {
this.$store.commit('setLoadingRestart', true);
this.$store.commit('setPrinterData', {
webhooks: {
state: 'shutdown',
state_message: 'RESTART'
}
});
this.$socket.sendObj('printer.restart', { }, "responseRestart");
},
doRestartFirmware() {
this.$store.commit('setLoadingRestartFirmware', true);
this.$store.commit('setPrinterData', {
webhooks: {
state: 'shutdown',
state_message: 'FIRMWARE RESTART'
}
});
this.$socket.sendObj('printer.firmware_restart', { }, "responseRestartFirmware");
},
doRebootHost() {
this.$store.commit('setLoadingRebootHost', true);
this.$socket.sendObj('machine.reboot', { });
},
doShutdownHost() {
this.$store.commit('setLoadingShutdownHost', true);
this.$socket.sendObj('machine.shutdown', { });
},
}
}
</script>
+33 -25
View File
@@ -4,33 +4,41 @@
<template>
<v-card>
<v-list-item>
<v-list-item-avatar color="grey"><v-icon dark>mdi-webcam</v-icon></v-list-item-avatar>
<v-list-item-content>
<v-list-item-title class="headline">Webcam</v-list-item-title>
</v-list-item-content>
</v-list-item>
<v-divider class="my-2"></v-divider>
<v-card-text class="px-0 pt-3 content">
<v-toolbar flat dense >
<v-toolbar-title>
<span class="subheading"><v-icon left>mdi-webcam</v-icon>Webcam</span>
</v-toolbar-title>
</v-toolbar>
<v-card-text>
<v-row>
<v-col class="px-10 py-0">
<v-col class="py-0">
<v-text-field
v-model="webcamUrl"
hide-details
label="Webcam URL"
></v-text-field>
<v-row v-if="rotationEnabled">
<v-col sm="auto">
<v-switch v-model="rotate" hide-details label="Rotate"></v-switch>
</v-col>
<v-col>
<v-select :items="[{ text: '90 degrees', value: 90 }, { text: '270 degrees', value: 270 }]" v-model="rotateDegrees" hide-details></v-select>
</v-col>
</v-row>
</v-col>
</v-row>
<v-row v-if="rotationEnabled">
<v-col class="py-0" col-auto>
<v-switch v-model="rotate" hide-details label="Rotate"></v-switch>
</v-col>
<v-col>
<v-select :items="[{ text: '90 degrees', value: 90 }, { text: '270 degrees', value: 270 }]" v-model="rotateDegrees" hide-details></v-select>
</v-col>
</v-row>
<v-row>
<v-col class="py-0">
<v-switch v-model="flipX" hide-details label="Flip webcam horizontally"></v-switch>
</v-col>
</v-row>
<v-row>
<v-col class="py-0">
<v-switch v-model="flipY" hide-details label="Flip webcam vertically"></v-switch>
</v-col>
</v-row>
<v-row>
<v-col class="py-0">
<v-switch v-model="boolNavi" hide-details label="Show in navigation"></v-switch>
</v-col>
</v-row>
@@ -54,7 +62,7 @@
return this.$store.state.gui.webcam.url;
},
set(url) {
return this.$store.dispatch('setSettings', { gui: { webcam: { url } } });
return this.$store.dispatch('gui/setSettings', { webcam: { url } });
}
},
flipX: {
@@ -62,7 +70,7 @@
return this.$store.state.gui.webcam.flipX;
},
set(flipX) {
return this.$store.dispatch('setSettings', { gui: { webcam: { flipX } } });
return this.$store.dispatch('gui/setSettings', { webcam: { flipX } });
}
},
flipY: {
@@ -70,7 +78,7 @@
return this.$store.state.gui.webcam.flipY;
},
set(flipY) {
return this.$store.dispatch('setSettings', { gui: { webcam: { flipY } } });
return this.$store.dispatch('gui/setSettings', { webcam: { flipY } });
}
},
rotate: {
@@ -78,7 +86,7 @@
return this.$store.state.gui.webcam.rotate;
},
set(rotate) {
return this.$store.dispatch('setSettings', { gui: { webcam: { rotate } } });
return this.$store.dispatch('gui/setSettings', { webcam: { rotate } });
}
},
rotateDegrees: {
@@ -86,7 +94,7 @@
return this.$store.state.gui.webcam.rotateDegrees;
},
set(rotateDegrees) {
return this.$store.dispatch('setSettings', { gui: { webcam: { rotateDegrees } } });
return this.$store.dispatch('gui/setSettings', { webcam: { rotateDegrees } });
}
},
boolNavi: {
@@ -94,7 +102,7 @@
return this.$store.state.gui.webcam.bool;
},
set(showNav) {
return this.$store.dispatch('setSettings', { gui: { webcam: { bool: showNav } } });
return this.$store.dispatch('gui/setSettings', { webcam: { bool: showNav } });
}
},
},
+2 -2
View File
@@ -8,7 +8,7 @@ import EndstopPanel from "./EndstopPanel";
import LimitsPanel from "./LimitsPanel";
import ConfigFilesPanel from "./ConfigFilesPanel";
import RunoutPanel from "./RunoutPanel";
import SystemPanel from "./SystemPanel";
import LogfilesPanel from "./LogfilesPanel";
Vue.component('settings-general-panel', GeneralPanel);
Vue.component('settings-webcam-panel', WebcamPanel);
@@ -17,7 +17,7 @@ Vue.component('settings-macros-panel', MacrosPanel);
Vue.component('settings-endstop-panel', EndstopPanel);
Vue.component('settings-limits-panel', LimitsPanel);
Vue.component('settings-runout-panel', RunoutPanel);
Vue.component('settings-system-panel', SystemPanel);
Vue.component('settings-logfiles-panel', LogfilesPanel);
Vue.component('settings-config-files-panel', ConfigFilesPanel);
export default {
+114 -143
View File
@@ -6,134 +6,123 @@
.statusPanel-image-preview {
width: 100%;
}
.v-btn.minwidth-0 {
min-width: auto !important;
}
</style>
<template>
<v-card>
<v-list-item>
<v-progress-circular
:rotate="-90"
:size="50"
:width="7"
:value="printProgress * 100"
color="red"
class="mr-5 mt-2"
v-if="['printing', 'paused', 'error'].includes(printer_state)"
>
</v-progress-circular>
<v-list-item-avatar color="grey" v-if="!['printing', 'paused', 'error'].includes(printer_state)"><v-icon dark>mdi-information-variant</v-icon></v-list-item-avatar>
<v-list-item-content>
<v-list-item-title class="headline">{{ ['printing', 'paused', 'error'].includes(printer_state) ? Math.round(printProgress * 100)+"% - " : "" }}{{ display_message ? display_message : (printer_state !== "" ? printer_state.charAt(0).toUpperCase() + printer_state.slice(1) : "Unknown") }}</v-list-item-title>
<v-list-item-subtitle class="mr-3" v-if="['printing', 'paused', 'complete', 'error'].includes(printer_state)">{{ "File: "+current_file }}</v-list-item-subtitle>
</v-list-item-content>
<v-btn-toggle
color="primary"
dense
multiple
>
<v-btn class="button-min-width-auto orange px-2" v-if="printer_state === 'printing'" @click="btnPauseJob" :loading="loadingStatusPause" title="Pause print"><v-icon>mdi-pause</v-icon></v-btn>
<v-btn class="button-min-width-auto red" v-if="(printer_state === 'paused')" :loading="loadingStatusCancel" @click="btnCancelJob" title="Cancel print"><v-icon>mdi-stop</v-icon></v-btn>
<v-btn class="button-min-width-auto orange" v-if="(printer_state === 'paused')" :loading="loadingStatusResume" @click="btnResumeJob" title="Resume job"><v-icon>mdi-play</v-icon></v-btn>
<v-btn class="button-min-width-auto orange" v-if="(printer_state === 'error')" :loading="loadingStatusClear" @click="btnClearJob" title="Clear job"><v-icon>mdi-close</v-icon></v-btn>
<v-btn class="button-min-width-auto primary" v-if="(printer_state === 'complete')" :loading="loadingStatusReprint" @click="btnReprintJob" title="Reprint job"><v-icon>mdi-autorenew</v-icon></v-btn>
</v-btn-toggle>
</v-list-item>
<v-divider class="my-2" ></v-divider>
<v-toolbar flat dense>
<v-toolbar-title>
<span class="subheading align-baseline">
<v-icon left>mdi-information</v-icon>{{ (printer_state !== "" ? printer_state.charAt(0).toUpperCase() + printer_state.slice(1) : "Unknown") }}
</span>
</v-toolbar-title>
<v-spacer></v-spacer>
<v-item-group class="v-btn-toggle" name="controllers">
<v-btn small class="px-2 minwidth-0" color="orange" v-if="printer_state === 'printing'" @click="btnPauseJob" :loading="loadings.includes('statusPrintPause')" title="Pause print"><v-icon small>mdi-pause</v-icon></v-btn>
<v-btn small class="px-2 minwidth-0" color="red" v-if="(printer_state === 'paused')" :loading="loadings.includes('statusPrintCancel')" @click="btnCancelJob" title="Cancel print"><v-icon small>mdi-stop</v-icon></v-btn>
<v-btn small class="px-2 minwidth-0" color="orange" v-if="(printer_state === 'paused')" :loading="loadings.includes('statusPrintResume')" @click="btnResumeJob" title="Resume job"><v-icon small>mdi-play</v-icon></v-btn>
<v-btn small class="px-2 minwidth-0" color="orange" v-if="(printer_state === 'error')" :loading="loadings.includes('statusPrintClear')" @click="btnClearJob" title="Clear job"><v-icon small>mdi-close</v-icon></v-btn>
<v-btn small class="px-2 minwidth-0" color="primary" v-if="(printer_state === 'complete')" :loading="loadings.includes('statusPrintReprint')" @click="btnReprintJob" title="Reprint job"><v-icon small>mdi-autorenew</v-icon></v-btn>
</v-item-group>
</v-toolbar>
<v-row v-if="current_filename" class="mx-0">
<v-col class="col-auto py-3 pr-0">
<v-progress-circular
:rotate="-90"
:size="50"
:width="7"
:value="printPercent * 100"
color="red"
>
</v-progress-circular>
</v-col>
<v-col class="col py-3" style="width: 100px;">
<h3 class="font-weight-regular">{{ Math.round(printPercent * 100)+"%" }}{{ display_message ? " - "+display_message : "" }}</h3>
<span class="subtitle-2 text-truncate d-block px-0 text--disabled"><v-icon small class="mr-1">mdi-file-outline</v-icon>{{ current_filename }}</span>
</v-col>
</v-row>
<v-divider class="mt-0 mb-0" ></v-divider>
<v-card-text class="px-0 pt-0 pb-2 content">
<v-row>
<v-col
class="col-12 col-sm-4 pl-sm-5 pr-sm-2"
class="col-12 col-sm-4 pl-sm-3 pt-0 pr-sm-0 pb-0"
v-if="
['printing', 'paused', 'complete'].includes(printer_state) &&
current_file_metadata &&
current_file_metadata.thumbnails &&
current_file_metadata.thumbnails.length &&
current_file_metadata.thumbnails.find(element => element.width === 400)
current_file &&
current_file.thumbnails &&
current_file.thumbnails.length &&
current_file.thumbnails.find(element => element.width === 400)
">
<img
class="statusPanel-image-preview"
:src="'data:image/gif;base64,'+(current_file_metadata.thumbnails ? current_file_metadata.thumbnails.find(element => element.width === 400).data : '')"
:src="'data:image/gif;base64,'+(current_file.thumbnails ? current_file.thumbnails.find(element => element.width === 400).data : '')"
/>
</v-col>
<v-col
:class="
(['printing', 'paused', 'complete'].includes(printer_state) &&
current_file_metadata &&
current_file_metadata.thumbnails &&
current_file_metadata.thumbnails.length &&
current_file_metadata.thumbnails.find(element => element.width === 400)) ? 'col-12 py-0 col-sm-8 pl-sm-0' : 'col-12 py-0'
current_file &&
current_file.thumbnails &&
current_file.thumbnails.length &&
current_file.thumbnails.find(element => element.width === 400 || element.width === 300)) ? 'col-12 py-0 col-sm-8 pl-sm-0' : 'col-12 py-0'
">
<v-layout wrap class=" text-center">
<v-flex col tag="strong" class="category-header col-auto">
<v-row class="text-center pt-2" align="center">
<v-col class="py-0 flex-grow-0 pl-8 pr-3">
<v-icon>mdi-axis-arrow</v-icon>
</v-flex>
<v-flex grow class="equal-width">
<v-layout column>
<v-flex tag="strong">X</v-flex>
<v-flex tag="span">{{ position.length ? position[0].toFixed(2) : "--" }}</v-flex>
</v-layout>
</v-flex>
<v-flex grow class="equal-width">
<v-layout column>
<v-flex tag="strong">Y</v-flex>
<v-flex tag="span">{{ position.length ? position[1].toFixed(2) : "--" }}</v-flex>
</v-layout>
</v-flex>
<v-flex grow class="equal-width">
<v-layout column>
<v-flex tag="strong">Z</v-flex>
<v-flex tag="span">{{ position.length ? position[2].toFixed(2) : "--" }}</v-flex>
</v-layout>
</v-flex>
</v-layout>
</v-col>
<v-col class="equal-width py-0">
<v-row><v-col class="px-0 py-0"><strong>X</strong></v-col></v-row>
<v-row><v-col class="px-0 py-0">{{ position.length ? position[0].toFixed(2) : "--" }}</v-col></v-row>
</v-col>
<v-col class="equal-width py-0">
<v-row><v-col class="px-0 py-0"><strong>Y</strong></v-col></v-row>
<v-row><v-col class="px-0 py-0">{{ position.length ? position[1].toFixed(2) : "--" }}</v-col></v-row>
</v-col>
<v-col class="equal-width py-0 pr-sm-6">
<v-row><v-col class="px-0 py-0"><strong>Z</strong></v-col></v-row>
<v-row><v-col class="px-0 py-0">{{ position.length ? position[2].toFixed(2) : "--" }}</v-col></v-row>
</v-col>
</v-row>
<v-divider class="my-2" v-if="['printing', 'paused', 'complete', 'error'].includes(printer_state)"></v-divider>
<v-layout wrap class=" text-center" v-if="['printing', 'paused', 'complete', 'error'].includes(printer_state)">
<v-flex col tag="strong" class="category-header col-auto">
<v-row class="text-center" align="center" v-if="['printing', 'paused', 'complete', 'error'].includes(printer_state)">
<v-col class="py-0 flex-grow-0 pl-8 pr-3">
<v-icon>mdi-poll</v-icon>
</v-flex>
<v-flex grow class="equal-width">
<v-layout column>
<v-flex tag="strong">Filament used</v-flex>
<v-flex tag="span">{{ filament_used > 1000 ? (filament_used / 1000).toFixed(2)+"m" : filament_used.toFixed(2)+"mm" }}</v-flex>
</v-layout>
</v-flex>
<v-flex grow class="equal-width">
<v-layout column>
<v-flex tag="strong">Print Time</v-flex>
<v-flex tag="span">{{ formatTime(print_time) }}</v-flex>
</v-layout>
</v-flex>
<v-flex grow class="equal-width">
<v-layout column>
<v-flex tag="strong">Total Time</v-flex>
<v-flex tag="span">{{ formatTime(print_time_total) }}</v-flex>
</v-layout>
</v-flex>
</v-layout>
</v-col>
<v-col class="equal-width py-0">
<v-row><v-col class="px-0 py-0"><strong>Filament</strong></v-col></v-row>
<v-row><v-col class="px-0 py-0">{{ filament_used > 1000 ? (filament_used / 1000).toFixed(2)+"m" : filament_used.toFixed(2)+"mm" }}</v-col></v-row>
</v-col>
<v-col class="equal-width py-0">
<v-row><v-col class="px-0 py-0"><strong>Print</strong></v-col></v-row>
<v-row><v-col class="px-0 py-0">{{ formatTime(print_time) }}</v-col></v-row>
</v-col>
<v-col class="equal-width py-0 pr-sm-6">
<v-row><v-col class="px-0 py-0"><strong>Total</strong></v-col></v-row>
<v-row><v-col class="px-0 py-0">{{ formatTime(print_time_total) }}</v-col></v-row>
</v-col>
</v-row>
<v-divider class="my-2" v-if="['printing', 'paused', 'error'].includes(printer_state)"></v-divider>
<v-layout wrap class=" text-center" v-if="['printing', 'paused', 'error'].includes(printer_state)">
<v-flex col tag="strong" class="category-header col-auto">
<v-row class="text-center" align="center" v-if="['printing', 'paused', 'error'].includes(printer_state)">
<v-col class="py-0 flex-grow-0 pl-8 pr-3">
<v-icon>mdi-clock-outline</v-icon>
</v-flex>
<v-flex grow class="equal-width">
<v-layout column>
<v-flex tag="strong">File</v-flex>
<v-flex tag="span">{{ print_time > 0 && printProgress > 0 ? formatTime(print_time / printProgress - print_time) : '--' }}</v-flex>
</v-layout>
</v-flex>
<v-flex grow class="equal-width">
<v-layout column>
<v-flex tag="strong">Filament</v-flex>
<v-flex tag="span">{{ (filament_used > 0 && current_file_filament_total > filament_used) ? formatTime(print_time / (filament_used / current_file_filament_total) - print_time) : '--' }}</v-flex>
</v-layout>
</v-flex>
<v-flex grow class="equal-width">
<v-layout column>
<v-flex tag="strong">Slicer</v-flex>
<v-flex tag="span">{{ current_file_estimated_time > print_time ? formatTime(current_file_estimated_time - print_time) : '--'}}</v-flex>
</v-layout>
</v-flex>
</v-layout>
</v-col>
<v-col class="equal-width py-0">
<v-row><v-col class="px-0 py-0"><strong>File</strong></v-col></v-row>
<v-row><v-col class="px-0 py-0">{{ print_time > 0 && printPercent > 0 ? formatTime(print_time / printPercent - print_time) : '--' }}</v-col></v-row>
</v-col>
<v-col class="equal-width py-0">
<v-row><v-col class="px-0 py-0"><strong>Filament</strong></v-col></v-row>
<v-row><v-col class="px-0 py-0">{{ (filament_used > 0 && 'filament_total' in current_file && current_file.filament_total > filament_used) ? formatTime(print_time / (filament_used / current_file.filament_total) - print_time) : '--' }}</v-col></v-row>
</v-col>
<v-col class="equal-width py-0 pr-sm-6">
<v-row><v-col class="px-0 py-0"><strong>Slicer</strong></v-col></v-row>
<v-row><v-col class="px-0 py-0">{{ 'estimated_time' in current_file && current_file.estimated_time > print_time ? formatTime(current_file.estimated_time - print_time) : '--'}}</v-col></v-row>
</v-col>
</v-row>
</v-col>
</v-row>
</v-card-text>
@@ -141,67 +130,58 @@
</template>
<script>
import { mapState, mapGetters } from 'vuex';
import { mapState } from 'vuex';
export default {
data: function() {
return {
loadingStatusCancel: false,
loadingStatusResume: false,
loadingStatusPause: false,
loadingStatusClear: false,
loadingStatusReprint: false,
}
},
computed: {
...mapState({
toolhead: state => state.printer.toolhead,
position: state => state.printer.toolhead.position,
loadings: state => state.loadings,
estimated_print_time: state => state.printer.toolhead.estimated_print_time,
printProgress: state => state.printer.virtual_sdcard.progress,
file_position: state => state.printer.virtual_sdcard.file_position,
current_file: state => state.printer.current_file,
print_time: state => state.printer.print_stats.print_duration,
print_time_total: state => state.printer.print_stats.total_duration,
filament_used: state => state.printer.print_stats.filament_used,
current_file: state => state.printer.print_stats.filename,
current_filename: state => state.printer.print_stats.filename,
printer_state: state => state.printer.print_stats.state,
klippy_state: state => state.printer.webhooks.state,
klippy_state_message: state => state.printer.webhooks.state_message,
display_message: state => state.printer.display_status.message,
loadings: state => state.socket.loadings,
}),
...mapGetters([
'current_file_size',
'current_file_metadata',
'current_file_estimated_time',
'current_file_filament_total',
]),
printPercent: {
get() {
return this.$store.getters["printer/getPrintPercent"];
}
}
},
methods: {
btnPauseJob() {
this.$store.commit('setLoading', { name: 'statusPrintPause' });
this.$socket.sendObj('printer.print.pause', { }, 'respondPrintPause');
this.$store.commit('socket/addLoading', { name: 'statusPrintPause' });
this.$socket.sendObj('printer.print.pause', { }, 'socket/removeLoading', { name: 'statusPrintPause' });
},
btnResumeJob() {
this.$store.commit('setLoading', { name: 'statusPrintResume' });
this.$socket.sendObj('printer.print.resume', { }, 'respondPrintResume');
this.$store.commit('socket/addLoading', { name: 'statusPrintResume' });
this.$socket.sendObj('printer.print.resume', { }, 'socket/removeLoading', { name: 'statusPrintResume' });
},
btnCancelJob() {
this.$store.commit('setLoading', { name: 'statusPrintCancel' });
this.$socket.sendObj('printer.print.cancel', { }, 'respondPrintCancel');
this.$store.commit('socket/addLoading', { name: 'statusPrintCancel' });
this.$socket.sendObj('printer.print.cancel', { }, 'socket/removeLoading', { name: 'statusPrintCancel' });
},
btnClearJob() {
this.$store.commit('setLoading', {name: 'statusPrintClear'});
this.$socket.sendObj('printer.gcode.script', {script: 'SDCARD_RESET_FILE'}, 'respondPrintClear');
this.$store.commit('socket/addLoading', {name: 'statusPrintClear'});
this.$socket.sendObj('printer.gcode.script', {script: 'SDCARD_RESET_FILE'}, 'socket/removeLoading', { name: 'statusPrintClear' });
},
btnReprintJob() {
this.$store.commit('setLoading', {name: 'statusPrintReprint'});
this.$socket.sendObj('printer.print.start', { filename: this.current_file }, 'respondPrintReprint');
this.$store.commit('socket/addLoading', {name: 'statusPrintReprint'});
this.$socket.sendObj('printer.print.start', { filename: this.current_filename }, 'socket/removeLoading', { name: 'statusPrintReprint' });
},
formatTime(seconds) {
let h = Math.floor(seconds / 3600);
@@ -211,15 +191,6 @@
return h+':'+m+':'+s;
},
},
watch: {
loadings: function(loadings) {
this.loadingStatusCancel = loadings.includes('statusPrintCancel');
this.loadingStatusResume = loadings.includes('statusPrintResume');
this.loadingStatusPause = loadings.includes('statusPrintPause');
this.loadingStatusClear = loadings.includes('statusPrintClear');
this.loadingStatusReprint = loadings.includes('statusPrintReprint');
}
}
}
</script>
+62 -53
View File
@@ -6,71 +6,71 @@
#line-chart {
height: 250px;
}
.colHeaterIcons {
width: 68px;
}
</style>
<template>
<v-card>
<v-list-item>
<v-list-item-avatar color="grey"><v-icon dark>mdi-thermometer</v-icon></v-list-item-avatar>
<v-list-item-content>
<v-list-item-title class="headline">Temperatures</v-list-item-title>
<v-list-item-subtitle>
{{ heatersCount }} heaters
<span v-if="temperature_fans.length === 1">, {{ temperature_fans.length }} fan</span>
<span v-if="temperature_fans.length > 1">, {{ temperature_fans.length }} fans</span>
<span v-if="temperature_sensors.length === 1">, {{ temperature_sensors.length }} sensor</span>
<span v-if="temperature_sensors.length > 1">, {{ temperature_sensors.length }} sensors</span>
</v-list-item-subtitle>
</v-list-item-content>
</v-list-item>
<v-divider class="my-2"></v-divider>
<v-card-text class="px-0 pt-0 pb-2 content">
<v-row class="pl-3 pr-3">
<v-col class="text-center py-0"><b>Heater</b></v-col>
<v-col class="text-center py-0"><b>Current</b></v-col>
<v-col class="text-center py-0"><b>Target</b></v-col>
<v-toolbar flat dense>
<v-toolbar-title>
<span class="subheading"><v-icon left>mdi-thermometer-lines</v-icon>Temperatures</span>
</v-toolbar-title>
</v-toolbar>
<v-card-text class="px-0 py-2 content">
<v-row align="center">
<v-col class="py-0 font-weight-bold" style="padding-left: 68px;">Name</v-col>
<v-col class="py-0 text-center font-weight-bold d-none d-sm-block">Status</v-col>
<v-col class="py-0 text-center font-weight-bold">Current</v-col>
<v-col class="text-center py-0 pr-8 font-weight-bold">Target</v-col>
</v-row>
<div v-for="(heater, index) in heaters" v-bind:key="index" >
<v-divider class="my-2"></v-divider>
<v-row class="pl-3 pr-3 heater-row">
<v-col class="text-center py-0">
<b>{{ heater.name }}</b><br />
<small>{{ heater.target > 0 ? "active" : "off" }}</small>
<v-row align="center">
<v-col class="flex-grow-0 py-0 pl-8 pr-0 colHeaterIcons">
<v-icon :color="heater.color">mdi-{{ heater.icon }}</v-icon>
</v-col>
<v-col class="text-center py-0 vertical_align_center"><span>{{ heater.temperature ? heater.temperature.toFixed(1) : 0 }}°C</span></v-col>
<v-col class="text-center py-0 vertical_align_center">
<v-col class="py-0 font-weight-bold">{{ heater.name }}</v-col>
<v-col class="py-0 text-center d-none d-sm-block"><small>{{ heater.target > 0 ? "active" : "off" }}</small></v-col>
<v-col class="py-0 text-center">{{ heater.temperature ? heater.temperature.toFixed(1) : 0 }}°C</v-col>
<v-col class="text-center py-0 pr-8 pr-0 vertical_align_center">
<toolInput :name="heater.name" :target="heater.target" :min_temp="heater.min_temp" :max_temp="heater.max_temp" command="SET_HEATER_TEMPERATURE" attribute-name="HEATER" ></toolInput>
</v-col>
</v-row>
</div>
<div v-for="(fan, index) in temperature_fans" v-bind:key="index+99" >
<div v-for="(fan, index) in this['printer/getTemperatureFans']" v-bind:key="index+99" >
<v-divider class="my-2"></v-divider>
<v-row class="pl-3 pr-3 heater-row">
<v-col class="text-center py-0">
<b>{{ fan.name }}</b><br />
<small>{{ fan.target > 0 && fan.speed > 0 ? (fan.speed * 100).toFixed(0)+"%" : (fan.target > 0 ? "standby" : "off") }}</small>
<v-row align="center">
<v-col class="flex-grow-0 py-0 pl-8 pr-0 colHeaterIcons">
<v-icon :color="(fan.target ? 'grey lighten-5' : 'grey darken-2')" :class="(fan.speed ? ' icon-rotate' : '')">mdi-fan</v-icon>
</v-col>
<v-col class="text-center py-0 vertical_align_center"><span>{{ fan.temperature ? fan.temperature.toFixed(1) : 0}}°C</span></v-col>
<v-col class="text-center py-0 vertical_align_center">
<v-col class="py-0 font-weight-bold">{{ fan.name }}</v-col>
<v-col class="py-0 text-center d-none d-sm-block"><small>{{ fan.target > 0 && fan.speed > 0 ? (fan.speed * 100).toFixed(0)+"%" : (fan.target > 0 ? "standby" : "off") }}</small></v-col>
<v-col class="py-0 text-center">{{ fan.temperature ? fan.temperature.toFixed(1) : 0}}°C</v-col>
<v-col class="text-center py-0 pr-8 pr-0 vertical_align_center">
<toolInput :name="fan.name" :target="fan.target" command="SET_TEMPERATURE_FAN_TARGET" attribute-name="temperature_fan" ></toolInput>
</v-col>
</v-row>
</div>
<div v-if="temperature_sensors.length" >
<div v-for="(sensor,index) in this['printer/getTemperatureSensors']" v-bind:key="index+999">
<v-divider class="my-2"></v-divider>
<v-row class="pl-3 pr-3 heater-row">
<v-col class="text-center py-0">
<b>Temperature<br />Sensors</b>
<v-row align="center">
<v-col class="flex-grow-0 py-0 pl-8 pr-0 colHeaterIcons">
<v-icon color="grey darken-2" :title="'min: '+sensor.min_temp+'° / max: '+sensor.max_temp+'°'">{{ sensor.icon }}</v-icon>
</v-col>
<v-col class="text-center py-0 vertical_align_center" v-for="(sensor,index) in temperature_sensors" v-bind:key="index+999" >
<span style="cursor: default;" :title="'min: '+(sensor.measured_min_temp ? sensor.measured_min_temp.toFixed(1) : 0)+'° / max: '+(sensor.measured_max_temp ? sensor.measured_max_temp.toFixed(1) : 0)+'°'">{{ sensor.temperature ? sensor.temperature.toFixed(1) : 0 }}°C</span><br />
<small style="cursor: default;" :title="'min: '+( sensor.measured_min_temp ? sensor.measured_min_temp.toFixed(1) : 0)+'° / max: '+(sensor.measured_max_temp ? sensor.measured_max_temp.toFixed(1) : 0)+'°'">{{ sensor.name }}</small>
<v-col class="py-0 font-weight-bold">{{ sensor.name }}</v-col>
<v-col class="py-0 d-none d-sm-block"><span>&nbsp;</span></v-col>
<v-col class="py-0 text-center">
<span style="cursor: default;" :title="'min: '+(sensor.measured_min_temp ? sensor.measured_min_temp.toFixed(1) : 0)+'° / max: '+(sensor.measured_max_temp ? sensor.measured_max_temp.toFixed(1) : 0)+'°'">{{ sensor.temperature ? sensor.temperature.toFixed(1) : 0 }}°C</span>
</v-col>
<v-col class="text-center py-0 pr-8 vertical_align_center"><span>&nbsp;</span></v-col>
</v-row>
</div>
<v-divider class="my-2" v-if="boolTempchart"></v-divider>
<v-row v-if="boolTempchart">
<v-col>
<v-col class="px-8">
<line-chart :chart-data="chartdata" v-if="loaded"></line-chart>
</v-col>
</v-row>
@@ -99,29 +99,38 @@
},
computed: {
...mapState({
datasets: state => state.temperaturChart,
datasets: state => state.printer.tempHistory.datasets,
boolTempchart: state => state.gui.dashboard.boolTempchart,
}),
...mapGetters([
'heaters',
'heatersCount',
'temperature_fans',
'temperature_sensors',
])
'printer/getTemperatureFans',
'printer/getTemperatureSensors',
]),
datasets: {
get () {
return this.$store.state.printer.tempHistory.datasets
}
},
heaters: {
get () {
return this.$store.getters["printer/getHeaters"]
}
}
},
created() {
},
methods: {
fillData () {
this.loaded = true;
this.chartdata = {
datasets: this.datasets
}
}
},
mounted () {
this.fillData();
this.chartdata = {
datasets: this.datasets
}
setTimeout(() => {
this.loaded = true
}, 1000)
},
}
</script>
+5 -7
View File
@@ -6,13 +6,11 @@
<template>
<v-card>
<v-list-item>
<v-list-item-avatar color="grey"><v-icon dark>mdi-webcam</v-icon></v-list-item-avatar>
<v-list-item-content>
<v-list-item-title class="headline">Webcam</v-list-item-title>
</v-list-item-content>
</v-list-item>
<v-divider class="my-2"></v-divider>
<v-toolbar flat dense >
<v-toolbar-title>
<span class="subheading"><v-icon left>mdi-webcam</v-icon>Webcam</span>
</v-toolbar-title>
</v-toolbar>
<v-card-text class="px-0 py-0 content">
<img :src="webcamConfig.url" class="webcamImage" :style="webcamStyle" />
</v-card-text>
+20 -31
View File
@@ -18,13 +18,13 @@
</v-row>
<v-row>
<v-col class="col-12 pt-0 text-center d-flex flex-column align-center flex-sm-row justify-center">
<v-btn-toggle borderless no-gutters class="mx-2 mb-2 order-last flex-nowrap order-sm-first" >
<v-btn @click="sendBabySteppingDownFine()" class="" :loading="loadingBabySteppingDownFine" ><v-icon class="mr-2">mdi-arrow-collapse-down</v-icon> -0.01mm</v-btn>
<v-btn @click="sendBabySteppingDown()" class="" :loading="loadingBabySteppingDown" >-0.05mm</v-btn>
<v-btn-toggle dense no-gutters class="mx-2 mb-2 order-last flex-nowrap order-sm-first" >
<v-btn small @click="sendBabySteppingDownFine()" class="" :loading="loadings.includes('babySteppingDownFine')" ><v-icon small class="mr-2">mdi-arrow-collapse-down</v-icon> -0.01mm</v-btn>
<v-btn small @click="sendBabySteppingDown()" class="" :loading="loadings.includes('babySteppingDown')" >-0.05mm</v-btn>
</v-btn-toggle>
<v-btn-toggle borderless no-gutters class="mx-2 mb-2 order-first flex-nowrap order-sm-last" >
<v-btn @click="sendBabySteppingUpFine()" class="" :loading="loadingBabySteppingUpFine" ><v-icon class="mr-2">mdi-arrow-expand-up</v-icon> +0.01mm</v-btn>
<v-btn @click="sendBabySteppingUp()" class="" :loading="loadingBabySteppingUp" >+0.05mm</v-btn>
<v-btn-toggle dense no-gutters class="mx-2 mb-2 order-first flex-nowrap order-sm-last" >
<v-btn small @click="sendBabySteppingUpFine()" class="" :loading="loadings.includes('babySteppingUpFine')" ><v-icon small class="mr-2">mdi-arrow-expand-up</v-icon> +0.01mm</v-btn>
<v-btn small @click="sendBabySteppingUp()" class="" :loading="loadings.includes('babySteppingUp')" >+0.05mm</v-btn>
</v-btn-toggle>
</v-col>
</v-row>
@@ -42,15 +42,12 @@
},
data: function() {
return {
loadingBabySteppingDownFine: false,
loadingBabySteppingDown: false,
loadingBabySteppingUpFine: false,
loadingBabySteppingUp: false,
}
},
computed: {
...mapState({
loadings: state => state.loadings,
loadings: state => state.socket.loadings,
homing_origin: state => state.printer.gcode_move.homing_origin,
printer_state: state => state.printer.print_stats.state,
homed_axis: state => state.printer.toolhead.homed_axes,
@@ -59,35 +56,27 @@
methods: {
sendBabySteppingDownFine() {
let gcode = "SET_GCODE_OFFSET Z_ADJUST=-0.01"+(this.homed_axis === "xyz" ? " MOVE=1" : "");
this.$store.commit('setLoading', { name: 'babySteppingDownFine' });
this.$store.commit('addGcodeResponse', gcode);
Vue.prototype.$socket.sendObj('printer.gcode.script', { script: gcode }, "respondeBabySteppingDownFine");
this.$store.commit('socket/addLoading', { name: 'babySteppingDownFine' });
this.$store.commit('server/addEvent', gcode);
Vue.prototype.$socket.sendObj('printer.gcode.script', { script: gcode }, "socket/removeLoading", { name: 'babySteppingDownFine' });
},
sendBabySteppingDown() {
let gcode = "SET_GCODE_OFFSET Z_ADJUST=-0.05"+(this.homed_axis === "xyz" ? " MOVE=1" : "");
this.$store.commit('setLoading', { name: 'babySteppingDown' });
this.$store.commit('addGcodeResponse', gcode);
Vue.prototype.$socket.sendObj('printer.gcode.script', { script: gcode }, "respondeBabySteppingDown");
this.$store.commit('socket/addLoading', { name: 'babySteppingDown' });
this.$store.commit('server/addEvent', gcode);
Vue.prototype.$socket.sendObj('printer.gcode.script', { script: gcode }, "socket/removeLoading", { name: 'babySteppingDown' });
},
sendBabySteppingUpFine() {
let gcode = "SET_GCODE_OFFSET Z_ADJUST=0.01"+(this.homed_axis === "xyz" ? " MOVE=1" : "");
this.$store.commit('setLoading', { name: 'babySteppingUpFine' });
this.$store.commit('addGcodeResponse', gcode);
Vue.prototype.$socket.sendObj('printer.gcode.script', { script: gcode }, "respondeBabySteppingUpFine");
this.$store.commit('socket/addLoading', { name: 'babySteppingUpFine' });
this.$store.commit('server/addEvent', gcode);
Vue.prototype.$socket.sendObj('printer.gcode.script', { script: gcode }, "socket/removeLoading", { name: 'babySteppingUpFine' });
},
sendBabySteppingUp() {
let gcode = "SET_GCODE_OFFSET Z_ADJUST=0.05"+(this.homed_axis === "xyz" ? " MOVE=1" : "");
this.$store.commit('setLoading', { name: 'babySteppingUp' });
this.$store.commit('addGcodeResponse', gcode);
Vue.prototype.$socket.sendObj('printer.gcode.script', { script: gcode }, "respondeBabySteppingUp");
},
},
watch: {
loadings: function(loadings) {
this.loadingBabySteppingDownFine = loadings.includes('babySteppingDownFine');
this.loadingBabySteppingDown = loadings.includes('babySteppingDown');
this.loadingBabySteppingUpFine = loadings.includes('babySteppingUpFine');
this.loadingBabySteppingUp = loadings.includes('babySteppingUp');
this.$store.commit('socket/addLoading', { name: 'babySteppingUp' });
this.$store.commit('server/addEvent', gcode);
Vue.prototype.$socket.sendObj('printer.gcode.script', { script: gcode }, "socket/removeLoading", { name: 'babySteppingUp' });
},
}
}
+2
View File
@@ -2,6 +2,7 @@ import Vue from 'vue'
import StatusPanel from './StatusPanel.vue'
import KlippyStatePanel from './KlippyStatePanel.vue'
import MinSettingsPanel from './MinSettingsPanel.vue'
import ToolsPanel from './ToolsPanel.vue'
import ControlPanel from "./ControlPanel";
import ExtruderPanel from "./ExtruderPanel";
@@ -14,6 +15,7 @@ import PowerControlPanel from "./PowerControlPanel.vue";
Vue.component('status-panel', StatusPanel);
Vue.component('klippy-state-panel', KlippyStatePanel);
Vue.component('min-settings-panel', MinSettingsPanel);
Vue.component('tools-panel', ToolsPanel);
Vue.component('control-panel', ControlPanel);
Vue.component('extruder-panel', ExtruderPanel);
+109
View File
@@ -0,0 +1,109 @@
<style>
._fan-slider-subheader {
height: auto;
}
</style>
<template>
<v-row>
<v-col :class="controllable ? 'pb-1 pt-3' : 'py-2'">
<v-subheader class="_fan-slider-subheader">
<span>{{ convertName }}</span>
<v-spacer></v-spacer>
<span class="font-weight-bold">{{ Math.round(value) }} %</span>
</v-subheader>
<v-card-text class="py-0" v-if="controllable">
<v-slider
v-model="value"
:min="0"
:max="100"
@change="sendCmd"
hide-details>
<template v-slot:prepend>
<v-icon @click="decrement">mdi-minus</v-icon>
</template>
<template v-slot:append>
<v-icon @click="increment">mdi-plus</v-icon>
</template>
</v-slider>
</v-card-text>
</v-col>
</v-row>
</template>
<script>
export default {
data: function() {
return {
value: this.target * this.multi,
}
},
props: {
target: {
type: Number,
required: true,
},
name: {
type: String,
required: true,
default: ''
},
type: {
type: String,
required: false,
default: ''
},
controllable: {
type: Boolean,
required: false,
default: false
},
multi: {
type: Number,
required: false,
default: 1
},
},
computed: {
convertName() {
let tmp = this.name;
tmp = tmp.replaceAll("_", " ");
tmp = tmp.charAt(0).toUpperCase() + tmp.slice(1);
return tmp;
}
},
methods: {
sendCmd() {
let gcode = "";
if (this.type === "fan") gcode = "M106 S"+(this.value * 2.55).toFixed(0);
if (this.type === "fan_generic") gcode = "SET_FAN_SPEED FAN="+this.name+" SPEED="+(this.value/100);
if (gcode !== "") {
this.$store.commit('server/addEvent', gcode);
this.$socket.sendObj('printer.gcode.script', { script: gcode });
}
},
decrement() {
this.value = this.value > 0 ? (this.value - 1).toFixed(0) : 0;
this.sendCmd();
},
increment() {
this.value = this.value < 100 ? (this.value + 1).toFixed(0) : 100;
this.sendCmd();
}
},
watch: {
target: function(newVal) {
this.value = newVal * this.multi;
},
},
created: function() {
},
}
</script>
+6 -4
View File
@@ -30,17 +30,19 @@
setValue() {
if (this.value) {
let index = this.hiddenMacros.indexOf(this.name.toUpperCase());
if (index > -1) this.hiddenMacros.splice(index, 1);
} else this.hiddenMacros.push(this.name.toUpperCase());
if (index > -1) this.hiddenMacros.splice(index, 1)
} else this.hiddenMacros.push(this.name.toUpperCase())
this.$store.dispatch("gui/upload")
}
},
watch: {
hiddenMacros: function() {
this.value = !this.hiddenMacros.includes(this.name.toUpperCase());
this.value = !this.hiddenMacros.includes(this.name.toUpperCase())
}
},
created() {
this.value = !this.hiddenMacros.includes(this.name.toUpperCase());
this.value = !this.hiddenMacros.includes(this.name.toUpperCase())
}
}
</script>
+10 -27
View File
@@ -8,10 +8,10 @@
<div>
<v-row class="px-6" >
<v-col sm-12>
<v-switch v-model="enabled" :label="enabled ? 'enabled' : 'disabled'" @change="changeSensor()" class="settingsRunoutSwitchInput my-0"></v-switch>
<v-switch v-model="value" :label="enabled ? 'enabled' : 'disabled'" @change="changeSensor()" class="settingsRunoutSwitchInput my-0"></v-switch>
</v-col>
</v-row>
<v-row class="px-6" v-if="enabled" >
<v-row class="px-6" v-if="value" >
<v-col sm-12>
<label class="mt-1 d-inline-block">Filament:</label>
<v-chip class="float-right" :color="filament_detected ? 'green' : 'red' " text-color="white">{{ filament_detected ? 'detected' : 'empty' }}</v-chip>
@@ -22,47 +22,30 @@
<script>
import { mapGetters } from 'vuex';
export default {
data: function() {
return {
value: false,
enabled: false,
filament_detected: false,
}
},
props: {
name: String,
enabled: Boolean,
filament_detected: Boolean,
},
computed: {
...mapGetters([
'getFilamentSwitchSensors'
])
},
methods: {
changeSensor() {
let gcode = 'SET_FILAMENT_SENSOR SENSOR='+this.name+' ENABLE='+(this.enabled ? 1 : 0);
this.$socket.sendObj('printer.gcode.script', { script: gcode });
}
},
watch: {
getFilamentSwitchSensors: function() {
let sensor = this.getFilamentSwitchSensors.find(sensor => sensor.name === this.name);
if (sensor) {
this.enabled = sensor.enabled;
this.filament_detected = sensor.filament_detected;
}
let gcode = 'SET_FILAMENT_SENSOR SENSOR='+this.name+' ENABLE='+(this.value ? 1 : 0)
this.$store.commit('server/addEvent', gcode)
this.$socket.sendObj('printer.gcode.script', { script: gcode })
}
},
created() {
let sensor = this.getFilamentSwitchSensors.find(sensor => sensor.name === this.name);
if (sensor) {
this.enabled = sensor.enabled;
this.filament_detected = sensor.filament_detected;
}
this.value = this.enabled
}
}
</script>
+10 -1
View File
@@ -7,6 +7,15 @@
.tool-input .v-input__slot { margin-bottom: 0; }
.tool-input .v-text-field__details { display: none; }
.tool-input input {
-moz-appearance: textfield;
}
.tool-input input::-webkit-outer-spin-button,
.tool-input input::-webkit-inner-spin-button {
-webkit-appearance: none;
margin: 0;
}
</style>
<template>
@@ -43,7 +52,7 @@
} else if (this.min_temp !== undefined && this.value < this.min_temp && parseFloat(this.value) !== 0) {
this.value = this.target;
Vue.$toast.error("Temperature too low for "+this.name+"! (min: "+this.min_temp+")");
} else this.$socket.sendObj('printer.gcode.script', {script: this.command+' '+this.attributeName+'='+this.name+' TARGET='+this.value});
} else this.$socket.sendObj('printer.gcode.script', { script: this.command+' '+this.attributeName+'='+this.name+' TARGET='+this.value });
}
},
watch: {
+42 -43
View File
@@ -1,12 +1,35 @@
<style>
._tool-slider-subheader {
height: auto;
}
</style>
<template>
<v-row>
<v-col class="col-auto"><v-icon @click="decrement">mdi-minus</v-icon></v-col>
<v-col class="col"><v-slider v-model="value" thumb-label="always" :label="label" :min="min" :max="variableMax" @change="sendCmd" hide-details></v-slider></v-col>
<v-col class="col-auto"><v-icon @click="increment">mdi-plus</v-icon></v-col>
<v-col class="pb-1 pt-3">
<v-subheader class="_tool-slider-subheader">
<span>{{ label }}</span>
<v-spacer></v-spacer>
<span class="font-weight-bold">{{ value }} {{ unit }}</span>
</v-subheader>
<v-card-text class="py-0">
<v-slider
v-model="value"
:min="min"
:max="max"
@change="sendCmd"
hide-details>
<template v-slot:prepend>
<v-icon @click="decrement">mdi-minus</v-icon>
</template>
<template v-slot:append>
<v-icon @click="increment">mdi-plus</v-icon>
</template>
</v-slider>
</v-card-text>
</v-col>
</v-row>
</template>
@@ -16,7 +39,6 @@
data: function() {
return {
value: this.target * this.multi,
variableMax: this.max,
}
},
props: {
@@ -25,7 +47,6 @@
required: true,
},
command: {
type: String,
required: true,
},
attributeName: {
@@ -38,6 +59,11 @@
required: false,
default: ''
},
unit: {
type: String,
required: false,
default: '%'
},
attributeScale: {
type: Number,
required: false,
@@ -53,15 +79,10 @@
required: false,
default: 100
},
extenderSteps: {
step: {
type: Number,
required: false,
default: 100
},
extender: {
type: Boolean,
required: false,
default: false
default: 1
},
multi: {
type: Number,
@@ -74,47 +95,25 @@
},
methods: {
sendCmd() {
this.$socket.sendObj('printer.gcode.script', { script: this.command+' '+this.attributeName+(this.value*this.attributeScale).toFixed(0) });
let gcode = this.command+' '+this.attributeName+(this.value*this.attributeScale).toFixed(0)
this.$store.commit('server/addEvent', gcode)
this.$socket.sendObj('printer.gcode.script', { script: gcode })
},
decrement() {
this.value--;
this.value = this.value > this.min ? (this.value - this.step).toFixed(0) : this.min
this.sendCmd();
},
increment() {
this.value++;
this.value = this.value < this.max ? (this.value + this.step).toFixed(0) : this.max
this.sendCmd();
},
checkExpand() {
if (this.value > 0) {
if (this.value > this.variableMax) {
let tmpMulti = Math.ceil((this.value - this.variableMax) / this.extenderSteps);
this.variableMax += tmpMulti * this.extenderSteps;
} else if (this.value > (this.variableMax - this.extenderSteps)) {
this.variableMax += this.extenderSteps;
}
}
}
},
watch: {
target: function() {
this.value = this.target * this.multi;
target: function(newVal) {
this.value = newVal * this.multi;
},
value: function() {
if (this.extender) {
setTimeout(() => {
this.checkExpand();
}, 1000);
}
}
},
created: function() {
if (this.extender && this.value > this.variableMax) {
let tmpMulti = Math.ceil((this.value - this.variableMax) / this.extenderSteps);
this.variableMax += tmpMulti * this.extenderSteps;
if (this.variableMax === this.value) this.variableMax += this.extenderSteps;
}
}
}
</script>
</script>
+1 -1
View File
@@ -22,7 +22,7 @@ Vue.component('vue-headful', vueHeadful);
fetch('/config.json')
.then(res => res.json())
.then(file => {
store.commit('setSettings', file);
store.commit('socket/setData', file);
const websocketProtocol = document.location.protocol === 'https:' ? 'wss://' : 'ws://';
const socketClient = new WebSocketClient(websocketProtocol + store.state.socket.hostname + ':' + store.state.socket.port + '/websocket', {
+15 -12
View File
@@ -15,12 +15,15 @@
margin-top: 5px;
}
.log-cell {
padding: 16px !important;
}
.log-cell.title-cell {
vertical-align: top;
height: auto !important;
}
.log-cell.content-cell {
vertical-align: top;
min-height: auto;
height: auto !important;
}
</style>
@@ -68,10 +71,10 @@
<template #item="{ item }">
<tr>
<td class="log-cell title-cell">
<td class="log-cell title-cell py-2 flex-grow-0 pr-0">
{{ item.date.toLocaleString() }}
</td>
<td class="log-cell content-cell" colspan="2">
<td class="log-cell content-cell py-2" colspan="2">
<span v-if="item.message" class="message" v-html="formatMessage(item.message)"></span>
</td>
</tr>
@@ -117,8 +120,8 @@
},
computed: {
...mapState({
events: state => state.events,
helplist: state => state.helplist,
events: state => state.server.events,
helplist: state => state.printer.helplist,
loadings: state => state.loadings,
}),
...mapGetters([
@@ -127,9 +130,9 @@
},
methods: {
doSend() {
this.$store.commit('setLoading', { name: 'loadingSendGcode' });
this.$store.commit('addGcodeResponse', this.gcode);
Vue.prototype.$socket.sendObj('printer.gcode.script', { script: this.gcode }, "sendGcode");
//this.$store.commit('setLoading', { name: 'loadingSendGcode' });
this.$store.commit('server/addEvent', this.gcode);
Vue.prototype.$socket.sendObj('printer.gcode.script', { script: this.gcode }, "server/getGcodeRespond");
this.lastCommands.push(this.gcode);
this.gcode = "";
this.lastCommandNumber = null;
@@ -168,7 +171,7 @@
let output = "";
commands.forEach(command => output += "<b>"+command.command+":</b> "+command.description+"<br />");
this.$store.commit('addGcodeResponse', output);
this.$store.commit('server/addEvent', output);
}
}
}
+26 -22
View File
@@ -1,48 +1,52 @@
<template>
<v-row>
<v-col class="col-sm-12 col-md-7">
<v-col class="col-sm-12 col-md-5">
<min-settings-panel v-if="klippy_state === 'ready' && existsPrinterConfig"></min-settings-panel>
<status-panel v-if="klippy_state === 'ready'"></status-panel>
<klippy-state-panel v-if="klippy_state !== 'ready'"></klippy-state-panel>
<klippy-state-panel v-if="socket_connected && klippy_state !== 'ready'"></klippy-state-panel>
<webcam-panel v-if="showDashboardWebcam" class="mt-6"></webcam-panel>
<z-offset-panel class="mt-6" v-if="klippy_state === 'ready'"></z-offset-panel>
<control-panel class="mt-6" v-if="klippy_state === 'ready'"></control-panel>
<extruder-panel class="mt-6" v-if="klippy_state === 'ready'"></extruder-panel>
</v-col>
<v-col class="col-sm-12 col-md-5">
<tools-panel></tools-panel>
<peripherie-panel class="mt-6" v-if="klippy_state === 'ready'"></peripherie-panel>
<power-control-panel class="mt-6" v-if="countPowerDevices > 0"></power-control-panel>
</v-col>
<v-col class="col-sm-12 col-md-7">
<tools-panel v-if="socket_connected && klippy_connected"></tools-panel>
<miniconsole-panel class="mt-6" v-if="klippy_state === 'ready' && showDashboardConsole"></miniconsole-panel>
<power-control-panel class="mt-6" v-if="powerDevicesCount > 0"></power-control-panel>
</v-col>
</v-row>
</template>
<script>
import { mapState, mapGetters } from 'vuex'
import { mapState } from 'vuex'
import ZOffsetPanel from "../components/panels/ZOffsetPanel";
export default {
components: {ZOffsetPanel},
components: { ZOffsetPanel },
data: () => ({
//is_ready: false
}),
computed: {
...mapState({
socket_connected: state => state.socket.isConnected,
klippy_connected: state => state.server.klippy_connected,
klippy_state: state => state.server.klippy_state,
showDashboardWebcam: state => state.gui.dashboard.boolWebcam,
showDashboardConsole: state => state.gui.dashboard.boolConsole,
klippy_state: state => state.printer.webhooks.state,
config: state => state.printer.configfile.config,
}),
...mapGetters([
'showDashboardWebcam',
'powerDevicesCount'
])
},
/*created() {
//this.is_ready = (this.klippy_state === "ready") ? true : false;
},
watch: {
klippy_state() {
this.is_ready = (this.klippy_state === "ready") ? true : false;
countPowerDevices: {
get() {
return this.$store.getters["server/power/count"]
}
},
existsPrinterConfig: {
get() {
return this.$store.getters["printer/existPrinterConfig"]
}
}
}*/
},
}
</script>
+220 -178
View File
@@ -41,113 +41,113 @@
vertical-align: middle;
transition: font-size 175ms;
}
.minHeight36 {
min-height: 36px;
}
</style>
<template>
<div>
<v-card class="fileupload-card" @dragover="dragOverUpload" @dragleave="dragLeaveUpload" @drop.prevent.stop="dragDropUpload">
<v-card-title>
G-Code Files
<v-spacer></v-spacer>
<v-btn :loading="loadingMakeDirectory" @click="createDirectory"><v-icon class="mr-1">mdi-folder-plus</v-icon> new Directory</v-btn>
<v-btn color="primary ml-4" :loading="loadingGcodeRefresh" @click="refreshFileList"><v-icon class="mr-1">mdi-refresh</v-icon> Refresh</v-btn>
<input type="file" ref="fileUpload" style="display: none" @change="uploadFile" />
<v-btn color="primary ml-4 " :loading="loadingGcodeUpload" @click="clickUploadButton"><v-icon>mdi-upload</v-icon>Upload</v-btn>
</v-card-title>
<v-card-subtitle>
Current path: {{ this.currentPath !== 'gcodes' ? "/"+this.currentPath.substring(7) : "/" }}
</v-card-subtitle>
<v-card-text>
<v-text-field
v-model="search"
append-icon="mdi-magnify"
label="Search"
single-line
hide-details
></v-text-field>
</v-card-text>
<v-data-table
:items="files"
class="files-table"
:headers="headers"
:options="options"
:custom-sort="sortFiles"
:sort-by.sync="sortBy"
:sort-desc.sync="sortDesc"
:items-per-page="countPerPage"
item-key="name"
:search="search"
:custom-filter="advancedSearch"
@pagination="refreshMetadata">
<v-card class="fileupload-card my-3" @dragover="dragOverUpload" @dragleave="dragLeaveUpload" @drop.prevent.stop="dragDropUpload">
<v-card-title>
G-Code Files
<v-spacer></v-spacer>
<input type="file" ref="fileUpload" style="display: none" @change="uploadFile" />
<v-item-group class="v-btn-toggle" name="controllers">
<v-btn @click="clickUploadButton" title="Upload new Gcode" class="primary" :loading="loadings.includes('gcodeUpload')"><v-icon>mdi-upload</v-icon></v-btn>
<v-btn @click="createDirectory" title="Create new Directory"><v-icon>mdi-folder-plus</v-icon></v-btn>
<v-btn @click="refreshFileList" title="Refresh current Directory"><v-icon>mdi-refresh</v-icon></v-btn>
<v-menu :offset-y="true" title="Setup current list">
<template v-slot:activator="{ on, attrs }">
<v-btn class="" 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="showHiddenFiles" label="Hidden files"></v-checkbox>
</v-list-item>
<v-divider></v-divider>
<v-list-item class="minHeight36" v-for="header of configHeaders" v-bind:key="header.key">
<v-checkbox class="mt-0" hide-details v-model="header.visible" @change="changeMetadataVisible(header.value)" :label="header.text"></v-checkbox>
</v-list-item>
</v-list>
</v-menu>
</v-item-group>
</v-card-title>
<v-card-subtitle>Current path: {{ this.currentPath !== 'gcodes' ? "/"+this.currentPath.substring(7) : "/" }}</v-card-subtitle>
<v-card-text>
<v-text-field
v-model="search"
append-icon="mdi-magnify"
label="Search"
single-line
hide-details
></v-text-field>
</v-card-text>
<v-data-table
:items="files"
class="files-table"
:headers="filteredHeaders"
:options="options"
:custom-sort="sortFiles"
:sort-by.sync="sortBy"
:sort-desc.sync="sortDesc"
:items-per-page.sync="countPerPage"
item-key="name"
:search="search"
:custom-filter="advancedSearch"
@pagination="refreshMetadata">
<template #no-data>
<div class="text-center">empty</div>
</template>
<template slot="items" slot-scope="props">
<td v-for="header in filteredHeaders" v-bind:key="header.text">{{ props.item[header.value] }}</td>
</template>
<template v-slot:body.prepend>
<tr
v-if="(currentPath !== 'gcodes')"
class="file-list-cursor"
@click="clickRowGoBack"
@dragover="dragOverFilelist($event, {isDirectory: true, filename: '..'})" @dragleave="dragLeaveFilelist" @drop.prevent.stop="dragDropFilelist($event, {isDirectory: true, filename: '..'})"
>
<td class=" ">
<v-icon>mdi-folder-upload</v-icon>
</td>
<td class=" " colspan="8">
..
</td>
</tr>
</template>
<template #no-data>
<div class="text-center">empty</div>
</template>
<template #item="{ item }">
<tr
@contextmenu="showContextMenu($event, item)"
@click="clickRow(item)"
class="file-list-cursor"
draggable="true"
@drag="dragFile($event, item)"
@dragend="dragendFile($event)"
@dragover="dragOverFilelist($event, item)" @dragleave="dragLeaveFilelist" @drop.prevent.stop="dragDropFilelist($event, item)"
:data-name="item.filename"
>
<td class=" ">
<v-icon v-if="item.isDirectory">mdi-folder</v-icon>
<v-icon v-if="!item.isDirectory && !(item.thumbnails && item.thumbnails.length > 0)">mdi-file</v-icon>
<img v-if="!item.isDirectory && item.thumbnails && item.thumbnails.length > 0" :src="'data:image/gif;base64,'+(item.thumbnails.length ? item.thumbnails[0].data : '--')" />
</td>
<td class=" ">
{{ item.filename }}
</td>
<td class="text-no-wrap text-right">
{{ item.isDirectory ? '--' : formatFilesize(item.size) }}
</td>
<td class="text-right">
{{ formatDate(item.modified) }}
</td>
<td class="text-no-wrap text-right">
{{ item.object_height ? item.object_height.toFixed(2)+' mm' : '--' }}
</td>
<td class="text-no-wrap text-right">
{{ item.layer_height ? item.layer_height.toFixed(2)+' mm' : '--' }}
</td>
<td class="text-no-wrap text-right">
{{ item.filament_total ? item.filament_total.toFixed()+' mm' : '--' }}
</td>
<td class="text-no-wrap text-right">
{{ formatPrintTime(item.estimated_time) }}
</td>
<td class="text-no-wrap text-right">
{{ item.slicer ? item.slicer : '--' }}<br />
<small v-if="item.slicer_version">{{ item.slicer_version}}</small>
</td>
</tr>
</template>
</v-data-table>
<div class="dragzone" :style="'visibility: '+dropzone.visibility+'; opacity: '+dropzone.hidden">
<div class="textnode">Drop files to add gcode.</div>
</div>
</v-card>
<template slot="body.prepend" v-if="(currentPath !== 'gcodes')">
<tr
class="file-list-cursor"
@click="clickRowGoBack"
@dragover="dragOverFilelist($event, {isDirectory: true, filename: '..'})" @dragleave="dragLeaveFilelist" @drop.prevent.stop="dragDropFilelist($event, {isDirectory: true, filename: '..'})"
>
<td class=" "><v-icon>mdi-folder-upload</v-icon></td>
<td class=" " colspan="8">..</td>
</tr>
</template>
<template #item="{ item }">
<tr
@contextmenu="showContextMenu($event, item)"
@click="clickRow(item)"
class="file-list-cursor"
draggable="true"
@drag="dragFile($event, item)"
@dragend="dragendFile($event)"
@dragover="dragOverFilelist($event, item)" @dragleave="dragLeaveFilelist" @drop.prevent.stop="dragDropFilelist($event, item)"
:data-name="item.filename"
>
<td class="pr-0" style="width: 32px;">
<v-icon v-if="item.isDirectory">mdi-folder</v-icon>
<v-icon v-if="!item.isDirectory && !(item.thumbnails && item.thumbnails.length > 0)">mdi-file</v-icon>
<img v-if="!item.isDirectory && item.thumbnails && item.thumbnails.length > 0" :src="'data:image/gif;base64,'+(item.thumbnails.length ? item.thumbnails[0].data : '--')" />
</td>
<td class=" ">{{ item.filename }}</td>
<td class="text-no-wrap text-right" v-if="headers.filter(header => header.value === 'size')[0].visible">{{ item.isDirectory ? '--' : formatFilesize(item.size) }}</td>
<td class="text-right" v-if="headers.filter(header => header.value === 'modified')[0].visible">{{ formatDate(item.modified) }}</td>
<td class="text-no-wrap text-right" v-if="headers.filter(header => header.value === 'object_height')[0].visible">{{ item.object_height ? item.object_height.toFixed(2)+' mm' : '--' }}</td>
<td class="text-no-wrap text-right" v-if="headers.filter(header => header.value === 'layer_height')[0].visible">{{ item.layer_height ? item.layer_height.toFixed(2)+' mm' : '--' }}</td>
<td class="text-no-wrap text-right" v-if="headers.filter(header => header.value === 'filament_total')[0].visible">{{ item.filament_total ? item.filament_total.toFixed()+' mm' : '--' }}</td>
<td class="text-no-wrap text-right" v-if="headers.filter(header => header.value === 'estimated_time')[0].visible">{{ formatPrintTime(item.estimated_time) }}</td>
<td class="text-no-wrap text-right" v-if="headers.filter(header => header.value === 'slicer')[0].visible">{{ item.slicer ? item.slicer : '--' }}<br /><small v-if="item.slicer_version">{{ item.slicer_version}}</small></td>
</tr>
</template>
</v-data-table>
<div class="dragzone" :style="'visibility: '+dropzone.visibility+'; opacity: '+dropzone.hidden">
<div class="textnode">Drop files to add gcode.</div>
</div>
</v-card>
<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)" :disabled="is_printing" v-if="!contextMenu.item.isDirectory">
@@ -173,9 +173,10 @@
<v-dialog v-model="dialogPrintFile.show" max-width="400">
<v-card>
<v-img
v-if="dialogPrintFile.item.thumbnails && dialogPrintFile.item.thumbnails.find(element => element.width === 400)"
:src="'data:image/gif;base64,'+(dialogPrintFile.item.thumbnails ? dialogPrintFile.item.thumbnails.find(element => element.width === 400).data : '')"
:height="(dialogPrintFile.item.thumbnails ? dialogPrintFile.item.thumbnails.find(element => element.width === 400).height : '')+'px'"
contain
v-if="dialogPrintFile.item.thumbnails && dialogPrintFile.item.thumbnails.find(element => element.width === 300 || element.width === 400)"
:src="'data:image/gif;base64,'+(dialogPrintFile.item.thumbnails ? dialogPrintFile.item.thumbnails.find(element => element.width === 300 || element.width === 400).data : '')"
:height="(dialogPrintFile.item.thumbnails ? dialogPrintFile.item.thumbnails.find(element => element.width === 400 || element.width === 300).height : '')+'px'"
></v-img>
<v-card-title class="headline">Start Job</v-card-title>
<v-card-text>Do you want to start {{ dialogPrintFile.item.filename }}?</v-card-text>
@@ -204,7 +205,7 @@
<v-card>
<v-card-title class="headline">Rename File</v-card-title>
<v-card-text>
<v-text-field label="Name" required v-model="dialogRenameFile.newName"></v-text-field>
<v-text-field label="Name" required v-model="dialogRenameFile.newName" ref="inputFieldNewName"></v-text-field>
</v-card-text>
<v-card-actions>
<v-spacer></v-spacer>
@@ -231,8 +232,7 @@
<script>
import { mapState, mapGetters } from 'vuex';
import axios from 'axios';
import { findDirectory } from "../plugins/helpers";
/*import Vue from "vue";*/
import { findDirectory } from "@/plugins/helpers";
export default {
data () {
@@ -241,6 +241,7 @@
sortBy: 'modified',
sortDesc: true,
selected: [],
hideHeaderColums: [],
dialogPrintFile: {
show: false,
item: {}
@@ -260,15 +261,15 @@
item: {}
},
headers: [
{ text: '', value: '', },
{ text: 'Name', value: 'filename', },
{ text: 'Filesize', value: 'size', align: 'right', },
{ text: 'Last modified', value: 'modified', align: 'right', },
{ text: 'Object Height', value: 'object_height', align: 'right', },
{ text: 'Layer Height', value: 'layer_height', align: 'right', },
{ text: 'Filament Usage', value: 'filament_total', align: 'right', },
{ text: 'Print Time', value: 'estimated_time', align: 'right', },
{ text: 'Generated by', value: 'slicer', align: 'right', },
{ text: '', value: '', align: 'left', configable: false, visible: true },
{ text: 'Name', value: 'filename', align: 'left', configable: false, visible: true },
{ text: 'Filesize', value: 'size', align: 'right', configable: true, visible: true },
{ text: 'Last modified', value: 'modified', align: 'right', configable: true, visible: true },
{ text: 'Object Height', value: 'object_height', align: 'right', configable: true, visible: true },
{ text: 'Layer Height', value: 'layer_height', align: 'right', configable: true, visible: true },
{ text: 'Filament Usage', value: 'filament_total', align: 'right', configable: true, visible: true },
{ text: 'Print Time', value: 'estimated_time', align: 'right', configable: true, visible: true },
{ text: 'Slicer', value: 'slicer', align: 'right', configable: true, visible: true },
],
options: {
@@ -287,9 +288,6 @@
},
files: [],
currentPath: 'gcodes',
loadingGcodeUpload: false,
loadingGcodeRefresh: false,
loadingMakeDirectory: false,
draggingFile: {
status: false,
item: {}
@@ -301,25 +299,48 @@
},
computed: {
...mapState({
filetree: state => state.filetree,
countPerPage: state => state.gui.gcodefiles.countPerPage,
filetree: state => state.files.filetree,
hostname: state => state.socket.hostname,
port: state => state.socket.port,
loadings: state => state.loadings,
loadings: state => state.socket.loadings,
displayMetadata: state => state.gui.gcodefiles.showMetadata,
}),
...mapGetters([
'is_printing'
])
]),
configHeaders() {
return this.headers.filter(header => header.configable === true);
},
filteredHeaders() {
return this.headers.filter(header => header.visible === true);
},
showHiddenFiles: {
get: function() {
return this.$store.state.gui.gcodefiles.showHiddenFiles;
},
set: function(newVal) {
return this.$store.dispatch("gui/setSettings", { gcodefiles: { showHiddenFiles: newVal } });
}
},
countPerPage: {
get: function() {
return this.$store.state.gui.gcodefiles.countPerPage
},
set: function(newVal) {
return this.$store.dispatch("gui/setSettings", { gcodefiles: { countPerPage: newVal } });
}
},
},
created() {
/*let dirArray = this.currentPath.split("/");
this.files = findDirectory(this.filetree, dirArray);*/
this.loadPath();
this.loadPath()
},
methods: {
uploadFile: function() {
if (this.$refs.fileUpload.files.length) {
this.doUploadFile(this.$refs.fileUpload.files[0]);
this.doUploadFile(this.$refs.fileUpload.files[0]).finally(() => {
this.$refs.fileUpload.value = ''
})
}
},
doUploadFile: function(file) {
@@ -328,77 +349,71 @@
let filename = file.name.replace(" ", "_");
formData.append('file', file, (this.currentPath+"/"+filename).substring(7));
this.$store.commit('setLoading', { name: 'loadingGcodeUpload' });
this.$store.commit('socket/addLoading', { name: 'gcodeUpload' });
axios.post('//' + this.hostname + ':' + this.port + '/server/files/upload',
formData, {
headers: { 'Content-Type': 'multipart/form-data' }
}
return axios.post('//' + this.hostname + ':' + this.port + '/server/files/upload',
formData, { headers: { 'Content-Type': 'multipart/form-data' } }
).then((result) => {
this.$store.commit('removeLoading', { name: 'loadingGcodeUpload' });
this.$store.commit('socket/removeLoading', { name: 'gcodeUpload' });
toast.success("Upload of "+result.data.result+" successful!");
})
.catch(() => {
this.$store.commit('removeLoading', { name: 'loadingGcodeUpload' });
}).catch(() => {
this.$store.commit('socket/removeLoading', { name: 'gcodeUpload' });
toast.error("Cannot upload the file!");
});
},
clickUploadButton: function() {
this.$refs.fileUpload.click();
this.$refs.fileUpload.click()
},
refreshFileList: function() {
this.$store.commit('setLoading', { name: 'loadingGcodeRefresh' });
this.$socket.sendObj('server.files.get_directory', { path: this.currentPath }, 'getDirectory');
this.$socket.sendObj('server.files.get_directory', { path: this.currentPath }, 'files/getDirectory')
},
formatDate(date) {
let tmp2 = new Date(date);
let tmp2 = new Date(date)
return tmp2.toLocaleString().replace(',', '');
return tmp2.toLocaleString().replace(',', '')
},
formatFilesize(fileSizeInBytes) {
let i = -1;
let byteUnits = [' kB', ' MB', ' GB', ' TB', 'PB', 'EB', 'ZB', 'YB'];
let i = -1
let byteUnits = [' kB', ' MB', ' GB', ' TB', 'PB', 'EB', 'ZB', 'YB']
do {
fileSizeInBytes = fileSizeInBytes / 1024;
i++;
} while (fileSizeInBytes > 1024);
fileSizeInBytes = fileSizeInBytes / 1024
i++
} while (fileSizeInBytes > 1024)
return Math.max(fileSizeInBytes, 0.1).toFixed(1) + byteUnits[i];
return Math.max(fileSizeInBytes, 0.1).toFixed(1) + byteUnits[i]
},
formatPrintTime(totalSeconds) {
if (totalSeconds) {
let output = "";
let output = ""
let days = Math.floor(totalSeconds / (3600 * 24));
let days = Math.floor(totalSeconds / (3600 * 24))
if (days) {
totalSeconds %= (3600 * 24);
output += days+"d";
totalSeconds %= (3600 * 24)
output += days+"d"
}
let hours = Math.floor(totalSeconds / 3600);
totalSeconds %= 3600;
if (hours) output += " "+hours+"h";
let hours = Math.floor(totalSeconds / 3600)
totalSeconds %= 3600
if (hours) output += " "+hours+"h"
let minutes = Math.floor(totalSeconds / 60);
if (minutes) output += " "+minutes+"m";
let minutes = Math.floor(totalSeconds / 60)
if (minutes) output += " "+minutes+"m"
let seconds = totalSeconds % 60;
if (seconds) output += " "+seconds.toFixed(0)+"s";
let seconds = totalSeconds % 60
if (seconds) output += " "+seconds.toFixed(0)+"s"
return output;
return output
}
return '--';
return '--'
},
showContextMenu (e, item) {
e.preventDefault();
this.contextMenu.shown = true;
this.contextMenu.x = e.clientX;
this.contextMenu.y = e.clientY;
this.contextMenu.item = item;
this.$nextTick(() => {
this.contextMenu.shown = true
});
e.preventDefault()
this.contextMenu.shown = true
this.contextMenu.x = e.clientX
this.contextMenu.y = e.clientY
this.contextMenu.item = item
this.$nextTick(() => { this.contextMenu.shown = true })
},
downloadFile() {
let filename = (this.currentPath+"/"+this.contextMenu.item.filename);
@@ -419,7 +434,7 @@
this.$socket.sendObj('server.files.move', {
source: this.currentPath+"/"+this.dialogRenameFile.item.filename,
dest: this.currentPath+"/"+this.dialogRenameFile.newName
}, 'getPostFileMove');
}, 'files/getMove');
},
renameDirectory(item) {
this.dialogRenameDirectory.item = item;
@@ -431,7 +446,7 @@
this.$socket.sendObj('server.files.move', {
source: this.currentPath+"/"+this.dialogRenameDirectory.item.filename,
dest: this.currentPath+"/"+this.dialogRenameDirectory.newName
}, 'getPostFileMove');
}, 'files/getFileMove');
},
removeFile() {
let filename = (this.currentPath+"/"+this.contextMenu.item.filename);
@@ -450,11 +465,11 @@
createDirectoryAction: function() {
if (this.dialogCreateDirectory.name.length && this.dialogCreateDirectory.name.indexOf(" ") === -1) {
this.dialogCreateDirectory.show = false;
this.$socket.sendObj('server.files.post_directory', { path: this.currentPath+"/"+this.dialogCreateDirectory.name }, 'getPostDirectory');
this.$socket.sendObj('server.files.post_directory', { path: this.currentPath+"/"+this.dialogCreateDirectory.name }, 'files/getCreateDir');
}
},
deleteDirectoryAction: function() {
this.$socket.sendObj('server.files.delete_directory', { path: this.currentPath+"/"+this.contextMenu.item.filename }, 'getDeleteDirectory');
this.$socket.sendObj('server.files.delete_directory', { path: this.currentPath+"/"+this.contextMenu.item.filename }, 'files/getDeleteDir');
},
clickRow: function(item) {
if (!item.isDirectory) {
@@ -469,9 +484,12 @@
this.currentPath = this.currentPath.substr(0, this.currentPath.lastIndexOf("/"));
},
loadPath: function() {
this.$socket.sendObj('server.files.get_directory', { path: this.currentPath }, 'getDirectory');
this.$socket.sendObj('server.files.get_directory', { path: this.currentPath }, 'files/getDirectory');
let dirArray = this.currentPath.split("/");
this.files = findDirectory(this.filetree, dirArray);
if (!this.showHiddenFiles) {
this.files = this.files.filter(file => file.filename !== "thumbs" && file.filename.substr(0, 1) !== ".");
}
},
startPrint(filename = "") {
filename = (this.currentPath+"/"+filename).substring(7);
@@ -592,7 +610,7 @@
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.sendObj("server.files.metadata", { filename: filename }, "getMetadata");
this.$socket.sendObj("server.files.metadata", { filename: filename }, "files/getMetadata");
}
}
@@ -602,7 +620,14 @@
search != null &&
typeof value === 'string' &&
value.toString().toLowerCase().indexOf(search.toLowerCase()) !== -1
}
},
changeMetadataVisible: function(name) {
if (this.headers.filter(header => header.value === name).length) {
let value = this.headers.filter(header => header.value === name)[0].visible;
this.$store.dispatch("gui/setGcodefilesMetadata", {name: name, value: value});
}
},
},
watch: {
filetree: {
@@ -610,18 +635,35 @@
handler(newVal) {
let dirArray = this.currentPath.split("/");
this.files = findDirectory(newVal, dirArray);
if (!this.showHiddenFiles) {
this.files = this.files.filter(file => file.filename !== "thumbs" && file.filename.substr(0, 1) !== ".");
}
}
},
currentPath: {
handler(newVal) {
let dirArray = newVal.split("/");
this.files = findDirectory(this.filetree, dirArray);
if (!this.showHiddenFiles) {
this.files = this.files.filter(file => file.filename !== "thumbs" && file.filename.substr(0, 1) !== ".");
}
}
},
loadings: function(loadings) {
this.loadingGcodeRefresh = loadings.includes('loadingGcodeRefresh');
this.loadingGcodeUpload = loadings.includes('loadingGcodeUpload');
displayMetadata: {
deep: true,
handler(newVal) {
Object.entries(newVal).forEach(value => {
if (this.headers.filter(header => header.value === value[0]).length) {
this.headers.filter(header => header.value === value[0])[0].visible = value[1];
}
});
}
},
showHiddenFiles: function() {
this.loadPath();
}
}
}
</script>
</script>
+27 -32
View File
@@ -53,15 +53,15 @@
</v-row>
<v-row>
<v-col class="col-12">
<v-btn color="primary" class="mr-3" @click="loadProfile" :loading="loadingLoad" :disabled="disabledLoad">LOAD</v-btn>
<v-btn color="primary" class="mr-3" @click="saveDialog = true; newName = profile" :loading="loadingSave" :disabled="disabledSave">SAVE</v-btn>
<v-btn color="primary" class="mr-3" @click="removeDialog = true" :loading="loadingRemove" :disabled="disabledRemove">REMOVE</v-btn>
<v-btn color="primary" class="mr-3" @click="loadProfile" :loading="loadings.includes('bedMeshLoad')" :disabled="disabledLoad">LOAD</v-btn>
<v-btn color="primary" class="mr-3" @click="saveDialog = true; newName = profile" :loading="loadings.includes('bedMeshSave')" :disabled="disabledSave">SAVE</v-btn>
<v-btn color="primary" class="mr-3" @click="removeDialog = true" :loading="loadings.includes('bedMeshRemove')" :disabled="disabledRemove">REMOVE</v-btn>
</v-col>
</v-row>
<v-row>
<v-col class="col-12">
<v-btn color="primary" class="mr-3" @click="clearBedMesh" :loading="loadingClear" :disabled="disabledClear">CLEAR</v-btn>
<v-btn color="primary" class="mr-3" @click="calibrateDialog = true" :loading="loadingCalibrate" :disabled="is_printing">Calibrate</v-btn>
<v-btn color="primary" class="mr-3" @click="clearBedMesh" :loading="loadings.includes('bedMeshClear')" :disabled="disabledClear">CLEAR</v-btn>
<v-btn color="primary" class="mr-3" @click="calibrateDialog = true" :loading="loadings.includes('bedMeshCalibrate')" :disabled="is_printing">Calibrate</v-btn>
</v-col>
</v-row>
</v-card-text>
@@ -193,18 +193,12 @@
}
}
},
profiles: [],
profile: {},
boolShowBedMesh: false,
loadingLoad: false,
disabledLoad: true,
loadingSave: false,
disabledSave: true,
loadingRemove: false,
disabledRemove: true,
loadingClear: false,
disabledClear: true,
loadingCalibrate: false,
showMeshType: 'probed',
saveDialog: false,
removeDialog: false,
@@ -216,12 +210,20 @@
...mapState({
config: state => state.printer.configfile.config,
bed_mesh: state => state.printer.bed_mesh,
loadings: state => state.loadings,
loadings: state => state.socket.loadings,
}),
...mapGetters([
'is_printing',
]),
profiles: {
get() {
return this.$store.getters["printer/getBedMeshProfiles"]
},
set() {
}
}
},
methods: {
showBedMesh: function() {
@@ -290,35 +292,35 @@
this.showBedMesh();
},
loadProfile: function() {
this.$store.commit('setLoading', { name: 'bedMeshLoad' });
this.$socket.sendObj('printer.gcode.script', { script: "BED_MESH_PROFILE LOAD="+this.profile }, "responseBedMeshLoad");
this.$store.commit('socket/addLoading', { name: 'bedMeshLoad' });
this.$socket.sendObj('printer.gcode.script', { script: "BED_MESH_PROFILE LOAD="+this.profile }, "socket/removeLoading", { name: 'bedMeshLoad' });
},
saveProfile: function() {
this.saveDialog = false;
this.$store.commit('setLoading', { name: 'bedMeshSave' });
this.$socket.sendObj('printer.gcode.script', { script: "BED_MESH_PROFILE SAVE="+this.newName.toUpperCase() }, "responseBedMeshSave");
this.$store.commit('socket/addLoading', { name: 'bedMeshSave' });
this.$socket.sendObj('printer.gcode.script', { script: "BED_MESH_PROFILE SAVE="+this.newName.toUpperCase() }, "socket/removeLoading", { name: 'bedMeshSave' });
},
removeProfile: function() {
this.removeDialog = false;
this.$store.commit('setLoading', { name: 'bedMeshRemove' });
this.$socket.sendObj('printer.gcode.script', { script: "BED_MESH_PROFILE REMOVE="+this.profile }, "responseBedMeshRemove");
this.$store.commit('socket/addLoading', { name: 'bedMeshRemove' });
this.$socket.sendObj('printer.gcode.script', { script: "BED_MESH_PROFILE REMOVE="+this.profile }, "socket/removeLoading", { name: 'bedMeshRemove' });
},
clearBedMesh: function() {
this.$store.commit('setLoading', { name: 'bedMeshClear' });
this.$socket.sendObj('printer.gcode.script', { script: "BED_MESH_CLEAR" }, "responseBedMeshClear");
this.$store.commit('socket/addLoading', { name: 'bedMeshClear' });
this.$socket.sendObj('printer.gcode.script', { script: "BED_MESH_CLEAR" }, "socket/removeLoading", { name: 'bedMeshClear' });
},
calibrateMesh: function() {
this.calibrateDialog = false;
this.$store.commit('setLoading', { name: 'bedMeshCalibrate' });
this.$socket.sendObj('printer.gcode.script', { script: "BED_MESH_CALIBRATE" }, "responseBedMeshCalibrate");
this.$store.commit('socket/addLoading', { name: 'bedMeshCalibrate' });
this.$socket.sendObj('printer.gcode.script', { script: "BED_MESH_CALIBRATE" }, "socket/removeLoading", { name: 'bedMeshCalibrate' });
}
},
created: function() {
this.profiles = this.$store.getters.getBedMeshProfiles;
},
watch: {
config: function() {
this.profiles = this.$store.getters.getBedMeshProfiles;
this.profiles = this.$store.getters["printer/getBedMeshProfiles"];
},
profile: function() {
if (this.profile !== "" && this.bed_mesh !== undefined && this.profile === this.bed_mesh.profile_name) {
@@ -336,7 +338,7 @@
deep: false,
handler(newVal) {
if (newVal !== undefined) {
this.profiles = this.$store.getters.getBedMeshProfiles;
this.profiles = this.$store.getters["printer/getBedMeshProfiles"];
this.showBedMesh();
if (this.profile !== "" && this.profile === this.bed_mesh.profile_name) this.disabledLoad = true;
@@ -355,13 +357,6 @@
}
}
},
loadings: function(loadings) {
this.loadingLoad = loadings.includes('bedMeshLoad');
this.loadingClear = loadings.includes('bedMeshClear');
this.loadingSave = loadings.includes('bedMeshSave');
this.loadingRemove = loadings.includes('bedMeshRemove');
this.loadingCalibrate = loadings.includes('bedMeshCalibrate');
}
}
}
</script>
+2 -7
View File
@@ -12,11 +12,6 @@
<settings-macros-panel></settings-macros-panel>
</v-col>
</v-row>
<v-fab-transition>
<v-btn fab fixed large bottom right :loading="loadingUpload" @click="saveGuiSettings">
<v-icon>mdi-check</v-icon>
</v-btn>
</v-fab-transition>
</div>
</template>
<script>
@@ -25,12 +20,12 @@
export default {
computed: {
...mapState({
loadingUpload: state => state.socket.loadingSaveGuiConfig,
}),
},
methods: {
...mapActions([
'saveGuiSettings'
]),
}
}
Loaded 100 of 139 files, more files were not shown because too many files have changed in this diff. Show more