Compare commits

..
26 Commits
Author SHA1 Message Date
Stefan Dej 74f104f1a4 push version number
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2021-02-09 22:55:15 +01:00
Stefan Dej 9ccc3f69a3 last fixes for control panel customizing
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2021-02-09 22:23:20 +01:00
Stefan Dej 0d2f9bd8d8 bugfix: fix order in console from preset
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2021-02-08 22:25:23 +01:00
Stefan Dej 28aa03a55f remove debug output
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2021-02-07 23:19:22 +01:00
Stefan Dej d891ec0800 bugfix: only allow positiv values in control and extruder settings
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2021-02-07 23:00:53 +01:00
Stefan Dej 767a9403fd bugfix: editing existing preset doesn't work after add another heater (fix #182)
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2021-02-07 22:33:48 +01:00
Stefan Dej 6fb8d16143 bugfix: colorpicker return object instead of string (fix #193)
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2021-02-07 22:16:10 +01:00
Stefan Dej 0cffe5f235 disable debug output, fixed typo
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2021-02-07 21:50:02 +01:00
Stefan Dej f634872297 bugfix: save only hex values of chart colors
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2021-02-07 21:50:02 +01:00
Stefan Dej 91014a7349 feature: hide additional sensors in temp list
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2021-02-07 21:50:02 +01:00
Stefan Dej 850eecd600 add speed in chart tooltip
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2021-02-07 21:50:02 +01:00
Stefan Dej fff66f0c3b feature: hide additional sensors
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2021-02-07 21:50:02 +01:00
Stefan Dej 3749b76162 feature: add customize feedrate & feed distances to ExtruderPanel.vue (fix #158)
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2021-02-07 21:36:46 +01:00
Stefan Dej 88ac7a5cae feature: add customize feedrate for ControlPanel.vue (fix #49)
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2021-02-07 03:26:06 +01:00
Stefan Dej eb123ffc01 feature: add preheat function in gcode files context menu
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2021-02-07 02:42:43 +01:00
Stefan Dej 411087434c feature: add disk usage to gcode-files
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2021-02-07 00:58:40 +01:00
Stefan Dej 8db37259e1 feature: add update notification
feature: display branch if not master in UpdatePanel.vue

Signed-off-by: Stefan Dej <meteyou@gmail.com>
2021-02-06 23:57:54 +01:00
Stefan Dej 3a03d93fef bugfix: add vertical divider for better "button feeling"
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2021-02-06 22:23:48 +01:00
Stefan Dej 42071ae422 feature: process notify_klippy_shutdown from moonraker
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2021-02-06 21:56:57 +01:00
Stefan Dej aeb6ae1ec9 feature: disable power devices with attribute "locked_while_printing" in moonraker while printing
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2021-02-06 21:39:04 +01:00
Stefan Dej 837f6641d0 bugfix: esp32 cam or ustreamer link fix bypassCache append (fixed #185)
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2021-02-06 02:20:08 +01:00
Stefan Dej 7a139d68c5 bugfix: remove ":" in ConnectingDialog.vue
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2021-02-04 21:45:54 +01:00
lixxbox 24bfb8bc58 hotfix: mainsail docs logo
I accidentally removed the logo from the config during the recent commit.
2021-02-04 12:29:06 +01:00
Stefan Dej 390bb40c69 fix some docs
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2021-02-03 21:05:10 +01:00
lixxbox 84470463fe remove duplicates 2021-02-03 20:51:50 +01:00
lixxbox f9c989793c adding quicktips and some minor changes to the docs 2021-02-03 20:51:50 +01:00
51 changed files with 902 additions and 145 deletions

No files matched your search

+10 -1
View File
@@ -1,6 +1,15 @@
title: "Mainsail"
tagline: A web interface for Klipper
description: Mainsail is a lightweight & responsive web interface for the Klipper 3D printer firmware. It communicates with Moonraker (Klipper-API) from Arksine.
logo: "/assets/img/logo-mainsail.png"
description: A web interface for Klipper
theme: just-the-docs
remote_theme: pmarsceill/just-the-docs
color_scheme: "mainsail"
search_enabled: true
defaults:
-
scope:
path: "" # an empty string here means all files in the project
values:
image: assets/img/rtfm.png
-7
View File
@@ -1,7 +0,0 @@
---
layout: default
title: Additional Support
nav_order: 7
has_children: true
permalink: /additional
---
Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 647 KiB

+8 -2
View File
@@ -9,9 +9,15 @@ has_children: false
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}
[Setup Guide](/setup){: .btn}
[Release Notes](https://github.com/meteyou/mainsail/releases){: .btn}{:target="_blank"}
For support join us on Discord, or open an issue on Github.
[Discord](https://discord.gg/skWTwTD){: .btn}{:target="_blank"}
[Github](https://github.com/meteyou/mainsail){: .btn}{:target="_blank"}
For support join our discord server -> [https://discord.gg/skWTwTD](https://discord.gg/skWTwTD)
## Screenshots
![Dashboard](assets/img/screenshot.png)
+37
View File
@@ -0,0 +1,37 @@
---
layout: default
title: Additional Sensors
parent: Quicktips
has_children: false
permalink: /quicktips/additional-sensors
description: >-
Integrate additional sensors into the temperature graph. For example Raspberry Pi, MCU, BMExxx, HTU21D, LM75 and more..
---
# {{ page.title }}
{{ page.description }}
## Raspberry Pi temperature sensor
Append the following section to your printer.cfg:
```yaml
[temperature_sensor raspberry_pi]
sensor_type: rpi_temperature
min_temp: 10
max_temp: 100
```
## ATSAM, ATAMD, and STM32 temperature sensor
Append the following section to your printer.cfg:
```yaml
[temperature_sensor mcu_temp]
sensor_type: temperature_mcu
min_temp: 0
max_temp: 100
```
For more information on this topic and how to add additional sensors, please refer to [Klipper documentation](https://www.klipper3d.org/Config_Reference.html#builtin-micro-controller-temperature-sensor){:target="_blank"}.
{: .info}
+26
View File
@@ -0,0 +1,26 @@
---
layout: default
title: Console Shortcuts
parent: Quicktips
has_children: false
permalink: /quicktips/console-shortcuts
description: >-
Similar to a terminal of your OS, there are some keyboard shortcuts in Mainsail that make your everyday life easier.
---
# {{ page.title }}
{{ page.description }}
## Help command
Issue a `HELP` command to get a list of possible commands.
## Autocomplete
You can start typing a command and then complete it with the tab-key. If there are several possibilities, you will get a list of choices.
![](../assets/img/quicktips/console-shortcuts/tab_complete.gif)
## Scroll through commands
Using the &uarr; up / &darr; down arrow keys you can scroll through previous commands.
+20
View File
@@ -0,0 +1,20 @@
---
layout: default
title: Disable Octoprint LCD menu
parent: Quicktips
has_children: false
permalink: /quicktips/disable-octoprint-lcd-menu
description: >-
Klipper is shipped with an Octoprint entry in the LCD menu. These menu points don't work with Mainsail.
---
# {{ page.title }}
{{ page.description }}
## Modify printer.cfg
Just add the following entry to your printer.cfg:
```yaml
[menu __main __octoprint]
type: disabled
```
@@ -0,0 +1,34 @@
---
layout: default
title: Hide macros, outputs or fans
parent: Quicktips
has_children: false
permalink: /quicktips/hide-gcode_macros
description: >-
As you probably already noticed, you can show and hide the gcode macros in the interface settings, but there is more...
---
# {{ page.title }}
{{ page.description }}
Did you know, that you can also hide gcode macros by prefixing the name with an underscore?
```yaml
[gcode_macro MY_AWESOME_GCODE]
gcode:
_MY_HELPER_CODE
```
```yaml
[gcode_macro _MY_HELPER_CODE]
gcode:
M300
```
`MY_AWESOME_GCODE` appears in your interface settings, `_MY_HELPER_CODE` not.
![](../assets/img/quicktips/hide-gcode_macros/my_awesome_macro.png)
By the way, this also works for other configuration sections like, **fans and outputs.**
{: .info}
+11
View File
@@ -0,0 +1,11 @@
---
layout: default
title: Quicktips
nav_order: 10
has_children: true
permalink: /quicktips
description: quick tips, without much explanation
---
# {{ page.title }}
{{ page.description }}
+31
View File
@@ -0,0 +1,31 @@
---
layout: default
title: Presets
parent: Quicktips
has_children: false
permalink: /quicktips/presets
description: >-
Mainsail supports so-called presets. They are often used for preheat & cooldown, but also execute normal gcode.
---
# {{ page.title }}
{{ page.description }}
## Setup
In Mainsails interface settings you will find a section called "Preheat Presets". There you can set your presets via "ADD PRESET" and the following dialog.
### Preheat
Enter a name \(e.g. name, color and type of filament\) and the temperatures obtained. You can disable individual heaters and even specify a custom gcode for the preheat phase.
![](../assets/img/quicktips/presets/preheat.png)
### Further Examples
#### Z-Offset
To quickly switch between different Z-offsets \(flexplates with smooth and textured surfaces\), you can create presets and deactivate the heaters.
As G-Code you simply enter `SET_GCODE_OFFSET Z=0.2`, of course with your determined offset.
![](../assets/img/quicktips/presets/gcodeoffset.png)
@@ -1,17 +1,19 @@
---
layout: default
title: Slicer upload
parent: Additional Support
nav_order: 1
permalink: /additional/slicer-upload
title: Slicer Upload
parent: Quicktips
permalink: /quicktips/slicer-upload
description: >-
It is possible to upload G-Code from your slicer and have it start printing.
---
## Upload from Slicer
# {{ page.title }}
{{ page.description }}
Moonraker has compatibility with Octoprint's legacy file upload API.
### 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.
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)
@@ -1,20 +1,27 @@
---
layout: default
title: Thumbnails
parent: Additional Support
nav_order: 1
permalink: /additional/thumbnails
parent: Quicktips
permalink: /quicktips/thumbnails
description: >-
Mainsail can display thumbnails in the file browser and as previews in the print status.
---
## Thumbnails
Mainsail can display thumbnails in the file browser and as previews in the print status.
# {{ page.title }}
{{ page.description }}
![preview](../assets/img/additional/large-preview.png)
### PrusaSlicer (since v2.3.0)
In "Expert" mode PrusaSlicer has an option in the "Printer Settings" tab to activate previews.
Under `General / Firmware`, enter `32x32,400x300` as "G-code thumbnails".
![SuperSlicer](../assets/img/additional/PrusaSlicer2.3.0-thumbnails.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.
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)
+33
View File
@@ -0,0 +1,33 @@
---
layout: default
title: Update Manager
parent: Quicktips
has_children: false
permalink: /quicktips/update-manager
description: >-
Perform updates of Mainsail, Klipper, Moonraker and your system from within Mainsail.
---
# {{ page.title }}
{{ page.description }}
## Moonraker.conf
Add the following section to your printers moonraker.conf:
```yaml
[update_manager]
[update_manager client mainsail]
type: web
repo: meteyou/mainsail
path: ~/mainsail
```
Once you have restarted the moonraker service, the Update Manager will appear in Mainsails machine settings.
![](../assets/img/quicktips/update-manager/update-manager.png)
You can find further information on this topic by checking out the [Moonraker documentation](https://github.com/Arksine/moonraker/blob/master/docs/configuration.md#update_manager){:target="_blank"}.
{: .info}
+5 -1
View File
@@ -4,7 +4,11 @@ title: Remote Mode
nav_order: 4
has_children: false
permalink: /remotemode
description: >-
description in progress
---
## Remote Mode
# {{ page.title }}
{{ page.description }}
The description will follow soon.
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "mainsail",
"version": "1.1.0",
"version": "1.2.0",
"private": true,
"scripts": {
"serve": "vue-cli-service serve",
+9 -5
View File
@@ -35,6 +35,7 @@
:value="true"
>
<router-link
style="position: relative;"
slot="activator" class="nav-link" exact :to="category.path" @click.prevent
v-if="
(category.title === 'Webcam' && boolNaviWebcam) ||
@@ -45,12 +46,16 @@
)
">
<v-icon>mdi-{{ category.icon }}</v-icon>
<v-badge
dot
<v-icon
small
color="warning"
style="top: -9px; left: -16px;"
style="
top: 11px;
left: 32px;
position: absolute;
"
v-if="category.title === 'Settings' && isUpdateAvailable"
></v-badge>
>mdi-progress-upload</v-icon>
<span class="nav-title">
{{ category.title }}
</span>
@@ -193,7 +198,6 @@ export default {
...mapGetters([
'getTitle',
'getVersion',
'server/updateManager/isUpdateAvailable',
]),
print_percent: {
get() {
+2 -2
View File
@@ -8,7 +8,7 @@
<v-toolbar flat dense color="primary">
<v-toolbar-title>
<span class="subheading">
<v-icon class="mdi mdi-connection" left></v-icon>Connecting<span v-if="connectingFailed"> failed</span><span v-if="isConnecting"> to {{ parseInt(port) !== 80 ? hostname+":"+port : hostname }}</span>
<v-icon class="mdi mdi-connection" left></v-icon>Connecting<span v-if="connectingFailed"> failed</span><span v-if="isConnecting"> to {{ parseInt(port) !== 80 && port !== "" ? hostname+":"+port : hostname }}</span>
</span>
</v-toolbar-title>
</v-toolbar>
@@ -16,7 +16,7 @@
<v-progress-linear color="white" indeterminate></v-progress-linear>
</v-card-text>
<v-card-text class="pt-5" v-if="!isConnecting && connectingFailed">
<p>Cannot not connect to {{ parseInt(port) !== 80 ? hostname+":"+port : hostname }}.</p>
<p>Cannot not connect to {{ parseInt(port) !== 80 && port !== "" ? hostname+":"+port : hostname }}.</p>
<div class="text-center">
<v-btn @click="reconnect" color="primary">try again</v-btn>
</div>
+2 -1
View File
@@ -31,7 +31,7 @@
<div v-if="countPowerDevices">
<v-divider class="mt-0"></v-divider>
<v-subheader class="pt-2" style="height: auto;">Power Devices</v-subheader>
<v-list-item v-for="(device, index) in devices" v-bind:key="index" class="minheight30" @click="changeSwitch(device, device.status)" :disabled="(device.status === 'error')">
<v-list-item v-for="(device, index) in devices" v-bind:key="index" class="minheight30" @click="changeSwitch(device, device.status)" :disabled="(device.status === 'error' || device.locked_while_printing && ['printing', 'paused'].includes(printer_state))">
<v-list-item-title>
<v-icon class="mr-2" :color="device.status === 'on' ? '' : 'grey darken-2'">mdi-{{ device.status === 'on' ? 'toggle-switch' : 'toggle-switch-off' }}</v-icon>{{ device.device }}
</v-list-item-title>
@@ -62,6 +62,7 @@ export default {
},
computed: {
...mapState({
printer_state: state => state.printer.print_stats.state,
devices: (state) => state.server.power.devices,
}),
countPowerDevices: {
+5
View File
@@ -62,6 +62,11 @@ export default {
if (datasetPower) {
output += " at "+datasetPower.dataPoint.y.toFixed(0)+"%"
}
const datasetSpeed = e.entries.find(datasetPower => datasetPower.dataSeries.name === dataset.dataSeries.name+"_speed")
if (datasetSpeed) {
output += " at "+datasetSpeed.dataPoint.y.toFixed(0)+"%"
}
})
}
+36 -23
View File
@@ -22,39 +22,27 @@
<v-row no-gutters class="mt-3" v-if="['standby', 'paused', 'complete', 'error'].includes(printer_state)">
<v-col class="text-center">
<v-btn-toggle dense no-gutters class="row no-gutters 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="doSendMove('X-'+steps, feedrateXY)" class="btnMinWidthAuto col" v-for="steps of stepsXYsorted" v-bind:key="'x-'+steps"><span class="body-2">-{{ steps }}</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 @click="doSendMove('X+'+steps, feedrateXY)" class="btnMinWidthAuto col" v-for="steps of stepsXYsortedReverse" v-bind:key="'x+'+steps"><span class="body-2">+{{ steps }}</span></v-btn>
</v-btn-toggle>
</v-col>
</v-row>
<v-row no-gutters class="mt-3" v-if="['standby', 'paused', 'complete', 'error'].includes(printer_state)">
<v-col class="text-center">
<v-btn-toggle dense no-gutters class="row no-gutters 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="doSendMove('Y-'+steps, feedrateXY)" class="btnMinWidthAuto col" v-for="steps of stepsXYsorted" v-bind:key="'y-'+steps"><span class="body-2">-{{ steps }}</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 @click="doSendMove('Y+'+steps, feedrateXY)" class="btnMinWidthAuto col" v-for="steps of stepsXYsortedReverse" v-bind:key="'y+'+steps"><span class="body-2">+{{ steps }}</span></v-btn>
</v-btn-toggle>
</v-col>
</v-row>
<v-row no-gutters class="mt-3" v-if="['standby', 'paused', 'complete', 'error'].includes(printer_state)">
<v-col class="text-center">
<v-btn-toggle dense no-gutters class="row no-gutters 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="doSendMove('Z-'+steps, feedrateZ)" class="btnMinWidthAuto col" v-for="steps of stepsZsorted" v-bind:key="'z-'+steps"><span class="body-2">-{{ steps }}</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 @click="doSendMove('Z+'+steps, feedrateZ)" class="btnMinWidthAuto col" v-for="steps of stepsZsortedReverse" v-bind:key="'z+'+steps"><span class="body-2">+{{ steps }}</span></v-btn>
</v-btn-toggle>
</v-col>
</v-row>
@@ -85,11 +73,36 @@
homedAxes: state => state.printer.toolhead.homed_axes,
config: state => state.printer.configfile.config,
loadings: state => state.socket.loadings,
printer_state: state => state.printer.print_stats.state
printer_state: state => state.printer.print_stats.state,
feedrateXY: state => state.gui.dashboard.control.feedrateXY,
stepsXY: state => state.gui.dashboard.control.stepsXY,
feedrateZ: state => state.gui.dashboard.control.feedrateZ,
stepsZ: state => state.gui.dashboard.control.stepsZ,
}),
...mapGetters([
'printer/getMacros',
])
]),
stepsXYsorted: {
get() {
return [...this.$store.state.gui.dashboard.control.stepsXY].sort(function(a, b) { return b-a })
}
},
stepsXYsortedReverse: {
get() {
return [...this.$store.state.gui.dashboard.control.stepsXY].sort(function(a, b) { return a-b })
}
},
stepsZsorted: {
get() {
return [...this.$store.state.gui.dashboard.control.stepsZ].sort(function(a, b) { return b-a })
}
},
stepsZsortedReverse: {
get() {
return [...this.$store.state.gui.dashboard.control.stepsZ].sort(function(a, b) { return a-b })
}
}
},
methods: {
doHome() {
@@ -122,9 +135,9 @@
this.$store.commit('socket/addLoading', { name: 'zTilt' });
this.$socket.sendObj('printer.gcode.script', { script: "Z_TILT_ADJUST" }, "socket/removeLoading", { name: 'zTilt' });
},
doSendMove(gcode) {
doSendMove(gcode, feedrate) {
gcode = "G91" + "\n" +
"G1 " + gcode + " F6000" + "\n" +
"G1 " + gcode + " F"+feedrate*60 + "\n" +
"G90";
this.doSend(gcode);
@@ -138,6 +151,6 @@
this.$store.commit('socket/addLoading', { name: 'macro_'+gcode });
Vue.prototype.$socket.sendObj('printer.gcode.script', { script: gcode }, "socket/removeLoading", { name: 'macro_'+gcode });
},
}
},
}
</script>
+16 -5
View File
@@ -9,13 +9,13 @@
<v-col class="col col-md-6">
<v-label>Feed amount in mm:</v-label>
<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 v-for="amount in feedamountsSorted" 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 col-md-6">
<v-label>Feedrate in mm/s:</v-label>
<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 v-for="rate in feedratesSorted" 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>
@@ -41,8 +41,6 @@
return {
feedAmount: 25,
feedrate: 5,
feedAmounts: [ 100, 25, 10, 5, 1 ],
feedrates: [ 60, 30, 15, 5, 1 ],
}
},
computed: {
@@ -50,11 +48,24 @@
loadings: state => state.socket.loadings,
printer_state: state => state.printer.print_stats.state,
extruder: state => state.printer.extruder,
config: state => state.printer.configfile.config
config: state => state.printer.configfile.config,
feedamounts: state => state.gui.dashboard.extruder.feedamounts,
feedrates: state => state.gui.dashboard.extruder.feedrates,
}),
...mapGetters([
'printer/getExtrudePossible',
]),
feedamountsSorted: {
get() {
return [...this.feedamounts].sort((a,b) => { return b-a })
}
},
feedratesSorted: {
get() {
return [...this.feedrates].sort((a,b) => { return b-a })
}
}
},
methods: {
setFeedAmount(value) {
@@ -133,7 +133,9 @@
<v-spacer></v-spacer>
<v-toolbar-items>
<v-btn dark text href="https://www.klipper3d.org/Config_Reference.html" target="_blank" class="d-none d-md-flex"><v-icon small class="mr-1">mdi-help</v-icon>Config Reference</v-btn>
<v-divider white vertical v-if="currentPath !== '/config_examples'" class="d-none d-md-flex"></v-divider>
<v-btn dark text @click="saveFile(false)" v-if="currentPath !== '/config_examples'"><v-icon small class="mr-1">mdi-content-save</v-icon><span class="d-none d-sm-inline">Save</span></v-btn>
<v-divider white vertical v-if="currentPath !== '/config_examples' && !['printing', 'paused'].includes(printer_state)" class="d-none d-sm-flex"></v-divider>
<v-btn dark text @click="saveFile(true)" v-if="currentPath !== '/config_examples' && !['printing', 'paused'].includes(printer_state)" class="d-none d-sm-flex"><v-icon small class="mr-1">mdi-restart</v-icon>Save & restart</v-btn>
</v-toolbar-items>
</v-toolbar>
@@ -0,0 +1,221 @@
<style>
</style>
<template>
<v-form ref="formControlExtruder">
<v-card>
<v-toolbar flat dense >
<v-toolbar-title>
<span class="subheading"><v-icon left>mdi-tune</v-icon>Control</span>
</v-toolbar-title>
</v-toolbar>
<v-card-text class="pa-0">
<v-container>
<v-row>
<v-col col-6>
<v-text-field
label="Speed XY"
v-model="feedrateXY"
@blur="blurFeedrateXY"
type="number"
suffix="mm/s"
hide-details="auto"
:rules="[
v => v > 0 || 'Minimum speed is 1'
]"
></v-text-field>
</v-col>
<v-col col-6>
<v-text-field
label="Speed Z"
v-model="feedrateZ"
@blur="blurFeedrateZ"
type="number"
suffix="mm/s"
hide-details="auto"
ref="feedrateZ"
:rules="[
v => v > 1 || 'Minimum speed is 1'
]"
></v-text-field>
</v-col>
</v-row>
<v-row>
<v-col>
<v-combobox
label="Move distances XY in mm"
v-model="stepsXY"
hide-selected
hide-details="auto"
multiple
small-chips
:deletable-chips="true"
append-icon=""
type="number"
:rules="[
v => v.length > 0 || 'Minimum 1 value',
v => v.length < 4 || 'For narrow screens it is recommended to enter max. 3 values.',
]"
></v-combobox>
</v-col>
</v-row>
<v-row>
<v-col>
<v-combobox
label="Move distances Z in mm"
v-model="stepsZ"
hide-selected
hide-details="auto"
multiple
small-chips
:deletable-chips="true"
append-icon=""
type="number"
:rules="[
v => v.length > 0 || 'Minimum 1 value',
v => v.length < 4 || 'For narrow screens it is recommended to enter max. 3 values.',
]"
></v-combobox>
</v-col>
</v-row>
</v-container>
</v-card-text>
</v-card>
<v-card class="mt-6">
<v-toolbar flat dense >
<v-toolbar-title>
<span class="subheading"><v-icon left>mdi-tune</v-icon>Extruder</span>
</v-toolbar-title>
</v-toolbar>
<v-card-text class="pa-0">
<v-container>
<v-row>
<v-col>
<v-combobox
label="Move distances E in mm"
v-model="feedamountsE"
hide-selected
hide-details="auto"
multiple
small-chips
:deletable-chips="true"
append-icon=""
type="number"
:rules="[
v => v.length > 0 || 'Minimum 1 value',
v => v.length < 6 || 'For narrow screens it is recommended to enter max. 5 values.',
]"
></v-combobox>
</v-col>
</v-row>
<v-row>
<v-col>
<v-combobox
label="Speed E in mm/s"
v-model="feedratesE"
hide-selected
hide-details="auto"
multiple
small-chips
:deletable-chips="true"
append-icon=""
type="number"
:rules="[
v => v.length > 0 || 'Minimum 1 value',
v => v.length < 6 || 'For narrow screens it is recommended to enter max. 5 values.',
]"
></v-combobox>
</v-col>
</v-row>
</v-container>
</v-card-text>
</v-card>
</v-form>
</template>
<script>
export default {
components: {
},
data: function() {
return {
}
},
computed: {
feedrateXY: {
get() {
return this.$store.state.gui.dashboard.control.feedrateXY
},
set(feedrate) {
return this.$store.dispatch('gui/setSettings', { dashboard: { control: { feedrateXY: feedrate } } })
}
},
stepsXY: {
get() {
const steps = this.$store.state.gui.dashboard.control.stepsXY
return steps.sort(function (a,b) { return b-a })
},
set(steps) {
const absSteps = []
for(const value of steps) absSteps.push(Math.abs(value))
return this.$store.dispatch('gui/setSettings', { dashboard: { control: { stepsXY: absSteps } } })
}
},
feedrateZ: {
get() {
return this.$store.state.gui.dashboard.control.feedrateZ
},
set(value) {
return this.$store.dispatch('gui/setSettings', { dashboard: { control: { feedrateZ: value } } })
}
},
stepsZ: {
get() {
const steps = this.$store.state.gui.dashboard.control.stepsZ
return steps.sort(function (a,b) { return b-a })
},
set(steps) {
const absSteps = []
for(const value of steps) absSteps.push(Math.abs(value))
return this.$store.dispatch('gui/setSettings', { dashboard: { control: { stepsZ: absSteps } } })
}
},
feedamountsE: {
get() {
const steps = this.$store.state.gui.dashboard.extruder.feedamounts
return steps.sort(function (a,b) { return b-a })
},
set(amounts) {
const absAmounts = []
for(const value of amounts) absAmounts.push(Math.abs(value))
return this.$store.dispatch('gui/setSettings', { dashboard: { extruder: { feedamounts: absAmounts } } })
}
},
feedratesE: {
get() {
const steps = this.$store.state.gui.dashboard.extruder.feedrates
return steps.sort(function (a,b) { return b-a })
},
set(rates) {
const absRates = []
for(const value of rates) absRates.push(Math.abs(value))
return this.$store.dispatch('gui/setSettings', { dashboard: { extruder: { feedrates: absRates } } })
}
},
},
mounted() {
this.$refs.formControlExtruder.validate()
},
methods: {
blurFeedrateXY() {
if (!(this.feedrateXY > 0)) this.feedrateXY = 100
},
blurFeedrateZ() {
if (!(this.feedrateZ > 0)) this.feedrateZ = 25
}
}
}
</script>
@@ -278,7 +278,32 @@
this.dialog.name = preset.name
this.dialog.index = preset.index
this.dialog.gcode = preset.gcode
this.dialog.values = {...preset.values}
this.dialog.values = {}
for(const heater of this["printer/getHeaters"]) {
if (heater.name in preset.values) {
this.dialog.values[heater.name] = {...preset.values[heater.name]}
} else {
this.dialog.values[heater.name] = {
bool: false,
value: 0,
type: 'heater',
}
}
}
for(const fan of this["printer/getTemperatureFans"]) {
if ('temperature_fan '+fan.name in preset.values) {
this.dialog.values['temperature_fan '+fan.name] = {...preset.values['temperature_fan '+fan.name]}
} else {
this.dialog.values['temperature_fan '+fan.name] = {
bool: false,
value: 0,
type: 'temperature_fan',
}
}
}
this.dialog.bool = true
},
savePreset() {
+18 -7
View File
@@ -18,11 +18,11 @@
<div v-for="(value, key) of updateableSoftwares" v-bind:key="key">
<v-divider class="my-0" ></v-divider>
<v-row class="py-2">
<v-col class="pl-6 text-no-wrap">
<v-col class="pl-6">
{{ 'name' in value ? value.name : key }}<br />
{{ getVersionOutput(value) }}
</v-col>
<v-col class="pr-6 text-right">
<v-col class="col-auto pr-6 text-right" align-self="center">
<v-chip
small
label
@@ -30,7 +30,7 @@
:color="getBtnColor(value)"
@click="updateModule(key)"
:disabled="getBtnDisabled(value)"
class="minwidth-0 mt-3 px-2 text-uppercase"
class="minwidth-0 px-2 text-uppercase"
><v-icon small class="mr-1">mdi-{{ getBtnIcon(value) }}</v-icon>{{ getBtnText(value) }}</v-chip>
</v-col>
</v-row>
@@ -38,7 +38,7 @@
<div v-if="'system' in version_info">
<v-divider class="my-0 border-top-2" ></v-divider>
<v-row class="pt-2">
<v-col class="pl-6 text-no-wrap">
<v-col class="col-auto pl-6 text-no-wrap">
<strong>System</strong><br />
<v-tooltip top v-if="version_info.system.package_count > 0" :max-width="300">
<template v-slot:activator="{ on, attrs }">
@@ -48,7 +48,7 @@
</v-tooltip>
<span v-if="version_info.system.package_count === 0">OS-Packages</span>
</v-col>
<v-col class="pr-6 text-right">
<v-col class="pr-6 text-right" align-self="center">
<v-chip
small
label
@@ -56,7 +56,7 @@
:color="version_info.system.package_count ? 'primary' : 'green'"
:disabled="!(version_info.system.package_count) || printer_state === 'printing'"
@click="updateSystem"
class="minwidth-0 mt-3 px-2 text-uppercase"
class="minwidth-0 px-2 text-uppercase"
><v-icon small class="mr-1">mdi-{{ version_info.system.package_count ? 'progress-upload' : 'check' }}</v-icon>{{ version_info.system.package_count ? 'upgrade' : 'up-to-date' }}</v-chip>
</v-col>
</v-row>
@@ -151,7 +151,18 @@
const local_version = 'version' in object ? object.version : '?'
const remote_version = 'remote_version' in object ? object.remote_version : '?'
return local_version !== remote_version ? local_version+" > "+remote_version : local_version
let output = ""
if ('remote_alias' in object && object.remote_alias !== "origin") output += object.remote_alias
if ('branch' in object && object.branch !== "master") {
if (output !== "") output += "/"
output += object.branch
}
if (output !== "") output += ": "
output += local_version !== remote_version ? local_version+" > "+remote_version : local_version
return output
},
updateModule(key) {
if (["klipper", "moonraker"].includes(key)) this.$socket.sendObj('machine.update.'+key, { })
+2
View File
@@ -1,6 +1,7 @@
import Vue from 'vue'
import GeneralPanel from './GeneralPanel'
import ControlPanel from './ControlPanel'
import WebcamPanel from './WebcamPanel'
import DashboardPanel from "./DashboardPanel";
import ConsolePanel from "./ConsolePanel";
@@ -15,6 +16,7 @@ import RemotePrintersPanel from "./RemotePrintersPanel";
import PresetsPanel from "./PresetsPanel";
Vue.component('settings-general-panel', GeneralPanel);
Vue.component('settings-control-panel', ControlPanel);
Vue.component('settings-webcam-panel', WebcamPanel);
Vue.component('settings-dashboard-panel', DashboardPanel);
Vue.component('settings-console-panel', ConsolePanel);
+50 -26
View File
@@ -128,7 +128,7 @@
</template>
<span>min: {{ sensor.measured_min_temp ? sensor.measured_min_temp.toFixed(1) : 0}}°<br />max: {{ sensor.measured_max_temp ? sensor.measured_max_temp.toFixed(1) : 0 }}°</span>
</v-tooltip>
<span v-for="(values, key) of sensor.additionValues" v-bind:key="key" class="d-block">{{ values.value.toFixed(1) }} {{ values.unit }}</span>
<span v-for="(values, key) of sensor.tempListAdditionValues" v-bind:key="key" class="d-block">{{ values.value.toFixed(1) }} {{ values.unit }}</span>
</v-col>
<v-col class="text-center py-2 pr-8 vertical_align_center"><span>&nbsp;</span></v-col>
</v-row>
@@ -156,39 +156,58 @@
</v-toolbar>
<v-card-text class="pt-3">
<v-container class="px-0 py-0">
<v-row>
<v-row v-if="'chartTemperature' in editHeater.object && editHeater.object.chartTemperature">
<v-col class="col-12">
<v-checkbox
v-model="editHeater.boolTemperature"
label="Show current temperature in chart"
hide-details
class="mt-0"
v-if="'chartTemperature' in editHeater.object && editHeater.object.chartTemperature"
@change="setVisibleTemperature"
@change="setVisible('temperature')"
></v-checkbox>
</v-col>
</v-row>
<v-row>
<v-row v-if="'chartTarget' in editHeater.object && editHeater.object.chartTarget">
<v-col class="col-12">
<v-checkbox
v-model="editHeater.boolTarget"
label="Show target temperature in chart"
hide-details
class="mt-0"
v-if="'chartTarget' in editHeater.object && editHeater.object.chartTarget"
@change="setVisibleTarget"
@change="setVisible('target')"
></v-checkbox>
</v-col>
</v-row>
<v-row>
<v-row v-if="'chartPower' in editHeater.object && editHeater.object.chartPower">
<v-col class="col-12">
<v-checkbox
v-model="editHeater.boolPower"
label="Show PWM-power in chart"
hide-details
class="mt-0"
v-if="'chartPower' in editHeater.object && editHeater.object.chartPower"
@change="setVisiblePower"
@change="setVisible('power')"
></v-checkbox>
</v-col>
</v-row>
<v-row v-if="'chartSpeed' in editHeater.object && editHeater.object.chartSpeed">
<v-col class="col-12">
<v-checkbox
v-model="editHeater.boolSpeed"
label="Show PWM-power in chart"
hide-details
class="mt-0"
@change="setVisible('speed')"
></v-checkbox>
</v-col>
</v-row>
<v-row v-for="key in Object.keys(editHeater.additionSensors)" v-bind:key="key">
<v-col class="col-12">
<v-checkbox
v-model="editHeater.additionSensors[key]"
:label="'Show '+key+' in list'"
hide-details
class="mt-0"
@change="setVisibleAdditionalSensor(key)"
></v-checkbox>
</v-col>
</v-row>
@@ -230,6 +249,8 @@
boolTemperature: false,
boolTarget: false,
boolPower: false,
boolSpeed: false,
additionSensors: {},
color: "",
}
}
@@ -303,8 +324,10 @@
}
if (preset.gcode !== "") {
this.$store.commit('server/addEvent', { message: preset.gcode, type: 'command' })
this.$socket.sendObj('printer.gcode.script', { script: preset.gcode })
setTimeout(() => {
this.$store.commit('server/addEvent', { message: preset.gcode, type: 'command' })
this.$socket.sendObj('printer.gcode.script', { script: preset.gcode })
}, 100)
}
},
cooldown() {
@@ -318,29 +341,30 @@
this.editHeater.boolTemperature = 'chartTemperature' in object && object.chartTemperature !== undefined && 'visible' in object.chartTemperature ? object.chartTemperature.visible : false
this.editHeater.boolTarget = 'chartTarget' in object && object.chartTarget !== undefined && 'visible' in object.chartTarget ? object.chartTarget.visible : false
this.editHeater.boolPower = 'chartPower' in object && object.chartPower !== undefined && 'visible' in object.chartPower ? object.chartPower.visible : false
this.editHeater.boolSpeed = 'chartSpeed' in object && object.chartSpeed !== undefined && 'visible' in object.chartSpeed ? object.chartSpeed.visible : false
let additionalSensors = {}
Object.keys(object.additionValues).forEach(sensor => {
additionalSensors[sensor] = object.additionValues[sensor]['gui']['boolList']
})
this.editHeater.additionSensors = Object.assign(additionalSensors)
this.editHeater.bool = true
},
setVisibleTemperature() {
if ("name" in this.editHeater.object) {
this.$store.commit('printer/tempHistory/setVisible', { name: this.editHeater.object.name, type: 'temperature', value: this.editHeater.boolTemperature })
this.$store.dispatch('gui/setTempchartDatasetSetting', { name: this.editHeater.object.name, type: 'temperature', value: this.editHeater.boolTemperature })
}
setVisible(type) {
if ("name" in this.editHeater.object) {
this.$store.commit('printer/tempHistory/setVisible', { name: this.editHeater.object.name, type: type, value: this.editHeater['bool'+type.charAt(0).toUpperCase() + type.slice(1)] })
this.$store.dispatch('gui/setTempchartDatasetSetting', { name: this.editHeater.object.name, type: type, value: this.editHeater['bool'+type.charAt(0).toUpperCase() + type.slice(1)] })
}
},
setVisibleTarget() {
setVisibleAdditionalSensor(sensor) {
if ("name" in this.editHeater.object) {
this.$store.commit('printer/tempHistory/setVisible', { name: this.editHeater.object.name, type: 'target', value: this.editHeater.boolTarget })
this.$store.dispatch('gui/setTempchartDatasetSetting', { name: this.editHeater.object.name, type: 'target', value: this.editHeater.boolTarget })
}
},
setVisiblePower() {
if ("name" in this.editHeater.object) {
this.$store.commit('printer/tempHistory/setVisible', { name: this.editHeater.object.name, type: 'power', value: this.editHeater.boolPower })
this.$store.dispatch('gui/setTempchartDatasetSetting', { name: this.editHeater.object.name, type: 'power', value: this.editHeater.boolPower })
this.$store.dispatch('gui/setTempchartDatasetAdditionalSensorSetting', { name: this.editHeater.object.name, sensor: sensor, value: this.editHeater.additionSensors[sensor] })
}
},
setChartColor(value) {
if ("name" in this.editHeater.object) {
if (typeof value === "object" && 'hex' in value) value = value.hex
this.$store.commit('printer/tempHistory/setColor', { name: this.editHeater.object.name, value: value })
this.$store.dispatch('gui/setTempchartDatasetSetting', { name: this.editHeater.object.name, type: 'color', value: value })
}
+5 -2
View File
@@ -38,8 +38,11 @@
'webcamConfig': state => state.gui.webcam
}),
url() {
const params = new URLSearchParams(this.webcamConfig.url);
params.set('bypassCache', ""+this.refresh);
let basicUrl = this.webcamConfig.url
if (basicUrl && basicUrl.indexOf("?") === -1) basicUrl += "?"
const params = new URLSearchParams(basicUrl)
params.set('bypassCache', ""+this.refresh)
return decodeURIComponent(params.toString())
},
webcamStyle() {
+54 -1
View File
@@ -74,7 +74,21 @@
</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-subtitle>
Current path: {{ this.currentPath !== 'gcodes' ? "/"+this.currentPath.substring(7) : "/" }}<br />
<div v-if="this.disk_usage !== null">
<v-tooltip top>
<template v-slot:activator="{ on, attrs }">
<span v-bind="attrs" v-on="on">Free disk: {{ formatFilesize(disk_usage.free) }}</span>
</template>
<span>
Used: {{ formatFilesize(this.disk_usage.used) }}<br />
Free: {{ formatFilesize(this.disk_usage.free) }}<br />
Total: {{ formatFilesize(this.disk_usage.total) }}
</span>
</v-tooltip>
</div>
</v-card-subtitle>
<v-card-text>
<v-text-field
v-model="search"
@@ -153,6 +167,7 @@
<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-footer>bla bla</v-data-footer>
</v-data-table>
<div class="dragzone" :style="'visibility: '+dropzone.visibility+'; opacity: '+dropzone.hidden">
<div class="textnode">Drop files to add gcode.</div>
@@ -163,6 +178,18 @@
<v-list-item @click="clickRow(contextMenu.item)" :disabled="is_printing" v-if="!contextMenu.item.isDirectory">
<v-icon class="mr-1">mdi-play</v-icon> Print start
</v-list-item>
<v-list-item
@click="preheat"
v-if="
'first_layer_extr_temp' in contextMenu.item &&
contextMenu.item.first_layer_extr_temp > 0 &&
'first_layer_bed_temp' in contextMenu.item &&
contextMenu.item.first_layer_bed_temp > 0
"
:disabled="['error', 'printing', 'paused'].includes(printer_state)"
>
<v-icon class="mr-1">mdi-fire</v-icon> Preheat
</v-list-item>
<v-list-item @click="downloadFile" v-if="!contextMenu.item.isDirectory">
<v-icon class="mr-1">mdi-cloud-download</v-icon> Download
</v-list-item>
@@ -350,6 +377,7 @@
hostname: state => state.socket.hostname,
port: state => state.socket.port,
loadings: state => state.socket.loadings,
printer_state: state => state.printer.print_stats.state,
displayMetadata: state => state.gui.gcodefiles.showMetadata,
}),
@@ -386,6 +414,11 @@
return this.$store.dispatch("gui/setSettings", { gcodefiles: { hideMetadataColums: newVal } })
}
},
disk_usage: {
get: function() {
return this.$store.getters["files/getDiskUsage"](this.currentPath)
}
}
},
created() {
this.loadPath()
@@ -519,6 +552,26 @@
this.contextMenu.item = item
this.$nextTick(() => { this.contextMenu.shown = true })
},
preheat() {
if (
'first_layer_extr_temp' in this.contextMenu.item &&
'first_layer_bed_temp' in this.contextMenu.item &&
!['error', 'printing', 'paused'].includes(this.printer_state)
) {
let gcode = ""
if (this.contextMenu.item.first_layer_extr_temp > 0) {
gcode = "M104 S"+this.contextMenu.item.first_layer_extr_temp
this.$store.commit('server/addEvent', { message: gcode, type: 'command' })
this.$socket.sendObj('printer.gcode.script', { script: gcode })
}
if (this.contextMenu.item.first_layer_bed_temp > 0) {
gcode = "M140 S"+this.contextMenu.item.first_layer_bed_temp
this.$store.commit('server/addEvent', { message: gcode, type: 'command' })
this.$socket.sendObj('printer.gcode.script', { script: gcode })
}
}
},
downloadFile() {
let filename = (this.currentPath+"/"+this.contextMenu.item.filename);
let link = document.createElement("a");
+1
View File
@@ -13,6 +13,7 @@
<v-col class="col-12 col-md-6 col-lg-4">
<settings-presets-panel></settings-presets-panel>
<settings-remote-printers-panel class="mt-6"></settings-remote-printers-panel>
<settings-control-panel class="mt-6"></settings-control-panel>
</v-col>
</v-row>
</div>
+9
View File
@@ -7,6 +7,15 @@ export default {
getDirectory({ commit }, payload) {
commit('setDirectory', payload)
if (
'requestParams' in payload &&
'path' in payload.requestParams &&
'disk_usage' in payload
) commit('setDiskUsage', {
disk_usage: payload.disk_usage,
path: payload.requestParams.path
})
},
getMetadata({ commit, rootState }, payload) {
+13
View File
@@ -60,4 +60,17 @@ export default {
return [favicon16Default, favicon32Default]
},
getDiskUsage: (state) => (path) => {
if (path.indexOf('/') !== -1) path = path.substr(0, path.indexOf('/'))
const dir = state.filetree.find(dir => dir.filename === path)
if (dir && 'disk_usage' in dir) return dir.disk_usage
return {
free: 0,
total: 0,
used: 0,
}
}
}
+8 -4
View File
@@ -9,25 +9,29 @@ export function getDefaultState() {
isDirectory: true,
filename: 'gcodes',
modified: new Date(),
childrens: []
childrens: [],
disk_usage: {}
},
{
isDirectory: true,
filename: 'config_examples',
modified: new Date(),
childrens: []
childrens: [],
disk_usage: {}
},
{
isDirectory: true,
filename: 'config',
modified: new Date(),
childrens: []
childrens: [],
disk_usage: {}
},
{
isDirectory: true,
filename: 'docs',
modified: new Date(),
childrens: []
childrens: [],
disk_usage: {}
}
],
}
+8
View File
@@ -162,4 +162,12 @@ export default {
if (index >= 0 && currentPath[index]) currentPath.splice(index, 1);
},
setDiskUsage(state, payload) {
let path = payload.path
if (path.indexOf('/') !== -1) path = path.substr(0, path.indexOf('/'))
const dir = state.filetree.find(dir => dir.filename === path)
if (dir && 'disk_usage' in dir) Vue.set(dir, "disk_usage", payload.disk_usage)
}
}
+22 -2
View File
@@ -5,8 +5,23 @@ export default {
commit('reset')
},
getData({ commit }, payload) {
getData({ commit, dispatch }, payload) {
commit('setData', payload)
if (
'state' in payload &&
'tempchart' in payload.state &&
'datasetSettings' in payload.state.tempchart
) {
for (const key of Object.keys(payload.state.tempchart.datasetSettings)) {
if (
'color' in payload.state.tempchart.datasetSettings[key] &&
typeof payload.state.tempchart.datasetSettings[key].color === "object"
) {
dispatch('setTempchartDatasetSetting', { name: key, type: 'color', value: payload.state.tempchart.datasetSettings[key].color.hex })
}
}
}
},
setSettings({ commit, dispatch }, payload) {
@@ -21,7 +36,7 @@ export default {
},
upload({ state, rootState }) {
let file = new File([JSON.stringify({ state })], '.mainsail.json');
let file = new File([JSON.stringify({ state })], '.mainsail.json')
let formData = new FormData();
formData.append('file', file);
@@ -66,5 +81,10 @@ export default {
setTempchartDatasetSetting({ commit, dispatch }, payload) {
commit("setTempchartDatasetSetting", payload)
dispatch("upload")
},
setTempchartDatasetAdditionalSensorSetting({ commit, dispatch }, payload) {
commit("setTempchartDatasetAdditionalSensorSetting", payload)
dispatch("upload")
}
}
+12
View File
@@ -23,6 +23,18 @@ export default {
return false
},
getDatasetAdditionalSensorValue: (state) => (payload) => {
if (
payload.name in state.tempchart.datasetSettings &&
'additionalSensors' in state.tempchart.datasetSettings[payload.name] &&
payload.sensor in state.tempchart.datasetSettings[payload.name]['additionalSensors']
) return state.tempchart.datasetSettings[payload.name]['additionalSensors'][payload.sensor]
return {
'boolList': true
}
},
getPresetsFromHeater: state => (payload) => {
const output = []
+10
View File
@@ -13,6 +13,16 @@ export function getDefaultState() {
boolConsole: true,
hiddenMacros: [],
hiddenTempChart: [],
control: {
feedrateXY: 100,
stepsXY: [ 100, 10, 1 ],
feedrateZ: 25,
stepsZ: [ 25, 1, 0.1 ],
},
extruder: {
feedamounts: [ 50, 25, 10, 5, 1 ],
feedrates: [ 60, 30, 15, 5, 1 ],
}
},
webcam: {
url: "",
+13
View File
@@ -72,5 +72,18 @@ export default {
Vue.set(state.tempchart.datasetSettings, payload.name, {})
Vue.set(state.tempchart.datasetSettings[payload.name], payload.type, payload.value)
},
setTempchartDatasetAdditionalSensorSetting(state, payload) {
if (!(payload.name in state.tempchart.datasetSettings))
Vue.set(state.tempchart.datasetSettings, payload.name, {})
if (!('additionalSensors' in state.tempchart.datasetSettings[payload.name]))
Vue.set(state.tempchart.datasetSettings[payload.name], 'additionalSensors', {})
if (!(payload.sensor in state.tempchart.datasetSettings[payload.name]['additionalSensors']))
Vue.set(state.tempchart.datasetSettings[payload.name]['additionalSensors'], payload.sensor, {})
Vue.set(state.tempchart.datasetSettings[payload.name]['additionalSensors'][payload.sensor], 'boolList', payload.value)
}
}
+50 -1
View File
@@ -79,12 +79,14 @@ export default {
target: value.target,
temperature: value.temperature,
additionValues: getters.getAdditionSensors(nameSplit[1]),
tempListAdditionValues: getters.getTempListAdditionSensors(nameSplit[1]),
power: 'power' in value ? value.power : null,
presets: rootGetters["gui/getPresetsFromHeater"]({ name: key }),
chartColor: getters["tempHistory/getDatasetColor"](name),
chartTemperature: getters["tempHistory/getDataset"](name),
chartTarget: getters["tempHistory/getDataset"](name+"_target"),
chartPower: getters["tempHistory/getDataset"](name+'_power'),
chartSpeed: getters["tempHistory/getDataset"](name+'_speed'),
min_temp: state.configfile.config[key] !== undefined ? parseFloat(state.configfile.config[key].min_temp) : undefined,
max_temp: state.configfile.config[key] !== undefined ? parseFloat(state.configfile.config[key].max_temp) : undefined,
});
@@ -107,12 +109,14 @@ export default {
target: value.target,
temperature: value.temperature,
additionValues: getters.getAdditionSensors(nameSplit[1]),
tempListAdditionValues: getters.getTempListAdditionSensors(nameSplit[1]),
speed: value.speed,
presets: rootGetters["gui/getPresetsFromHeater"]({ name: key }),
chartColor: getters["tempHistory/getDatasetColor"](nameSplit[1]),
chartTemperature: getters["tempHistory/getDataset"](nameSplit[1]),
chartTarget: getters["tempHistory/getDataset"](nameSplit[1]+"_target"),
chartPower: getters["tempHistory/getDataset"](nameSplit[1]+'_power'),
chartSpeed: getters["tempHistory/getDataset"](nameSplit[1]+'_speed'),
})
}
}
@@ -141,6 +145,7 @@ export default {
name: nameSplit[1],
temperature: value.temperature,
additionValues: getters.getAdditionSensors(nameSplit[1]),
tempListAdditionValues: getters.getTempListAdditionSensors(nameSplit[1]),
icon: icon,
min_temp: min_temp,
max_temp: max_temp,
@@ -283,7 +288,7 @@ export default {
})
},
getAdditionSensors: state => (name) => {
getAdditionSensors: (state, getters, rootState, rootGetters) => (name) => {
let additionValues = {}
additionalSensors.forEach(sensorName => {
if (sensorName+" "+name in state) {
@@ -292,6 +297,10 @@ export default {
let tmp = {}
tmp[key] = {}
tmp[key]['value'] = state[sensorName+" "+name][key]
tmp[key]['gui'] = rootGetters["gui/getDatasetAdditionalSensorValue"]({
name: name,
sensor: key
})
switch(key) {
case 'pressure':
@@ -315,6 +324,46 @@ export default {
return additionValues
},
getTempListAdditionSensors: (state, getters, rootState, rootGetters) => (name) => {
let additionValues = {}
additionalSensors.forEach(sensorName => {
if (sensorName+" "+name in state) {
Object.keys(state[sensorName+" "+name]).forEach(key => {
if (key !== "temperature") {
const settings = rootGetters["gui/getDatasetAdditionalSensorValue"]({
name: name,
sensor: key
})
if (settings.boolList) {
let tmp = {}
tmp[key] = {}
tmp[key]['value'] = state[sensorName+" "+name][key]
switch(key) {
case 'pressure':
tmp[key]['unit'] = "hPa"
break
case 'humidity':
tmp[key]['unit'] = "%"
break
default:
tmp[key]['unit'] = ""
}
additionValues = Object.assign(additionValues, tmp)
}
}
})
}
})
return additionValues
},
getAllMacros: state => {
let array = []
+30 -28
View File
@@ -46,7 +46,7 @@ export default {
}
commit('addDataset', datasetTemperature)
}
} else commit('clearDataset', name)
commit('addValue', {
name: name,
@@ -55,7 +55,7 @@ export default {
time: now
})
if ('targets' in datasets && (type.startsWith("extruder") || type === "heater_bed" || type === "temperature_fan")) {
if ('targets' in datasets && (type.startsWith("extruder") || ["heater_bed", "temperature_fan"].includes(type))) {
let datasetTarget = state.datasets.find(element => element.name === name+"_target")
if (datasetTarget === undefined) {
datasetTarget = {
@@ -72,7 +72,7 @@ export default {
}
commit('addDataset', datasetTarget)
}
} else commit('clearDataset', name+"_target")
commit('addValue', {
name: name+"_target",
@@ -82,33 +82,35 @@ export default {
})
}
if ('powers' in datasets && (type.startsWith("extruder") || type === "heater_bed")) {
let datasetPower = state.datasets.find(element => element.name === name+"_power")
if (datasetPower === undefined) {
datasetPower = {
type: "line",
name: name+"_power",
xValueType: "dateTime",
axisYType: "secondary",
dataPoints:[],
showInLegend: false,
markerType: 'none',
lineDashType: "dot",
lineThickness: 1,
visible: (rootGetters["gui/getDatasetValue"]({ name: name, type: 'power' })) ? 1 : 0,
color: datasetTemperature.color,
}
['power', 'speed'].forEach(additionalType => {
if (additionalType+"s" in datasets && (type.startsWith("extruder") || ["heater_bed", "temperature_fan"].includes(type))) {
let datasetAdditinal = state.datasets.find(element => element.name === name+"_"+additionalType)
if (datasetAdditinal === undefined) {
datasetAdditinal = {
type: "line",
name: name+"_"+additionalType,
xValueType: "dateTime",
axisYType: "secondary",
dataPoints:[],
showInLegend: false,
markerType: 'none',
lineDashType: "dot",
lineThickness: 1,
visible: (rootGetters["gui/getDatasetValue"]({ name: name, type: additionalType })) ? 1 : 0,
color: datasetTemperature.color,
}
commit('addDataset', datasetPower)
commit('addDataset', datasetAdditinal)
} else commit('clearDataset', name+"_"+additionalType)
commit('addValue', {
name: name+"_"+additionalType,
value: datasets[additionalType+"s"],
type: type,
time: now
})
}
commit('addValue', {
name: name+"_power",
value: datasets.powers,
type: type,
time: now
})
}
})
}
})
}
+13 -1
View File
@@ -1,4 +1,5 @@
import { getDefaultState } from './index'
import { datasetTypesInPercents } from '@/store/variables'
import Vue from "vue";
export default {
@@ -11,7 +12,11 @@ export default {
},
addValue(state, payload) {
const multi = payload.name.endsWith("_power") ? 100 : 1
let multi = 1
datasetTypesInPercents.forEach(element => {
if (payload.name.endsWith("_"+element)) multi = 100
})
const dataset = state.datasets.find(element => element.name === payload.name)
if (dataset !== undefined && payload.value !== undefined) {
@@ -37,6 +42,13 @@ export default {
}
},
clearDataset(state, payload) {
const dataset = state.datasets.find(dataset => dataset.name === payload)
if (dataset) {
Vue.set(dataset, 'dataPoints', [])
}
},
hidePowerDatasets(state) {
state.datasets.forEach(element => {
if (element.name.endsWith("_power")) {
+2 -2
View File
@@ -12,7 +12,7 @@ export default {
Vue.prototype.$socket.sendObj('server.files.list', { root: 'config' }, 'server/checkMainsailJson')
},
checkMainsailJson({ commit, dispatch, rootState }, payload) {
checkMainsailJson({ dispatch, rootState }, payload) {
let boolFallback = true
Object.entries(payload).forEach(([, file]) => {
@@ -21,7 +21,7 @@ export default {
fetch('//'+rootState.socket.hostname+':'+rootState.socket.port+'/server/files/config/.mainsail.json?time='+Date.now())
.then(res => res.json()).then(file => {
commit('gui/setData', file, { root: true })
dispatch('gui/getData', file, { root: true })
if (!rootState.socket.remoteMode) dispatch('farm/readStoredPrinters', {}, { root: true })
dispatch('printer/init', null, { root: true })
})
+7
View File
@@ -18,6 +18,13 @@ export default {
Vue.prototype.$socket.sendObj('server.info', {}, 'server/getInfo');
},
setKlippyShutdown(state) {
Vue.set(state, 'klippy_state', 'shutdown')
Vue.set(state, 'klippy_message', 'Shutdown...')
Vue.prototype.$socket.sendObj('server.info', {}, 'server/getInfo');
},
setData(state, payload) {
if ("requestParams" in payload) delete payload.requestParams
+6 -7
View File
@@ -23,13 +23,12 @@ export default {
},
isUpdateAvailable(state) {
if (
'klipper' in state &&
'remote_hash' in state.klipper &&
'current_hash' in state.klipper &&
state.klipper.current_hash !== state.klipper.current_hash
) {
return true
for (const key of Object.keys(state.version_info)) {
if (
'version' in state.version_info[key] &&
'remote_version' in state.version_info[key] &&
state.version_info[key].version !== state.version_info[key].remote_version
) return true
}
return false
+4
View File
@@ -51,6 +51,10 @@ export default {
commit('server/setKlippyDisconnected', null, { root: true })
break
case 'notify_klippy_shutdown':
commit('server/setKlippyShutdown', null, { root: true })
break
case 'notify_filelist_changed':
switch(payload.params[0].action) {
case 'upload_file':
+6
View File
@@ -16,6 +16,12 @@ export const datasetTypes = [
"temperature",
"target",
"power",
"speed",
]
export const datasetTypesInPercents = [
"power",
"speed",
]
export const additionalSensors = [