Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6bfb20766a | ||
|
|
616c7aa7f4 | ||
|
|
d6cd1c81fb | ||
|
|
74f104f1a4 | ||
|
|
9ccc3f69a3 | ||
|
|
0d2f9bd8d8 | ||
|
|
28aa03a55f | ||
|
|
d891ec0800 | ||
|
|
767a9403fd | ||
|
|
6fb8d16143 | ||
|
|
0cffe5f235 | ||
|
|
f634872297 | ||
|
|
91014a7349 | ||
|
|
850eecd600 | ||
|
|
fff66f0c3b | ||
|
|
3749b76162 | ||
|
|
88ac7a5cae | ||
|
|
eb123ffc01 | ||
|
|
411087434c | ||
|
|
8db37259e1 | ||
|
|
3a03d93fef | ||
|
|
42071ae422 | ||
|
|
aeb6ae1ec9 | ||
|
|
837f6641d0 | ||
|
|
7a139d68c5 | ||
|
|
24bfb8bc58 | ||
|
|
390bb40c69 | ||
|
|
84470463fe | ||
|
|
f9c989793c | ||
|
|
b0044f3d2b | ||
|
|
e2e496c31e | ||
|
|
8363932ae9 | ||
|
|
f958027671 | ||
|
|
4b678468ab | ||
|
|
9090c60038 | ||
|
|
35955d4899 | ||
|
|
4a58f0c3e2 | ||
|
|
4003166000 | ||
|
|
9888d796bd | ||
|
|
8a8587786a | ||
|
|
64c6790d3a | ||
|
|
28998090e6 | ||
|
|
87e1ccb384 | ||
|
|
e5469b47ca | ||
|
|
a72af00c0a | ||
|
|
576f3ee4fa | ||
|
|
2ee53b26bb | ||
|
|
414a05bf7b |
No files matched your search
+10
-1
@@ -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
|
||||
@@ -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
@@ -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
|
||||

|
||||
@@ -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}
|
||||
@@ -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.
|
||||
|
||||

|
||||
|
||||
## Scroll through commands
|
||||
|
||||
Using the ↑ up / ↓ down arrow keys you can scroll through previous commands.
|
||||
@@ -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.
|
||||
|
||||

|
||||
|
||||
By the way, this also works for other configuration sections like, **fans and outputs.**
|
||||
{: .info}
|
||||
|
||||
@@ -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 }}
|
||||
@@ -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.
|
||||
|
||||

|
||||
|
||||
### 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.
|
||||
|
||||

|
||||
@@ -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.
|
||||
|
||||

|
||||
@@ -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 }}
|
||||
|
||||

|
||||
|
||||
### PrusaSlicer (since v2.3.0)
|
||||
|
||||
In "Expert" mode PrusaSlicer has an option in the "Printer Settings" tab to activate previews.
|
||||
Under `General / Firmware`, enter `32x32,400x300` as "G-code thumbnails".
|
||||
|
||||

|
||||
|
||||
### SuperSlicer (since v2.2.54.0)
|
||||
|
||||
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.
|
||||
|
||||

|
||||
|
||||
@@ -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.
|
||||
|
||||

|
||||
|
||||
|
||||
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
@@ -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.
|
||||
+2
-1
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "mainsail",
|
||||
"version": "1.0.0",
|
||||
"version": "1.2.0",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"serve": "vue-cli-service serve",
|
||||
@@ -17,6 +17,7 @@
|
||||
"vue-context": "^6.0.0",
|
||||
"vue-github-api": "^0.1.7",
|
||||
"vue-headful": "^2.1.0",
|
||||
"vue-i18n": "^8.22.4",
|
||||
"vue-plotly": "^1.1.0",
|
||||
"vue-prism-editor": "^1.2.2",
|
||||
"vue-resource": "^1.5.1",
|
||||
|
||||
+16
-12
@@ -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,14 +46,18 @@
|
||||
)
|
||||
">
|
||||
<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 }}
|
||||
{{ $t(`Router.${category.title}`) }}
|
||||
</span>
|
||||
<v-icon class="nav-arrow" v-if="category.children && category.children.length > 0">mdi-chevron-down</v-icon>
|
||||
</router-link>
|
||||
@@ -61,7 +66,7 @@
|
||||
<li v-for="(page, pageIndex) in category.children" class="nav-item" v-bind:key="`${index}-${pageIndex}`">
|
||||
<router-link :to="page.path" class="nav-link" @click.prevent v-if="klippy_state !== 'error' || page.alwaysShow">
|
||||
<v-icon>mdi-{{ page.icon }}</v-icon>
|
||||
<span class="nav-title">{{ page.title }}</span>
|
||||
<span class="nav-title">{{ $t(`Router.${page.title}`) }}</span>
|
||||
</router-link>
|
||||
</li>
|
||||
</ul>
|
||||
@@ -75,10 +80,10 @@
|
||||
<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>
|
||||
<input type="file" ref="fileUploadAndStart" accept=".gcode" style="display: none" @change="uploadAndStart" />
|
||||
<v-btn color="primary" class="mr-5 d-none d-sm-flex" v-if="isConnected && save_config_pending" :disabled="['printing', 'paused'].includes(printer_state)" :loading="loadings.includes['topbarSaveConfig']" @click="clickSaveConfig">SAVE CONFIG</v-btn>
|
||||
<v-btn color="primary" class="mr-5 d-none d-sm-flex" v-if="isConnected && ['standby', 'complete'].includes(printer_state)" :loading="loadings.includes['btnUploadAndStart']" @click="btnUploadAndStart"><v-icon class="mr-2">mdi-file-upload</v-icon>Upload & Print</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>
|
||||
<input type="file" ref="fileUploadAndStart" accept=".gcode, .ufp" style="display: none" @change="uploadAndStart" />
|
||||
<v-btn color="primary" class="mr-5 d-none d-sm-flex" v-if="isConnected && save_config_pending" :disabled="['printing', 'paused'].includes(printer_state)" :loading="loadings.includes['topbarSaveConfig']" @click="clickSaveConfig">{{ $t("App.SAVECONFIG")}}</v-btn>
|
||||
<v-btn color="primary" class="mr-5 d-none d-sm-flex" v-if="isConnected && ['standby', 'complete'].includes(printer_state)" :loading="loadings.includes['btnUploadAndStart']" @click="btnUploadAndStart"><v-icon class="mr-2">mdi-file-upload</v-icon>{{ $t("App.UploadPrint")}}</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">{{ $t("App.EmergencyStop")}}</span></v-btn>
|
||||
<top-corner-menu></top-corner-menu>
|
||||
</v-app-bar>
|
||||
|
||||
@@ -101,7 +106,7 @@
|
||||
dark
|
||||
v-model="uploadSnackbar.status"
|
||||
>
|
||||
<strong>Uploading {{ uploadSnackbar.filename }}</strong><br />
|
||||
<strong>{{ $t("App.Uploading")}} {{ uploadSnackbar.filename }}</strong><br />
|
||||
{{ Math.round(uploadSnackbar.percent) }} % @ {{ formatFilesize(Math.round(uploadSnackbar.speed)) }}/s<br />
|
||||
<v-progress-linear class="mt-2" :value="uploadSnackbar.percent"></v-progress-linear>
|
||||
<template v-slot:action="{ attrs }">
|
||||
@@ -193,7 +198,6 @@ export default {
|
||||
...mapGetters([
|
||||
'getTitle',
|
||||
'getVersion',
|
||||
'server/updateManager/isUpdateAvailable',
|
||||
]),
|
||||
print_percent: {
|
||||
get() {
|
||||
|
||||
@@ -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>{{ $t("App.Connecting") }}<span v-if="connectingFailed"> {{ $t("App.Failed") }}</span><span v-if="isConnecting"> {{ $t("App.To") }} {{ parseInt(port) !== 80 && port !== "" ? hostname+":"+port : hostname }}</span>
|
||||
</span>
|
||||
</v-toolbar-title>
|
||||
</v-toolbar>
|
||||
@@ -16,9 +16,9 @@
|
||||
<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>{{ $t("App.CannotNotConnectTo") }} {{ parseInt(port) !== 80 && port !== "" ? hostname+":"+port : hostname }}.</p>
|
||||
<div class="text-center">
|
||||
<v-btn @click="reconnect" color="primary">try again</v-btn>
|
||||
<v-btn @click="reconnect" color="primary">{{ $t("App.TryAgain") }}</v-btn>
|
||||
</div>
|
||||
</v-card-text>
|
||||
</v-card>
|
||||
|
||||
@@ -9,11 +9,11 @@
|
||||
<v-toolbar-title>
|
||||
<span class="subheading">
|
||||
<v-icon class="mdi mdi-connection" left></v-icon>
|
||||
<span v-if="isConnecting">Connection to {{ parseInt(port) !== 80 ? hostname+':'+port : hostname }}</span>
|
||||
<span v-if="connectingFailed">Connection failed</span>
|
||||
<span v-if="!isConnecting && !connectingFailed && !dialogAddPrinter.bool && !dialogEditPrinter.bool">Select Printer</span>
|
||||
<span v-if="dialogAddPrinter.bool">Add Printer</span>
|
||||
<span v-if="dialogEditPrinter.bool">Edit Printer</span>
|
||||
<span v-if="isConnecting">{{ $t("App.ConnectionTo") }}{{ parseInt(port) !== 80 ? hostname+':'+port : hostname }}</span>
|
||||
<span v-if="connectingFailed">{{ $t("App.ConnectionFailed") }}</span>
|
||||
<span v-if="!isConnecting && !connectingFailed && !dialogAddPrinter.bool && !dialogEditPrinter.bool">{{ $t("App.SelectPrinter") }}</span>
|
||||
<span v-if="dialogAddPrinter.bool">{{ $t("App.AddPrinter") }}</span>
|
||||
<span v-if="dialogEditPrinter.bool">{{ $t("App.EditPrinter") }}</span>
|
||||
</span>
|
||||
</v-toolbar-title>
|
||||
<v-spacer></v-spacer>
|
||||
@@ -25,10 +25,10 @@
|
||||
<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>{{ $t("App.CannotNotConnectTo") }} {{ parseInt(port) !== 80 ? hostname+":"+port : hostname }}.</p>
|
||||
<div class="text-center">
|
||||
<v-btn @click="switchToChangePrinter" color="white" outlined class="mr-3">change printer</v-btn>
|
||||
<v-btn @click="reconnect" color="primary">try again</v-btn>
|
||||
<v-btn @click="switchToChangePrinter" color="white" outlined class="mr-3">{{ $t("App.ChangePrinter") }}</v-btn>
|
||||
<v-btn @click="reconnect" color="primary">{{ $t("App.TryAgain") }}</v-btn>
|
||||
</div>
|
||||
</v-card-text>
|
||||
<v-card-text class="pt-3" v-if="!isConnecting && dialogAddPrinter.bool">
|
||||
@@ -63,7 +63,7 @@
|
||||
class="middle"
|
||||
@click="addPrinter"
|
||||
>
|
||||
add printer
|
||||
{{ $t("App.AddPrinter") }}
|
||||
</v-btn>
|
||||
</v-col>
|
||||
</v-row>
|
||||
@@ -111,7 +111,7 @@
|
||||
class="middle"
|
||||
@click="updatePrinter"
|
||||
>
|
||||
update printer
|
||||
{{ $t("App.UpdatePrinter") }}
|
||||
</v-btn>
|
||||
</v-col>
|
||||
</v-row>
|
||||
@@ -140,14 +140,14 @@
|
||||
</v-row>
|
||||
<v-row v-if="showCorsInfo">
|
||||
<v-col>
|
||||
<p class="text-center" v-if="this['farm/countPrinters'] === 0">Hello and welcome to the remote mode of Mainsail!</p>
|
||||
<p class="text-center">Please remember to add <code>{{ currentUrl }}</code> in moonraker.conf within "cors_domains".</p>
|
||||
<p class="text-center">You can find more details at <a href="https://docs.mainsail.xyz/remotemode" target="_blank">docs.mainsail.xyz/remotemode</a>.</p>
|
||||
<p class="text-center" v-if="this['farm/countPrinters'] === 0">{{ $t("App.Hello") }}</p>
|
||||
<p class="text-center">{{ $t("App.PleaseRememberToAdd") }}<code>{{ currentUrl }}</code> {{ $t("App.InMoonrakerConf") }}</p>
|
||||
<p class="text-center">{{ $t("App.YouCanFindMore") }}<a href="https://docs.mainsail.xyz/remotemode" target="_blank">{{ $t("App.Remotemode") }}</a>.</p>
|
||||
</v-col>
|
||||
</v-row>
|
||||
<v-row>
|
||||
<v-col class="text-center mt-0">
|
||||
<v-btn @click="dialogAddPrinter.bool = true">add printer</v-btn>
|
||||
<v-btn @click="dialogAddPrinter.bool = true">{{ $t("App.AddPrinter") }}</v-btn>
|
||||
</v-col>
|
||||
</v-row>
|
||||
</v-container>
|
||||
|
||||
@@ -13,37 +13,37 @@
|
||||
</template>
|
||||
|
||||
<v-list dense>
|
||||
<v-subheader class="" style="height: auto;">Klipper Control</v-subheader>
|
||||
<v-subheader class="" style="height: auto;">{{ $t("App.KlipperControl") }}</v-subheader>
|
||||
<v-list-item class="minheight30" link @click="doRestart()">
|
||||
<v-list-item-title><v-icon class="mr-2" small>mdi-restart</v-icon>Restart</v-list-item-title>
|
||||
<v-list-item-title><v-icon class="mr-2" small>mdi-restart</v-icon>{{ $t("App.Restart") }}</v-list-item-title>
|
||||
</v-list-item>
|
||||
<v-list-item class="minheight30" link @click="doFirmwareRestart()">
|
||||
<v-list-item-title><v-icon class="mr-2" small>mdi-restart</v-icon>Firmware Restart</v-list-item-title>
|
||||
<v-list-item-title><v-icon class="mr-2" small>mdi-restart</v-icon>{{ $t("App.FirmwareRestart") }}</v-list-item-title>
|
||||
</v-list-item>
|
||||
<v-divider class="mt-0"></v-divider>
|
||||
<v-subheader class="pt-2" style="height: auto;">Restart Services</v-subheader>
|
||||
<v-subheader class="pt-2" style="height: auto;">{{ $t("App.RestartServices") }}</v-subheader>
|
||||
<v-list-item class="minheight30" link @click="doServiceRestartKlipper()">
|
||||
<v-list-item-title><v-icon class="mr-2" small>mdi-restart</v-icon>Klipper</v-list-item-title>
|
||||
<v-list-item-title><v-icon class="mr-2" small>mdi-restart</v-icon>{{ $t("App.Klipper") }}</v-list-item-title>
|
||||
</v-list-item>
|
||||
<v-list-item class="minheight30" link @click="doServiceRestartMoonraker()">
|
||||
<v-list-item-title><v-icon class="mr-2" small>mdi-restart</v-icon>Moonraker</v-list-item-title>
|
||||
<v-list-item-title><v-icon class="mr-2" small>mdi-restart</v-icon>{{ $t("App.Moonraker") }}</v-list-item-title>
|
||||
</v-list-item>
|
||||
<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-subheader class="pt-2" style="height: auto;">{{ $t("App.PowerDevices") }}</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' || 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>
|
||||
</v-list-item>
|
||||
</div>
|
||||
<v-divider class="mt-0"></v-divider>
|
||||
<v-subheader class="pt-2" style="height: auto;">Host Control</v-subheader>
|
||||
<v-subheader class="pt-2" style="height: auto;">{{ $t("App.HostControl") }}</v-subheader>
|
||||
<v-list-item class="minheight30" link @click="doHostReboot()">
|
||||
<v-list-item-title><v-icon class="mr-2" small>mdi-power</v-icon>Reboot</v-list-item-title>
|
||||
<v-list-item-title><v-icon class="mr-2" small>mdi-power</v-icon>{{ $t("App.Reboot") }}</v-list-item-title>
|
||||
</v-list-item>
|
||||
<v-list-item class="minheight30" link @click="doHostShutdown()">
|
||||
<v-list-item-title><v-icon class="mr-2" small>mdi-power</v-icon>Shutdown</v-list-item-title>
|
||||
<v-list-item-title><v-icon class="mr-2" small>mdi-power</v-icon>{{ $t("App.Shutdown") }}</v-list-item-title>
|
||||
</v-list-item>
|
||||
</v-list>
|
||||
</v-menu>
|
||||
@@ -62,6 +62,7 @@ export default {
|
||||
},
|
||||
computed: {
|
||||
...mapState({
|
||||
printer_state: state => state.printer.print_stats.state,
|
||||
devices: (state) => state.server.power.devices,
|
||||
}),
|
||||
countPowerDevices: {
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
</template>
|
||||
<v-toolbar flat dense >
|
||||
<v-toolbar-title>
|
||||
<span class="subheading"><v-icon left>mdi-update</v-icon>Updating {{ application }}{{ complete ? " done!" : "..." }}</span>
|
||||
<span class="subheading"><v-icon left>mdi-update</v-icon>{{ $t("App.Updating")}} {{ application }}{{ complete ? " done!" : "..." }}</span>
|
||||
</v-toolbar-title>
|
||||
</v-toolbar>
|
||||
<v-card-text class="py-6">
|
||||
@@ -45,7 +45,7 @@
|
||||
color="primary"
|
||||
>
|
||||
<template #no-data>
|
||||
<div class="py-2">empty</div>
|
||||
<div class="py-2">{{ $t("App.Empty")}}</div>
|
||||
</template>
|
||||
|
||||
<template #item="{ item }">
|
||||
@@ -61,7 +61,7 @@
|
||||
</v-data-table>
|
||||
<v-row>
|
||||
<v-col class="text-center pt-5">
|
||||
<v-btn @click="close" :disabled="!complete" color="primary">close</v-btn>
|
||||
<v-btn @click="close" :disabled="!complete" color="primary">{{ $t("App.Close")}}</v-btn>
|
||||
</v-col>
|
||||
</v-row>
|
||||
</v-card-text>
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
<template>
|
||||
<div id="tempchart" style="height: 270px; width: 100%;"></div>
|
||||
<div id="tempchart" style="height: 300px; width: 100%;"></div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapState } from 'vuex'
|
||||
import CanvasJS from '@/assets/canvasjs-3.2.3/canvasjs.min'
|
||||
|
||||
export default {
|
||||
@@ -11,10 +12,13 @@ export default {
|
||||
},
|
||||
data: function() {
|
||||
return {
|
||||
chart : null,
|
||||
tempchartDisplayMinutes: 10,
|
||||
timer: '',
|
||||
timerChart: '',
|
||||
timerDataset: '',
|
||||
chartOptions: {
|
||||
theme: "dark1",
|
||||
zoomEnabled: true,
|
||||
backgroundColor: 'transparent',
|
||||
animationEnabled: true,
|
||||
legend: {
|
||||
@@ -22,8 +26,52 @@ export default {
|
||||
verticalAlign: "top",
|
||||
},
|
||||
toolTip:{
|
||||
content: "{name}: {y}",
|
||||
yValueFormatString: "#,###.00",
|
||||
shared: true,
|
||||
borderColor: "#ffffff30",
|
||||
content: (e) => {
|
||||
let output = ""
|
||||
|
||||
if (e.entries[0].dataPoint.x) {
|
||||
const date = new Date(e.entries[0].dataPoint.x)
|
||||
const hours = "0" + date.getHours();
|
||||
const minutes = "0" + date.getMinutes();
|
||||
const seconds = "0" + date.getSeconds();
|
||||
output += "<strong>"+hours.substr(-2) + ':' + minutes.substr(-2) + ':' + seconds.substr(-2)+"</strong>"
|
||||
}
|
||||
|
||||
const mainEntries = e.entries.filter(dataset => dataset.dataSeries.showInLegend && dataset.dataSeries.visible).sort((a,b) => {
|
||||
if (a.dataSeries.legendText > b.dataSeries.legendText) return 1
|
||||
if (a.dataSeries.legendText < b.dataSeries.legendText) return -1
|
||||
|
||||
return 0
|
||||
})
|
||||
|
||||
if (mainEntries.length) {
|
||||
mainEntries.forEach(dataset => {
|
||||
output += "<br />"
|
||||
output += dataset.dataSeries.legendText+": "+dataset.dataPoint.y.toFixed(1)
|
||||
|
||||
const datasetTarget = e.entries.find(datasetTarget => datasetTarget.dataSeries.name === dataset.dataSeries.name+"_target")
|
||||
if (datasetTarget) {
|
||||
output += " / "+datasetTarget.dataPoint.y.toFixed(1)
|
||||
}
|
||||
|
||||
output += "°C"
|
||||
|
||||
const datasetPower = e.entries.find(datasetPower => datasetPower.dataSeries.name === dataset.dataSeries.name+"_power")
|
||||
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)+"%"
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
return output
|
||||
}
|
||||
},
|
||||
axisX:{
|
||||
valueFormatString: "HH:mm" ,
|
||||
@@ -40,19 +88,33 @@ export default {
|
||||
minimum: 0,
|
||||
maximum: 300,
|
||||
interval: 50,
|
||||
suffix: '°C'
|
||||
},
|
||||
axisY2: {
|
||||
gridThickness: 0,
|
||||
gridColor: '#ffffff30',
|
||||
minimum: 0,
|
||||
maximum: 100,
|
||||
interval: 25,
|
||||
suffix: '%'
|
||||
},
|
||||
data: [ ]
|
||||
},
|
||||
chart : null
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapState({
|
||||
intervalChartUpdate: state => state.gui.tempchart.intervalChartUpdate,
|
||||
intervalDatasetUpdate: state => state.gui.tempchart.intervalDatasetUpdate,
|
||||
}),
|
||||
datasets: {
|
||||
get () {
|
||||
const datasets = this.$store.state.printer.tempHistory.datasets
|
||||
|
||||
return datasets.sort((a,b) => {
|
||||
if ('name' in a && 'name' in b) {
|
||||
if (a.name.endsWith("_target") > b.name.endsWith("_power")) return -1
|
||||
if (a.name.endsWith("_power") < b.name.endsWith("_target")) return 1
|
||||
if (a.name.endsWith("_target") > b.name.endsWith("_target")) return -1
|
||||
if (a.name.endsWith("_target") < b.name.endsWith("_target")) return 1
|
||||
}
|
||||
@@ -61,6 +123,11 @@ export default {
|
||||
})
|
||||
}
|
||||
},
|
||||
autoscale: {
|
||||
get() {
|
||||
return this.$store.state.gui.tempchart.autoscale
|
||||
}
|
||||
},
|
||||
maxTemp: {
|
||||
get() {
|
||||
return this.$store.getters["printer/getMaxTemp"]
|
||||
@@ -78,8 +145,7 @@ export default {
|
||||
|
||||
},
|
||||
created() {
|
||||
|
||||
this.timer = setInterval(() => {
|
||||
this.timerChart = setInterval(() => {
|
||||
if (
|
||||
document.getElementById("tempchart") &&
|
||||
this.chart &&
|
||||
@@ -88,10 +154,15 @@ export default {
|
||||
this.chartOptions.data = this.datasets
|
||||
this.chartOptions.axisX.minimum = new Date() - 60* this.tempchartDisplayMinutes *1000
|
||||
this.chartOptions.axisX.maximum = new Date()
|
||||
this.chartOptions.axisY.maximum = this.maxTemp
|
||||
this.chartOptions.axisY.maximum = this.autoscale ? null : this.maxTemp
|
||||
//this.chartOptions.axisY.interval = this.autoscale ? 25 : 50
|
||||
this.chart.render()
|
||||
}
|
||||
}, 1000);
|
||||
}, this.intervalChartUpdate)
|
||||
|
||||
this.timerDataset = setInterval(() => {
|
||||
this.$store.dispatch("printer/tempHistory/updateDatasets")
|
||||
}, this.intervalDatasetUpdate)
|
||||
},
|
||||
mounted: function() {
|
||||
this.createChart()
|
||||
|
||||
@@ -14,47 +14,35 @@
|
||||
<v-container class="pt-0">
|
||||
<v-row no-gutters class="" v-if="['standby', 'paused', 'complete', 'error'].includes(printer_state)">
|
||||
<v-col class="col-12 mt-3 pb-0 text-center">
|
||||
<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-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">{{ $t("Dashboard.Home")}} </span>{{ $t("Dashboard.All")}}</v-btn>
|
||||
<v-btn small @click="doQGL" :loading="loadings.includes('qgl')" color="primary" class="ml-2" v-if="'quad_gantry_level' in config">{{ $t("Dashboard.QGL")}}</v-btn>
|
||||
<v-btn small @click="doZtilt" :loading="loadings.includes('zTilt')" color="primary" class="ml-2" v-if="'z_tilt' in config">{{ $t("Dashboard.ZTilt")}}</v-btn>
|
||||
</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('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>
|
||||
@@ -7,22 +7,22 @@
|
||||
<v-container>
|
||||
<v-row class="">
|
||||
<v-col class="col col-md-6">
|
||||
<v-label>Feed amount in mm:</v-label>
|
||||
<v-label>{{ $t("Dashboard.FeedAmountIn") }} 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-label>{{ $t("Dashboard.FeedrateIn") }} 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>
|
||||
<v-row class="">
|
||||
<v-col class="col text-center">
|
||||
<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-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> {{ $t("Dashboard.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> {{ $t("Dashboard.Extrude") }}</v-btn>
|
||||
</v-col>
|
||||
</v-row>
|
||||
</v-container>
|
||||
@@ -40,9 +40,7 @@
|
||||
data: function() {
|
||||
return {
|
||||
feedAmount: 25,
|
||||
feedrate: 5,
|
||||
feedAmounts: [ 100, 25, 10, 5, 1 ],
|
||||
feedrates: [ 60, 30, 15, 5, 1 ],
|
||||
feedrate: 5
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
@@ -50,11 +48,23 @@
|
||||
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) {
|
||||
|
||||
@@ -2,21 +2,21 @@
|
||||
<v-card>
|
||||
<v-toolbar flat dense >
|
||||
<v-toolbar-title>
|
||||
<span class="subheading"><v-icon left>mdi-alert-circle</v-icon>Klippy-State: {{ klippy_state}}</span>
|
||||
<span class="subheading"><v-icon left>mdi-alert-circle</v-icon>{{ $t('Setting.KlippyState')}}{{ 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 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>
|
||||
<p style="white-space:pre-wrap">{{ $t('Setting.KlippyInfo') }}</p>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
</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 small @click="doRestart" color="error" class=""><v-icon class="mr-sm-2">mdi-restart</v-icon>Restart</v-btn>
|
||||
<v-btn small @click="doRestartFirmware" class="ml-4" color="error"><v-icon class="mr-sm-2">mdi-restart</v-icon>FIRMWARE Restart</v-btn>
|
||||
<v-btn small @click="doRestart" color="error" class=""><v-icon class="mr-sm-2">mdi-restart</v-icon>{{ $t('Setting.Restart') }}</v-btn>
|
||||
<v-btn small @click="doRestartFirmware" class="ml-4" color="error"><v-icon class="mr-sm-2">mdi-restart</v-icon>{{ $t('Setting.FIRMWARERestart') }}</v-btn>
|
||||
</v-card-text>
|
||||
</v-card>
|
||||
</template>
|
||||
|
||||
@@ -12,21 +12,21 @@
|
||||
<v-toolbar flat dense color="orange darken-2">
|
||||
<v-toolbar-title>
|
||||
<span class="subheading">
|
||||
<v-icon class="mdi mdi-alert-circle" left></v-icon>Missing configuration
|
||||
<v-icon class="mdi mdi-alert-circle" left></v-icon>{{ $t("Dashboard.MissingConfiguration") }}
|
||||
</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" class="orange--text"><code>virtual_sdcard</code> is not defined in config.</p>
|
||||
<p v-if="!boolPauseResume" class="orange--text"><code>pause_resume</code> is not defined in config.</p>
|
||||
<p v-if="!boolDisplayStatus" class="orange--text"><code>display_status</code> is not defined in config.</p>
|
||||
<p v-if="!boolMacroPause" class="orange--text"><code>gcode_macro PAUSE</code> is not defined in config.</p>
|
||||
<p v-if="!boolMacroResume" class="orange--text"><code>gcode_macro RESUME</code> is not defined in config.</p>
|
||||
<p v-if="!boolMacroCancelPrint" class="orange--text"><code>gcode_macro CANCEL_PRINT</code> is not defined in config.</p>
|
||||
<p v-if="!boolVirtualSdcard" class="orange--text"><code>virtual_sdcard</code> {{ $t("Dashboard.IsNotDefinedInConfig") }}</p>
|
||||
<p v-if="!boolPauseResume" class="orange--text"><code>pause_resume</code> {{ $t("Dashboard.IsNotDefinedInConfig") }}</p>
|
||||
<p v-if="!boolDisplayStatus" class="orange--text"><code>display_status</code> {{ $t("Dashboard.IsNotDefinedInConfig") }}</p>
|
||||
<p v-if="!boolMacroPause" class="orange--text"><code>gcode_macro PAUSE</code> {{ $t("Dashboard.IsNotDefinedInConfig") }}</p>
|
||||
<p v-if="!boolMacroResume" class="orange--text"><code>gcode_macro RESUME</code> {{ $t("Dashboard.IsNotDefinedInConfig") }}</p>
|
||||
<p v-if="!boolMacroCancelPrint" class="orange--text"><code>gcode_macro CANCEL_PRINT</code> {{ $t("Dashboard.IsNotDefinedInConfig") }}</p>
|
||||
<div class="text-center">
|
||||
<v-btn href="https://docs.mainsail.xyz/necessary-configuration" target="_blank" color="white" outlined small><v-icon small class="mr-1">mdi-information</v-icon>more information</v-btn>
|
||||
<v-btn href="https://docs.mainsail.xyz/necessary-configuration" target="_blank" color="white" outlined small><v-icon small class="mr-1">mdi-information</v-icon>{{ $t("Dashboard.MoreInformation") }}</v-btn>
|
||||
</div>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
|
||||
@@ -23,19 +23,19 @@
|
||||
<v-card>
|
||||
<v-toolbar flat dense>
|
||||
<v-toolbar-title>
|
||||
<span class="subheading"><v-icon left>mdi-console-line</v-icon>Console</span>
|
||||
<span class="subheading"><v-icon left>mdi-console-line</v-icon>{{ $t("Dashboard.Console") }}</span>
|
||||
</v-toolbar-title>
|
||||
<v-spacer></v-spacer>
|
||||
<v-menu :offset-y="true" :close-on-content-click="false" title="Setup Console">
|
||||
<v-menu :offset-y="true" :close-on-content-click="false" :title="$t('Dashboard.SetupConsole')">
|
||||
<template v-slot:activator="{ on, attrs }">
|
||||
<v-btn small class="px-2 minwidth-0" color="lightgray" v-bind="attrs" v-on="on"><v-icon small>mdi-cog</v-icon></v-btn>
|
||||
<v-btn small class="px-2 minwidth-0" color="grey darken-3" v-bind="attrs" v-on="on"><v-icon small>mdi-cog</v-icon></v-btn>
|
||||
</template>
|
||||
<v-list>
|
||||
<v-list-item class="minHeight36">
|
||||
<v-checkbox class="mt-0" v-model="hideWaitTemperatures" hide-details label="Hide temperatures"></v-checkbox>
|
||||
<v-checkbox class="mt-0" v-model="hideWaitTemperatures" hide-details :label="$t('Dashboard.HideTemperatures')"></v-checkbox>
|
||||
</v-list-item>
|
||||
<v-list-item class="minHeight36">
|
||||
<v-checkbox class="mt-0" v-model="boolCustomFilters" hide-details label="Custom filters"></v-checkbox>
|
||||
<v-checkbox class="mt-0" v-model="boolCustomFilters" hide-details :label="$t('Dashboard.CustomFilters')"></v-checkbox>
|
||||
</v-list-item>
|
||||
</v-list>
|
||||
</v-menu>
|
||||
@@ -45,7 +45,7 @@
|
||||
<v-row>
|
||||
<v-col>
|
||||
<v-text-field
|
||||
label="Send code..."
|
||||
:label="$t('Dashboard.SendCode')"
|
||||
ref="gcodeCommandField"
|
||||
solo
|
||||
hide-details
|
||||
@@ -60,7 +60,7 @@
|
||||
</v-col>
|
||||
<v-col class="col-auto align-content-center">
|
||||
<v-btn color="info" class="gcode-command-btn" @click="doSend" :loading="loadings.includes('sendGcode')" :disabled="loadings.includes('sendGcode')" >
|
||||
<v-icon class="mr-2">mdi-send</v-icon> send
|
||||
<v-icon class="mr-2">mdi-send</v-icon> {{ $t("Dashboard.Send") }}
|
||||
</v-btn>
|
||||
</v-col>
|
||||
</v-row>
|
||||
@@ -81,7 +81,7 @@
|
||||
sort-by="date"
|
||||
>
|
||||
<template #no-data>
|
||||
<div class="py-2">empty</div>
|
||||
<div class="py-2">{{ $t("Dashboard.Empty") }}</div>
|
||||
</template>
|
||||
|
||||
<template #item="{ item }">
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
<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-printer-3d" left></v-icon>Print Settings</span>
|
||||
<span class="subheading"><v-icon class="mdi mdi-printer-3d" left></v-icon>{{ $t("Dashboard.PrintSettings") }}</span>
|
||||
</v-toolbar-title>
|
||||
</v-toolbar>
|
||||
<tool-slider label="Speed factor" :target="speed_factor" :max="200" :multi="100" :step="5" command="M220" attribute-name="S" ></tool-slider>
|
||||
@@ -30,7 +30,7 @@
|
||||
<v-card class="mt-6" v-if="this['printer/getMiscellaneous'].length">
|
||||
<v-toolbar flat dense >
|
||||
<v-toolbar-title>
|
||||
<span class="subheading"><v-icon left>mdi-dip-switch</v-icon>Miscellaneous</span>
|
||||
<span class="subheading"><v-icon left>mdi-dip-switch</v-icon>{{ $t("Dashboard.Miscellaneous") }}</span>
|
||||
</v-toolbar-title>
|
||||
</v-toolbar>
|
||||
<div v-for="(object, index) of this['printer/getMiscellaneous']" v-bind:key="index">
|
||||
|
||||
@@ -4,15 +4,15 @@
|
||||
<v-toolbar flat dense color="orange darken-2">
|
||||
<v-toolbar-title>
|
||||
<span class="subheading">
|
||||
<v-icon class="mdi mdi-alert-circle" left></v-icon>Moonraker Failed Plugins
|
||||
<v-icon class="mdi mdi-alert-circle" left></v-icon>{{ $t("Dashboard.MoonrakerFailedPlugins") }}
|
||||
</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 class="orange--text">An error was detected while loading the moonraker plugins. Please check the logfile and fix the issue.</p>
|
||||
<p class="mb-2 orange--text">Following plugin has an error:</p>
|
||||
<p class="orange--text">{{ $t("Dashboard.MoonrakerErrorInfo") }}</p>
|
||||
<p class="mb-2 orange--text">{{ $t("Dashboard.FollowingPluginHasAnError") }}</p>
|
||||
<ul class="mt-0 pt-0">
|
||||
<li v-for="plugin in failedPlugins" v-bind:key="plugin" class="orange--text"><code>{{ plugin }}</code></li>
|
||||
</ul>
|
||||
@@ -21,7 +21,7 @@
|
||||
</v-card-text>
|
||||
<v-divider class="my-2"></v-divider>
|
||||
<v-card-text class="px-4 pt-2 pb-4 content text-center text-lg-left">
|
||||
<v-btn small :href="'//'+hostname+':'+port+'/server/files/moonraker.log'" color="primary" class=""><v-icon class="mr-2">mdi-download</v-icon>Download Log</v-btn>
|
||||
<v-btn small :href="'//'+hostname+':'+port+'/server/files/moonraker.log'" color="primary" class=""><v-icon class="mr-2">mdi-download</v-icon>{{ $t("Dashboard.DownloadLog") }}</v-btn>
|
||||
</v-card-text>
|
||||
</v-card>
|
||||
</template>
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
<v-col>
|
||||
<v-card>
|
||||
<v-card-title>
|
||||
Config Files
|
||||
{{ $t('Setting.ConfigFiles') }}
|
||||
<v-spacer class="d-none d-sm-block"></v-spacer>
|
||||
<input type="file" ref="fileUpload" style="display: none" multiple @change="uploadFile" />
|
||||
<v-item-group class="v-btn-toggle my-5 my-sm-0 col-12 col-sm-auto px-0 py-0">
|
||||
@@ -43,13 +43,13 @@
|
||||
</template>
|
||||
<v-list>
|
||||
<v-list-item class="minHeight36">
|
||||
<v-checkbox class="mt-0" hide-details v-model="showHiddenFiles" label="Hidden files"></v-checkbox>
|
||||
<v-checkbox class="mt-0" hide-details v-model="showHiddenFiles" :label="$t('Setting.HiddenFiles')"></v-checkbox>
|
||||
</v-list-item>
|
||||
</v-list>
|
||||
</v-menu>
|
||||
</v-item-group>
|
||||
</v-card-title>
|
||||
<v-card-subtitle>Current path: {{ this.currentPath === "" ? "/" : this.currentPath }}</v-card-subtitle>
|
||||
<v-card-subtitle>{{ $t('Setting.CurrentPath') }} {{ this.currentPath === "" ? "/" : this.currentPath }}</v-card-subtitle>
|
||||
<v-data-table
|
||||
:items="files"
|
||||
class="files-table"
|
||||
@@ -61,13 +61,13 @@
|
||||
:sort-desc.sync="sortDesc"
|
||||
:items-per-page.sync="countPerPage"
|
||||
:footer-props="{
|
||||
itemsPerPageText: 'Files'
|
||||
itemsPerPageText: $t('Setting.Files')
|
||||
}"
|
||||
mobile-breakpoint="0"
|
||||
item-key="name">
|
||||
|
||||
<template #no-data>
|
||||
<div class="text-center">empty</div>
|
||||
<div class="text-center">{{ $t('Setting.Empty') }}</div>
|
||||
</template>
|
||||
|
||||
<template slot="body.prepend" v-if="(currentPath !== '')">
|
||||
@@ -99,26 +99,26 @@
|
||||
<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)" v-if="!contextMenu.item.isDirectory">
|
||||
<v-icon class="mr-1">mdi-file-document-edit-outline</v-icon> Edit file
|
||||
<v-icon class="mr-1">mdi-file-document-edit-outline</v-icon> {{ $t('Setting.EditFile') }}
|
||||
</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-icon class="mr-1">mdi-cloud-download</v-icon> {{ $t('Setting.Download') }}
|
||||
</v-list-item>
|
||||
<v-list-item @click="renameFile(contextMenu.item)" v-if="!contextMenu.item.isDirectory && currentPath !== '/config_examples'">
|
||||
<v-icon class="mr-1">mdi-rename-box</v-icon> Rename
|
||||
<v-icon class="mr-1">mdi-rename-box</v-icon> {{ $t('Setting.Rename') }}
|
||||
</v-list-item>
|
||||
<v-list-item @click="removeFile" v-if="!contextMenu.item.isDirectory && currentPath !== '/config_examples'">
|
||||
<v-icon class="mr-1">mdi-delete</v-icon> Delete
|
||||
<v-icon class="mr-1">mdi-delete</v-icon> {{ $t('Setting.Delete') }}
|
||||
</v-list-item>
|
||||
<v-list-item @click="deleteDirectoryAction" v-if="contextMenu.item.isDirectory && currentPath !== '' && currentPath !== '/config_examples'">
|
||||
<v-icon class="mr-1">mdi-delete</v-icon> Delete
|
||||
<v-icon class="mr-1">mdi-delete</v-icon> {{ $t('Setting.Delete') }}
|
||||
</v-list-item>
|
||||
</v-list>
|
||||
</v-menu>
|
||||
<v-dialog v-model="editor.showLoader" hide-overlay persistent width="300" >
|
||||
<v-card color="primary" dark >
|
||||
<v-card-text>
|
||||
Please stand by
|
||||
{{ $t('Setting.PleaseStandBy') }}
|
||||
<v-progress-linear indeterminate color="white" class="mb-0" ></v-progress-linear>
|
||||
</v-card-text>
|
||||
</v-card>
|
||||
@@ -132,9 +132,11 @@
|
||||
<v-toolbar-title>{{ editor.item.filename }}</v-toolbar-title>
|
||||
<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-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-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-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>{{ $t('Setting.ConfigReference') }}</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">{{ $t('Setting.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>{{ $t('Setting.SaveRestart') }}</v-btn>
|
||||
</v-toolbar-items>
|
||||
</v-toolbar>
|
||||
<prism-editor class="my-editor" v-model="editor.sourcecode" :readonly="editor.readonly" :highlight="highlighter" line-numbers></prism-editor>
|
||||
@@ -142,40 +144,40 @@
|
||||
</v-dialog>
|
||||
<v-dialog v-model="dialogRenameFile.show" max-width="400">
|
||||
<v-card>
|
||||
<v-card-title class="headline">Rename File</v-card-title>
|
||||
<v-card-title class="headline">{{ $t('Setting.RenameFile') }}</v-card-title>
|
||||
<v-card-text>
|
||||
<v-text-field label="Name" required v-model="dialogRenameFile.newName"></v-text-field>
|
||||
<v-text-field :label="$t('Setting.Name')" required v-model="dialogRenameFile.newName"></v-text-field>
|
||||
</v-card-text>
|
||||
<v-card-actions>
|
||||
<v-spacer></v-spacer>
|
||||
<v-btn color="" text @click="dialogRenameFile.show = false">Cancel</v-btn>
|
||||
<v-btn color="primary" text @click="renameFileAction">rename</v-btn>
|
||||
<v-btn color="" text @click="dialogRenameFile.show = false">{{ $t('Setting.Cancel') }}</v-btn>
|
||||
<v-btn color="primary" text @click="renameFileAction">{{ $t('Setting.Rename') }}</v-btn>
|
||||
</v-card-actions>
|
||||
</v-card>
|
||||
</v-dialog>
|
||||
<v-dialog v-model="dialogCreateFile.show" max-width="400">
|
||||
<v-card>
|
||||
<v-card-title class="headline">Create File</v-card-title>
|
||||
<v-card-title class="headline">{{ $t('Setting.CreateFile') }}</v-card-title>
|
||||
<v-card-text>
|
||||
<v-text-field label="Name" required v-model="dialogCreateFile.name"></v-text-field>
|
||||
<v-text-field :label="$t('Setting.Name')" required v-model="dialogCreateFile.name"></v-text-field>
|
||||
</v-card-text>
|
||||
<v-card-actions>
|
||||
<v-spacer></v-spacer>
|
||||
<v-btn color="" text @click="dialogCreateFile.show = false">Cancel</v-btn>
|
||||
<v-btn color="primary" text @click="createFileAction">create</v-btn>
|
||||
<v-btn color="" text @click="dialogCreateFile.show = false">{{ $t('Setting.Cancel') }}</v-btn>
|
||||
<v-btn color="primary" text @click="createFileAction">{{ $t('Setting.Create') }}</v-btn>
|
||||
</v-card-actions>
|
||||
</v-card>
|
||||
</v-dialog>
|
||||
<v-dialog v-model="dialogCreateFolder.show" max-width="400">
|
||||
<v-card>
|
||||
<v-card-title class="headline">Create Folder</v-card-title>
|
||||
<v-card-title class="headline">{{ $t('Setting.CreateFolder') }}</v-card-title>
|
||||
<v-card-text>
|
||||
<v-text-field label="Name" required v-model="dialogCreateFolder.name"></v-text-field>
|
||||
<v-text-field :label="$t('Setting.Name')" required v-model="dialogCreateFolder.name"></v-text-field>
|
||||
</v-card-text>
|
||||
<v-card-actions>
|
||||
<v-spacer></v-spacer>
|
||||
<v-btn color="" text @click="dialogCreateFolder.show = false">Cancel</v-btn>
|
||||
<v-btn color="primary" text @click="createFolderAction">create</v-btn>
|
||||
<v-btn color="" text @click="dialogCreateFolder.show = false">{{ $t('Setting.Cancel') }}</v-btn>
|
||||
<v-btn color="primary" text @click="createFolderAction">{{ $t('Setting.Create') }}</v-btn>
|
||||
</v-card-actions>
|
||||
</v-card>
|
||||
</v-dialog>
|
||||
@@ -188,7 +190,7 @@
|
||||
dark
|
||||
v-model="uploadSnackbar.status"
|
||||
>
|
||||
<span v-if="uploadSnackbar.max > 1" class="mr-1">({{ uploadSnackbar.number }}/{{ uploadSnackbar.max }})</span><strong>Uploading {{ uploadSnackbar.filename }}</strong><br />
|
||||
<span v-if="uploadSnackbar.max > 1" class="mr-1">({{ uploadSnackbar.number }}/{{ uploadSnackbar.max }})</span><strong>{{ $t('Setting.Uploading') }} {{ uploadSnackbar.filename }}</strong><br />
|
||||
{{ Math.round(uploadSnackbar.percent) }} % @ {{ formatFilesize(Math.round(uploadSnackbar.speed)) }}/s<br />
|
||||
<v-progress-linear class="mt-2" :value="uploadSnackbar.percent"></v-progress-linear>
|
||||
<template v-slot:action="{ attrs }">
|
||||
@@ -232,9 +234,9 @@
|
||||
selected: [],
|
||||
headers: [
|
||||
{ text: '', value: '', },
|
||||
{ text: 'Name', value: 'filename', },
|
||||
{ text: 'Filesize', value: 'size', align: 'right', },
|
||||
{ text: 'Last modified', value: 'modified', align: 'right', },
|
||||
{ text: this.$t('Setting.Name'), value: 'filename', },
|
||||
{ text: this.$t('Setting.Filesize'), value: 'size', align: 'right', },
|
||||
{ text: this.$t('Setting.LastModified'), value: 'modified', align: 'right', },
|
||||
],
|
||||
options: {
|
||||
},
|
||||
|
||||
@@ -6,26 +6,26 @@
|
||||
<v-card>
|
||||
<v-toolbar flat dense >
|
||||
<v-toolbar-title>
|
||||
<span class="subheading"><v-icon left>mdi-console-line</v-icon>Console</span>
|
||||
<span class="subheading"><v-icon left>mdi-console-line</v-icon>{{ $t('Setting.Console') }}</span>
|
||||
</v-toolbar-title>
|
||||
</v-toolbar>
|
||||
<v-card-text class="py-3">
|
||||
<v-container px-0 py-0>
|
||||
<v-row>
|
||||
<v-col class="py-2">
|
||||
<v-switch v-model="hideWaitTemperatures" label="Hide temperatures" hide-details class="mt-0"></v-switch>
|
||||
<v-switch v-model="hideWaitTemperatures" :label="$t('Setting.HideTemperatures')" hide-details class="mt-0"></v-switch>
|
||||
</v-col>
|
||||
</v-row>
|
||||
<v-row>
|
||||
<v-col class="py-2">
|
||||
<v-switch v-model="boolCustomFilters" label="Custom filter" hide-details class="mt-0"></v-switch>
|
||||
<v-switch v-model="boolCustomFilters" :label="$t('Setting.CustomFilter')" hide-details class="mt-0"></v-switch>
|
||||
</v-col>
|
||||
</v-row>
|
||||
<v-row v-if="boolCustomFilters">
|
||||
<v-col class="py-2">
|
||||
<v-textarea
|
||||
outlined
|
||||
label="Rules"
|
||||
:label="$t('Setting.Rules')"
|
||||
v-model="customFilters"
|
||||
hide-details
|
||||
class="mb-2"
|
||||
|
||||
@@ -0,0 +1,63 @@
|
||||
<style>
|
||||
.webcamImage {
|
||||
width: 100%;
|
||||
}
|
||||
</style>
|
||||
|
||||
<template>
|
||||
<v-card>
|
||||
<v-toolbar flat dense >
|
||||
<v-toolbar-title>
|
||||
<span class="subheading"><v-icon left>mdi-tune</v-icon>{{ $t('Setting.ControlExtruder') }}</span>
|
||||
</v-toolbar-title>
|
||||
</v-toolbar>
|
||||
<v-card-text class="pt-2 pb-0">
|
||||
<v-text-field
|
||||
:label="$t('Setting.FeedrateXY')"
|
||||
v-model="feedrateXY"
|
||||
type="number"
|
||||
suffix="mm/s"
|
||||
></v-text-field>
|
||||
<v-text-field
|
||||
:label="$t('Setting.FeedrateZ')"
|
||||
v-model="feedrateZ"
|
||||
type="number"
|
||||
suffix="mm/s"
|
||||
></v-text-field>
|
||||
</v-card-text>
|
||||
</v-card>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
components: {
|
||||
|
||||
},
|
||||
data: function() {
|
||||
return {
|
||||
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
feedrateXY: {
|
||||
get() {
|
||||
return this.$store.state.gui.dashboard.control.feedrateXY
|
||||
},
|
||||
set(value) {
|
||||
return this.$store.dispatch('gui/setSettings', { dashboard: { control: { feedrateXY: value } } })
|
||||
}
|
||||
},
|
||||
feedrateZ: {
|
||||
get() {
|
||||
return this.$store.state.gui.dashboard.control.feedrateZ
|
||||
},
|
||||
set(value) {
|
||||
return this.$store.dispatch('gui/setSettings', { dashboard: { control: { feedrateZ: value } } })
|
||||
}
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -6,24 +6,24 @@
|
||||
<v-card>
|
||||
<v-toolbar flat dense >
|
||||
<v-toolbar-title>
|
||||
<span class="subheading"><v-icon left>mdi-view-dashboard</v-icon>Dashboard</span>
|
||||
<span class="subheading"><v-icon left>mdi-view-dashboard</v-icon>{{ $t('Setting.Dashboard') }}</span>
|
||||
</v-toolbar-title>
|
||||
</v-toolbar>
|
||||
<v-card-text>
|
||||
<v-container px-0 py-0>
|
||||
<v-row>
|
||||
<v-col class="py-2">
|
||||
<v-switch v-model="boolShowWebcamOnDashboard" label="Webcam" hide-details class="mt-0"></v-switch>
|
||||
<v-switch v-model="boolShowWebcamOnDashboard" :label="$t('Setting.Webcam')" hide-details class="mt-0"></v-switch>
|
||||
</v-col>
|
||||
</v-row>
|
||||
<v-row>
|
||||
<v-col class="py-2">
|
||||
<v-switch v-model="boolShowTempchartOnDashboard" label="Tempchart" hide-details class="mt-0"></v-switch>
|
||||
<v-switch v-model="boolShowTempchartOnDashboard" :label="$t('Setting.Tempchart')" hide-details class="mt-0"></v-switch>
|
||||
</v-col>
|
||||
</v-row>
|
||||
<v-row>
|
||||
<v-col class="py-2">
|
||||
<v-switch v-model="boolShowConsoleOnDashboard" label="Console" hide-details class="mt-0"></v-switch>
|
||||
<v-switch v-model="boolShowConsoleOnDashboard" :label="$t('Setting.Console')" hide-details class="mt-0"></v-switch>
|
||||
</v-col>
|
||||
</v-row>
|
||||
</v-container>
|
||||
|
||||
@@ -2,20 +2,20 @@
|
||||
<v-card>
|
||||
<v-toolbar flat dense >
|
||||
<v-toolbar-title>
|
||||
<span class="subheading"><v-icon left>mdi-arrow-expand-vertical</v-icon>Endstops</span>
|
||||
<span class="subheading"><v-icon left>mdi-arrow-expand-vertical</v-icon>{{ $t('Setting.Endstops')}}</span>
|
||||
</v-toolbar-title>
|
||||
</v-toolbar>
|
||||
<v-card-text class="pb-0">
|
||||
<v-container px-0 py-0>
|
||||
<v-row v-for="(status, index) of sortEndstops" v-bind:key="index">
|
||||
<v-col>
|
||||
<label class="mt-1 d-inline-block">Endstop <b>{{ index.toUpperCase() }}</b></label>
|
||||
<label class="mt-1 d-inline-block">{{ $t('Setting.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>
|
||||
<v-row v-if="(Object.keys(endstops).length === 0 && endstops.constructor === Object)" >
|
||||
<v-col>
|
||||
<p>Press the sync-button on the right-bottom to load the current endstop status.</p>
|
||||
<p>{{ $t('Setting.EndstopInfo')}}</p>
|
||||
</v-col>
|
||||
</v-row>
|
||||
</v-container>
|
||||
|
||||
@@ -8,13 +8,13 @@
|
||||
<v-card>
|
||||
<v-toolbar flat dense >
|
||||
<v-toolbar-title>
|
||||
<span class="subheading"><v-icon left>mdi-cog</v-icon>General</span>
|
||||
<span class="subheading"><v-icon left>mdi-cog</v-icon>{{ $t('Setting.General') }}</span>
|
||||
</v-toolbar-title>
|
||||
</v-toolbar>
|
||||
<v-card-text class="pt-2 pb-0">
|
||||
<v-text-field
|
||||
v-model="printerName"
|
||||
label="Printer Name"
|
||||
:label="$t('Setting.PrinterName')"
|
||||
></v-text-field>
|
||||
</v-card-text>
|
||||
</v-card>
|
||||
|
||||
@@ -0,0 +1,58 @@
|
||||
<style>
|
||||
|
||||
</style>
|
||||
|
||||
<template>
|
||||
<v-card>
|
||||
<v-toolbar flat dense >
|
||||
<v-toolbar-title>
|
||||
<span class="subheading"><v-icon left>mdi-translate</v-icon>{{ $t('Setting.Language') }}</span>
|
||||
</v-toolbar-title>
|
||||
</v-toolbar>
|
||||
<v-card-text class="pt-2 pb-0">
|
||||
<v-select
|
||||
v-model="lang"
|
||||
@change="changeLanguage"
|
||||
:items="items"
|
||||
:label="$t('Setting.Language')"
|
||||
></v-select>
|
||||
</v-card-text>
|
||||
</v-card>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
components: {
|
||||
|
||||
},
|
||||
data: function() {
|
||||
return {
|
||||
items: [
|
||||
{
|
||||
text: "English",
|
||||
value: "en"
|
||||
},
|
||||
{
|
||||
text: "简体中文",
|
||||
value: "zh"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
lang: {
|
||||
get() {
|
||||
return localStorage.getItem("lang")
|
||||
},
|
||||
set(newName){
|
||||
return localStorage.setItem("lang",newName)
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
changeLanguage(val){
|
||||
this.$i18n.locale = this.lang = val
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -2,16 +2,16 @@
|
||||
<v-card>
|
||||
<v-toolbar flat dense >
|
||||
<v-toolbar-title>
|
||||
<span class="subheading"><v-icon left>mdi-speedometer</v-icon>Machine Limits</span>
|
||||
<span class="subheading"><v-icon left>mdi-speedometer</v-icon>{{ $t('Setting.MachineLimits')}}</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>
|
||||
<tool-slider :label="$t('Setting.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>
|
||||
<tool-slider :label="$t('Setting.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>
|
||||
<tool-slider :label="$t('Setting.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>
|
||||
<tool-slider :label="$t('Setting.SquareCornerVelocity')" 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>
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<v-card>
|
||||
<v-toolbar flat dense >
|
||||
<v-toolbar-title>
|
||||
<span class="subheading"><v-icon left>mdi-file-document-edit</v-icon>Logfiles</span>
|
||||
<span class="subheading"><v-icon left>mdi-file-document-edit</v-icon>{{ $t("Setting.Logfiles")}}</span>
|
||||
</v-toolbar-title>
|
||||
</v-toolbar>
|
||||
<v-card-text :class="'text-center text-lg-left py-0'">
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<v-card>
|
||||
<v-toolbar flat dense >
|
||||
<v-toolbar-title>
|
||||
<span class="subheading"><v-icon left>mdi-code-tags</v-icon>Macros</span>
|
||||
<span class="subheading"><v-icon left>mdi-code-tags</v-icon>{{ $t('Setting.Macros') }}</span>
|
||||
</v-toolbar-title>
|
||||
</v-toolbar>
|
||||
<v-card-text class="py-3">
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<v-card>
|
||||
<v-toolbar flat dense >
|
||||
<v-toolbar-title>
|
||||
<span class="subheading"><v-icon left>mdi-fire</v-icon>Preheat Presets</span>
|
||||
<span class="subheading"><v-icon left>mdi-fire</v-icon>{{ $t('Setting.PreheatPresets') }}</span>
|
||||
</v-toolbar-title>
|
||||
</v-toolbar>
|
||||
<v-card-text class="py-3">
|
||||
@@ -28,7 +28,7 @@
|
||||
<v-col class="rounded transition-swing secondary py-2 px-2 mb-6" style="cursor: pointer;">
|
||||
<v-row align="center">
|
||||
<v-col class="pl-6">
|
||||
<strong>Cooldown</strong>
|
||||
<strong>{{ $t('Setting.Cooldown')}}</strong>
|
||||
</v-col>
|
||||
<v-col class="col-auto text-right"><v-btn small class="minwidth-0 float-right" v-on:click.stop.prevent="editCooldown"><v-icon small>mdi-pencil</v-icon></v-btn></v-col>
|
||||
</v-row>
|
||||
@@ -36,7 +36,7 @@
|
||||
</v-row>
|
||||
<v-row>
|
||||
<v-col class="text-center mt-0">
|
||||
<v-btn @click="createPreset">add preset</v-btn>
|
||||
<v-btn @click="createPreset">{{ $t('Setting.AddPreset')}}</v-btn>
|
||||
</v-col>
|
||||
</v-row>
|
||||
</v-container>
|
||||
@@ -48,7 +48,7 @@
|
||||
<v-toolbar-title>
|
||||
<span class="subheading">
|
||||
<v-icon class="mdi mdi-fire" left></v-icon>
|
||||
{{ dialog.index === null ? "Create" : "Edit" }} Preset
|
||||
{{ dialog.index === null ? $t('Setting.Create') : $t('Setting.Edit') }} {{ $t('Setting.Preset') }}
|
||||
</span>
|
||||
</v-toolbar-title>
|
||||
<v-spacer></v-spacer>
|
||||
@@ -67,7 +67,7 @@
|
||||
<v-col class="col-12">
|
||||
<v-text-field
|
||||
v-model="dialog.name"
|
||||
label="Name"
|
||||
:label="$t('Setting.Name')"
|
||||
hide-details="auto"
|
||||
:rules="[rules.required, rules.unique]"
|
||||
dense
|
||||
@@ -107,7 +107,7 @@
|
||||
<v-textarea
|
||||
outlined
|
||||
name="input-7-4"
|
||||
label="Custom G-Code"
|
||||
:label="$t('Setting.CustomGCode')"
|
||||
v-model="dialog.gcode"
|
||||
hide-details="auto"
|
||||
></v-textarea>
|
||||
@@ -115,7 +115,7 @@
|
||||
</v-row>
|
||||
<v-row class="mt-3" v-if="dialog.boolInvalidMin">
|
||||
<v-col class="py-0">
|
||||
<v-alert dense text type="error">You have to set minimum a target temperature or a custom gcode.</v-alert>
|
||||
<v-alert dense text type="error">{{ $t('Setting.PresetInfo')}}</v-alert>
|
||||
</v-col>
|
||||
</v-row>
|
||||
<v-row class="mt-3">
|
||||
@@ -135,7 +135,7 @@
|
||||
:class="dialog.index !== null ? 'float-right' : '' "
|
||||
type="submit"
|
||||
>
|
||||
{{ dialog.index === null ? "store" : "update" }} preset
|
||||
{{ dialog.index === null ? $t('Setting.Store') : $t('Setting.Update') }} {{ $t('Setting.Preset') }}
|
||||
</v-btn>
|
||||
</v-col>
|
||||
</v-row>
|
||||
@@ -150,7 +150,7 @@
|
||||
<v-toolbar flat dense color="primary">
|
||||
<v-toolbar-title>
|
||||
<span class="subheading">
|
||||
<v-icon class="mdi mdi-fire" left></v-icon> Edit Cooldown
|
||||
<v-icon class="mdi mdi-fire" left></v-icon> {{ $t('Setting.EditCooldown')}}
|
||||
</span>
|
||||
</v-toolbar-title>
|
||||
<v-spacer></v-spacer>
|
||||
@@ -167,7 +167,7 @@
|
||||
<v-textarea
|
||||
outlined
|
||||
name="input-7-4"
|
||||
label="Custom G-Code"
|
||||
:label="$t('Setting.CustomGCode')"
|
||||
v-model="cooldownDialog.gcode"
|
||||
:rules="[rules.required]"
|
||||
></v-textarea>
|
||||
@@ -180,7 +180,7 @@
|
||||
outlined
|
||||
type="submit"
|
||||
>
|
||||
update cooldown
|
||||
{{ $t('Setting.UpdateCooldown')}}
|
||||
</v-btn>
|
||||
</v-col>
|
||||
</v-row>
|
||||
@@ -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() {
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<v-card>
|
||||
<v-toolbar flat dense >
|
||||
<v-toolbar-title>
|
||||
<span class="subheading"><v-icon left>mdi-printer-3d</v-icon>Remote Printers</span>
|
||||
<span class="subheading"><v-icon left>mdi-printer-3d</v-icon>{{ $t('Setting.RemotePrinters') }}</span>
|
||||
</v-toolbar-title>
|
||||
</v-toolbar>
|
||||
<v-card-text class="py-3">
|
||||
@@ -30,7 +30,7 @@
|
||||
</v-row>
|
||||
<v-row>
|
||||
<v-col class="text-center mt-0">
|
||||
<v-btn @click="dialogAddPrinter.bool = true">add printer</v-btn>
|
||||
<v-btn @click="dialogAddPrinter.bool = true">{{ $t('Setting.AddPrinter')}}</v-btn>
|
||||
</v-col>
|
||||
</v-row>
|
||||
</v-container>
|
||||
@@ -42,7 +42,7 @@
|
||||
<v-toolbar-title>
|
||||
<span class="subheading">
|
||||
<v-icon class="mdi mdi-connection" left></v-icon>
|
||||
Add Printer
|
||||
{{ $t('Setting.AddPrinter')}}
|
||||
</span>
|
||||
</v-toolbar-title>
|
||||
<v-spacer></v-spacer>
|
||||
@@ -80,7 +80,7 @@
|
||||
class="middle"
|
||||
@click="addPrinter"
|
||||
>
|
||||
add printer
|
||||
{{ $t('Setting.AddPrinter')}}
|
||||
</v-btn>
|
||||
</v-col>
|
||||
</v-row>
|
||||
@@ -128,7 +128,7 @@
|
||||
class="middle"
|
||||
@click="addPrinter"
|
||||
>
|
||||
add printer
|
||||
{{ $t('Setting.AddPrinter')}}
|
||||
</v-btn>
|
||||
</v-col>
|
||||
</v-row>
|
||||
@@ -142,7 +142,7 @@
|
||||
<v-toolbar-title>
|
||||
<span class="subheading">
|
||||
<v-icon class="mdi mdi-connection" left></v-icon>
|
||||
Edit Printer
|
||||
{{ $t('Setting.EditPrinter')}}
|
||||
</span>
|
||||
</v-toolbar-title>
|
||||
<v-spacer></v-spacer>
|
||||
@@ -190,7 +190,7 @@
|
||||
class="middle"
|
||||
@click="updatePrinter"
|
||||
>
|
||||
update printer
|
||||
{{ $t('Setting.UpdatePrinter')}}
|
||||
</v-btn>
|
||||
</v-col>
|
||||
</v-row>
|
||||
@@ -248,7 +248,7 @@
|
||||
class="middle"
|
||||
@click="updatePrinter"
|
||||
>
|
||||
update printer
|
||||
{{ $t('Setting.UpdatePrinter')}}
|
||||
</v-btn>
|
||||
</v-col>
|
||||
</v-row>
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
<v-switch v-model="runout.enabled" hide-details @change="changeSensor(runout)" class="settingsRunoutSwitchInput my-0"></v-switch>
|
||||
</v-toolbar>
|
||||
<v-card-text v-if="runout.enabled">
|
||||
<v-chip label block :color="runout.filament_detected ? 'green' : 'red' " class="d-block text-center">{{ runout.filament_detected ? 'detected' : 'empty' }}</v-chip>
|
||||
<v-chip label block :color="runout.filament_detected ? 'green' : 'red' " class="d-block text-center">{{ runout.filament_detected ? $t('Setting.detected') : $t('Setting.Empty') }}</v-chip>
|
||||
</v-card-text>
|
||||
</v-card>
|
||||
</div>
|
||||
|
||||
@@ -2,14 +2,14 @@
|
||||
<v-card>
|
||||
<v-toolbar flat dense >
|
||||
<v-toolbar-title>
|
||||
<span class="subheading"><v-icon left>mdi-update</v-icon>Update Manager</span>
|
||||
<span class="subheading"><v-icon left>mdi-update</v-icon>{{ $t('Setting.UpdateManager')}}</span>
|
||||
</v-toolbar-title>
|
||||
<v-spacer></v-spacer>
|
||||
<v-tooltip top>
|
||||
<template v-slot:activator="{ on, attrs }">
|
||||
<v-btn small class="px-2 minwidth-0" color="primary" :loading="loadings.includes('loadingBtnSyncUpdateManager')" :disabled="['printing', 'paused'].includes(printer_state)" @click="btnSync" v-bind="attrs" v-on="on"><v-icon small>mdi-refresh</v-icon></v-btn>
|
||||
</template>
|
||||
<span>Check for updates</span>
|
||||
<span>{{ $t('Setting.CheckForUpdates')}}</span>
|
||||
</v-tooltip>
|
||||
</v-toolbar>
|
||||
<v-card-text class="px-0 py-0">
|
||||
@@ -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,17 +38,17 @@
|
||||
<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">
|
||||
<strong>System</strong><br />
|
||||
<v-col class="col-auto pl-6 text-no-wrap">
|
||||
<strong>{{ $t('Setting.System')}}</strong><br />
|
||||
<v-tooltip top v-if="version_info.system.package_count > 0" :max-width="300">
|
||||
<template v-slot:activator="{ on, attrs }">
|
||||
<span v-bind="attrs" v-on="on">{{ version_info.system.package_count }} packages can be upgraded</span>
|
||||
<span v-bind="attrs" v-on="on">{{ version_info.system.package_count }} {{ $t('Setting.PackagesCanBeUpgraded')}}</span>
|
||||
</template>
|
||||
<span>{{ version_info.system.package_list.join(', ') }}</span>
|
||||
</v-tooltip>
|
||||
<span v-if="version_info.system.package_count === 0">OS-Packages</span>
|
||||
<span v-if="version_info.system.package_count === 0">{{ $t('Setting.OSPackages')}}</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, { })
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<v-card>
|
||||
<v-toolbar flat dense >
|
||||
<v-toolbar-title>
|
||||
<span class="subheading"><v-icon left>mdi-webcam</v-icon>Webcam</span>
|
||||
<span class="subheading"><v-icon left>mdi-webcam</v-icon>{{ $t('Setting.Webcam') }}</span>
|
||||
</v-toolbar-title>
|
||||
</v-toolbar>
|
||||
<v-card-text>
|
||||
@@ -16,13 +16,13 @@
|
||||
<v-text-field
|
||||
v-model="webcamUrl"
|
||||
hide-details
|
||||
label="Webcam URL"
|
||||
:label="$t('Setting.WebcamURL')"
|
||||
></v-text-field>
|
||||
</v-col>
|
||||
</v-row>
|
||||
<v-row v-if="rotationEnabled">
|
||||
<v-col class="py-2" col-auto>
|
||||
<v-switch v-model="rotate" hide-details label="Rotate" class="mt-0"></v-switch>
|
||||
<v-switch v-model="rotate" hide-details :label="$t('Setting.Rotate')" class="mt-0"></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>
|
||||
@@ -30,17 +30,17 @@
|
||||
</v-row>
|
||||
<v-row>
|
||||
<v-col class="py-2">
|
||||
<v-switch v-model="flipX" hide-details label="Flip webcam horizontally" class="mt-0"></v-switch>
|
||||
<v-switch v-model="flipX" hide-details :label="$t('Setting.FlipWebcamHorizontally')" class="mt-0"></v-switch>
|
||||
</v-col>
|
||||
</v-row>
|
||||
<v-row>
|
||||
<v-col class="py-2">
|
||||
<v-switch v-model="flipY" hide-details label="Flip webcam vertically" class="mt-0"></v-switch>
|
||||
<v-switch v-model="flipY" hide-details :label="$t('Setting.FlipWebcamVertically')" class="mt-0"></v-switch>
|
||||
</v-col>
|
||||
</v-row>
|
||||
<v-row>
|
||||
<v-col class="py-2">
|
||||
<v-switch v-model="boolNavi" hide-details label="Show in navigation" class="mt-0"></v-switch>
|
||||
<v-switch v-model="boolNavi" hide-details :label="$t('Setting.ShowInNavigation')" class="mt-0"></v-switch>
|
||||
</v-col>
|
||||
</v-row>
|
||||
</v-container>
|
||||
|
||||
@@ -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";
|
||||
@@ -13,8 +14,10 @@ import LogfilesPanel from "./LogfilesPanel";
|
||||
import UpdatePanel from "./UpdatePanel";
|
||||
import RemotePrintersPanel from "./RemotePrintersPanel";
|
||||
import PresetsPanel from "./PresetsPanel";
|
||||
import LanguagePanel from "./LanguagePanel";
|
||||
|
||||
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);
|
||||
@@ -27,6 +30,7 @@ Vue.component('settings-config-files-panel', ConfigFilesPanel);
|
||||
Vue.component('settings-update-panel', UpdatePanel);
|
||||
Vue.component('settings-remote-printers-panel', RemotePrintersPanel);
|
||||
Vue.component('settings-presets-panel', PresetsPanel);
|
||||
Vue.component('settings-language-panel', LanguagePanel);
|
||||
|
||||
export default {
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
<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") }}
|
||||
<v-icon left>mdi-information</v-icon>{{ (printer_state !== "" ? printer_state.charAt(0).toUpperCase() + printer_state.slice(1) : $t("Dashboard.Unknown")) }}
|
||||
</span>
|
||||
</v-toolbar-title>
|
||||
<v-spacer></v-spacer>
|
||||
@@ -27,7 +27,7 @@
|
||||
<template v-slot:activator="{ on, attrs }">
|
||||
<v-icon v-bind="attrs" v-on="on" small>mdi-pause</v-icon>
|
||||
</template>
|
||||
<span>Pause print</span>
|
||||
<span>{{ $t("Dashboard.PausePrint") }}</span>
|
||||
</v-tooltip>
|
||||
</v-btn>
|
||||
<v-btn small class="px-2 minwidth-0" color="red" v-if="(printer_state === 'paused')" :loading="loadings.includes('statusPrintCancel')" @click="btnCancelJob">
|
||||
@@ -35,7 +35,7 @@
|
||||
<template v-slot:activator="{ on, attrs }">
|
||||
<v-icon v-bind="attrs" v-on="on" small>mdi-stop</v-icon>
|
||||
</template>
|
||||
<span>Cancel print</span>
|
||||
<span>{{ $t("Dashboard.CancelPrint") }}</span>
|
||||
</v-tooltip>
|
||||
</v-btn>
|
||||
<v-btn small class="px-2 minwidth-0" color="orange" v-if="(printer_state === 'paused')" :loading="loadings.includes('statusPrintResume')" @click="btnResumeJob">
|
||||
@@ -43,7 +43,7 @@
|
||||
<template v-slot:activator="{ on, attrs }">
|
||||
<v-icon v-bind="attrs" v-on="on" small>mdi-play</v-icon>
|
||||
</template>
|
||||
<span>Resume print</span>
|
||||
<span>{{ $t("Dashboard.ResumePrint") }}</span>
|
||||
</v-tooltip>
|
||||
</v-btn>
|
||||
<v-btn small class="px-2 minwidth-0" color="primary" v-if="['error', 'complete'].includes(printer_state)" :loading="loadings.includes('statusPrintClear')" @click="btnClearJob">
|
||||
@@ -51,7 +51,7 @@
|
||||
<template v-slot:activator="{ on, attrs }">
|
||||
<v-icon v-bind="attrs" v-on="on" small>mdi-broom</v-icon>
|
||||
</template>
|
||||
<span>Clear print stats</span>
|
||||
<span>{{ $t("Dashboard.ClearPrintStats") }}</span>
|
||||
</v-tooltip>
|
||||
</v-btn>
|
||||
<v-btn small class="px-2 minwidth-0" color="primary" v-if="['error', 'complete'].includes(printer_state)" :loading="loadings.includes('statusPrintReprint')" @click="btnReprintJob">
|
||||
@@ -59,7 +59,7 @@
|
||||
<template v-slot:activator="{ on, attrs }">
|
||||
<v-icon v-bind="attrs" v-on="on" small>mdi-printer</v-icon>
|
||||
</template>
|
||||
<span>Reprint job</span>
|
||||
<span>{{ $t("Dashboard.ReprintJob") }}</span>
|
||||
</v-tooltip>
|
||||
</v-btn>
|
||||
</v-item-group>
|
||||
@@ -145,7 +145,7 @@
|
||||
<v-icon>mdi-poll</v-icon>
|
||||
</v-col>
|
||||
<v-col class="equal-width py-2">
|
||||
<v-row><v-col class="px-0 pb-1"><strong>Filament</strong></v-col></v-row>
|
||||
<v-row><v-col class="px-0 pb-1"><strong>{{ $t("Dashboard.Filament") }}</strong></v-col></v-row>
|
||||
<v-row>
|
||||
<v-col class="px-0 pt-1">
|
||||
<v-tooltip top>
|
||||
@@ -159,11 +159,11 @@
|
||||
</v-row>
|
||||
</v-col>
|
||||
<v-col class="equal-width py-2">
|
||||
<v-row><v-col class="px-0 pb-1"><strong>Print</strong></v-col></v-row>
|
||||
<v-row><v-col class="px-0 pb-1"><strong>{{ $t("Dashboard.Print") }}</strong></v-col></v-row>
|
||||
<v-row><v-col class="px-0 pt-1">{{ formatTime(print_time) }}</v-col></v-row>
|
||||
</v-col>
|
||||
<v-col class="equal-width py-2">
|
||||
<v-row><v-col class="px-0 pb-1"><strong>Total</strong></v-col></v-row>
|
||||
<v-row><v-col class="px-0 pb-1"><strong>{{ $t("Dashboard.Total") }}</strong></v-col></v-row>
|
||||
<v-row><v-col class="px-0 pt-1">{{ formatTime(print_time_total) }}</v-col></v-row>
|
||||
</v-col>
|
||||
</v-row>
|
||||
@@ -177,15 +177,15 @@
|
||||
<v-icon>mdi-printer-3d</v-icon>
|
||||
</v-col>
|
||||
<v-col class="equal-width py-2">
|
||||
<v-row><v-col class="px-0 pb-1"><strong>Speed</strong></v-col></v-row>
|
||||
<v-row><v-col class="px-0 pb-1"><strong>{{ $t("Dashboard.Speed") }}</strong></v-col></v-row>
|
||||
<v-row><v-col class="px-0 pt-1 text-no-wrap">{{ (requested_speed / 60).toFixed(0) }} mm/s</v-col></v-row>
|
||||
</v-col>
|
||||
<v-col class="equal-width py-2">
|
||||
<v-row><v-col class="px-0 pb-1"><strong>Layer</strong></v-col></v-row>
|
||||
<v-row><v-col class="px-0 pb-1"><strong>{{ $t("Dashboard.Layer") }}</strong></v-col></v-row>
|
||||
<v-row><v-col class="px-0 pt-1 text-no-wrap">{{ current_layer }} of {{ max_layers }}</v-col></v-row>
|
||||
</v-col>
|
||||
<v-col class="equal-width py-2">
|
||||
<v-row><v-col class="px-0 pb-1"><strong>ETA</strong></v-col></v-row>
|
||||
<v-row><v-col class="px-0 pb-1"><strong>{{ $t("Dashboard.ETA") }}</strong></v-col></v-row>
|
||||
<v-row><v-col class="px-0 pt-1">{{ eta ? formatDateTime(eta) : '--' }}</v-col></v-row>
|
||||
</v-col>
|
||||
</v-row>
|
||||
@@ -199,15 +199,15 @@
|
||||
<v-icon>mdi-clock-outline</v-icon>
|
||||
</v-col>
|
||||
<v-col class="equal-width py-2 ">
|
||||
<v-row><v-col class="px-0 pb-1"><strong>File</strong></v-col></v-row>
|
||||
<v-row><v-col class="px-0 pb-1"><strong>{{ $t("Dashboard.File") }}</strong></v-col></v-row>
|
||||
<v-row><v-col class="px-0 pt-1">{{ estimated_time_file ? formatTime(estimated_time_file) : '--' }}</v-col></v-row>
|
||||
</v-col>
|
||||
<v-col class="equal-width py-2">
|
||||
<v-row><v-col class="px-0 pb-1"><strong>Filament</strong></v-col></v-row>
|
||||
<v-row><v-col class="px-0 pb-1"><strong>{{ $t("Dashboard.Filament") }}</strong></v-col></v-row>
|
||||
<v-row><v-col class="px-0 pt-1">{{ estimated_time_filament ? formatTime(estimated_time_filament) : '--' }}</v-col></v-row>
|
||||
</v-col>
|
||||
<v-col class="equal-width py-2">
|
||||
<v-row><v-col class="px-0 pb-1"><strong>Slicer</strong></v-col></v-row>
|
||||
<v-row><v-col class="px-0 pb-1"><strong>{{ $t("Dashboard.Slicer") }}</strong></v-col></v-row>
|
||||
<v-row><v-col class="px-0 pt-1">{{ estimated_time_slicer ? formatTime(estimated_time_slicer) : '--' }}</v-col></v-row>
|
||||
</v-col>
|
||||
</v-row>
|
||||
|
||||
@@ -6,112 +6,228 @@
|
||||
.colHeaterIcons {
|
||||
width: 68px;
|
||||
}
|
||||
|
||||
.canvasjs-chart-tooltip>div {
|
||||
border-radius: 10px !important;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
<template>
|
||||
<v-card>
|
||||
<v-toolbar flat dense>
|
||||
<v-toolbar-title>
|
||||
<span class="subheading"><v-icon left>mdi-thermometer-lines</v-icon>Temperatures</span>
|
||||
</v-toolbar-title>
|
||||
<v-spacer></v-spacer>
|
||||
<v-menu :offset-y="true" title="Preheat" v-if="this['gui/getPreheatPresets'].length">
|
||||
<template v-slot:activator="{ on, attrs }">
|
||||
<v-btn small class="px-2 minwidth-0" color="primary" v-bind="attrs" v-on="on" :disabled="['printing', 'paused'].includes(printer_state)">Presets <v-icon small>mdi-menu-down</v-icon></v-btn>
|
||||
</template>
|
||||
<v-list dense class="py-0">
|
||||
<v-list-item v-for="preset of this['gui/getPreheatPresets']" v-bind:key="preset.index" link @click="preheat(preset)">
|
||||
<v-list-item-icon class="mr-0">
|
||||
<v-icon small>mdi-fire</v-icon>
|
||||
</v-list-item-icon>
|
||||
<v-list-item-content>
|
||||
<v-list-item-title v-text="preset.name"></v-list-item-title>
|
||||
</v-list-item-content>
|
||||
</v-list-item>
|
||||
</v-list>
|
||||
<v-divider></v-divider>
|
||||
<v-list dense class="py-0">
|
||||
<v-list-item link @click="cooldown()">
|
||||
<v-list-item-icon class="mr-0">
|
||||
<v-icon small>mdi-snowflake</v-icon>
|
||||
</v-list-item-icon>
|
||||
<v-list-item-content>
|
||||
<v-list-item-title>Cooldown</v-list-item-title>
|
||||
</v-list-item-content>
|
||||
</v-list-item>
|
||||
</v-list>
|
||||
</v-menu>
|
||||
<v-btn small class="px-2 minwidth-0" color="primary" @click="cooldown()" v-if="this['gui/getPreheatPresets'].length === 0"><v-icon small>mdi-snowflake</v-icon>Cooldown</v-btn>
|
||||
</v-toolbar>
|
||||
<v-card-text class="px-0 py-2 content">
|
||||
<v-container class="px-0">
|
||||
<v-row align="center">
|
||||
<v-col class="py-2 font-weight-bold" style="padding-left: 68px;">Name</v-col>
|
||||
<v-col class="py-2 text-center font-weight-bold d-none d-sm-block">State</v-col>
|
||||
<v-col class="py-2 text-center font-weight-bold">Current</v-col>
|
||||
<v-col class="py-2 pr-8 text-center 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>
|
||||
<div>
|
||||
<v-card>
|
||||
<v-toolbar flat dense>
|
||||
<v-toolbar-title>
|
||||
<span class="subheading"><v-icon left>mdi-thermometer-lines</v-icon>{{ $t("Dashboard.Temperatures") }}</span>
|
||||
</v-toolbar-title>
|
||||
<v-spacer></v-spacer>
|
||||
<v-item-group class="v-btn-toggle" name="controllers">
|
||||
<v-menu :offset-y="true" title="Preheat" v-if="this['gui/getPreheatPresets'].length">
|
||||
<template v-slot:activator="{ on, attrs }">
|
||||
<v-btn small class="px-2 minwidth-0" color="primary" v-bind="attrs" v-on="on" :disabled="['printing', 'paused'].includes(printer_state)">{{ $t("Dashboard.Presets") }} <v-icon small>mdi-menu-down</v-icon></v-btn>
|
||||
</template>
|
||||
<v-list dense class="py-0">
|
||||
<v-list-item v-for="preset of this['gui/getPreheatPresets']" v-bind:key="preset.index" link @click="preheat(preset)">
|
||||
<v-list-item-icon class="mr-0">
|
||||
<v-icon small>mdi-fire</v-icon>
|
||||
</v-list-item-icon>
|
||||
<v-list-item-content>
|
||||
<v-list-item-title v-text="preset.name"></v-list-item-title>
|
||||
</v-list-item-content>
|
||||
</v-list-item>
|
||||
</v-list>
|
||||
<v-divider></v-divider>
|
||||
<v-list dense class="py-0">
|
||||
<v-list-item link @click="cooldown()">
|
||||
<v-list-item-icon class="mr-0">
|
||||
<v-icon small>mdi-snowflake</v-icon>
|
||||
</v-list-item-icon>
|
||||
<v-list-item-content>
|
||||
<v-list-item-title>{{ $t("Dashboard.Cooldown") }}</v-list-item-title>
|
||||
</v-list-item-content>
|
||||
</v-list-item>
|
||||
</v-list>
|
||||
</v-menu>
|
||||
<v-btn small class="px-2 minwidth-0" color="primary" @click="cooldown()" v-if="this['gui/getPreheatPresets'].length === 0"><v-icon small class="mr-1">mdi-snowflake</v-icon>{{ $t("Dashboard.Cooldown") }}</v-btn>
|
||||
<v-menu :offset-y="true" :close-on-content-click="false" :title="$t('Dashboard.SetupTemperatures')">
|
||||
<template v-slot:activator="{ on, attrs }">
|
||||
<v-btn small class="px-2 minwidth-0" color="grey darken-3" v-bind="attrs" v-on="on"><v-icon small>mdi-cog</v-icon></v-btn>
|
||||
</template>
|
||||
<v-list>
|
||||
<v-list-item class="minHeight36">
|
||||
<v-checkbox class="mt-0" v-model="boolTempchart" hide-details :label="$t('Dashboard.ShowChart')"></v-checkbox>
|
||||
</v-list-item>
|
||||
<v-list-item class="minHeight36">
|
||||
<v-checkbox class="mt-0" v-model="autoscaleTempchart" hide-details :label="$t('Dashboard.AutoscaleChart')"></v-checkbox>
|
||||
</v-list-item>
|
||||
</v-list>
|
||||
</v-menu>
|
||||
</v-item-group>
|
||||
</v-toolbar>
|
||||
<v-card-text class="px-0 py-2 content">
|
||||
<v-container class="px-0">
|
||||
<v-row align="center">
|
||||
<v-col class="pl-8 pr-0 flex-grow-0 py-2colHeaterIcons">
|
||||
<v-icon :color="heater.color">mdi-{{ heater.icon }}</v-icon>
|
||||
</v-col>
|
||||
<v-col class="py-2 font-weight-bold">{{ convertName(heater.name) }}</v-col>
|
||||
<v-col class="py-2 text-center d-none d-sm-block"><small>{{ heater.target > 0 ? (heater.power !== null ? (heater.power > 0 ? (heater.power * 100).toFixed(0)+'%' : "0%") : "active") : "off" }}</small></v-col>
|
||||
<v-col class="py-2 text-center">{{ heater.temperature ? heater.temperature.toFixed(1) : 0 }}°C</v-col>
|
||||
<v-col class="text-center py-2 pr-8 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 class="py-2 font-weight-bold" style="padding-left: 68px;">{{ $t("Dashboard.Name") }}</v-col>
|
||||
<v-col class="py-2 text-center font-weight-bold d-none d-sm-block">{{ $t("Dashboard.State") }}</v-col>
|
||||
<v-col class="py-2 text-center font-weight-bold">{{ $t("Dashboard.Current") }}</v-col>
|
||||
<v-col class="py-2 pr-8 text-center font-weight-bold">{{ $t("Dashboard.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 align="center">
|
||||
<v-col class="pl-8 pr-0 flex-grow-0 py-2 colHeaterIcons">
|
||||
<v-icon :color="heater.color">mdi-{{ heater.icon }}</v-icon>
|
||||
</v-col>
|
||||
<v-col class="py-2 font-weight-bold"><span style="cursor: pointer;" @click="openHeater(heater)">{{ convertName(heater.name) }}</span></v-col>
|
||||
<v-col class="py-2 text-center d-none d-sm-block"><small>{{ heater.target > 0 ? (heater.power !== null ? (heater.power > 0 ? (heater.power * 100).toFixed(0)+'%' : "0%") : "active") : "off" }}</small></v-col>
|
||||
<v-col class="py-2 text-center">
|
||||
<span class="d-block">{{ heater.temperature ? heater.temperature.toFixed(1) : 0 }}°C</span>
|
||||
<span v-for="(values, key) of heater.additionValues" 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">
|
||||
<toolInput :name="heater.name" :target="heater.target" :min_temp="heater.min_temp" :max_temp="heater.max_temp" :items="heater.presets" command="SET_HEATER_TEMPERATURE" attribute-name="HEATER" ></toolInput>
|
||||
</v-col>
|
||||
</v-row>
|
||||
</div>
|
||||
<div v-for="(fan, index) in temperatureFans" v-bind:key="index+99" >
|
||||
<v-divider class="my-2"></v-divider>
|
||||
<v-row align="center">
|
||||
<v-col class="flex-grow-0 py-2 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="py-2 font-weight-bold"><span style="cursor: pointer;" @click="openHeater(fan)">{{ convertName(fan.name) }}</span></v-col>
|
||||
<v-col class="py-2 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-2 text-center">
|
||||
<span class="d-block">{{ fan.temperature ? fan.temperature.toFixed(1) : 0}}°C</span>
|
||||
<span v-for="(values, key) of fan.additionValues" 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 pr-0 vertical_align_center">
|
||||
<toolInput :name="fan.name" :target="fan.target" command="SET_TEMPERATURE_FAN_TARGET" attribute-name="temperature_fan" :items="fan.presets" ></toolInput>
|
||||
</v-col>
|
||||
</v-row>
|
||||
</div>
|
||||
<div v-for="(sensor,index) in temperatureSensors" v-bind:key="index+999">
|
||||
<v-divider class="my-2"></v-divider>
|
||||
<v-row align="center">
|
||||
<v-col class="flex-grow-0 py-2 pl-8 pr-0 colHeaterIcons">
|
||||
<v-icon color="grey darken-2" :title="$t('Dashboard.Min')+sensor.min_temp+'° / ' + $t('Dashboard.Max')+sensor.max_temp+'°'">{{ sensor.icon }}</v-icon>
|
||||
</v-col>
|
||||
<v-col class="py-2 font-weight-bold">
|
||||
<span style="cursor: pointer;" @click="openHeater(sensor)">{{ convertName(sensor.name) }}</span>
|
||||
</v-col>
|
||||
<v-col class="py-2 d-none d-sm-block"><span> </span></v-col>
|
||||
<v-col class="py-2 text-center">
|
||||
<v-tooltip top>
|
||||
<template v-slot:activator="{ on, attrs }">
|
||||
<span
|
||||
style="cursor: default;"
|
||||
class="d-block px-0"
|
||||
v-bind="attrs"
|
||||
v-on="on"
|
||||
>{{ sensor.temperature ? sensor.temperature.toFixed(1) : 0 }}°C</span>
|
||||
</template>
|
||||
<span>{{ $t('Dashboard.Min') }}{{ sensor.measured_min_temp ? sensor.measured_min_temp.toFixed(1) : 0}}°<br />{{ $t('Dashboard.Max')}}{{ sensor.measured_max_temp ? sensor.measured_max_temp.toFixed(1) : 0 }}°</span>
|
||||
</v-tooltip>
|
||||
<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> </span></v-col>
|
||||
</v-row>
|
||||
</div>
|
||||
<v-divider class="my-2" v-if="boolTempchart"></v-divider>
|
||||
<v-row v-if="boolTempchart">
|
||||
<v-col class="px-8 pt-6">
|
||||
<temp-chart ></temp-chart>
|
||||
</v-col>
|
||||
</v-row>
|
||||
</div>
|
||||
<div v-for="(fan, index) in temperatureFans" v-bind:key="index+99" >
|
||||
<v-divider class="my-2"></v-divider>
|
||||
<v-row align="center">
|
||||
<v-col class="flex-grow-0 py-2 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="py-2 font-weight-bold">{{ convertName(fan.name) }}</v-col>
|
||||
<v-col class="py-2 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-2 text-center">{{ fan.temperature ? fan.temperature.toFixed(1) : 0}}°C</v-col>
|
||||
<v-col class="text-center py-2 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-for="(sensor,index) in temperatureSensors" v-bind:key="index+999">
|
||||
<v-divider class="my-2"></v-divider>
|
||||
<v-row align="center">
|
||||
<v-col class="flex-grow-0 py-2 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="py-2 font-weight-bold">{{ convertName(sensor.name) }}</v-col>
|
||||
<v-col class="py-2 d-none d-sm-block"><span> </span></v-col>
|
||||
<v-col class="py-2 text-center">
|
||||
<v-tooltip top>
|
||||
<template v-slot:activator="{ on, attrs }">
|
||||
<span
|
||||
style="cursor: default;"
|
||||
class=" px-0"
|
||||
v-bind="attrs"
|
||||
v-on="on"
|
||||
>{{ sensor.temperature ? sensor.temperature.toFixed(1) : 0 }}°C</span>
|
||||
</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>
|
||||
</v-col>
|
||||
<v-col class="text-center py-2 pr-8 vertical_align_center"><span> </span></v-col>
|
||||
</v-row>
|
||||
</div>
|
||||
<v-divider class="my-2" v-if="boolTempchart"></v-divider>
|
||||
<v-row v-if="boolTempchart">
|
||||
<v-col class="px-8 pt-6">
|
||||
<temp-chart ></temp-chart>
|
||||
</v-col>
|
||||
</v-row>
|
||||
</v-container>
|
||||
</v-card-text>
|
||||
</v-card>
|
||||
</v-container>
|
||||
</v-card-text>
|
||||
</v-card>
|
||||
<v-dialog v-model="editHeater.bool" persistent :width="400">
|
||||
<v-card dark>
|
||||
<v-toolbar flat dense color="primary">
|
||||
<v-toolbar-title>
|
||||
<span class="subheading">
|
||||
<v-icon left>mdi-{{ 'icon' in editHeater.object ? editHeater.object.icon : "info" }}</v-icon>
|
||||
{{ 'name' in editHeater.object ? convertName(editHeater.object.name) : "UNKNOWN" }}
|
||||
</span>
|
||||
</v-toolbar-title>
|
||||
<v-spacer></v-spacer>
|
||||
<v-btn small class="minwidth-0" @click="editHeater.bool = false"><v-icon small>mdi-close-thick</v-icon></v-btn>
|
||||
</v-toolbar>
|
||||
<v-card-text class="pt-3">
|
||||
<v-container class="px-0 py-0">
|
||||
<v-row v-if="'chartTemperature' in editHeater.object && editHeater.object.chartTemperature">
|
||||
<v-col class="col-12">
|
||||
<v-checkbox
|
||||
v-model="editHeater.boolTemperature"
|
||||
:label="$t('Dashboard.ShowCurrentTemperatureInChart')"
|
||||
hide-details
|
||||
class="mt-0"
|
||||
@change="setVisible('temperature')"
|
||||
></v-checkbox>
|
||||
</v-col>
|
||||
</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="$t('Dashboard.ShowTargetTemperatureInChart')"
|
||||
hide-details
|
||||
class="mt-0"
|
||||
@change="setVisible('target')"
|
||||
></v-checkbox>
|
||||
</v-col>
|
||||
</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="$t('Dashboard.ShowPWMPowerInChart')"
|
||||
hide-details
|
||||
class="mt-0"
|
||||
@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="$t('Dashboard.ShowPWMPowerInChart')"
|
||||
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="$t('Dashboard.Show')+key+$t('Dashboard.InList')"
|
||||
hide-details
|
||||
class="mt-0"
|
||||
@change="setVisibleAdditionalSensor(key)"
|
||||
></v-checkbox>
|
||||
</v-col>
|
||||
</v-row>
|
||||
<v-row>
|
||||
<v-col class="col-12 text-center">
|
||||
<v-color-picker
|
||||
hide-canvas
|
||||
hide-mode-switch
|
||||
mode="hexa"
|
||||
v-model="editHeater.color"
|
||||
@input="setChartColor"
|
||||
class="mx-auto"
|
||||
></v-color-picker>
|
||||
</v-col>
|
||||
</v-row>
|
||||
</v-container>
|
||||
</v-card-text>
|
||||
</v-card>
|
||||
</v-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
@@ -127,7 +243,16 @@
|
||||
},
|
||||
data: function() {
|
||||
return {
|
||||
extruderTemps: [250,215,195,0],
|
||||
editHeater: {
|
||||
bool: false,
|
||||
object: {},
|
||||
boolTemperature: false,
|
||||
boolTarget: false,
|
||||
boolPower: false,
|
||||
boolSpeed: false,
|
||||
additionSensors: {},
|
||||
color: "",
|
||||
}
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
@@ -155,6 +280,22 @@
|
||||
get () {
|
||||
return this.$store.getters["printer/getTemperatureSensors"]
|
||||
}
|
||||
},
|
||||
boolTempchart: {
|
||||
get() {
|
||||
return this.$store.state.gui.dashboard.boolTempchart
|
||||
},
|
||||
set: function(newVal) {
|
||||
return this.$store.dispatch("gui/setSettings", { dashboard: { boolTempchart: newVal } })
|
||||
}
|
||||
},
|
||||
autoscaleTempchart: {
|
||||
get() {
|
||||
return this.$store.state.gui.tempchart.autoscale
|
||||
},
|
||||
set: function(newVal) {
|
||||
return this.$store.dispatch("gui/setSettings", { tempchart: { autoscale: newVal } })
|
||||
}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
@@ -162,6 +303,11 @@
|
||||
},
|
||||
methods: {
|
||||
convertName: convertName,
|
||||
cssBorderLeftColor(color) {
|
||||
return {
|
||||
"border-left-color": color
|
||||
}
|
||||
},
|
||||
preheat(preset) {
|
||||
for (const [name, attributes] of Object.entries(preset.values)) {
|
||||
if (attributes.bool) {
|
||||
@@ -178,13 +324,50 @@
|
||||
}
|
||||
|
||||
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() {
|
||||
this.$store.commit('server/addEvent', { message: this.cooldownGcode, type: 'command' })
|
||||
this.$socket.sendObj('printer.gcode.script', { script: this.cooldownGcode })
|
||||
},
|
||||
openHeater(object) {
|
||||
this.editHeater.object = object
|
||||
|
||||
this.editHeater.color = object.chartColor
|
||||
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
|
||||
},
|
||||
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)] })
|
||||
}
|
||||
},
|
||||
setVisibleAdditionalSensor(sensor) {
|
||||
if ("name" in this.editHeater.object) {
|
||||
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 })
|
||||
}
|
||||
}
|
||||
},
|
||||
}
|
||||
|
||||
@@ -8,11 +8,11 @@
|
||||
<v-card>
|
||||
<v-toolbar flat dense >
|
||||
<v-toolbar-title>
|
||||
<span class="subheading"><v-icon left>mdi-webcam</v-icon>Webcam</span>
|
||||
<span class="subheading"><v-icon left>mdi-webcam</v-icon>{{ $t('Setting.Webcam')}}</span>
|
||||
</v-toolbar-title>
|
||||
</v-toolbar>
|
||||
<v-card-text class="px-0 py-0 content">
|
||||
<img :src="url" class="webcamImage" :style="webcamStyle" alt="Webcam"/>
|
||||
<img :src="url" class="webcamImage" :style="webcamStyle" :alt="$t('Setting.Webcam')"/>
|
||||
</v-card-text>
|
||||
</v-card>
|
||||
</template>
|
||||
@@ -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() {
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<v-card v-if="(['printing', 'paused'].includes(printer_state))">
|
||||
<v-toolbar flat dense >
|
||||
<v-toolbar-title>
|
||||
<span class="subheading"><v-icon class="mdi mdi-arrow-collapse-vertical" left></v-icon>Z Baby Stepping</span>
|
||||
<span class="subheading"><v-icon class="mdi mdi-arrow-collapse-vertical" left></v-icon>{{ $t("Dashboard.ZBabyStepping") }}</span>
|
||||
</v-toolbar-title>
|
||||
</v-toolbar>
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
<v-container>
|
||||
<v-row class="py-0">
|
||||
<v-col class="col text-center">
|
||||
<p class="mb-0">Current Offset: {{ homing_origin.length > 1 ? homing_origin[2].toFixed(2) : 0.00 }}mm</p>
|
||||
<p class="mb-0">{{ $t("Dashboard.CurrentOffset") }} {{ homing_origin.length > 1 ? homing_origin[2].toFixed(2) : 0.00 }}mm</p>
|
||||
</v-col>
|
||||
</v-row>
|
||||
<v-row>
|
||||
|
||||
@@ -19,14 +19,27 @@
|
||||
</style>
|
||||
|
||||
<template>
|
||||
<v-text-field type="number" min="0" :max="max_temp" step="any" ref="toolField" v-model="value" class="tool-input" @change="setTemps" onClick="this.select();">
|
||||
</v-text-field>
|
||||
<v-combobox
|
||||
dense
|
||||
hide-details
|
||||
onClick="this.select();"
|
||||
v-model="value"
|
||||
:items="items"
|
||||
item-text="value"
|
||||
@change="setTemps"
|
||||
></v-combobox>
|
||||
</template>
|
||||
|
||||
|
||||
|
||||
<script>
|
||||
import Vue from "vue";
|
||||
|
||||
/*
|
||||
<v-text-field v-if="false" type="number" min="0" :max="max_temp" step="any" ref="toolField" class="tool-input">
|
||||
</v-text-field>
|
||||
*/
|
||||
|
||||
export default {
|
||||
data: function() {
|
||||
return {
|
||||
@@ -40,12 +53,14 @@
|
||||
max_temp: Number,
|
||||
command: String,
|
||||
attributeName: String,
|
||||
items: Array,
|
||||
},
|
||||
computed: {
|
||||
|
||||
},
|
||||
methods: {
|
||||
setTemps() {
|
||||
if (typeof this.value === 'object' && this.value !== null) this.value = this.value.value
|
||||
if (parseFloat(this.value) === 0) this.value = 0
|
||||
|
||||
if (this.max_temp !== undefined && this.value > this.max_temp) {
|
||||
|
||||
@@ -0,0 +1,237 @@
|
||||
{
|
||||
"App": {
|
||||
"SAVECONFIG": "SAVE CONFIG",
|
||||
"UploadPrint": "Upload & Print",
|
||||
"EmergencyStop": "Emergency Stop",
|
||||
"Uploading": "Uploading",
|
||||
"Connecting": "Connecting",
|
||||
"To": "to",
|
||||
"Failed": "failed",
|
||||
"CannotNotConnectTo": "Cannot not connect to",
|
||||
"TryAgain": "try again",
|
||||
"ConnectionTo": "Connection to",
|
||||
"ConnectionFailed": "Connection failed",
|
||||
"SelectPrinter": "Select Printer",
|
||||
"AddPrinter": "Add Printer",
|
||||
"EditPrinter": "Edit Printer",
|
||||
"UpdatePrinter": "Update Printer",
|
||||
"ChangePrinter": "Change Printer",
|
||||
"Hello": "Hello and welcome to the remote mode of Mainsail!",
|
||||
"PleaseRememberToAdd": "Please remember to add",
|
||||
"InMoonrakerConf": "in moonraker.conf within 'cors_domains'.",
|
||||
"YouCanFindMore": "You can find more details at",
|
||||
"Remotemode": "docs.mainsail.xyz/remotemode",
|
||||
"Empty": "Empty",
|
||||
"Close": "Close",
|
||||
"KlipperControl": "Klipper Control",
|
||||
"Restart": "Restart",
|
||||
"FirmwareRestart": "Firmware Restart",
|
||||
"RestartServices": "Restart Services",
|
||||
"Klipper": "Klipper",
|
||||
"Moonraker": "Moonraker",
|
||||
"PowerDevices": "Power Devices",
|
||||
"HostControl": "Host Control",
|
||||
"Reboot": "Reboot",
|
||||
"Shutdown": "Shutdown"
|
||||
},
|
||||
"Router" : {
|
||||
"Dashboard": "Dashboard",
|
||||
"Printers": "Printers",
|
||||
"Settings": "Settings",
|
||||
"Webcam": "Webcam",
|
||||
"Console": "Console",
|
||||
"Heightmap": "Heightmap",
|
||||
"G-Code Files": "G-Code Files",
|
||||
"Machine": "Machine",
|
||||
"Interface": "Interface"
|
||||
},
|
||||
"Dashboard": {
|
||||
"MissingConfiguration": "Missing configuration",
|
||||
"IsNotDefinedInConfig": "is not defined in config.",
|
||||
"MoreInformation": "more information",
|
||||
"MoonrakerFailedPlugins": "Moonraker Failed Plugins",
|
||||
"MoonrakerErrorInfo": "An error was detected while loading the moonraker plugins. Please check the logfile and fix the issue.",
|
||||
"FollowingPluginHasAnError": "Following plugin has an error:",
|
||||
"DownloadLog": "Download Log",
|
||||
"PausePrint": "Pause print",
|
||||
"CancelPrint": "Cancel print",
|
||||
"ResumePrint": "Resume print",
|
||||
"ClearPrintStats": "Clear print stats",
|
||||
"ReprintJob": "Reprint job",
|
||||
"Filament": "Filament",
|
||||
"Print": "Print",
|
||||
"Total": "Total",
|
||||
"Speed": "Speed",
|
||||
"Layer": "Layer",
|
||||
"ETA": "ETA",
|
||||
"File": "File",
|
||||
"Slicer": "Slicer",
|
||||
"ZBabyStepping": "Z Baby Stepping",
|
||||
"CurrentOffset": "Current Offset: ",
|
||||
"Home": "Home",
|
||||
"All": "All",
|
||||
"QGL": "QGL",
|
||||
"ZTilt": "Z Tilt",
|
||||
"FeedAmountIn": "Feed amount in",
|
||||
"FeedrateIn": "Feedrate in",
|
||||
"Retract": "Retract",
|
||||
"Extrude": "Extrude",
|
||||
"PrintSettings": "Print Settings",
|
||||
"Miscellaneous": "Miscellaneous",
|
||||
"Temperatures": "Temperatures",
|
||||
"Presets": "Presets",
|
||||
"Cooldown": "Cooldown",
|
||||
"Name": "Name",
|
||||
"State": "State",
|
||||
"Current": "Current",
|
||||
"Target": "Target",
|
||||
"Min": "min: ",
|
||||
"Max": "max: ",
|
||||
"ShowCurrentTemperatureInChart": "Show current temperature in chart",
|
||||
"ShowTargetTemperatureInChart": "Show target temperature in chart",
|
||||
"ShowPWMPowerInChart": "Show PWM-power in chart",
|
||||
"Show": "Show",
|
||||
"InList": "in list",
|
||||
"SetupTemperatures": "Setup Temperatures",
|
||||
"ShowChart": "Show Chart",
|
||||
"AutoscaleChart": "Autoscale Chart",
|
||||
"Console": "Console",
|
||||
"SendCode": "Send code...",
|
||||
"Send": "Send",
|
||||
"Empty": "Empty",
|
||||
"Setup Console": "Setup Console",
|
||||
"Hide temperatures": "Hide temperatures",
|
||||
"Custom filters": "Custom filters",
|
||||
"Unknown": "Unknown"
|
||||
},
|
||||
"Files": {
|
||||
"GCodeFiles": "G-Code Files",
|
||||
"UploadNewGcode": "Upload new Gcode",
|
||||
"CreateNewDirectory": "Create new Directory",
|
||||
"RefreshCurrentDirectory":"Refresh current Directory",
|
||||
"SetupCurrentList":"Setup current list",
|
||||
"HiddenFiles":"Hidden files",
|
||||
"FreeDisk":"Free disk: ",
|
||||
"Used":"Used: ",
|
||||
"Free":"Free: ",
|
||||
"Total":"Total: ",
|
||||
"Files": "Files",
|
||||
"Search":"Search",
|
||||
"Empty": "Empty",
|
||||
"blabla": "bla bla",
|
||||
"DropFilesToAddGcode": "Drop files to add gcode.",
|
||||
"PrintStart": "Print start",
|
||||
"Preheat": "Preheat",
|
||||
"Download": "Download",
|
||||
"Rename": "Rename",
|
||||
"Delete": "Delete",
|
||||
"StartJob": "Start Job",
|
||||
"DoYouWantToStart": "Do you want to start",
|
||||
"No": "No",
|
||||
"Yes": "Yes",
|
||||
"NewDirectory": "New Directory",
|
||||
"PleaseEnterANewDirectoryName": "Please enter a new directory name:",
|
||||
"RenameFile": "Rename File",
|
||||
"Name": "Name",
|
||||
"Cancel": "Cancel",
|
||||
"Create": "Create",
|
||||
"RenameDirectory": "Rename Directory",
|
||||
"Uploading": "Uploading",
|
||||
"CurrentPath": "Current path",
|
||||
"Filesize": "Filesize",
|
||||
"LastModified": "Last modified",
|
||||
"ObjectHeight": "Object Height",
|
||||
"LayerHeight": "Layer Height",
|
||||
"FilamentUsage": "Filament Usage",
|
||||
"PrintTime": "Print Time",
|
||||
"Slicer": "Slicer"
|
||||
},
|
||||
"Console": {
|
||||
"send": "send",
|
||||
"SetupConsole": "Setup Console",
|
||||
"SendCode": "Send code...",
|
||||
"Empty": "Empty",
|
||||
"HideTemperatures": "Hide temperatures",
|
||||
"CustomFilters": "Custom filters",
|
||||
"Date": "Date",
|
||||
"Event": "Event"
|
||||
},
|
||||
"Setting": {
|
||||
"Language": "Language",
|
||||
"General": "General",
|
||||
"PrinterName": "Printer Name",
|
||||
"ControlExtruder": "Control & Extruder",
|
||||
"PreheatPresets": "Preheat Presets",
|
||||
"Webcam": "Webcam",
|
||||
"Tempchart": "Tempchart",
|
||||
"Macros": "Macros",
|
||||
"Dashboard": "Dashboard",
|
||||
"Console": "Console",
|
||||
"RemotePrinters": "Remote Printers",
|
||||
"ConfigFiles": "Config Files",
|
||||
"SetupCurrentList": "Setup current list",
|
||||
"HiddenFiles": "Hidden files",
|
||||
"CurrentPath: ": "Current path: ",
|
||||
"Empty": "Empty",
|
||||
"EditFile": "Edit file",
|
||||
"Download": "Download",
|
||||
"Rename": "Rename",
|
||||
"Delete": "Delete",
|
||||
"PleaseStandBy": "Please stand by",
|
||||
"ConfigReference": "Config Reference",
|
||||
"Save": "Save",
|
||||
"SaveRestart": "Save & restart",
|
||||
"RenameFile": "Rename File",
|
||||
"Name": "Name",
|
||||
"Cancel": "Cancel",
|
||||
"Create": "Create",
|
||||
"Edit": "Edit",
|
||||
"CreateFile": "Create File",
|
||||
"CreateFolder": "Create Folder",
|
||||
"Uploading": "Uploading",
|
||||
"Files": "Files",
|
||||
"Filesize": "Filesize",
|
||||
"LastModified": "Last modified",
|
||||
"MachineLimits": "Machine Limits",
|
||||
"Velocity": "Velocity",
|
||||
"Acceleration": "Acceleration",
|
||||
"Deceleration": "Deceleration",
|
||||
"SquareCornerVelocity": "Square corner velocity",
|
||||
"KlippyState": "Klippy-State: ",
|
||||
"KlippyInfo": "Moonraker can't connect to Klippy!\nPlease check if the Klipper service is running and an UDS (Unix Domain Socket) is configured.",
|
||||
"Restart": "Restart",
|
||||
"FIRMWARERestart": "FIRMWARE Restart",
|
||||
"UpdateManager": "Update Manager",
|
||||
"CheckForUpdates": "Check for updates",
|
||||
"System": "System",
|
||||
"PackagesCanBeUpgraded": "packages can be upgraded",
|
||||
"OSPackages": "OS-Packages",
|
||||
"Endstops": "Endstops",
|
||||
"Endstop": "Endstop",
|
||||
"EndstopInfo": "Press the sync-button on the right-bottom to load the current endstop status.",
|
||||
"Logfiles": "Logfiles",
|
||||
"WebcamURL": "Webcam URL",
|
||||
"Rotate": "Rotate",
|
||||
"FlipWebcamHorizontally": "Flip webcam horizontally",
|
||||
"FlipWebcamVertically": "Flip webcam vertically",
|
||||
"ShowInNavigation": "Show in navigation",
|
||||
"HideTemperatures": "Hide temperatures",
|
||||
"CustomFilter": "Custom filter",
|
||||
"Rules": "Rules",
|
||||
"FeedrateXY": "Feedrate XY",
|
||||
"FeedrateZ": "Feedrate Z",
|
||||
"Cooldown": "Cooldown",
|
||||
"AddPreset": "add preset",
|
||||
"Preset": "Preset",
|
||||
"CustomGCode": "Custom G-Code",
|
||||
"PresetInfo": "You have to set minimum a target temperature or a custom gcode.",
|
||||
"Store": "Store",
|
||||
"Update": "Update",
|
||||
"EditCooldown": "Edit Cooldown",
|
||||
"UpdateCooldown": "Update Cooldown",
|
||||
"AddPrinter": "Add Printer",
|
||||
"EditPrinter": "Edit Printer",
|
||||
"UpdatePrinter": "Update Printer",
|
||||
"detected": "detected"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,237 @@
|
||||
{
|
||||
"App": {
|
||||
"SAVECONFIG": "保存配置",
|
||||
"UploadPrint": "上传并打印",
|
||||
"EmergencyStop": "紧急停止",
|
||||
"Uploading": "上传",
|
||||
"Connecting": "连接",
|
||||
"To": "到",
|
||||
"Failed": "失败",
|
||||
"CannotNotConnectTo": "无法连接到",
|
||||
"TryAgain": "重试",
|
||||
"ConnectionTo": "连接到",
|
||||
"ConnectionFailed": "连接失败",
|
||||
"SelectPrinter": "选择打印机",
|
||||
"AddPrinter": "添加打印机",
|
||||
"EditPrinter": "编辑打印机",
|
||||
"UpdatePrinter": "更新打印机",
|
||||
"ChangePrinter": "更换打印机",
|
||||
"Hello": "大家好,欢迎来到主帆遥控模式!",
|
||||
"PleaseRememberToAdd": "请记得添加",
|
||||
"InMoonrakerConf": "在 moonraker.conf 的 'cors_domains' 中.",
|
||||
"YouCanFindMore": "详情请浏览",
|
||||
"Remotemode": "docs.mainsail.xyz/remotemode",
|
||||
"Empty": "空的",
|
||||
"Close": "关闭",
|
||||
"KlipperControl": "Klipper 控制",
|
||||
"Restart": "重启",
|
||||
"FirmwareRestart": "固件重启",
|
||||
"RestartServices": "重启服务",
|
||||
"Klipper": "Klipper",
|
||||
"Moonraker": "Moonraker",
|
||||
"PowerDevices": "电力设备",
|
||||
"HostControl": "主机控制",
|
||||
"Reboot": "重启",
|
||||
"Shutdown": "关机"
|
||||
},
|
||||
"Router" : {
|
||||
"Dashboard": "仪表盘",
|
||||
"Printers": "打印机",
|
||||
"Settings": "设置",
|
||||
"Webcam": "摄像头",
|
||||
"Console": "控制台",
|
||||
"Heightmap": "Heightmap",
|
||||
"G-Code Files": "G-Code 文件",
|
||||
"Machine": "机器",
|
||||
"Interface": "界面"
|
||||
},
|
||||
"Dashboard": {
|
||||
"MissingConfiguration": "缺少配置",
|
||||
"IsNotDefinedInConfig": "未在配置中定义.",
|
||||
"MoreInformation": "更多信息",
|
||||
"MoonrakerFailedPlugins": "Moonraker 失败的插件",
|
||||
"MoonrakerErrorInfo": "加载moonraker插件时检测到一个错误. 请检查日志文件并修复这个问题.",
|
||||
"FollowingPluginHasAnError": "以下插件有一个错误:",
|
||||
"DownloadLog": "下载日志",
|
||||
"PausePrint": "暂停打印",
|
||||
"CancelPrint": "取消打印",
|
||||
"ResumePrint": "继续打印",
|
||||
"ClearPrintStats": "清除打印统计信息",
|
||||
"ReprintJob": "重新打印工作",
|
||||
"Filament": "Filam耗材ent",
|
||||
"Print": "打印",
|
||||
"Total": "总计",
|
||||
"Speed": "速度",
|
||||
"Layer": "层",
|
||||
"ETA": "ETA",
|
||||
"File": "文件",
|
||||
"Slicer": "切片",
|
||||
"ZBabyStepping": "Z Baby Stepping",
|
||||
"CurrentOffset": "当前偏移量: ",
|
||||
"Home": "Home",
|
||||
"All": "All",
|
||||
"QGL": "QGL",
|
||||
"ZTilt": "Z 倾斜",
|
||||
"FeedAmountIn": "进料量",
|
||||
"FeedrateIn": "输入",
|
||||
"Retract": "回抽",
|
||||
"Extrude": "挤出",
|
||||
"PrintSettings": "打印设置",
|
||||
"Miscellaneous": "其他",
|
||||
"Temperatures": "温度",
|
||||
"Presets": "预设",
|
||||
"Cooldown": "冷却",
|
||||
"Name": "名称",
|
||||
"State": "状态",
|
||||
"Current": "当前",
|
||||
"Target": "目标",
|
||||
"Min": "最小: ",
|
||||
"Max": "最大: ",
|
||||
"ShowCurrentTemperatureInChart": "在图表中显示当前温度",
|
||||
"ShowTargetTemperatureInChart": "在图表中显示目标温度",
|
||||
"ShowPWMPowerInChart": "在图表中显示PWM功率",
|
||||
"Show": "显示",
|
||||
"InList": "在列表中",
|
||||
"SetupTemperatures": "设置温度",
|
||||
"ShowChart": "显示图表",
|
||||
"AutoscaleChart": "自动缩放图表",
|
||||
"Console": "控制台",
|
||||
"SendCode": "发送代码...",
|
||||
"Send": "发送",
|
||||
"Empty": "空的",
|
||||
"SetupConsole": "设置控制台",
|
||||
"HideTemperatures": "隐藏温度",
|
||||
"CustomFilters": "自定义筛选器",
|
||||
"Unknown": "未知"
|
||||
},
|
||||
"Files": {
|
||||
"GCodeFiles": "G-Code 文件",
|
||||
"UploadNewGcode": "上传新 Gcode",
|
||||
"CreateNewDirectory": "创建新目录",
|
||||
"RefreshCurrentDirectory":"刷新当前目录",
|
||||
"SetupCurrentList":"设置当前列表",
|
||||
"HiddenFiles":"隐藏文件",
|
||||
"FreeDisk":"可用磁盘: ",
|
||||
"Used":"使用: ",
|
||||
"Free":"空闲: ",
|
||||
"Total":"总共: ",
|
||||
"Files": "文件",
|
||||
"Search":"搜索",
|
||||
"Empty": "空的",
|
||||
"blabla": "巴拉巴拉",
|
||||
"DropFilesToAddGcode": "Drop files to add gcode.",
|
||||
"PrintStart": "开始打印",
|
||||
"Preheat": "预热",
|
||||
"Download": "下载",
|
||||
"Rename": "重命名",
|
||||
"Delete": "删除",
|
||||
"StartJob": "开始作业",
|
||||
"DoYouWantToStart": "你想开始吗",
|
||||
"No": "否",
|
||||
"Yes": "是",
|
||||
"NewDirectory": "新建目录",
|
||||
"PleaseEnterANewDirectoryName": "请输入新的目录名称:",
|
||||
"RenameFile": "重命名文件",
|
||||
"Name": "名称",
|
||||
"Cancel": "取消",
|
||||
"Create": "创建",
|
||||
"RenameDirectory": "重命名目录",
|
||||
"Uploading": "上传",
|
||||
"CurrentPath": "当前路径",
|
||||
"Filesize": "文件大小",
|
||||
"LastModified": "上次修改",
|
||||
"ObjectHeight": "对象高度",
|
||||
"LayerHeight": "层高",
|
||||
"FilamentUsage": "耗材使用",
|
||||
"PrintTime": "打印时间",
|
||||
"Slicer": "切片"
|
||||
},
|
||||
"Console": {
|
||||
"send": "发送",
|
||||
"SetupConsole": "设置控制台",
|
||||
"SendCode": "发送代码...",
|
||||
"Empty": "空的",
|
||||
"HideTemperatures": "隐藏温度",
|
||||
"CustomFilters": "自定义筛选器",
|
||||
"Date": "时间",
|
||||
"Event": "事件"
|
||||
},
|
||||
"Setting": {
|
||||
"Language": "语言",
|
||||
"General": "一般",
|
||||
"PrinterName": "打印机名称",
|
||||
"ControlExtruder": "控制 & 挤出机",
|
||||
"PreheatPresets": "预热预设",
|
||||
"Webcam": "摄像头",
|
||||
"Tempchart": "温度图",
|
||||
"Macros": "宏",
|
||||
"Dashboard": "仪表盘",
|
||||
"Console": "控制台",
|
||||
"RemotePrinters": "远程打印机",
|
||||
"ConfigFiles": "配置文件",
|
||||
"SetupCurrentList": "设置当前列表",
|
||||
"HiddenFiles": "隐藏文件",
|
||||
"CurrentPath": "当前路径: ",
|
||||
"Empty": "空的",
|
||||
"EditFile": "编辑文件",
|
||||
"Download": "下载",
|
||||
"Rename": "重命名",
|
||||
"Delete": "删除",
|
||||
"PleaseStandBy": "请等待",
|
||||
"ConfigReference": "配置参考",
|
||||
"Save": "保存",
|
||||
"SaveRestart": "保存 & 重启",
|
||||
"RenameFile": "重命名文件",
|
||||
"Name": "名称",
|
||||
"Cancel": "取消",
|
||||
"Create": "创建",
|
||||
"Edit": "编辑",
|
||||
"CreateFile": "创建文件",
|
||||
"CreateFolder": "创建文件夹",
|
||||
"Uploading": "上传",
|
||||
"Files": "文件",
|
||||
"Filesize": "文件大小",
|
||||
"LastModified": "上次修改",
|
||||
"MachineLimits": "机器限制",
|
||||
"Velocity": "速度",
|
||||
"Acceleration": "加速",
|
||||
"Deceleration": "减速",
|
||||
"SquareCornerVelocity": "直角速度",
|
||||
"KlippyState": "Klippy 状态: ",
|
||||
"KlippyInfo": "Moonraker 不能连接到 Klippy! \n请检查Klipper服务是否正在运行, 并且是否配置了UDS (Unix域套接字). ",
|
||||
"Restart": "重启",
|
||||
"FIRMWARERestart": "固件重启",
|
||||
"UpdateManager": "更新管理器",
|
||||
"CheckForUpdates": "检查更新",
|
||||
"System": "系统",
|
||||
"PackagesCanBeUpgraded": "软件包可以升级",
|
||||
"OSPackages": "OS包",
|
||||
"Endstops": "限位开关",
|
||||
"Endstop": "限位",
|
||||
"EndstopInfo": "按右下角的同步按钮加载当前的限位状态。",
|
||||
"Logfiles": "日志文件",
|
||||
"WebcamURL": "摄像头链接",
|
||||
"Rotate": "旋转",
|
||||
"FlipWebcamHorizontally": "水平翻转摄像头 ",
|
||||
"FlipWebcamVertically": "垂直翻转摄像头",
|
||||
"ShowInNavigation": "在导航中显示 ",
|
||||
"HideTemperatures": "隐藏温度",
|
||||
"CustomFilter": "自定义筛选器",
|
||||
"Rules": "规则",
|
||||
"FeedrateXY": "XY 步进速度",
|
||||
"FeedrateZ": "Z 步进速度",
|
||||
"Cooldown": "冷却",
|
||||
"AddPreset": "添加预设",
|
||||
"Preset": "预设",
|
||||
"CustomGCode": "自定义 G-Code",
|
||||
"PresetInfo": "您必须设置最低目标温度或自定义gcode.",
|
||||
"Store": "储存",
|
||||
"Update": "更新",
|
||||
"EditCooldown": "编辑冷却",
|
||||
"UpdateCooldown": "更新冷却",
|
||||
"AddPrinter": "添加打印机",
|
||||
"EditPrinter": "编辑打印机",
|
||||
"UpdatePrinter": "更新打印机",
|
||||
"detected": "发现"
|
||||
}
|
||||
}
|
||||
@@ -2,12 +2,14 @@ import Vue from 'vue'
|
||||
import WebSocketClient from './plugins/wsClient'
|
||||
import App from './App.vue'
|
||||
import vuetify from './plugins/vuetify'
|
||||
import i18n from './plugins/i18n'
|
||||
import VueResource from 'vue-resource'
|
||||
import './components'
|
||||
import store from './store'
|
||||
import router from './plugins/router'
|
||||
import vueHeadful from 'vue-headful';
|
||||
|
||||
|
||||
Vue.config.productionTip = false;
|
||||
|
||||
Vue.use(VueResource);
|
||||
@@ -19,6 +21,7 @@ Vue.http.headers.common['Access-Control-Allow-Methods'] = 'POST, GET, PUT, OPTIO
|
||||
|
||||
Vue.component('vue-headful', vueHeadful);
|
||||
|
||||
|
||||
fetch('/config.json')
|
||||
.then(res => res.json())
|
||||
.then(file => {
|
||||
@@ -37,8 +40,10 @@ fetch('/config.json')
|
||||
vuetify,
|
||||
router,
|
||||
store,
|
||||
i18n,
|
||||
render: h => h(App)
|
||||
}).$mount('#app')
|
||||
|
||||
})
|
||||
.catch((error) => {
|
||||
let p = document.createElement("p");
|
||||
@@ -47,3 +52,5 @@ fetch('/config.json')
|
||||
document.getElementById('app').append(p);
|
||||
window.console.error('Error:', error);
|
||||
});
|
||||
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
<v-text-field
|
||||
v-model="gcode"
|
||||
:items="items"
|
||||
label="Send code..."
|
||||
:label="$t('Console.SendCode')"
|
||||
solo
|
||||
class="gcode-command-field"
|
||||
ref="gcodeCommandField"
|
||||
@@ -48,21 +48,21 @@
|
||||
|
||||
<v-col class="col-auto align-content-center">
|
||||
<v-btn color="info" class="gcode-command-btn" @click="doSend" :loading="loadings.includes('sendGcode')" :disabled="loadings.includes('sendGcode')" >
|
||||
<v-icon class="mr-2">mdi-send</v-icon> send
|
||||
<v-icon class="mr-2">mdi-send</v-icon> {{ $t('Console.send')}}
|
||||
</v-btn>
|
||||
</v-col>
|
||||
|
||||
<v-col class="col-auto align-content-center">
|
||||
<v-menu :offset-y="true" :close-on-content-click="false" title="Setup Console">
|
||||
<v-menu :offset-y="true" :close-on-content-click="false" :title="$t('Console.SetupConsole')">
|
||||
<template v-slot:activator="{ on, attrs }">
|
||||
<v-btn class="gcode-command-btn px-2 minwidth-0" color="lightgray" 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" v-model="hideWaitTemperatures" hide-details label="Hide temperatures"></v-checkbox>
|
||||
<v-checkbox class="mt-0" v-model="hideWaitTemperatures" hide-details :label="$t('Console.HideTemperatures')"></v-checkbox>
|
||||
</v-list-item>
|
||||
<v-list-item class="minHeight36">
|
||||
<v-checkbox class="mt-0" v-model="boolCustomFilters" hide-details label="Custom filters"></v-checkbox>
|
||||
<v-checkbox class="mt-0" v-model="boolCustomFilters" hide-details :label="$t('Console.CustomFilters')"></v-checkbox>
|
||||
</v-list-item>
|
||||
</v-list>
|
||||
</v-menu>
|
||||
@@ -83,7 +83,7 @@
|
||||
mobile-breakpoint="0"
|
||||
>
|
||||
<template #no-data>
|
||||
<div class="text-center">empty</div>
|
||||
<div class="text-center">{{ $t("Console.Empty")}}</div>
|
||||
</template>
|
||||
|
||||
<template #item="{ item }">
|
||||
@@ -116,13 +116,13 @@
|
||||
sortBy: 'date',
|
||||
headers: [
|
||||
{
|
||||
text: 'Date',
|
||||
text: this.$t('Console.Date'),
|
||||
value: 'date',
|
||||
width: '15%',
|
||||
dateType: 'Date',
|
||||
},
|
||||
{
|
||||
text: 'Event',
|
||||
text: this.$t('Console.Event'),
|
||||
sortable: false,
|
||||
value: 'message',
|
||||
width: '85%'
|
||||
|
||||
+119
-49
@@ -51,20 +51,20 @@
|
||||
<div>
|
||||
<v-card class="fileupload-card my-3" @dragover="dragOverUpload" @dragleave="dragLeaveUpload" @drop.prevent.stop="dragDropUpload">
|
||||
<v-card-title>
|
||||
G-Code Files
|
||||
{{ $t("Files.GCodeFiles")}}
|
||||
<v-spacer class="d-none d-sm-block"></v-spacer>
|
||||
<input type="file" ref="fileUpload" accept=".gcode" style="display: none" multiple @change="uploadFile" />
|
||||
<input type="file" ref="fileUpload" accept=".gcode, .ufp" style="display: none" multiple @change="uploadFile" />
|
||||
<v-item-group class="v-btn-toggle my-5 my-sm-0 col-12 col-sm-auto px-0 py-0" name="controllers">
|
||||
<v-btn @click="clickUploadButton" title="Upload new Gcode" class="primary flex-grow-1" :loading="loadings.includes('gcodeUpload')"><v-icon>mdi-upload</v-icon></v-btn>
|
||||
<v-btn @click="createDirectory" title="Create new Directory" class="flex-grow-1"><v-icon>mdi-folder-plus</v-icon></v-btn>
|
||||
<v-btn @click="refreshFileList" title="Refresh current Directory" class="flex-grow-1"><v-icon>mdi-refresh</v-icon></v-btn>
|
||||
<v-menu :offset-y="true" :close-on-content-click="false" title="Setup current list">
|
||||
<v-btn @click="clickUploadButton" :title="$t('Files.UploadNewGcode')" class="primary flex-grow-1" :loading="loadings.includes('gcodeUpload')"><v-icon>mdi-upload</v-icon></v-btn>
|
||||
<v-btn @click="createDirectory" :title="$t('Files.CreateNewDirectory')" class="flex-grow-1"><v-icon>mdi-folder-plus</v-icon></v-btn>
|
||||
<v-btn @click="refreshFileList" :title="$t('Files.RefreshCurrentDirectory')" class="flex-grow-1"><v-icon>mdi-refresh</v-icon></v-btn>
|
||||
<v-menu :offset-y="true" :close-on-content-click="false" :title="$t('Files.SetupCurrentList')">
|
||||
<template v-slot:activator="{ on, attrs }">
|
||||
<v-btn class="flex-grow-1" v-bind="attrs" v-on="on"><v-icon class="">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-checkbox class="mt-0" hide-details v-model="showHiddenFiles" :label="$t('Files.HiddenFiles')"></v-checkbox>
|
||||
</v-list-item>
|
||||
<v-divider></v-divider>
|
||||
<v-list-item class="minHeight36" v-for="header of configHeaders" v-bind:key="header.key">
|
||||
@@ -74,12 +74,26 @@
|
||||
</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>
|
||||
{{ $t("Files.CurrentPath") }} {{ 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">{{ $t('Files.FreeDisk') + formatFilesize(disk_usage.free) }}</span>
|
||||
</template>
|
||||
<span>
|
||||
{{ $t('Files.Used') + formatFilesize(this.disk_usage.used) }}<br />
|
||||
{{ $t('Files.Free') + formatFilesize(this.disk_usage.free) }}<br />
|
||||
{{ $t('Files.Total') + formatFilesize(this.disk_usage.total) }}
|
||||
</span>
|
||||
</v-tooltip>
|
||||
</div>
|
||||
</v-card-subtitle>
|
||||
<v-card-text>
|
||||
<v-text-field
|
||||
v-model="search"
|
||||
append-icon="mdi-magnify"
|
||||
label="Search"
|
||||
:label="$t('Files.Search')"
|
||||
single-line
|
||||
hide-details
|
||||
></v-text-field>
|
||||
@@ -94,7 +108,7 @@
|
||||
:sort-desc.sync="sortDesc"
|
||||
:items-per-page.sync="countPerPage"
|
||||
:footer-props="{
|
||||
itemsPerPageText: 'Files'
|
||||
itemsPerPageText: $t('Files.Files')
|
||||
}"
|
||||
item-key="name"
|
||||
:search="search"
|
||||
@@ -107,7 +121,7 @@
|
||||
</template>
|
||||
|
||||
<template #no-data>
|
||||
<div class="text-center">empty</div>
|
||||
<div class="text-center">{{ $t('Files.empty') }}</div>
|
||||
</template>
|
||||
|
||||
<template slot="body.prepend" v-if="(currentPath !== 'gcodes')">
|
||||
@@ -153,86 +167,99 @@
|
||||
<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>{{ $t('Files.blabla')}}</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>
|
||||
<div class="textnode">{{ $t('Files.DropFilesToAddGcode')}}</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">
|
||||
<v-icon class="mr-1">mdi-play</v-icon> Print start
|
||||
<v-icon class="mr-1">mdi-play</v-icon> {{ $t("Files.PrintStart")}}
|
||||
</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> {{ $t('Files.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-icon class="mr-1">mdi-cloud-download</v-icon> {{ $t('Filse.Download')}}
|
||||
</v-list-item>
|
||||
<v-list-item @click="renameDirectory(contextMenu.item)" v-if="contextMenu.item.isDirectory">
|
||||
<v-icon class="mr-1">mdi-rename-box</v-icon> Rename
|
||||
<v-icon class="mr-1">mdi-rename-box</v-icon> {{ $t('Filse.Rename')}}
|
||||
</v-list-item>
|
||||
<v-list-item @click="renameFile(contextMenu.item)" v-if="!contextMenu.item.isDirectory">
|
||||
<v-icon class="mr-1">mdi-rename-box</v-icon> Rename
|
||||
<v-icon class="mr-1">mdi-rename-box</v-icon> {{ $t('Filse.Rename')}}
|
||||
</v-list-item>
|
||||
<v-list-item @click="removeFile" v-if="!contextMenu.item.isDirectory">
|
||||
<v-icon class="mr-1">mdi-delete</v-icon> Delete
|
||||
<v-icon class="mr-1">mdi-delete</v-icon> {{ $t('Filse.Delete')}}
|
||||
</v-list-item>
|
||||
<v-list-item @click="deleteDirectoryAction" v-if="contextMenu.item.isDirectory">
|
||||
<v-icon class="mr-1">mdi-delete</v-icon> Delete
|
||||
<v-icon class="mr-1">mdi-delete</v-icon> {{ $t('Filse.Delete')}}
|
||||
</v-list-item>
|
||||
</v-list>
|
||||
</v-menu>
|
||||
<v-dialog v-model="dialogPrintFile.show" max-width="400">
|
||||
<v-dialog v-model="dialogPrintFile.show" :max-width="getThumbnailWidth(dialogPrintFile.item)">
|
||||
<v-card>
|
||||
<v-img
|
||||
contain
|
||||
v-if="existsBigThumbnail(dialogPrintFile.item)"
|
||||
:src="'data:image/gif;base64,'+getBigThumbnail(dialogPrintFile.item)"
|
||||
></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>
|
||||
<v-card-title class="headline">{{ $t('Files.StartJob') }}</v-card-title>
|
||||
<v-card-text>{{ $t('Files.DoYouWantToStart') + dialogPrintFile.item.filename }}?</v-card-text>
|
||||
<v-card-actions>
|
||||
<v-spacer></v-spacer>
|
||||
<v-btn color="red darken-1" text @click="dialogPrintFile.show = false">No</v-btn>
|
||||
<v-btn color="green darken-1" text @click="startPrint(dialogPrintFile.item.filename)">Yes</v-btn>
|
||||
<v-btn color="red darken-1" text @click="dialogPrintFile.show = false">{{ $t('Files.No')}}</v-btn>
|
||||
<v-btn color="green darken-1" text @click="startPrint(dialogPrintFile.item.filename)">{{$t('Files.Yes')}}</v-btn>
|
||||
</v-card-actions>
|
||||
</v-card>
|
||||
</v-dialog>
|
||||
<v-dialog v-model="dialogCreateDirectory.show" max-width="400">
|
||||
<v-card>
|
||||
<v-card-title class="headline">New Directory</v-card-title>
|
||||
<v-card-title class="headline">{{ $t('Files.NewDirectory') }}</v-card-title>
|
||||
<v-card-text>
|
||||
Please enter a new directory name:
|
||||
{{ $t('Files.PleaseEnterANewDirectoryName') }}
|
||||
<v-text-field label="Name" :rules="input_rules" @keypress.enter="createDirectoryAction" required v-model="dialogCreateDirectory.name"></v-text-field>
|
||||
</v-card-text>
|
||||
<v-card-actions>
|
||||
<v-spacer></v-spacer>
|
||||
<v-btn color="" text @click="dialogCreateDirectory.show = false">Cancel</v-btn>
|
||||
<v-btn color="primary" text @click="createDirectoryAction">create</v-btn>
|
||||
<v-btn color="" text @click="dialogCreateDirectory.show = false">{{ $t('Files.Cancel') }}</v-btn>
|
||||
<v-btn color="primary" text @click="createDirectoryAction">{{ $t('Files.Create') }}</v-btn>
|
||||
</v-card-actions>
|
||||
</v-card>
|
||||
</v-dialog>
|
||||
<v-dialog v-model="dialogRenameFile.show" max-width="400">
|
||||
<v-card>
|
||||
<v-card-title class="headline">Rename File</v-card-title>
|
||||
<v-card-title class="headline">{{ $t('Files.RenameFile')}}</v-card-title>
|
||||
<v-card-text>
|
||||
<v-text-field label="Name" required v-model="dialogRenameFile.newName" ref="inputFieldNewName"></v-text-field>
|
||||
<v-text-field :label="$t('Files.Name')" required v-model="dialogRenameFile.newName" ref="inputFieldNewName"></v-text-field>
|
||||
</v-card-text>
|
||||
<v-card-actions>
|
||||
<v-spacer></v-spacer>
|
||||
<v-btn color="" text @click="dialogRenameFile.show = false">Cancel</v-btn>
|
||||
<v-btn color="primary" text @click="renameFileAction">rename</v-btn>
|
||||
<v-btn color="" text @click="dialogRenameFile.show = false">{{ $t('Files.Cancel') }}</v-btn>
|
||||
<v-btn color="primary" text @click="renameFileAction">{{ $t('Files.Rename') }}</v-btn>
|
||||
</v-card-actions>
|
||||
</v-card>
|
||||
</v-dialog>
|
||||
<v-dialog v-model="dialogRenameDirectory.show" max-width="400">
|
||||
<v-card>
|
||||
<v-card-title class="headline">Rename Directory</v-card-title>
|
||||
<v-card-title class="headline">{{ $t('Files.RenameDirectory') }}</v-card-title>
|
||||
<v-card-text>
|
||||
<v-text-field label="Name" required v-model="dialogRenameDirectory.newName"></v-text-field>
|
||||
</v-card-text>
|
||||
<v-card-actions>
|
||||
<v-spacer></v-spacer>
|
||||
<v-btn color="" text @click="dialogRenameDirectory.show = false">Cancel</v-btn>
|
||||
<v-btn color="primary" text @click="renameDirectoryAction">rename</v-btn>
|
||||
<v-btn color="" text @click="dialogRenameDirectory.show = false">{{ $t('Files.Cancel') }}</v-btn>
|
||||
<v-btn color="primary" text @click="renameDirectoryAction">{{ $t('Files.Rename') }}</v-btn>
|
||||
</v-card-actions>
|
||||
</v-card>
|
||||
</v-dialog>
|
||||
@@ -245,7 +272,7 @@
|
||||
dark
|
||||
v-model="uploadSnackbar.status"
|
||||
>
|
||||
<span v-if="uploadSnackbar.max > 1" class="mr-1">({{ uploadSnackbar.number }}/{{ uploadSnackbar.max }})</span><strong>Uploading {{ uploadSnackbar.filename }}</strong><br />
|
||||
<span v-if="uploadSnackbar.max > 1" class="mr-1">({{ uploadSnackbar.number }}/{{ uploadSnackbar.max }})</span><strong>{{ $t("Files.Uploading") + uploadSnackbar.filename }}</strong><br />
|
||||
{{ Math.round(uploadSnackbar.percent) }} % @ {{ formatFilesize(Math.round(uploadSnackbar.speed)) }}/s<br />
|
||||
<v-progress-linear class="mt-2" :value="uploadSnackbar.percent"></v-progress-linear>
|
||||
<template v-slot:action="{ attrs }">
|
||||
@@ -295,14 +322,14 @@
|
||||
},
|
||||
headers: [
|
||||
{ text: '', value: '', align: 'left', configable: false, visible: true, filterable: false },
|
||||
{ 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 },
|
||||
{ text: this.$t('Files.Name'), value: 'filename', align: 'left', configable: false, visible: true },
|
||||
{ text: this.$t('Files.Filesize'), value: 'size', align: 'right', configable: true, visible: true },
|
||||
{ text: this.$t('Files.LastModified'), value: 'modified', align: 'right', configable: true, visible: true },
|
||||
{ text: this.$t('Files.ObjectHeight'), value: 'object_height', align: 'right', configable: true, visible: true },
|
||||
{ text: this.$t('Files.LayerHeight'), value: 'layer_height', align: 'right', configable: true, visible: true },
|
||||
{ text: this.$t('Files.FilamentUsage'), value: 'filament_total', align: 'right', configable: true, visible: true },
|
||||
{ text: this.$t('Files.PrintTime'), value: 'estimated_time', align: 'right', configable: true, visible: true },
|
||||
{ text: this.$t('Files.Slicer'), value: 'slicer', align: 'right', configable: true, visible: true },
|
||||
],
|
||||
options: {
|
||||
|
||||
@@ -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");
|
||||
@@ -618,7 +671,7 @@
|
||||
this.dropzone.visibility = 'hidden';
|
||||
this.dropzone.opacity = 0;
|
||||
|
||||
if (!this.is_printing && e.dataTransfer.files.length) {
|
||||
if (e.dataTransfer.files.length) {
|
||||
await this.doUploadFile(e.dataTransfer.files[0]);
|
||||
}
|
||||
}
|
||||
@@ -726,10 +779,14 @@
|
||||
}
|
||||
},
|
||||
existsSmallThumbnail(item) {
|
||||
return ('thumbnails' in item && item.thumbnails.find(thumb => thumb.width >= 32 && thumb.width <= 64 && thumb.height >= 32 && thumb.height <= 64))
|
||||
return (
|
||||
'thumbnails' in item &&
|
||||
item.thumbnails !== undefined &&
|
||||
item.thumbnails.findIndex(thumb => thumb.width >= 32 && thumb.width <= 64 && thumb.height >= 32 && thumb.height <= 64) !== -1
|
||||
)
|
||||
},
|
||||
getSmallThumbnail(item) {
|
||||
if ('thumbnails' in item) {
|
||||
if (this.existsSmallThumbnail(item)) {
|
||||
const thumbnail = item.thumbnails.find(thumb =>
|
||||
thumb.width >= 32 && thumb.width <= 64 &&
|
||||
thumb.height >= 32 && thumb.height <= 64
|
||||
@@ -741,16 +798,29 @@
|
||||
return ""
|
||||
},
|
||||
existsBigThumbnail(item) {
|
||||
return ('thumbnails' in item && item.thumbnails.find(thumb => thumb.width === 400))
|
||||
return (
|
||||
'thumbnails' in item &&
|
||||
item.thumbnails !== undefined &&
|
||||
item.thumbnails.findIndex(thumb => thumb.width >= 300 && thumb.width <= 400) !== -1
|
||||
)
|
||||
},
|
||||
getBigThumbnail(item) {
|
||||
if ('thumbnails' in item) {
|
||||
const thumbnail = item.thumbnails.find(thumb => thumb.width === 400)
|
||||
if (this.existsBigThumbnail(item)) {
|
||||
const thumbnail = item.thumbnails.find(thumb => thumb.width >= 300 && thumb.width <= 400)
|
||||
|
||||
if (thumbnail) return thumbnail.data
|
||||
}
|
||||
|
||||
return ""
|
||||
},
|
||||
getThumbnailWidth(item) {
|
||||
if (this.existsBigThumbnail(item)) {
|
||||
const thumbnail = item.thumbnails.find(thumb => thumb.width >= 300 && thumb.width <= 400)
|
||||
|
||||
if (thumbnail) return thumbnail.width
|
||||
}
|
||||
|
||||
return 400
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
<v-row>
|
||||
<v-col class="col-12 col-md-6 col-lg-4">
|
||||
<settings-general-panel></settings-general-panel>
|
||||
<settings-language-panel class="mt-6"></settings-language-panel>
|
||||
<settings-webcam-panel class="mt-6"></settings-webcam-panel>
|
||||
<settings-dashboard-panel class="mt-6"></settings-dashboard-panel>
|
||||
<settings-console-panel class="mt-6"></settings-console-panel>
|
||||
@@ -13,6 +14,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>
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
import Vue from 'vue';
|
||||
import VueI18n from 'vue-i18n'
|
||||
Vue.use(VueI18n)
|
||||
|
||||
function loadLocaleMessages () {
|
||||
const locales = require.context('../locales', true, /[A-Za-z0-9-_,\s]+\.json$/i)
|
||||
const messages = {}
|
||||
locales.keys().forEach(key => {
|
||||
const matched = key.match(/([A-Za-z0-9-_]+)\./i)
|
||||
if (matched && matched.length > 1) {
|
||||
const locale = matched[1]
|
||||
messages[locale] = locales(key)
|
||||
}
|
||||
})
|
||||
return messages
|
||||
}
|
||||
|
||||
let lang = localStorage.getItem("lang") || 'en'
|
||||
|
||||
localStorage.setItem("lang",lang);
|
||||
|
||||
export default new VueI18n({
|
||||
locale: process.env.VUE_APP_I18N_LOCALE || lang,
|
||||
fallbackLocale: process.env.VUE_APP_I18N_FALLBACK_LOCALE || lang,
|
||||
messages: loadLocaleMessages()
|
||||
})
|
||||
@@ -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) {
|
||||
|
||||
@@ -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,
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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: {}
|
||||
}
|
||||
],
|
||||
}
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
import Vue from 'vue'
|
||||
import { getDefaultState } from './index'
|
||||
import { findDirectory } from "@/plugins/helpers"
|
||||
import store from "@/store";
|
||||
import axios from "axios";
|
||||
|
||||
export default {
|
||||
reset(state) {
|
||||
@@ -47,7 +45,21 @@ export default {
|
||||
|
||||
if (payload.files && payload.files.length) {
|
||||
for (let file of payload.files) {
|
||||
if (!parent.find(element => (element.isDirectory === false && element.filename === file.filename))) {
|
||||
const existingFile = parent.find(element => (element.isDirectory === false && element.filename === file.filename))
|
||||
|
||||
if (
|
||||
existingFile && (
|
||||
existingFile.size !== file.size ||
|
||||
existingFile.modified.getTime() !== new Date(file.modified*1000).getTime()
|
||||
)
|
||||
) {
|
||||
Vue.set(existingFile, 'modified', new Date(file.modified*1000))
|
||||
Vue.set(existingFile, 'size', file.size)
|
||||
|
||||
if (existingFile.metadataPulled) {
|
||||
Vue.prototype.$socket.sendObj("server.files.metadata", { filename: payload.requestParams.path+'/'+file.filename }, "files/getMetadata")
|
||||
}
|
||||
} else if (!existingFile) {
|
||||
parent.push({
|
||||
isDirectory: false,
|
||||
filename: file.filename,
|
||||
@@ -56,24 +68,6 @@ export default {
|
||||
metadataPulled: false,
|
||||
})
|
||||
}
|
||||
|
||||
if (file.filename === ".mainsail.json" && payload.requestParams.path === "config") {
|
||||
fetch('//'+store.state.socket.hostname+':'+store.state.socket.port+'/server/files/config/.mainsail.json?time='+Date.now())
|
||||
.then(res => res.json()).then(file => {
|
||||
this.commit('gui/setData', file, { root: true })
|
||||
if (!store.state.socket.remoteMode) this.dispatch('farm/readStoredPrinters', {}, { root: true })
|
||||
})
|
||||
}
|
||||
|
||||
if (file.filename === "gui.json" && payload.requestParams.path === "config") {
|
||||
fetch('//'+store.state.socket.hostname+':'+store.state.socket.port+'/server/files/config/gui.json?time='+Date.now())
|
||||
.then(res => res.json()).then(file => {
|
||||
this.commit('gui/setData', file, { root: true })
|
||||
this.dispatch('gui/upload', {}, { root: true })
|
||||
|
||||
axios.delete('//'+ store.state.socket.hostname+':'+store.state.socket.port +'/server/files/config/gui.json');
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -118,7 +112,7 @@ export default {
|
||||
let parent = findDirectory(state.filetree, (payload.item.root+"/"+path).split("/"));
|
||||
|
||||
if (parent) {
|
||||
if (parent.findIndex(element => (!element.isDirectory && element.filename === filename)) < 0) {
|
||||
if (parent.findIndex(element => (!element.isDirectory && element.filename === filename)) === -1) {
|
||||
let modified = new Date(payload.item.modified * 1000);
|
||||
|
||||
parent.push({
|
||||
@@ -128,7 +122,7 @@ export default {
|
||||
size: payload.item.size,
|
||||
metadataPulled: false,
|
||||
});
|
||||
}
|
||||
} else Vue.prototype.$socket.sendObj("server.files.metadata", { filename: payload.item.path }, "files/getMetadata")
|
||||
}
|
||||
},
|
||||
|
||||
@@ -182,4 +176,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)
|
||||
}
|
||||
}
|
||||
@@ -5,12 +5,33 @@ 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) {
|
||||
commit('setSettings', payload)
|
||||
|
||||
if ('tempchart' in payload && 'boolPowerDatasets' in payload.tempchart) {
|
||||
if (payload.tempchart.boolPowerDatasets) commit('printer/tempHistory/showPowerDatasets', {}, { root: true })
|
||||
else commit('printer/tempHistory/hidePowerDatasets', {}, { root: true })
|
||||
}
|
||||
|
||||
dispatch('upload')
|
||||
},
|
||||
|
||||
@@ -55,5 +76,15 @@ export default {
|
||||
deletePreset({ commit, dispatch }, payload) {
|
||||
commit("deletePreset", payload)
|
||||
dispatch("upload")
|
||||
},
|
||||
|
||||
setTempchartDatasetSetting({ commit, dispatch }, payload) {
|
||||
commit("setTempchartDatasetSetting", payload)
|
||||
dispatch("upload")
|
||||
},
|
||||
|
||||
setTempchartDatasetAdditionalSensorSetting({ commit, dispatch }, payload) {
|
||||
commit("setTempchartDatasetAdditionalSensorSetting", payload)
|
||||
dispatch("upload")
|
||||
}
|
||||
}
|
||||
@@ -10,5 +10,53 @@ export default {
|
||||
}
|
||||
|
||||
return output.sort(caseInsensitiveNameSort)
|
||||
},
|
||||
|
||||
getDatasetValue: (state) => (payload) => {
|
||||
if (
|
||||
payload.name in state.tempchart.datasetSettings &&
|
||||
payload.type in state.tempchart.datasetSettings[payload.name]
|
||||
) return state.tempchart.datasetSettings[payload.name][payload.type]
|
||||
|
||||
if (["temperature", "target"].includes(payload.type)) return true
|
||||
|
||||
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 = []
|
||||
|
||||
output.push({
|
||||
value: 0
|
||||
})
|
||||
|
||||
for (const [, preset] of Object.entries(state.presets)) {
|
||||
if (
|
||||
payload.name in preset.values &&
|
||||
preset.values[payload.name].bool &&
|
||||
output.findIndex(entry => entry.value === preset.values[payload.name].value) === -1
|
||||
) {
|
||||
output.push({
|
||||
value: preset.values[payload.name].value,
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
return output.sort((a,b) => {
|
||||
if (a.value > b.value) return -1
|
||||
if (a.value < b.value) return 1
|
||||
|
||||
return 0
|
||||
})
|
||||
}
|
||||
}
|
||||
@@ -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: "",
|
||||
@@ -22,6 +32,14 @@ export function getDefaultState() {
|
||||
flipY: false,
|
||||
bool: false,
|
||||
},
|
||||
tempchart: {
|
||||
intervalChartUpdate: 1000,
|
||||
intervalDatasetUpdate: 500,
|
||||
autoscale: false,
|
||||
datasetSettings: {
|
||||
|
||||
},
|
||||
},
|
||||
console: {
|
||||
hideWaitTemperatures: true,
|
||||
boolCustomFilters: false,
|
||||
|
||||
@@ -65,5 +65,26 @@ export default {
|
||||
if (state.presets[payload.index]) {
|
||||
state.presets.splice(payload.index, 1)
|
||||
}
|
||||
},
|
||||
|
||||
setTempchartDatasetSetting(state, payload) {
|
||||
if (!(payload.name in state.tempchart.datasetSettings))
|
||||
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)
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,5 @@
|
||||
import { caseInsensitiveNameSort } from '@/plugins/helpers'
|
||||
import { additionalSensors } from '@/store/variables'
|
||||
|
||||
export default {
|
||||
|
||||
@@ -45,7 +46,7 @@ export default {
|
||||
return array.sort(caseInsensitiveNameSort);
|
||||
},
|
||||
|
||||
getHeaters: (state, getters) => {
|
||||
getHeaters: (state, getters, rootState, rootGetters) => {
|
||||
let heaters = []
|
||||
let colorOff = "grey darken-2"
|
||||
let colorHot = "grey lighten-5"
|
||||
@@ -77,8 +78,15 @@ export default {
|
||||
color: color,
|
||||
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,
|
||||
});
|
||||
@@ -89,7 +97,7 @@ export default {
|
||||
return heaters.sort(caseInsensitiveNameSort);
|
||||
},
|
||||
|
||||
getTemperatureFans: (state, getters) => {
|
||||
getTemperatureFans: (state, getters, rootState, rootGetters) => {
|
||||
let fans = []
|
||||
|
||||
for (let [key, value] of Object.entries(state)) {
|
||||
@@ -100,8 +108,15 @@ export default {
|
||||
name: nameSplit[1],
|
||||
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'),
|
||||
})
|
||||
}
|
||||
}
|
||||
@@ -124,15 +139,20 @@ export default {
|
||||
if (value.temperature <= min_temp + split) icon = "mdi-thermometer-low"
|
||||
if (value.temperature >= max_temp - split) icon = "mdi-thermometer-high"
|
||||
|
||||
|
||||
|
||||
sensors.push({
|
||||
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,
|
||||
measured_min_temp: value.measured_min_temp,
|
||||
measured_max_temp: value.measured_max_temp,
|
||||
chartColor: getters["tempHistory/getDatasetColor"](nameSplit[1]),
|
||||
chartTemperature: getters["tempHistory/getDataset"](nameSplit[1]),
|
||||
})
|
||||
}
|
||||
}
|
||||
@@ -252,11 +272,14 @@ export default {
|
||||
if (a.type === "fan") return -1
|
||||
if (b.type === "fan") return 1
|
||||
|
||||
if (a.pwm < b.pwm) return 1
|
||||
if (a.pwm > b.pwm) return -1
|
||||
|
||||
if (a.controllable < b.controllable) return 1
|
||||
if (a.controllable > b.controllable) return -1
|
||||
|
||||
let nameA = a.name.toUpperCase()
|
||||
let nameB = b.name.toUpperCase()
|
||||
const nameA = a.name.toUpperCase()
|
||||
const nameB = b.name.toUpperCase()
|
||||
|
||||
if (nameA < nameB) return -1
|
||||
if (nameA > nameB) return 1
|
||||
@@ -265,6 +288,82 @@ export default {
|
||||
})
|
||||
},
|
||||
|
||||
getAdditionSensors: (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") {
|
||||
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':
|
||||
tmp[key]['unit'] = "hPa"
|
||||
break
|
||||
|
||||
case 'humidity':
|
||||
tmp[key]['unit'] = "%"
|
||||
break
|
||||
|
||||
default:
|
||||
tmp[key]['unit'] = ""
|
||||
}
|
||||
|
||||
additionValues = Object.assign(additionValues, tmp)
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
|
||||
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 = []
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@ export default {
|
||||
setData(state, payload) {
|
||||
if ("status" in payload) payload = payload.status;
|
||||
if ("requestParams" in payload) delete payload.requestParams
|
||||
let now = Date.now();
|
||||
//let now = Date.now();
|
||||
|
||||
Object.entries(payload).forEach(([key, value]) => {
|
||||
if (key === "webhooks") {
|
||||
@@ -36,31 +36,6 @@ export default {
|
||||
...value
|
||||
})
|
||||
} else Vue.set(state, key, value)
|
||||
|
||||
//update heaters
|
||||
if (
|
||||
Array.isArray(state.heaters.available_heaters) &&
|
||||
state.heaters.available_heaters.length
|
||||
) {
|
||||
let keySplit = key.split(" ")
|
||||
|
||||
if (
|
||||
state.heaters.available_heaters.includes(key) ||
|
||||
keySplit[0] === "temperature_fan" ||
|
||||
keySplit[0] === "temperature_sensor") {
|
||||
|
||||
let name = keySplit[0]
|
||||
if (keySplit[0] === "temperature_fan") name = keySplit[1]
|
||||
else if (keySplit[0] === "temperature_sensor") name = keySplit[1]
|
||||
else if (keySplit[0] === "heater_generic") name = keySplit[1]
|
||||
|
||||
if (value.temperature) this.commit('printer/tempHistory/addValue', { name: name, value: value.temperature, time: now })
|
||||
else if (key in state && 'temperature' in state[key]) this.commit('printer/tempHistory/addValue', { name: name, value: state[key].temperature, time: now })
|
||||
|
||||
if (value.target) this.commit('printer/tempHistory/addValue', { name: name+'_target', value: value.target, time: now })
|
||||
else if (key in state && 'target' in state[key]) this.commit('printer/tempHistory/addValue', { name: name+'_target', value: state[key].target, time: now })
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
@@ -1,9 +1,146 @@
|
||||
import {colorArray, colorChamber, colorHeaterBed, datasetTypes} from "@/store/variables";
|
||||
import {convertName} from "@/plugins/helpers";
|
||||
|
||||
export default {
|
||||
reset({ commit }) {
|
||||
commit('reset')
|
||||
},
|
||||
|
||||
getHistory({ commit }, payload) {
|
||||
commit('setHistory', payload);
|
||||
getHistory({ commit, state, rootGetters }, payload) {
|
||||
const now = new Date()
|
||||
if (payload !== undefined) {
|
||||
Object.entries(payload).sort().forEach(([name, datasets]) => {
|
||||
let keySplit = name.split(" ")
|
||||
if (keySplit.length > 1) name = keySplit[1]
|
||||
const type = keySplit[0]
|
||||
|
||||
if ('temperatures' in datasets) {
|
||||
let datasetTemperature = state.datasets.find(element => element.name === name)
|
||||
if (datasetTemperature === undefined) {
|
||||
let color = ''
|
||||
|
||||
switch (name) {
|
||||
case 'heater_bed':
|
||||
color = colorHeaterBed;
|
||||
break;
|
||||
case 'chamber':
|
||||
color = colorChamber;
|
||||
break;
|
||||
default:
|
||||
color = colorArray[state.datasets.filter(element =>
|
||||
!element.name.endsWith("_target") && element.name !== "heater_bed" && element.name !== "chamber"
|
||||
).length];
|
||||
break;
|
||||
}
|
||||
|
||||
datasetTemperature = {
|
||||
type: "line",
|
||||
name: name,
|
||||
legendText: convertName(name),
|
||||
xValueType: "dateTime",
|
||||
dataPoints:[],
|
||||
showInLegend: true,
|
||||
markerType: 'circle',
|
||||
color: rootGetters["gui/getDatasetValue"]({ name: name, type: 'color' }) || color,
|
||||
visible: (rootGetters["gui/getDatasetValue"]({ name: name, type: 'temperature' })) ? 1 : 0,
|
||||
}
|
||||
|
||||
commit('addDataset', datasetTemperature)
|
||||
} else commit('clearDataset', name)
|
||||
|
||||
commit('addValue', {
|
||||
name: name,
|
||||
value: datasets.temperatures,
|
||||
type: type,
|
||||
time: now
|
||||
})
|
||||
|
||||
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 = {
|
||||
type: "stepArea",
|
||||
name: name+"_target",
|
||||
xValueType: "dateTime",
|
||||
dataPoints:[],
|
||||
showInLegend: false,
|
||||
markerType: 'none',
|
||||
color: datasetTemperature.color,
|
||||
fillOpacity: .1,
|
||||
lineThickness: 0,
|
||||
visible: (rootGetters["gui/getDatasetValue"]({ name: name, type: 'target' })) ? 1 : 0,
|
||||
}
|
||||
|
||||
commit('addDataset', datasetTarget)
|
||||
} else commit('clearDataset', name+"_target")
|
||||
|
||||
commit('addValue', {
|
||||
name: name+"_target",
|
||||
value: datasets.targets,
|
||||
type: type,
|
||||
time: now
|
||||
})
|
||||
}
|
||||
|
||||
['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', datasetAdditinal)
|
||||
} else commit('clearDataset', name+"_"+additionalType)
|
||||
|
||||
commit('addValue', {
|
||||
name: name+"_"+additionalType,
|
||||
value: datasets[additionalType+"s"],
|
||||
type: type,
|
||||
time: now
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
|
||||
updateDatasets({ commit, rootState }) {
|
||||
if (
|
||||
'heaters' in rootState.printer &&
|
||||
'available_sensors' in rootState.printer.heaters &&
|
||||
rootState.printer.heaters.available_sensors.length
|
||||
) {
|
||||
const now = new Date()
|
||||
rootState.printer.heaters.available_sensors.forEach((objectName) => {
|
||||
if (objectName in rootState.printer) {
|
||||
const objectNameSplits = objectName.split(" ")
|
||||
let name = objectNameSplits[0]
|
||||
if (["temperature_fan", "temperature_sensor", "heater_generic"].includes(objectNameSplits[0])) name = objectNameSplits[1]
|
||||
|
||||
datasetTypes.forEach(datasetType => {
|
||||
if (datasetType in rootState.printer[objectName]) {
|
||||
commit('addValue', {
|
||||
name: datasetType === "temperature" ? name : name+"_"+datasetType,
|
||||
value: rootState.printer[objectName][datasetType],
|
||||
type: objectNameSplits[0],
|
||||
time: now
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -4,5 +4,9 @@ export default {
|
||||
let dataset = state.datasets.find(element => element.name === name)
|
||||
|
||||
return (dataset) ? dataset.color : null
|
||||
}
|
||||
},
|
||||
|
||||
getDataset: state => (name) => {
|
||||
return state.datasets.find(element => element.name === name)
|
||||
},
|
||||
}
|
||||
@@ -1,134 +1,90 @@
|
||||
import { getDefaultState } from './index'
|
||||
import { colorArray, colorChamber, colorHeaterBed } from "@/store/variables"
|
||||
import { datasetTypesInPercents } from '@/store/variables'
|
||||
import Vue from "vue";
|
||||
|
||||
export default {
|
||||
reset(state) {
|
||||
Object.assign(state, getDefaultState())
|
||||
},
|
||||
|
||||
setHistory(state, payload) {
|
||||
let now = new Date();
|
||||
|
||||
if (payload !== undefined) {
|
||||
Object.entries(payload).sort().forEach(([key, datasets]) => {
|
||||
let keySplit = key.split(" ");
|
||||
|
||||
if (keySplit.length > 1) key = keySplit[1];
|
||||
|
||||
if (datasets.temperatures) {
|
||||
let max = datasets.temperatures.length;
|
||||
for (let i = 0; i < max; i++) {
|
||||
let time = new Date(now.getTime() - 1000 * (max - i));
|
||||
|
||||
this.commit('printer/tempHistory/addValue', {
|
||||
name: key,
|
||||
value: datasets.temperatures[i],
|
||||
type: keySplit[0],
|
||||
time: time
|
||||
});
|
||||
|
||||
this.commit('printer/tempHistory/addValue', {
|
||||
name: key+'_target',
|
||||
value: datasets.targets[i],
|
||||
type: keySplit[0],
|
||||
time: time
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
addDataset(state, payload) {
|
||||
state.datasets.push(payload)
|
||||
},
|
||||
|
||||
addValue(state, payload) {
|
||||
// definations for delete old entries
|
||||
let timeOld = new Date().getTime() - (1000 * 60 * 10)
|
||||
let minResolution = 1000 // value in ms
|
||||
//let deletedIndex
|
||||
let multi = 1
|
||||
datasetTypesInPercents.forEach(element => {
|
||||
if (payload.name.endsWith("_"+element)) multi = 100
|
||||
})
|
||||
|
||||
let mainDataset = state.datasets.find(element => element.name === payload.name)
|
||||
if (!mainDataset) {
|
||||
//TODO load hidden sensors from gui store
|
||||
//let hidden = this.rootState.gui.dashboard.hiddenTempChart.indexOf(payload.name.toUpperCase()) >= 0;
|
||||
//let hidden = false
|
||||
const dataset = state.datasets.find(element => element.name === payload.name)
|
||||
|
||||
if (payload.name.includes('_target')) {
|
||||
let masterDataset = state.datasets.find(element => element.name === payload.name.replace('_target', ''))
|
||||
|
||||
if (masterDataset) {
|
||||
mainDataset = {
|
||||
type: "stepArea",
|
||||
name: payload.name,
|
||||
legendText: payload.name,
|
||||
xValueType: "dateTime",
|
||||
dataPoints:[],
|
||||
showInLegend: false,
|
||||
markerType: 'none',
|
||||
fillOpacity: .1,
|
||||
lineThickness: 0,
|
||||
toolTipContent: "{name}: {y}°C",
|
||||
color: masterDataset.color || '#666'
|
||||
}
|
||||
}
|
||||
} else {
|
||||
let color = '';
|
||||
|
||||
switch (payload.name) {
|
||||
case 'heater_bed': color = colorHeaterBed; break;
|
||||
case 'chamber': color = colorChamber; break;
|
||||
default: color = colorArray[state.datasets.filter(element => !element.name.endsWith("_target") && element.name !== "heater_bed" && element.name !== "chamber").length]; break;
|
||||
}
|
||||
|
||||
mainDataset = {
|
||||
type: "spline",
|
||||
name: payload.name,
|
||||
legendText: payload.name,
|
||||
xValueType: "dateTime",
|
||||
dataPoints:[],
|
||||
showInLegend: true,
|
||||
markerType: 'none',
|
||||
toolTipContent: "{name}: {y}°C",
|
||||
color: color,
|
||||
}
|
||||
}
|
||||
|
||||
mainDataset = state.datasets.push(mainDataset);
|
||||
}
|
||||
|
||||
// update current temp in temperature chart
|
||||
if (mainDataset && payload.value !== undefined) {
|
||||
if (dataset !== undefined && payload.value !== undefined) {
|
||||
if (Array.isArray(payload.value)) {
|
||||
for (let i = 0; i < payload.value.length; i++) {
|
||||
mainDataset.data.push({
|
||||
x: payload.time - 1000 * i,
|
||||
y: Math.round(payload.value[i]*100)/100
|
||||
for (let i = payload.value.length; i > 0; i--) {
|
||||
dataset.dataPoints.push({
|
||||
x: payload.time - (i*1000),
|
||||
y: Math.round(payload.value[payload.value.length - i] * multi * 100)/100
|
||||
})
|
||||
}
|
||||
} else {
|
||||
if (mainDataset.dataPoints && mainDataset.dataPoints.length) {
|
||||
let lastTemp = mainDataset.dataPoints[mainDataset.dataPoints.length - 1].y
|
||||
let lastTime = mainDataset.dataPoints[mainDataset.dataPoints.length - 1].x
|
||||
dataset.dataPoints.push({
|
||||
x: payload.time,
|
||||
y: Math.round(payload.value * multi * 100)/100
|
||||
})
|
||||
|
||||
if (
|
||||
payload.time - lastTime > minResolution &&
|
||||
(lastTemp !== payload.value || payload.time - lastTime > minResolution)
|
||||
) {
|
||||
mainDataset.dataPoints.push({
|
||||
x: payload.time,
|
||||
y: Math.round(payload.value*100)/100
|
||||
});
|
||||
}
|
||||
|
||||
let i
|
||||
while ((i = mainDataset.dataPoints.findIndex(item => timeOld > item.x)) > -1) {
|
||||
mainDataset.dataPoints.splice(i, 1)
|
||||
}
|
||||
} else if (mainDataset.dataPoints) {
|
||||
mainDataset.dataPoints.push({
|
||||
x: payload.time,
|
||||
y: Math.round(payload.value*100)/100
|
||||
});
|
||||
let i
|
||||
const timeOld = new Date().getTime() - (1000 * 60 * 10)
|
||||
while ((i = dataset.dataPoints.findIndex(item => timeOld > item.x)) > -1) {
|
||||
dataset.dataPoints.splice(i, 1)
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
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")) {
|
||||
element.visible = false
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
showPowerDatasets(state) {
|
||||
state.datasets.forEach(element => {
|
||||
if (element.name.endsWith("_power")) {
|
||||
element.visible = true
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
setVisible(state, payload) {
|
||||
const datasetName = payload.type !== 'temperature' ? payload.name+'_'+payload.type : payload.name
|
||||
|
||||
const datasetIndex = state.datasets.findIndex(element => element.name === datasetName)
|
||||
if (datasetIndex !== -1) {
|
||||
Vue.set(state.datasets[datasetIndex], 'visible', payload.value)
|
||||
|
||||
|
||||
}
|
||||
},
|
||||
|
||||
setColor(state, payload) {
|
||||
state.datasets.forEach(element => {
|
||||
if (
|
||||
element.name === payload.name ||
|
||||
element.name === payload.name+'_target' ||
|
||||
element.name === payload.name+'_power'
|
||||
) {
|
||||
element.color = payload.value
|
||||
}
|
||||
})
|
||||
},
|
||||
}
|
||||
@@ -7,10 +7,28 @@ export default {
|
||||
dispatch('updateManager/reset')
|
||||
},
|
||||
|
||||
init({ dispatch }) {
|
||||
init() {
|
||||
Vue.prototype.$socket.sendObj('server.info', {}, 'server/getInfo')
|
||||
Vue.prototype.$socket.sendObj('server.files.list', { root: 'config' }, 'server/checkMainsailJson')
|
||||
},
|
||||
|
||||
dispatch('printer/init', null, { root: true })
|
||||
checkMainsailJson({ dispatch, rootState }, payload) {
|
||||
let boolFallback = true
|
||||
|
||||
Object.entries(payload).forEach(([, file]) => {
|
||||
if ('filename' in file && file.filename === '.mainsail.json') {
|
||||
boolFallback = false
|
||||
|
||||
fetch('//'+rootState.socket.hostname+':'+rootState.socket.port+'/server/files/config/.mainsail.json?time='+Date.now())
|
||||
.then(res => res.json()).then(file => {
|
||||
dispatch('gui/getData', file, { root: true })
|
||||
if (!rootState.socket.remoteMode) dispatch('farm/readStoredPrinters', {}, { root: true })
|
||||
dispatch('printer/init', null, { root: true })
|
||||
})
|
||||
}
|
||||
})
|
||||
|
||||
if (boolFallback) dispatch('printer/init', null, { root: true })
|
||||
},
|
||||
|
||||
getInfo({ commit, state, rootState }, payload) {
|
||||
@@ -47,6 +65,7 @@ export default {
|
||||
},
|
||||
|
||||
getGcodeStore({ commit }, payload) {
|
||||
commit('clearGcodeStore')
|
||||
commit('setGcodeStore', payload)
|
||||
},
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -26,6 +33,10 @@ export default {
|
||||
});
|
||||
},
|
||||
|
||||
clearGcodeStore(state) {
|
||||
Vue.set(state, 'events', [])
|
||||
},
|
||||
|
||||
setGcodeStore(state, payload) {
|
||||
if ("gcode_store" in payload && Array.isArray(payload.gcode_store)) {
|
||||
payload.gcode_store.forEach(message => {
|
||||
|
||||
@@ -4,7 +4,9 @@ export default {
|
||||
const output = {}
|
||||
const sortKeys = Object.keys(state.version_info).sort((a,b) => {
|
||||
if (a === 'klipper') return -1
|
||||
if (b === 'klipper') return 1
|
||||
if ('name' in state.version_info[a] && state.version_info[a].name === 'mainsail') return 1
|
||||
if ('name' in state.version_info[b] && state.version_info[b].name === 'mainsail') return -1
|
||||
if (a < b) return -1
|
||||
if (a > b) return 1
|
||||
|
||||
@@ -21,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
|
||||
|
||||
@@ -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':
|
||||
|
||||
+17
-1
@@ -11,4 +11,20 @@ export const colorArray = [
|
||||
export const colorHeaterBed = '#2196F3'
|
||||
export const colorChamber = '#4CAF50'
|
||||
export const temperaturChartSampleLength = 1200
|
||||
export const themeDir = '.theme'
|
||||
export const themeDir = '.theme'
|
||||
export const datasetTypes = [
|
||||
"temperature",
|
||||
"target",
|
||||
"power",
|
||||
"speed",
|
||||
]
|
||||
|
||||
export const datasetTypesInPercents = [
|
||||
"power",
|
||||
"speed",
|
||||
]
|
||||
|
||||
export const additionalSensors = [
|
||||
"bme280",
|
||||
"htu21d",
|
||||
]
|
||||
@@ -9,6 +9,14 @@ module.exports = {
|
||||
"transpileDependencies": [
|
||||
"vuetify"
|
||||
],
|
||||
pluginOptions: {
|
||||
i18n: {
|
||||
locale: 'en',
|
||||
fallbackLocale: 'en',
|
||||
localeDir: 'locales',
|
||||
enableInSFC: true
|
||||
}
|
||||
},
|
||||
configureWebpack: {
|
||||
plugins: [
|
||||
new webpack.DefinePlugin({
|
||||
|
||||
Reference in new issue
Block a user