Compare commits

...
40 Commits
Author SHA1 Message Date
Stefan Dej a9cc16911d update top corner menu icon
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2021-05-18 23:15:56 +02:00
Stefan Dej 9bd2f7bdf5 push version number to v1.6.0
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2021-05-18 22:42:05 +02:00
Stefan Dej 83347fa35d bugfix: adjusting the home text in the control panel
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2021-05-18 22:25:24 +02:00
Stefan Dej 4eabaf3971 bugfix: rename reverse motion to invert motion in settings control panel
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2021-05-18 22:17:47 +02:00
Stefan Dej bb1b548db9 bugfix: fix typo in connection failed dialog
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2021-05-18 22:14:16 +02:00
Stefan Dej f693e40fc1 bugfix: make in_progress history entries deletable
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2021-05-18 21:57:14 +02:00
Stefan Dej 38c4da2f43 bugfix: add moonraker inotify support (#282)
* bugfix: update to moonraker file_manager inotify events

Signed-off-by: Stefan Dej <meteyou@gmail.com>

* feature: add root_update to enable gcode files with registered root directories

Signed-off-by: Stefan Dej <meteyou@gmail.com>
2021-05-18 21:38:33 +02:00
Stefan Dej 0ed0975005 add translation for UV4L-MJPEG webcam service
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2021-05-18 20:56:23 +02:00
Stefan Dej 97c06c3061 feature: add UV4L-MJPEG webcam support
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2021-05-18 01:08:47 +02:00
Stefan Dej 76727a82dc bugfix: VUE_APP_REMOTE_MODE true/false doesnt work
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2021-05-17 21:29:21 +02:00
Stefan Dej d8aea8feb7 bugfix: reload metadata after move/rename gcode file (fix: #281)
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2021-05-15 23:49:18 +02:00
Stefan Dej 57fbe9eb7c update npm packages
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2021-05-15 22:41:04 +02:00
Stefan Dej 600186e895 Merge remote-tracking branch 'origin/master' 2021-05-15 22:37:04 +02:00
dependabot[bot] f346db30fc build(deps): bump rexml from 3.2.4 to 3.2.5 in /docs (#273)
Bumps [rexml](https://github.com/ruby/rexml) from 3.2.4 to 3.2.5.
- [Release notes](https://github.com/ruby/rexml/releases)
- [Changelog](https://github.com/ruby/rexml/blob/master/NEWS.md)
- [Commits](https://github.com/ruby/rexml/compare/v3.2.4...v3.2.5)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-05-15 22:15:41 +02:00
lixxbox 598a7fe94f docs: stylesheets & escaping gcode (#279)
* docs: just a few stylesheet adjustments
	modified:   docs/_sass/color_schemes/mainsail.scss
	new file:   docs/assets/img/alert.svg
	new file:   docs/assets/img/info.svg
	new file:   docs/assets/img/success.svg
	new file:   docs/assets/img/warning.svg

* docs: escape gcodes, so that it can be rendered.
	modified:   necessary-cfg.md
2021-05-11 16:52:15 +02:00
Alex Zellner 6096704fe5 remove defaut_parameter from macro (#276)
* remove defaut_parameter

Change macros in preparation of the removal of default_parameter

* fix typo
2021-05-11 15:02:29 +02:00
lixxbox a0a3aa79ac docs: a simple recommendation for remote access (#277)
* docs: a simple recommendation for remote access
	new file:   quicktips/remote-access.md

* Update remote-access.md
2021-05-11 15:01:35 +02:00
Stefan Dej 1919aa6921 feature: add filament_motion_sensors
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2021-05-10 18:09:06 +02:00
Stefan Dej 576e0eaada fix typos in Files.vue
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2021-04-25 13:08:47 +02:00
Stefan Dej bf5851264d Merge remote-tracking branch 'origin/master' 2021-04-23 21:21:06 +02:00
Eike Ahmels 1cbe7d1164 save file with special characters (#269)
* image fix, grammar fix

* fixed suggestions bug, some cleanup from old editor, svg edge case

* FIX: save a file with special characters
2021-04-23 21:20:18 +02:00
Stefan Dej 84eed4c190 Merge remote-tracking branch 'origin/master' 2021-04-23 21:19:21 +02:00
Stefan Dej 11f46e8ec8 update vue.config.js
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2021-04-23 21:18:44 +02:00
Stefan Dej abb19a4ac9 feature: add FR to i18n
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2021-04-23 21:18:08 +02:00
Stefan Dej 5f0b628f6e bugfix: fix download in firefox (open new window)
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2021-04-20 23:57:33 +02:00
Stefan Dej f6679effd9 feature: rename directory in ConfigFilesPanel.vue
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2021-04-20 23:25:41 +02:00
Stefan Dej ee4a07c9b2 rework history list dialog
add estimated filament weight to history list dialog

Signed-off-by: Stefan Dej <meteyou@gmail.com>
2021-04-20 23:03:17 +02:00
Stefan Dej b49c57405c feature: multiple custom console filters
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2021-04-20 21:46:04 +02:00
Stefan Dej 71db147a19 bugfix: fix upper directory colspan number
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2021-04-18 23:21:36 +02:00
Stefan Dej 8a66899837 feature: store webcam settings in printer farm
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2021-04-18 21:48:31 +02:00
Stefan Dej 64d6dd596d bugfix: fix end time, when the job is in_progress in HistoryListPanel.vue
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2021-04-18 17:41:51 +02:00
Stefan Dej 091b78c569 fix missing space in upload dialog
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2021-04-18 16:48:04 +02:00
Stefan Dej 5e09f52a79 feature: display filament weight metadata in gcode-files list
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2021-04-18 12:59:05 +02:00
Stefan Dej ddbab8538a add titles to i18n in HistoryListPanel.vue
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2021-04-18 12:17:08 +02:00
Stefan Dej 2865a8f83a bugfix: fix icon issue in edit tool dialog of temperature_sensors
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2021-04-18 12:07:35 +02:00
Stefan Dej b09615dc2f bugfix: fix translations in ToolsPanel.vue
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2021-04-18 12:02:47 +02:00
Stefan Dej 365ed2cda7 feature: display printername in SelectPrinterDialog.vue
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2021-04-18 01:15:04 +02:00
Stefan Dej d578c9105c feature: limit requested_speed wiht current max_velocity
cleanup StatusPanel.vue

Signed-off-by: Stefan Dej <meteyou@gmail.com>
2021-04-17 23:30:38 +02:00
Stefan Dej 3df44b05e2 feature: delete directory with content in config files panel
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2021-04-17 00:18:01 +02:00
Stefan Dej 025921e84a feature: delete directory with content in g-code files
Signed-off-by: Stefan Dej <meteyou@gmail.com>
2021-04-17 00:01:25 +02:00
55 changed files with 5888 additions and 2609 deletions

No files matched your search

+7 -1
View File
@@ -24,6 +24,7 @@ GEM
http_parser.rb (~> 0.6.0)
ethon (0.12.0)
ffi (>= 1.3.0)
eventmachine (1.2.7)
eventmachine (1.2.7-x64-mingw32)
execjs (2.7.0)
faraday (1.3.0)
@@ -31,6 +32,7 @@ GEM
multipart-post (>= 1.2, < 3)
ruby2_keywords
faraday-net_http (1.0.1)
ffi (1.14.2)
ffi (1.14.2-x64-mingw32)
forwardable-extended (2.6.0)
gemoji (3.0.1)
@@ -213,6 +215,8 @@ GEM
multipart-post (2.1.1)
nokogiri (1.11.1-x64-mingw32)
racc (~> 1.4)
nokogiri (1.11.1-x86_64-linux)
racc (~> 1.4)
octokit (4.20.0)
faraday (>= 0.9)
sawyer (~> 0.8.0, >= 0.5.3)
@@ -223,7 +227,7 @@ GEM
rb-fsevent (0.10.4)
rb-inotify (0.10.1)
ffi (~> 1.0)
rexml (3.2.4)
rexml (3.2.5)
rouge (3.26.0)
ruby-enum (0.9.0)
i18n
@@ -251,6 +255,7 @@ GEM
tzinfo (>= 1.0.0)
unf (0.1.4)
unf_ext
unf_ext (0.0.7.7)
unf_ext (0.0.7.7-x64-mingw32)
unicode-display_width (1.7.0)
wdm (0.1.1)
@@ -258,6 +263,7 @@ GEM
PLATFORMS
x64-mingw32
x86_64-linux
DEPENDENCIES
github-pages
+39 -39
View File
@@ -1,52 +1,52 @@
$link-color: $red-300;
$btn-primary-color: $red-300;
.success, .info, .warning, .alert {
margin: 16px 0px;
padding: 20px;
position: relative;
border-radius: 3px;
width: 100%;
display: block;
background: #f5f6fa;
border: 1px solid hsl(0, 0%, 85%);
border-left: 4px solid;
padding-left: 3.5em;
}
.success {
margin: 16px 0px;
padding: 20px;
position: relative;
border-radius: 3px;
width: 100%;
display: block;
background-color: #f5f6fa;
border-left: 4px solid;
border-color: rgb(38, 203, 124);
border-left-color: rgb(38, 203, 124);
}
.info {
margin: 16px 0px;
padding: 20px;
position: relative;
border-radius: 3px;
width: 100%;
display: block;
background-color: #f5f6fa;
border-left: 4px solid;
border-color: rgb(56, 132, 255);
border-left-color: rgb(56, 132, 255);
}
.warning {
margin: 16px 0px;
padding: 20px;
position: relative;
border-radius: 3px;
width: 100%;
display: block;
background-color: #f5f6fa;
border-left: 4px solid;
border-color: rgb(247, 125, 5);
border-left-color: rgb(247, 125, 5);
}
.alert {
border-left-color: rgb(255, 70, 66);
}
.alert {
margin: 16px 0px;
padding: 20px;
position: relative;
border-radius: 3px;
width: 100%;
display: block;
background-color: #f5f6fa;
border-left: 4px solid;
border-color: rgb(255, 70, 66);
.success::before, .info::before, .warning::before, .alert::before {
display: inline-block;
position: absolute;
left: 1.0em;
width: 1.5em;
height: 1.5em;
vertical-align: middle;
margin: 0px 10px 0px 0px;
}
.success::before {
content: url("/assets/img/success.svg");
}
.info::before {
content: url("/assets/img/info.svg");
}
.warning::before {
content: url("/assets/img/warning.svg");
}
.alert::before {
content: url("/assets/img/alert.svg");
}
.key {
+1
View File
@@ -0,0 +1 @@
<svg preserveAspectRatio="xMidYMid meet" fill="none" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" stroke="currentColor" style="color: rgb(255, 70, 66);" class="icon-7f6730be--text-3f89f380"><g><path d="M10.29 3.86L1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z"/><line x1="12" y1="9" x2="12" y2="13"/><line x1="12" y1="17" x2="12" y2="17"/></g></svg>

After

Width:  |  Height:  |  Size: 454 B

+1
View File
@@ -0,0 +1 @@
<svg preserveAspectRatio="xMidYMid meet" fill="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" stroke="none" style="color: rgb(56, 132, 255);" class="icon-7f6730be--text-3f89f380"><g><path d="M12.2 8.98c.06-.01.12-.03.18-.06.06-.02.12-.05.18-.09l.15-.12c.18-.19.29-.45.29-.71 0-.06-.01-.13-.02-.19a.603.603 0 0 0-.06-.19.757.757 0 0 0-.09-.18c-.03-.05-.08-.1-.12-.15-.28-.27-.72-.37-1.09-.21-.13.05-.23.12-.33.21-.04.05-.09.1-.12.15-.04.06-.07.12-.09.18-.03.06-.05.12-.06.19-.01.06-.02.13-.02.19 0 .26.11.52.29.71.1.09.2.16.33.21.12.05.25.08.38.08.06 0 .13-.01.2-.02M13 16v-4a1 1 0 1 0-2 0v4a1 1 0 1 0 2 0M12 3c-4.962 0-9 4.038-9 9 0 4.963 4.038 9 9 9 4.963 0 9-4.037 9-9 0-4.962-4.037-9-9-9m0 20C5.935 23 1 18.065 1 12S5.935 1 12 1c6.066 0 11 4.935 11 11s-4.934 11-11 11" fill-rule="evenodd"></path></g></svg>

After

Width:  |  Height:  |  Size: 874 B

+1
View File
@@ -0,0 +1 @@
<svg preserveAspectRatio="xMidYMid meet" fill="none" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" stroke="currentColor" style="color: rgb(38, 203, 124);" class="icon-7f6730be--text-3f89f380"><g><path d="M22 11.07V12a10 10 0 1 1-5.93-9.14"></path><polyline points="23 3 12 14 9 11"></polyline></g></svg>

After

Width:  |  Height:  |  Size: 376 B

+1
View File
@@ -0,0 +1 @@
<svg preserveAspectRatio="xMidYMid meet" fill="none" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" stroke="currentColor" style="color: rgb(247, 125, 5);" class="icon-7f6730be--text-3f89f380"><g><circle cx="12" cy="12" r="10"></circle><line x1="12" y1="8" x2="12" y2="12"></line><line x1="12" y1="16" x2="12" y2="16"></line></g></svg>

After

Width:  |  Height:  |  Size: 406 B

+27 -10
View File
@@ -30,37 +30,51 @@ This enables pause / resume in mainsail.
```
# Macros
## for pause /resume / cancel functionality
## for pause / resume / cancel functionality
These should be modified to your own needs.
{% raw %}
```yaml
[gcode_macro PAUSE]
rename_existing: BASE_PAUSE
default_parameter_X: 230 #edit to your park position
default_parameter_Y: 230 #edit to your park position
default_parameter_Z: 10 #edit to your park position
default_parameter_E: 1 #edit to your retract length
gcode:
##### set defaults #####
{% set x = params.X|default(230) %} #edit to your park position
{% set y = params.Y|default(230) %} #edit to your park position
{% set z = params.Z|default(10)|float %} #edit to your park position
{% set e = params.E|default(1) %} #edit to your retract length
##### calculate save lift position #####
{% set max_z = printer.toolhead.axis_maximum.z|float %}
{% set act_z = printer.toolhead.position.z|float %}
{% set lift_z = z|abs %}
{% if act_z < (max_z - lift_z) %}
{% set z_safe = lift_z %}
{% else %}
{% set z_safe = max_z - act_z %}
{% endif %}
##### end of definitions #####
SAVE_GCODE_STATE NAME=PAUSE_state
BASE_PAUSE
G91
G1 E-{E} F2100
G1 Z{Z}
G1 E-{e} F2100
G1 Z{z_safe}
G90
G1 X{X} Y{Y} F6000
G1 X{x} Y{y} F6000
```
```yaml
[gcode_macro RESUME]
rename_existing: BASE_RESUME
default_parameter_E: 1 #edit to your retract length
gcode:
##### set defaults #####
{% set e = params.E|default(1) %} #edit to your retract length
G91
G1 E{E} F2100
G1 E{e} F2100
G90
RESTORE_GCODE_STATE NAME=PAUSE_state MOVE=1
BASE_RESUME
```
```yaml
[gcode_macro CANCEL_PRINT]
rename_existing: BASE_CANCEL_PRINT
@@ -70,11 +84,13 @@ gcode:
SDCARD_RESET_FILE
BASE_CANCEL_PRINT
```
{% endraw %}
# Optional
## customize klipper default commands
for example, if you want to adjust the `BED_MESH_CALIBRATE` command, which you can run from "heightmap > calibrate".
{% raw %}
```yaml
[gcode_macro BED_MESH_CALIBRATE]
rename_existing: BASE_BED_MESH_CALIBRATE
@@ -87,3 +103,4 @@ gcode:
BASE_BED_MESH_CALIBRATE
#after the original gcode
```
{% endraw %}
+86
View File
@@ -0,0 +1,86 @@
---
layout: default
title: Remote Access
parent: Quicktips
permalink: /quicktips/remote-access
description: >-
A guide to safe remote access.
---
# {{ page.title }}
{{ page.description }}
__Notice__
This is not a complete guide with every single step in detail, but rather a recommendation of what to do and especially what not to do to get access to the printer from somewhere remote from your network.
{: .info}
You have to decide if you ..
- only want to have status messages on your smartphone
- or you need full remote access to Mainsail from everywhere
Of course, you can also use a combination of both.
## Status messages
For simple status messages there are a couple of additional tools that can be used:
- __discord:__ Mooncord is a bot that sends you status messages over discord.
[https://github.com/eliteSchwein/mooncord](https://github.com/eliteSchwein/mooncord)
- __telegram:__ moonraker-telegram is a bot that sends you status messages over telegram.
[https://github.com/Raabi91/moonraker-telegram](https://github.com/Raabi91/moonraker-telegram)
These tools are installed on the local machine and send the status messages via the respective platforms. Thus, no access to your local network from outside is necessary.
For details, please refer to the projects instructions.
## Remote Access to Mainsail
<div class="alert">
What <b>not to do</b>:
<ul>
<li>Please do not open ports of Mainsail/Moonraker in your router to the rest of the world. There are plenty of reports of Octoprint installations being freely accessible on the Internet, with just as many reasons why this is not a good idea.</li>
</ul>
<a href="https://isc.sans.edu/forums/diary/3D+Printers+in+The+Wild+What+Can+Go+Wrong/24044/" target="_blank">https://isc.sans.edu/forums/diary/3D+Printers+in+The+Wild+What+Can+Go+Wrong/24044/</a>
</div>
<div class="warning">
What you <b>could do</b>:
<ul>
<li>Use an external service provider (e.g. tailscale) to gain access to your home network.
<ul>
<li>Con: you give the control out of your hand</li>
</ul>
</li>
<li>Reverse Proxy</li>
</ul>
</div>
<div class="success">
<b>Recommendation</b> what you <b>should do</b>:
<ul>
<li>Set up your own secured VPN tunnel.
<ul>
<li>either in the router</li>
<li>or your Pi</li>
</ul>
</li>
</ul>
</div>
## Set up VPN
Several routers allow you to set up a VPN tunnel without much effort.
After you have entered the login data into e.g. your smartphone, you will have secure access to your entire network, including Mainsail.
If your router does not support this, you can also set up your own VPN, e.g. on your Pi.
Therefore you could use: [OpenVPN](https://openvpn.net/), [WireGuard](https://www.wireguard.com/) or [PiVPN](https://www.pivpn.io/)
To be able to reach your home network even with a non-static IP address, you should use a dynamic DNS service. This will forward a domain directly to your IP address. Often, these DynDNS services can also be set up directly in the router, so that the IP address gets automatically updated on a change.
Some free services: [DuckDNS](https://www.duckdns.org) or [FreeDNS ](https://freedns.afraid.org/)
__Notice__
The devices that dial in via the VPN tunnel are assigned to a different address range. This address range must be configured in moonraker under _trusted_clients_ and _cors_domains_. [https://moonraker.readthedocs.io/en/latest/configuration/#authorization](https://moonraker.readthedocs.io/en/latest/configuration/#authorization) <br/><br/>
For example:
__192.168.1__.x&emsp;_// devices on your regular LAN_
__192.168.50__.x&emsp;_// devices connected through your VPN tunnel_
{: .info}
+4089 -1933
View File
File diff suppressed because it is too large. Load diff
+22 -19
View File
@@ -1,6 +1,6 @@
{
"name": "mainsail",
"version": "1.5.0",
"version": "1.6.0",
"private": true,
"decription": "a klipper web interface",
"author": {
@@ -15,10 +15,10 @@
},
"dependencies": {
"axios": "^0.21.1",
"core-js": "^3.10.0",
"echarts": "^5.0.2",
"echarts-gl": "^2.0.2",
"monaco-editor": "^0.23.0",
"core-js": "^3.12.1",
"echarts": "^5.1.1",
"echarts-gl": "^2.0.4",
"monaco-editor": "^0.24.0",
"monaco-editor-textmate": "^2.2.2",
"monaco-textmate": "^3.0.1",
"monaco-themes": "^0.3.3",
@@ -30,35 +30,38 @@
"vue-context": "^6.0.0",
"vue-github-api": "^0.1.7",
"vue-headful": "^2.1.0",
"vue-i18n": "^8.22.4",
"vue-i18n": "^8.24.4",
"vue-load-image": "^0.1.12",
"vue-observe-visibility": "^1.0.0",
"vue-plotly": "^1.1.0",
"vue-resource": "^1.5.2",
"vue-simple-upload": "^0.1.6",
"vue-toast-notification": "^0.6.1",
"vuetify": "^2.4.9",
"vuetify": "^2.5.0",
"vuex": "^3.6.2"
},
"devDependencies": {
"@mdi/font": "^5.9.55",
"@vue/cli-plugin-babel": "^4.5.12",
"@vue/cli-plugin-eslint": "^4.5.3",
"@vue/cli-plugin-pwa": "^4.5.12",
"@vue/cli-service": "^4.5.12",
"@vue/cli-plugin-babel": "^4.5.13",
"@vue/cli-plugin-eslint": "^4.5.13",
"@vue/cli-plugin-pwa": "^4.5.13",
"@vue/cli-service": "^4.5.13",
"babel-eslint": "^10.1.0",
"css-loader": "^5.2.0",
"eslint": "^7.23.0",
"eslint-plugin-vue": "^7.8.0",
"css-loader": "^5.2.4",
"eslint": "^7.26.0",
"eslint-plugin-vue": "^7.9.0",
"generate-file-webpack-plugin": "^1.0.1",
"monaco-editor-webpack-plugin": "^3.0.1",
"monaco-editor-webpack-plugin": "^3.1.0",
"monaco-vscode-textmate-theme-converter": "^0.1.1",
"sass": "^1.32.8",
"sass-loader": "^10.1.1",
"node-sass": "^6.0.0",
"sass": "^1.32.13",
"sass-loader": "^10.2.0",
"style-loader": "^2.0.0",
"sw-precache-webpack-plugin": "^1.0.0",
"vue-cli-plugin-route": "0.0.7",
"vue-cli-plugin-vuetify": "^2.3.1",
"vue-i18n-extract": "^1.2.0",
"vue-cli-plugin-vuetify": "^2.4.0",
"vue-i18n-extract": "^1.2.3",
"vue-loader": "^16.2.0",
"vue-router": "^3.5.1",
"vue-template-compiler": "^2.6.12",
"vuetify-loader": "^1.7.2"
+21 -24
View File
@@ -17,7 +17,7 @@
</span>
</v-toolbar-title>
<v-spacer></v-spacer>
<v-btn v-if="!isConnecting && !connectingFailed && !dialogAddPrinter.bool && !dialogEditPrinter.bool && this['farm/countPrinters'] > 0" small class="minwidth-0" @click="checkPrinters"><v-icon small>mdi-sync</v-icon></v-btn>
<v-btn v-if="!isConnecting && !connectingFailed && !dialogAddPrinter.bool && !dialogEditPrinter.bool && countPrinters > 0" small class="minwidth-0" @click="checkPrinters"><v-icon small>mdi-sync</v-icon></v-btn>
<v-btn small class="minwidth-0" v-if="!isConnecting && !connectingFailed && dialogAddPrinter.bool" @click="dialogAddPrinter.bool = false"><v-icon small>mdi-close-thick</v-icon></v-btn>
<v-btn small class="minwidth-0" v-if="!isConnecting && !connectingFailed && dialogEditPrinter.bool" @click="dialogEditPrinter.bool = false"><v-icon small>mdi-close-thick</v-icon></v-btn>
</v-toolbar>
@@ -119,7 +119,7 @@
</v-card-text>
<v-card-text class="pt-3" v-if="!isConnecting && !connectingFailed && !dialogAddPrinter.bool && !dialogEditPrinter.bool">
<v-container class="px-0 pb-0">
<v-row v-for="(printer, index) in this['farm/getPrinters']" v-bind:key="index">
<v-row v-for="(printer, index) in printers" v-bind:key="index">
<v-col class="rounded transition-swing secondary py-2 px-2 mb-2" style="cursor: pointer;" @click="connect(printer)">
<v-row align="center">
<v-col class="col-auto pr-0">
@@ -133,14 +133,14 @@
v-if="!printer.socket.isConnecting"
>mdi-{{ printer.socket.isConnected ? 'checkbox-marked-circle' : 'cancel' }}</v-icon>
</v-col>
<v-col>{{ printer.socket.hostname }}{{ parseInt(printer.socket.port) !== 80 ? ":"+printer.socket.port : "" }}</v-col>
<v-col>{{ getPrinterName(printer._namespace) }}</v-col>
<v-col class="col-auto"><v-btn small class="minwidth-0" v-on:click.stop.prevent="editPrinter(index)"><v-icon small>mdi-pencil</v-icon></v-btn></v-col>
</v-row>
</v-col>
</v-row>
<v-row v-if="showCorsInfo">
<v-col>
<p class="text-center" v-if="this['farm/countPrinters'] === 0">{{ $t("App.Hello") }}</p>
<p class="text-center" v-if="countPrinters === 0">{{ $t("App.Hello") }}</p>
<p class="text-center">{{ $t("App.PleaseRememberToAdd") }}<code>{{ currentUrl }}</code> {{ $t("App.InMoonrakerConf") }}</p>
<p class="text-center mb-0">{{ $t("App.YouCanFindMore") }} <a :href="$t('App.Remotemode')" target="_blank">{{ $t("App.Remotemode") }}</a>.</p>
</v-col>
@@ -187,30 +187,27 @@ export default {
hostname: state => state.socket.hostname,
port: state => state.socket.port,
}),
...mapGetters([
"farm/countPrinters",
"farm/getPrinters"
]),
...mapGetters({
countPrinters: "farm/countPrinters",
printers: "farm/getPrinters",
getPrinterName: "farm/getPrinterName",
}),
...mapActions({
readPrinters: "farm/readStoredPrinters"
}),
currentUrl: {
get() {
return "http://"+window.location.hostname+(window.location.port !== 80 && window.location.port !== '' ? ':'+window.location.port : '')
}
currentUrl() {
return "http://"+window.location.hostname+(window.location.port !== 80 && window.location.port !== '' ? ':'+window.location.port : '')
},
showCorsInfo: {
get() {
if (this["farm/countPrinters"]) {
for (const [ ,printer] of Object.entries(this["farm/getPrinters"])) {
if (!printer.socket.isConnected) return true
}
return false
showCorsInfo() {
if (this.countPrinters) {
for (const [ ,printer] of Object.entries(this.printers)) {
if (!printer.socket.isConnected) return true
}
return true
return false
}
return true
}
},
methods: {
@@ -227,8 +224,8 @@ export default {
this.$store.dispatch("farm/savePrinters")
},
editPrinter(index) {
this.dialogEditPrinter.hostname = this["farm/getPrinters"][index].socket.hostname
this.dialogEditPrinter.port = this["farm/getPrinters"][index].socket.port
this.dialogEditPrinter.hostname = this.printers[index].socket.hostname
this.dialogEditPrinter.port = this.printers[index].socket.port
this.dialogEditPrinter.index = index
this.dialogEditPrinter.bool = true
},
@@ -264,7 +261,7 @@ export default {
this.$store.dispatch('socket/setData', { connectingFailed: false })
},
checkPrinters() {
Object.entries(this['farm/getPrinters']).forEach(([key, printer]) => {
Object.entries(this.printers).forEach(([key, printer]) => {
if (!printer.socket.isConnected && !printer.socket.isConnecting) {
this.$store.dispatch('farm/'+key+'/connect')
}
+19 -25
View File
@@ -76,7 +76,6 @@ export default {
...mapState({
klippy_state: state => state.server.klippy_state,
klipperConfigfileSettings: state => state.printer.configfile.settings,
moonrakerComponents: state => state.server.components,
boolNaviWebcam: state => state.gui.webcam.bool,
mainsailVersion: state => state.packageVersion,
@@ -90,35 +89,29 @@ export default {
return this.$store.dispatch("setNaviDrawer", newVal)
}
},
currentPage: {
get() {
return this.$route.fullPath
}
currentPage() {
return this.$route.fullPath
},
naviPoints: {
get() {
return routes.filter((element) => element.showInNavi)
}
naviPoints() {
return routes.filter((element) => element.showInNavi)
},
printerName: {
get() {
return this.$store.state.gui.general.printername || this.$store.state.printer.hostname
}
printerName() {
return this.$store.state.gui.general.printername || this.$store.state.printer.hostname
},
sidebarLogo: {
get() {
return this.$store.getters["files/getSidebarLogo"]
}
sidebarLogo() {
return this.$store.getters["files/getSidebarLogo"]
},
sidebarBackground: {
get() {
return this.$store.getters["files/getSidebarBackground"]
}
sidebarBackground() {
return this.$store.getters["files/getSidebarBackground"]
},
isUpdateAvailable: {
get() {
return this.$store.getters["server/updateManager/isUpdateAvailable"]
}
isUpdateAvailable() {
return this.$store.getters["server/updateManager/isUpdateAvailable"]
},
moonrakerComponents() {
return this.$store.state.server.components
},
registeredDirectories() {
return this.$store.state.server.registered_directories
}
},
methods: {
@@ -128,6 +121,7 @@ export default {
if (route.component?.name === 'webcam') return this.boolNaviWebcam
if ('moonrakerComponent' in route) return this.moonrakerComponents.includes(route.moonrakerComponent)
if ('registeredDirectory' in route) return this.registeredDirectories.includes(route.registeredDirectory)
if ('klipperComponent' in route) return (route.klipperComponent in this.klipperConfigfileSettings)
return true
+2 -2
View File
@@ -7,8 +7,8 @@
<template>
<v-menu bottom left :offset-y="true" :close-on-content-click="false" v-model="showMenu">
<template v-slot:activator="{ on, attrs }">
<v-btn dark icon v-bind="attrs" v-on="on">
<v-icon>mdi-dots-vertical</v-icon>
<v-btn color="grey darken-3" v-bind="attrs" v-on="on" class="ml-5 minwidth-0 px-2">
<v-icon>mdi-power-standby</v-icon>
</v-btn>
</template>
+1 -1
View File
@@ -122,7 +122,7 @@
>
<div class="d-flex align-center">
<v-icon>mdi-home</v-icon>
<span class="ml-1">{{ $t('Panels.ControlPanel.ALL') }}</span>
<span class="ml-1"><span class="d-none d-sm-inline">{{ $t('Panels.ControlPanel.Home') }} </span>{{ $t('Panels.ControlPanel.ALL') }}</span>
</div>
</v-btn>
</v-col>
+9 -1
View File
@@ -111,7 +111,7 @@
},
data: function() {
return {
currentCamName: "off",
}
},
props: {
@@ -138,6 +138,14 @@
return this.$store.getters["farm/"+this.printer._namespace+"/isCurrentPrinter"]
}
},
currentCamName: {
get() {
return this.$store.getters["farm/"+this.printer._namespace+"/getSetting"]('currentCamName', 'off')
},
set(newVal) {
return this.$store.dispatch("farm/"+this.printer._namespace+"/setSettings", { currentCamName: newVal })
}
},
printer_name: {
get() {
return this.$store.getters["farm/"+this.printer._namespace+"/getPrinterName"]
+131 -86
View File
@@ -5,10 +5,10 @@
{{ $t('History.PrintHistory') }}
<v-spacer class="d-none d-sm-block"></v-spacer>
<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 title="Refresh History" class="flex-grow-1" @click="refreshHistory"><v-icon>mdi-refresh</v-icon></v-btn>
<v-btn :title="$t('History.TitleRefreshHistory')" class="flex-grow-1" @click="refreshHistory"><v-icon>mdi-refresh</v-icon></v-btn>
<v-menu :offset-y="true" :close-on-content-click="false" title="Setup current list">
<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>
<v-btn class="flex-grow-1" :title="$t('History.TitleSettings')" v-bind="attrs" v-on="on"><v-icon class="">mdi-cog</v-icon></v-btn>
</template>
<v-list>
<v-list-item class="minHeight36" v-for="header of configHeaders" v-bind:key="header.key">
@@ -130,12 +130,12 @@
<v-list-item @click="startPrint(contextMenu.item)" v-if="contextMenu.item.exists" :disabled="is_printing">
<v-icon class="mr-1">mdi-printer</v-icon> {{ $t('History.Reprint') }}
</v-list-item>
<v-list-item @click="deleteJob(contextMenu.item)" :disabled="contextMenu.item.status === 'in_progress'">
<v-list-item @click="deleteJob(contextMenu.item)">
<v-icon class="mr-1">mdi-delete</v-icon> {{ $t('History.Delete') }}
</v-list-item>
</v-list>
</v-menu>
<v-dialog v-model="detailsDialog.boolShow" :max-width="600" :max-height="500">
<v-dialog v-model="detailsDialog.boolShow" :max-width="600" :max-height="500" scrollable>
<v-card dark>
<v-toolbar flat dense >
<v-toolbar-title>
@@ -144,88 +144,133 @@
<v-spacer></v-spacer>
<v-btn small class="minwidth-0" color="grey darken-3" @click="detailsDialog.boolShow = false"><v-icon small>mdi-close-thick</v-icon></v-btn>
</v-toolbar>
<v-card-text class="pt-5">
<v-simple-table
style="
height: 350px;
max-height: 350px;
overflow-y: auto;
">
<tbody>
<tr>
<td>{{ $t('History.Filename') }}</td>
<td class="text-right">{{ detailsDialog.item.filename }}</td>
</tr>
<tr v-if="'metadata' in detailsDialog.item && 'size' in detailsDialog.item.metadata">
<td>{{ $t('History.Filesize') }}</td>
<td class="text-right">{{ formatFilesize(detailsDialog.item.metadata.size) }}</td>
</tr>
<tr v-if="'metadata' in detailsDialog.item && 'modified' in detailsDialog.item.metadata">
<td>{{ $t('History.LastModified') }}</td>
<td class="text-right">{{ formatDate(detailsDialog.item.metadata.modified) }}</td>
</tr>
<tr>
<td>{{ $t('History.Status') }}</td>
<td class="text-right">{{ detailsDialog.item.status }}</td>
</tr>
<tr>
<td>{{ $t('History.StartTime') }}</td>
<td class="text-right">{{ formatDate(detailsDialog.item.start_time) }}</td>
</tr>
<tr>
<td>{{ $t('History.EndTime') }}</td>
<td class="text-right">{{ formatDate(detailsDialog.item.end_time) }}</td>
</tr>
<tr v-if="'metadata' in detailsDialog.item && 'estimated_time' in detailsDialog.item.metadata">
<td>{{ $t('History.EstimatedTime') }}</td>
<td class="text-right">{{ formatPrintTime(detailsDialog.item.metadata.estimated_time) }}</td>
</tr>
<tr v-if="detailsDialog.item.print_duration > 0">
<td>{{ $t('History.PrintDuration') }}</td>
<td class="text-right">{{ formatPrintTime(detailsDialog.item.print_duration) }}</td>
</tr>
<tr v-if="detailsDialog.item.total_duration > 0">
<td>{{ $t('History.TotalDuration') }}</td>
<td class="text-right">{{ formatPrintTime(detailsDialog.item.total_duration) }}</td>
</tr>
<tr v-if="'metadata' in detailsDialog.item && 'filament_total' in detailsDialog.item.metadata">
<td>{{ $t('History.EstimatedFilament') }}</td>
<td class="text-right">{{ Math.round(detailsDialog.item.metadata.filament_total) }} mm</td>
</tr>
<tr v-if="detailsDialog.item.filament_used > 0">
<td>{{ $t('History.FilamentUsed') }}</td>
<td class="text-right">{{ Math.round(detailsDialog.item.filament_used) }} mm</td>
</tr>
<tr v-if="'metadata' in detailsDialog.item && 'first_layer_extr_temp' in detailsDialog.item.metadata">
<td>{{ $t('History.FirstLayerExtTemp') }}</td>
<td class="text-right">{{ detailsDialog.item.metadata.first_layer_extr_temp }} °C</td>
</tr>
<tr v-if="'metadata' in detailsDialog.item && 'first_layer_bed_temp' in detailsDialog.item.metadata">
<td>{{ $t('History.FirstLayerBedTemp') }}</td>
<td class="text-right">{{ detailsDialog.item.metadata.first_layer_bed_temp }} °C</td>
</tr>
<tr v-if="'metadata' in detailsDialog.item && 'first_layer_height' in detailsDialog.item.metadata">
<td>{{ $t('History.FirstLayerHeight') }}</td>
<td class="text-right">{{ detailsDialog.item.metadata.first_layer_height }} mm</td>
</tr>
<tr v-if="'metadata' in detailsDialog.item && 'layer_height' in detailsDialog.item.metadata">
<td>{{ $t('History.LayerHeight') }}</td>
<td class="text-right">{{ detailsDialog.item.metadata.layer_height }} mm</td>
</tr>
<tr v-if="'metadata' in detailsDialog.item && 'object_height' in detailsDialog.item.metadata">
<td>{{ $t('History.ObjectHeight') }}</td>
<td class="text-right">{{ detailsDialog.item.metadata.object_height }} mm</td>
</tr>
<tr v-if="'metadata' in detailsDialog.item && 'slicer' in detailsDialog.item.metadata">
<td>{{ $t('History.Slicer') }}</td>
<td class="text-right">{{ detailsDialog.item.metadata.slicer }}</td>
</tr>
<tr v-if="'metadata' in detailsDialog.item && 'slicer_version' in detailsDialog.item.metadata">
<td>{{ $t('History.SlicerVersion') }}</td>
<td class="text-right">{{ detailsDialog.item.metadata.slicer_version }}</td>
</tr>
</tbody>
</v-simple-table>
<v-card-text class="pt-5" style="height: 350px;">
<v-row>
<v-col>{{ $t('History.Filename') }}</v-col>
<v-col class="text-right">{{ detailsDialog.item.filename }}</v-col>
</v-row>
<template v-if="'metadata' in detailsDialog.item && 'size' in detailsDialog.item.metadata">
<v-divider class="my-3"></v-divider>
<v-row>
<v-col>{{ $t('History.Filesize') }}</v-col>
<v-col class="text-right">{{ formatFilesize(detailsDialog.item.metadata.size) }}</v-col>
</v-row>
</template>
<template v-if="'metadata' in detailsDialog.item && 'modified' in detailsDialog.item.metadata">
<v-divider class="my-3"></v-divider>
<v-row>
<v-col>{{ $t('History.LastModified') }}</v-col>
<v-col class="text-right">{{ formatDate(detailsDialog.item.metadata.modified) }}</v-col>
</v-row>
</template>
<v-divider class="my-3"></v-divider>
<v-row>
<v-col>{{ $t('History.Status') }}</v-col>
<v-col class="text-right">{{ detailsDialog.item.status }}</v-col>
</v-row>
<v-divider class="my-3"></v-divider>
<v-row>
<v-col>{{ $t('History.StartTime') }}</v-col>
<v-col class="text-right">{{ formatDate(detailsDialog.item.start_time) }}</v-col>
</v-row>
<template v-if="'end_time' in detailsDialog.item && detailsDialog.item.end_time > 0">
<v-divider class="my-3"></v-divider>
<v-row>
<v-col>{{ $t('History.EndTime') }}</v-col>
<v-col class="text-right">{{ formatDate(detailsDialog.item.end_time) }}</v-col>
</v-row>
</template>
<template v-if="'metadata' in detailsDialog.item && 'estimated_time' in detailsDialog.item.metadata">
<v-divider class="my-3"></v-divider>
<v-row>
<v-col>{{ $t('History.EstimatedTime') }}</v-col>
<v-col class="text-right">{{ formatPrintTime(detailsDialog.item.metadata.estimated_time) }}</v-col>
</v-row>
</template>
<template v-if="detailsDialog.item.print_duration > 0">
<v-divider class="my-3"></v-divider>
<v-row>
<v-col>{{ $t('History.PrintDuration') }}</v-col>
<v-col class="text-right">{{ formatPrintTime(detailsDialog.item.print_duration) }}</v-col>
</v-row>
</template>
<template v-if="detailsDialog.item.total_duration > 0">
<v-divider class="my-3"></v-divider>
<v-row>
<v-col>{{ $t('History.TotalDuration') }}</v-col>
<v-col class="text-right">{{ formatPrintTime(detailsDialog.item.total_duration) }}</v-col>
</v-row>
</template>
<template v-if="'metadata' in detailsDialog.item && 'filament_total' in detailsDialog.item.metadata">
<v-divider class="my-3"></v-divider>
<v-row>
<v-col>{{ $t('History.EstimatedFilamentWeight') }}</v-col>
<v-col class="text-right">{{ Math.round(detailsDialog.item.metadata.filament_weight_total*100)/100 }} g</v-col>
</v-row>
</template>
<template v-if="'metadata' in detailsDialog.item && 'filament_total' in detailsDialog.item.metadata">
<v-divider class="my-3"></v-divider>
<v-row>
<v-col>{{ $t('History.EstimatedFilament') }}</v-col>
<v-col class="text-right">{{ Math.round(detailsDialog.item.metadata.filament_total) }} mm</v-col>
</v-row>
</template>
<template v-if="detailsDialog.item.filament_used > 0">
<v-divider class="my-3"></v-divider>
<v-row>
<v-col>{{ $t('History.FilamentUsed') }}</v-col>
<v-col class="text-right">{{ Math.round(detailsDialog.item.filament_used) }} mm</v-col>
</v-row>
</template>
<template v-if="'metadata' in detailsDialog.item && 'first_layer_extr_temp' in detailsDialog.item.metadata">
<v-divider class="my-3"></v-divider>
<v-row>
<v-col>{{ $t('History.FirstLayerExtTemp') }}</v-col>
<v-col class="text-right">{{ detailsDialog.item.metadata.first_layer_extr_temp }} °C</v-col>
</v-row>
</template>
<template v-if="'metadata' in detailsDialog.item && 'first_layer_bed_temp' in detailsDialog.item.metadata">
<v-divider class="my-3"></v-divider>
<v-row>
<v-col>{{ $t('History.FirstLayerBedTemp') }}</v-col>
<v-col class="text-right">{{ detailsDialog.item.metadata.first_layer_bed_temp }} °C</v-col>
</v-row>
</template>
<template v-if="'metadata' in detailsDialog.item && 'first_layer_height' in detailsDialog.item.metadata">
<v-divider class="my-3"></v-divider>
<v-row>
<v-col>{{ $t('History.FirstLayerHeight') }}</v-col>
<v-col class="text-right">{{ detailsDialog.item.metadata.first_layer_height }} mm</v-col>
</v-row>
</template>
<template v-if="'metadata' in detailsDialog.item && 'layer_height' in detailsDialog.item.metadata">
<v-divider class="my-3"></v-divider>
<v-row>
<v-col>{{ $t('History.LayerHeight') }}</v-col>
<v-col class="text-right">{{ detailsDialog.item.metadata.layer_height }} mm</v-col>
</v-row>
</template>
<template v-if="'metadata' in detailsDialog.item && 'object_height' in detailsDialog.item.metadata">
<v-divider class="my-3"></v-divider>
<v-row>
<v-col>{{ $t('History.ObjectHeight') }}</v-col>
<v-col class="text-right">{{ detailsDialog.item.metadata.object_height }} mm</v-col>
</v-row>
</template>
<template v-if="'metadata' in detailsDialog.item && 'slicer' in detailsDialog.item.metadata">
<v-divider class="my-3"></v-divider>
<v-row>
<v-col>{{ $t('History.Slicer') }}</v-col>
<v-col class="text-right">{{ detailsDialog.item.metadata.slicer }}</v-col>
</v-row>
</template>
<template v-if="'metadata' in detailsDialog.item && 'slicer_version' in detailsDialog.item.metadata">
<v-divider class="my-3"></v-divider>
<v-row>
<v-col>{{ $t('History.SlicerVersion') }}</v-col>
<v-col class="text-right">{{ detailsDialog.item.metadata.slicer_version }}</v-col>
</v-row>
</template>
</v-card-text>
</v-card>
</v-dialog>
+9 -11
View File
@@ -34,8 +34,8 @@
<v-list-item class="minHeight36">
<v-checkbox class="mt-0" v-model="hideWaitTemperatures" hide-details :label="$t('Panels.MiniconsolePanel.HideTemperatures')"></v-checkbox>
</v-list-item>
<v-list-item class="minHeight36">
<v-checkbox class="mt-0" v-model="boolCustomFilters" hide-details :label="$t('Panels.MiniconsolePanel.CustomFilters')"></v-checkbox>
<v-list-item class="minHeight36" v-for="(filter, index) in customFilters" v-bind:key="index">
<v-checkbox class="mt-0" v-model="filter.bool" @change="toggleFilter(filter)" hide-details :label="filter.name"></v-checkbox>
</v-list-item>
</v-list>
</v-menu>
@@ -152,14 +152,9 @@ import {mapState} from 'vuex'
return this.$store.dispatch("gui/setSettings", { console: { hideWaitTemperatures: newVal } })
}
},
boolCustomFilters: {
get() {
return this.$store.state.gui.console.boolCustomFilters
},
set: function(newVal) {
return this.$store.dispatch("gui/setSettings", { console: { boolCustomFilters: newVal } })
}
}
customFilters() {
return this.$store.state.gui.console.customFilters
},
},
methods: {
doSend() {
@@ -230,7 +225,10 @@ import {mapState} from 'vuex'
});
return items;
}
},
toggleFilter(filter) {
this.$store.dispatch('gui/updateConsoleFilter', filter)
},
}
}
</script>
@@ -73,7 +73,7 @@
<v-item-group class="v-btn-toggle my-5 my-sm-0 col-12 col-sm-auto px-0 py-0">
<v-btn v-if="currentPath !== '' && currentPath !== '/config_examples'" class="flex-grow-1" @click="uploadFileButton" :loading="loadings.includes['configFileUpload']"><v-icon>mdi-file-upload</v-icon></v-btn>
<v-btn v-if="currentPath !== '' && currentPath !== '/config_examples'" class="flex-grow-1" @click="createFile"><v-icon>mdi-file-plus</v-icon></v-btn>
<v-btn v-if="currentPath !== '' && currentPath !== '/config_examples'" class="flex-grow-1" @click="createFolder"><v-icon>mdi-folder-plus</v-icon></v-btn>
<v-btn v-if="currentPath !== '' && currentPath !== '/config_examples'" class="flex-grow-1" @click="createDirecotry"><v-icon>mdi-folder-plus</v-icon></v-btn>
<v-btn class="flex-grow-1" @click="refreshFileList"><v-icon>mdi-refresh</v-icon></v-btn>
<v-menu :offset-y="true" :title="$t('Settings.ConfigFilesPanel.SetupCurrentList')">
<template v-slot:activator="{ on, attrs }">
@@ -115,7 +115,7 @@
class="file-list-cursor"
@click="clickRowGoBack">
<td class="pr-0 text-center" style="width: 32px;"><v-icon>mdi-folder-upload</v-icon></td>
<td class=" " colspan="8">..</td>
<td class=" " colspan="4">..</td>
</tr>
</template>
@@ -149,10 +149,13 @@
<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> {{ $t('Settings.ConfigFilesPanel.Rename') }}
</v-list-item>
<v-list-item @click="renameDirectory(contextMenu.item)" v-if="contextMenu.item.isDirectory && currentPath !== '/config_examples'">
<v-icon class="mr-1">mdi-rename-box</v-icon> {{ $t('Settings.ConfigFilesPanel.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> {{ $t('Settings.ConfigFilesPanel.Delete') }}
</v-list-item>
<v-list-item @click="deleteDirectoryAction" v-if="contextMenu.item.isDirectory && currentPath !== '' && currentPath !== '/config_examples'">
<v-list-item @click="deleteDirectory(contextMenu.item)" v-if="contextMenu.item.isDirectory && currentPath !== '' && currentPath !== '/config_examples'">
<v-icon class="mr-1">mdi-delete</v-icon> {{ $t('Settings.ConfigFilesPanel.Delete') }}
</v-list-item>
</v-list>
@@ -204,16 +207,42 @@
</v-card-actions>
</v-card>
</v-dialog>
<v-dialog v-model="dialogCreateFolder.show" max-width="400">
<v-dialog v-model="dialogCreateDirectory.show" max-width="400">
<v-card>
<v-card-title class="headline">{{ $t('Settings.ConfigFilesPanel.CreateFolder') }}</v-card-title>
<v-card-title class="headline">{{ $t('Settings.ConfigFilesPanel.CreateDirectory') }}</v-card-title>
<v-card-text>
<v-text-field :label="$t('Settings.ConfigFilesPanel.Name')" required v-model="dialogCreateFolder.name"></v-text-field>
<v-text-field :label="$t('Settings.ConfigFilesPanel.Name')" required v-model="dialogCreateDirectory.name"></v-text-field>
</v-card-text>
<v-card-actions>
<v-spacer></v-spacer>
<v-btn color="" text @click="dialogCreateFolder.show = false">{{ $t('Settings.ConfigFilesPanel.Cancel') }}</v-btn>
<v-btn color="primary" text @click="createFolderAction">{{ $t('Settings.ConfigFilesPanel.Create') }}</v-btn>
<v-btn color="" text @click="dialogCreateDirectory.show = false">{{ $t('Settings.ConfigFilesPanel.Cancel') }}</v-btn>
<v-btn color="primary" text @click="createDirectoryAction">{{ $t('Settings.ConfigFilesPanel.Create') }}</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">{{ $t('Settings.ConfigFilesPanel.RenameDirectory') }}</v-card-title>
<v-card-text>
<v-text-field :label="$t('Settings.ConfigFilesPanel.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">{{ $t('Settings.ConfigFilesPanel.Cancel') }}</v-btn>
<v-btn color="primary" text @click="renameDirectoryAction">{{ $t('Settings.ConfigFilesPanel.Rename') }}</v-btn>
</v-card-actions>
</v-card>
</v-dialog>
<v-dialog v-model="dialogDeleteDirectory.show" max-width="400">
<v-card>
<v-card-title class="headline">{{ $t('Settings.ConfigFilesPanel.DeleteDirectory') }}</v-card-title>
<v-card-text>
<p class="mb-0">{{ $t('Settings.ConfigFilesPanel.DeleteDirectoryQuestion', { name: dialogDeleteDirectory.item.filename } )}}</p>
</v-card-text>
<v-card-actions>
<v-spacer></v-spacer>
<v-btn color="" text @click="dialogDeleteDirectory.show = false">{{ $t('Settings.ConfigFilesPanel.Cancel') }}</v-btn>
<v-btn color="error" text @click="deleteDirectoryAction">{{ $t('Settings.ConfigFilesPanel.Delete') }}</v-btn>
</v-card-actions>
</v-card>
</v-dialog>
@@ -324,10 +353,19 @@ export default {
show: false,
name: "",
},
dialogCreateFolder: {
dialogCreateDirectory: {
show: false,
name: "",
},
dialogRenameDirectory: {
show: false,
newName: "",
item: {}
},
dialogDeleteDirectory: {
show: false,
item: {}
},
uploadSnackbar: {
status: false,
filename: "",
@@ -578,25 +616,41 @@ export default {
}
},
downloadFile() {
let filename = (this.currentPath+"/"+this.contextMenu.item.filename);
let link = document.createElement("a");
link.download = name;
link.href = '//' + this.hostname + ':' + this.port + '/server/files' + filename;
document.body.appendChild(link);
link.click();
document.body.removeChild(link);
const filename = (this.currentPath+"/"+this.contextMenu.item.filename)
const href = '//' + this.hostname + ':' + this.port + '/server/files' + filename
window.open(href)
},
createFolder() {
this.dialogCreateFolder.name = "";
this.dialogCreateFolder.show = true;
createDirecotry() {
this.dialogCreateDirectory.name = "";
this.dialogCreateDirectory.show = true;
},
createFolderAction() {
this.dialogCreateFolder.show = false;
createDirectoryAction() {
this.dialogCreateDirectory.show = false;
this.$socket.sendObj('server.files.post_directory', {
path: this.currentPath.substring(1)+"/"+this.dialogCreateFolder.name
path: this.currentPath.substring(1)+"/"+this.dialogCreateDirectory.name
}, 'files/getCreateDir');
},
renameDirectory(item) {
this.dialogRenameDirectory.item = item;
this.dialogRenameDirectory.newName = item.filename;
this.dialogRenameDirectory.show = true;
},
renameDirectoryAction() {
this.dialogRenameDirectory.show = false;
this.$socket.sendObj('server.files.move', {
source: this.currentPath+"/"+this.dialogRenameDirectory.item.filename,
dest: this.currentPath+"/"+this.dialogRenameDirectory.newName
}, 'files/getMove');
},
deleteDirectory(item) {
this.dialogDeleteDirectory.item = item;
this.dialogDeleteDirectory.show = true;
},
deleteDirectoryAction() {
this.dialogDeleteDirectory.show = false;
this.$socket.sendObj('server.files.delete_directory', { path: this.currentPath+"/"+this.dialogDeleteDirectory.item.filename, force: true }, 'files/getDeleteDir')
},
createFile() {
this.dialogCreateFile.name = "";
this.dialogCreateFile.show = true;
@@ -635,9 +689,6 @@ export default {
removeFile() {
this.$socket.sendObj('server.files.delete_file', { path: this.currentPath+"/"+this.contextMenu.item.filename }, 'files/getDeleteFile');
},
deleteDirectoryAction() {
this.$socket.sendObj('server.files.delete_directory', { path: this.currentPath+"/"+this.contextMenu.item.filename }, 'files/getDeleteDir');
},
uploadFileButton() {
this.$refs.fileUpload.click()
},
+159 -50
View File
@@ -3,51 +3,141 @@
</style>
<template>
<v-card>
<v-toolbar flat dense >
<v-toolbar-title>
<span class="subheading"><v-icon left>mdi-console-line</v-icon>{{ $t('Settings.ConsolePanel.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="$t('Settings.ConsolePanel.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="$t('Settings.ConsolePanel.CustomFilters')" 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="$t('Settings.ConsolePanel.Rules')"
v-model="customFilters"
hide-details
class="mb-2"
></v-textarea>
</v-col>
</v-row>
</v-container>
</v-card-text>
</v-card>
<div>
<v-card>
<v-toolbar flat dense >
<v-toolbar-title>
<span class="subheading"><v-icon left>mdi-console-line</v-icon>{{ $t('Settings.ConsolePanel.Console') }}</span>
</v-toolbar-title>
</v-toolbar>
<v-card-text class="py-3">
<v-container>
<v-row>
<v-col class="rounded transition-swing secondary py-2 px-2 mb-3" style="cursor: pointer;">
<v-row align="center">
<v-col class="pl-4">
<v-switch v-model="hideWaitTemperatures" :label="$t('Settings.ConsolePanel.HideTemperatures')" hide-details class="mt-0"></v-switch>
</v-col>
</v-row>
</v-col>
</v-row>
<v-row v-for="(filter, index) in this['gui/getConsoleFilters']" v-bind:key="index">
<v-col class="rounded transition-swing secondary py-2 px-2 mb-3" style="cursor: pointer;">
<v-row align="center">
<v-col class="pl-4">
<v-switch v-model="filter.bool" @change="toggleFilter(filter)" :label="filter.name" hide-details class="mt-0"></v-switch>
</v-col>
<v-col class="col-auto text-right"><v-btn small class="minwidth-0 float-right" v-on:click.stop.prevent="editFilter(filter)"><v-icon small>mdi-pencil</v-icon></v-btn></v-col>
</v-row>
</v-col>
</v-row>
<v-row>
<v-col class="text-center mt-0">
<v-btn @click="createFilter">{{ $t('Settings.ConsolePanel.AddFilter')}}</v-btn>
</v-col>
</v-row>
</v-container>
</v-card-text>
</v-card>
<v-dialog v-model="dialog.bool" persistent :width="400">
<v-card dark>
<v-toolbar flat dense color="primary">
<v-toolbar-title>
<span class="subheading">
<v-icon class="mdi mdi-fire" left></v-icon>
{{ dialog.index === null ? $t('Settings.ConsolePanel.CreateHeadline') : $t('Settings.ConsolePanel.EditHeadline') }}
</span>
</v-toolbar-title>
<v-spacer></v-spacer>
<v-btn small class="minwidth-0" @click="dialog.bool = false"><v-icon small>mdi-close-thick</v-icon></v-btn>
</v-toolbar>
<v-card-text class="pt-3">
<v-container class="pb-0">
<v-form
v-model="dialog.valid"
@submit.prevent="saveFilter"
>
<v-row>
<v-col>
<v-row>
<v-col class="col-12">
<v-text-field
v-model="dialog.name"
:label="$t('Settings.ConsolePanel.Name')"
hide-details="auto"
:rules="[rules.required, rules.unique]"
dense
></v-text-field>
</v-col>
</v-row>
</v-col>
</v-row>
<v-row>
<v-col>
<v-textarea
outlined
name="input-7-4"
:label="$t('Settings.ConsolePanel.Regex')"
v-model="dialog.regex"
hide-details="auto"
></v-textarea>
</v-col>
</v-row>
<v-row class="mt-3">
<v-col class="text-center">
<v-btn
color="red"
outlined
class="float-left minwidth-0"
@click="deleteFilter"
v-if="this.dialog.index !== null"
>
<v-icon>mdi-delete</v-icon>
</v-btn>
<v-btn
color="white"
outlined
:class="dialog.index !== null ? 'float-right' : '' "
type="submit"
>
{{ dialog.index === null ? $t('Settings.ConsolePanel.StoreButton') : $t('Settings.ConsolePanel.UpdateButton') }}
</v-btn>
</v-col>
</v-row>
</v-form>
</v-container>
</v-card-text>
</v-card>
</v-dialog>
</div>
</template>
<script>
import {mapGetters} from "vuex";
export default {
components: {
},
data: function() {
return {
dialog: {
bool: false,
valid: false,
name: "",
regex: "",
index: null,
},
rules: {
required: (value) => value !== '' || 'required',
unique: (value) => !this.existsPresetName(value) || 'Name already exists',
},
}
},
computed: {
...mapGetters([
'gui/getConsoleFilters',
]),
hideWaitTemperatures: {
get() {
return this.$store.state.gui.console.hideWaitTemperatures;
@@ -55,26 +145,45 @@
set(status) {
return this.$store.dispatch('gui/setSettings', { console: { hideWaitTemperatures: status } });
}
},
boolCustomFilters: {
get() {
return this.$store.state.gui.console.boolCustomFilters;
},
set(status) {
return this.$store.dispatch('gui/setSettings', { console: { boolCustomFilters: status } });
}
},
customFilters: {
get() {
return this.$store.state.gui.console.customFilters;
},
set(status) {
return this.$store.dispatch('gui/setSettings', { console: { customFilters: status } });
}
},
}
},
methods: {
existsPresetName(name) {
return (this["gui/getConsoleFilters"].findIndex((filter) => filter.name === name && filter.index !== this.dialog.index) >= 0)
},
clearDialog() {
this.dialog.bool = false
this.dialog.index = null
this.dialog.name = ""
this.dialog.regex = ""
},
createFilter() {
this.clearDialog()
this.dialog.bool = true
},
editFilter(preset) {
this.dialog.name = preset.name
this.dialog.index = preset.index
this.dialog.regex = preset.regex
this.dialog.bool = true
},
saveFilter() {
if (this.dialog.valid) {
if (this.dialog.index) {
this.$store.dispatch('gui/updateConsoleFilter', this.dialog)
} else this.$store.dispatch('gui/addConsoleFilter', this.dialog)
this.clearDialog()
}
},
toggleFilter(filter) {
this.$store.dispatch('gui/updateConsoleFilter', filter)
},
deleteFilter() {
this.$store.dispatch('gui/deleteConsoleFilter', this.dialog)
this.clearDialog()
},
}
}
</script>
@@ -70,9 +70,9 @@
</v-row>
<v-row>
<v-col class="pt-0">
<v-switch v-model="reverseX" :label="$t('Settings.ControlPanel.ReverseXMovement')" hide-details="auto" class="mt-0"></v-switch>
<v-switch v-model="reverseY" :label="$t('Settings.ControlPanel.ReverseYMovement')" hide-details="auto" class="mt-0"></v-switch>
<v-switch v-model="reverseZ" :label="$t('Settings.ControlPanel.ReverseZMovement')" hide-details="auto" class="mt-0"></v-switch>
<v-switch v-model="reverseX" :label="$t('Settings.ControlPanel.InvertXMovement')" hide-details="auto" class="mt-0"></v-switch>
<v-switch v-model="reverseY" :label="$t('Settings.ControlPanel.InvertYMovement')" hide-details="auto" class="mt-0"></v-switch>
<v-switch v-model="reverseZ" :label="$t('Settings.ControlPanel.InvertZMovement')" hide-details="auto" class="mt-0"></v-switch>
</v-col>
</v-row>
</template>
@@ -9,10 +9,10 @@
<v-container pb-0 px-0>
<v-row>
<v-col :class="'col-12' +(klippy_state !== 'ready' ? 'col-md-6' : 'col-md-12')+ ''">
<v-btn :href="'//'+hostname+':'+port+'/server/files/klippy.log'" block color="primary"><v-icon class="mr-2">mdi-download</v-icon>Klipper</v-btn>
<v-btn :href="'//'+hostname+':'+port+'/server/files/klippy.log'" @click="downloadLog" block color="primary"><v-icon class="mr-2">mdi-download</v-icon>Klipper</v-btn>
</v-col>
<v-col :class="'col-12 pt-0 ' +(klippy_state !== 'ready' ? 'col-md-6 mt-md-3 ' : 'col-md-12')+ ''">
<v-btn :href="'//'+hostname+':'+port+'/server/files/moonraker.log'" block color="primary"><v-icon class="mr-2">mdi-download</v-icon>Moonraker</v-btn>
<v-btn :href="'//'+hostname+':'+port+'/server/files/moonraker.log'" @click="downloadLog" block color="primary"><v-icon class="mr-2">mdi-download</v-icon>Moonraker</v-btn>
</v-col>
</v-row>
</v-container>
@@ -39,5 +39,15 @@
klippy_state: state => state.server.klippy_state,
}),
},
methods: {
downloadLog(event) {
event.preventDefault()
let href = ""
if ('href' in event.target.attributes) href = event.target.attributes.href.value;
if ('href' in event.target.parentElement.attributes) href = event.target.parentElement.attributes.href.value;
window.open(href)
}
}
}
</script>
@@ -1,6 +1,6 @@
<template>
<div>
<div v-for="(runout, index) of this['printer/getFilamentSwitchSensors']" v-bind:key="index">
<div v-for="(runout, index) of filamentSensors" v-bind:key="index">
<v-card class="mt-6">
<v-toolbar flat dense >
<v-toolbar-title>
@@ -18,8 +18,6 @@
</template>
<script>
import { mapGetters } from 'vuex'
export default {
components: {
@@ -30,9 +28,9 @@
}
},
computed: {
...mapGetters([
'printer/getFilamentSwitchSensors'
])
filamentSensors() {
return this.$store.getters["printer/getFilamentSensors"]
}
},
methods: {
changeSensor(runout) {
@@ -151,7 +151,7 @@
</v-row>
</v-col>
<v-col class="col-12 col-sm-6 text-center" align-self="center">
<vue-load-image v-if="['mjpegstreamer', 'mjpegstreamer-adaptive'].includes(dialog.service)">
<vue-load-image v-if="['mjpegstreamer', 'mjpegstreamer-adaptive', 'uv4l-mjpeg'].includes(dialog.service)">
<img slot="image" :src="dialog.url" alt="Preview" :style="webcamStyle" class="webcamImage" />
<v-progress-circular slot="preloader" indeterminate color="primary"></v-progress-circular>
<template slot="error">
@@ -231,6 +231,7 @@ export default {
serviceItems: [
{ value: "mjpegstreamer", text: this.$t("Settings.WebcamPanel.Mjpegstreamer")},
{ value: "mjpegstreamer-adaptive", text: this.$t("Settings.WebcamPanel.MjpegstreamerAdaptive") },
{ value: "uv4l-mjpeg", text: this.$t("Settings.WebcamPanel.Uv4lMjpeg") },
{ value: "ipstream", text: this.$t("Settings.WebcamPanel.Ipstream") },
],
};
+156 -178
View File
@@ -133,7 +133,7 @@
<v-row class="text-center py-5" align="center">
<v-col class="col-3 pa-0">
<strong>{{ $t("Panels.StatusPanel.Speed") }}</strong><br />
<span class="text-no-wrap">{{ (requested_speed / 60 * speed_factor).toFixed(0) }} mm/s</span>
<span class="text-no-wrap">{{ requested_speed.toFixed(0) }} mm/s</span>
</v-col>
<v-col class="col-3 pa-0">
<v-tooltip top>
@@ -271,198 +271,176 @@
position: state => state.printer.gcode_move.position,
gcode_position: state => state.printer.gcode_move.gcode_position,
requested_speed: state => state.printer.gcode_move.speed,
speed_factor: state => state.printer.gcode_move.speed_factor,
filament_used: state => state.printer.print_stats.filament_used,
current_file: state => state.printer.current_file,
print_time: state => state.printer.print_stats.print_duration,
print_time_total: state => state.printer.print_stats.total_duration,
}),
printerStateOutput: {
get() {
if (this.$store.state.printer.print_stats.state !== "") {
const printer_state = this.$store.state.printer.print_stats.state
printerStateOutput() {
if (this.$store.state.printer.print_stats.state !== "") {
const printer_state = this.$store.state.printer.print_stats.state
if (
printer_state === "standby" &&
this.$store.state.printer.idle_timeout.state === "Printing"
) return "Busy"
if (
printer_state === "standby" &&
this.$store.state.printer.idle_timeout.state === "Printing"
) return "Busy"
if (['paused', 'printing'].includes(printer_state)) {
return (this.printPercent * 100).toFixed(0)+"% "+printer_state.charAt(0).toUpperCase() + printer_state.slice(1)
if (['paused', 'printing'].includes(printer_state)) {
return (this.printPercent * 100).toFixed(0)+"% "+printer_state.charAt(0).toUpperCase() + printer_state.slice(1)
}
return printer_state.charAt(0).toUpperCase() + printer_state.slice(1)
}
return this.$t("Panels.StatusPanel.Unknown")
},
toolbarButtons() {
return [
{
text: this.$t("Panels.StatusPanel.PausePrint"),
color: "orange",
icon: "mdi-pause",
loadingName: "statusPrintPause",
status: ['printing'],
click: this.btnPauseJob
}, {
text: this.$t("Panels.StatusPanel.ResumePrint"),
color: "orange",
icon: "mdi-play",
loadingName: "statusPrintResume",
status: ['paused'],
click: this.btnResumeJob
}, {
text: this.$t("Panels.StatusPanel.CancelPrint"),
color: "red",
icon: "mdi-stop",
loadingName: "statusPrintCancel",
status: this.$store.state.gui.general.displayCancelPrint ? ['paused', 'printing'] : ['paused'],
click: this.btnCancelJob
}, {
text: this.$t("Panels.StatusPanel.ClearPrintStats"),
color: "primary",
icon: "mdi-broom",
loadingName: "statusPrintClear",
status: ['error', 'complete'],
click: this.btnClearJob
}, {
text: this.$t("Panels.StatusPanel.ReprintJob"),
color: "primary",
icon: "mdi-printer",
loadingName: "statusPrintReprint",
status: ['error', 'complete'],
click: this.btnReprintJob
}
]
},
filteredToolbarButtons() {
return this.toolbarButtons.filter((button) => {
return button.status.includes(this.printer_state)
})
},
printPercent() {
return this.$store.getters["printer/getPrintPercent"]
},
requested_speed() {
const requested_speed = this.$store.state.printer.gcode_move.speed
const speed_factor = this.$store.state.printer.gcode_move.speed_factor
const max_velocity = this.$store.state.printer.toolhead.max_velocity
const speed = requested_speed / 60 * speed_factor
if (speed > max_velocity) return max_velocity
return speed
},
max_layers() {
if (
'first_layer_height' in this.current_file &&
'layer_height' in this.current_file &&
'object_height' in this.current_file
) {
const max = Math.ceil((this.current_file.object_height - this.current_file.first_layer_height) / this.current_file.layer_height + 1)
return max > 0 ? max : 0
}
return 0
},
current_layer() {
if (
this.print_time > 0 &&
'first_layer_height' in this.current_file &&
'layer_height' in this.current_file &&
this.gcode_position !== undefined &&
this.gcode_position.length >= 3
) {
let current_layer = Math.ceil((this.gcode_position[2] - this.current_file.first_layer_height) / this.current_file.layer_height + 1)
current_layer = (current_layer <= this.max_layers) ? current_layer : this.max_layers
return current_layer > 0 ? current_layer : 0
}
return 0
},
estimated_time_file() {
return this.$store.getters["printer/getEstimatedTimeFile"]
},
estimated_time_filament() {
return this.$store.getters["printer/getEstimatedTimeFilament"]
},
estimated_time_slicer() {
return this.$store.getters["printer/getEstimatedTimeSlicer"]
},
estimated_time_avg() {
return this.$store.getters["printer/getEstimatedTimeAvg"]
},
eta() {
return this.$store.getters["printer/getEstimatedTimeETA"]
},
filament_diameter() {
return this.$store.state.printer.configfile.settings.extruder?.filament_diameter || 1.75
},
basicUrl() {
return this.$store.getters["socket/getUrl"]
},
thumbnailSmall() {
if (
"thumbnails" in this.current_file &&
this.current_file.thumbnails.length
) {
const thumbnail = this.current_file.thumbnails.find(thumb =>
thumb.width >= 32 && thumb.width <= 64 &&
thumb.height >= 32 && thumb.height <= 64
)
if (thumbnail && 'relative_path' in thumbnail) {
let relative_url = ""
if (this.current_file.filename.lastIndexOf("/") !== -1) {
relative_url = this.current_file.filename.substr(0, this.current_file.filename.lastIndexOf("/")+1)
}
return printer_state.charAt(0).toUpperCase() + printer_state.slice(1)
if (thumbnail && 'relative_path' in thumbnail) return this.basicUrl+"/server/files/gcodes/"+relative_url+thumbnail.relative_path
}
return this.$t("Panels.StatusPanel.Unknown")
}
return ""
},
toolbarButtons: {
get() {
return [
{
text: this.$t("Panels.StatusPanel.PausePrint"),
color: "orange",
icon: "mdi-pause",
loadingName: "statusPrintPause",
status: ['printing'],
click: this.btnPauseJob
}, {
text: this.$t("Panels.StatusPanel.ResumePrint"),
color: "orange",
icon: "mdi-play",
loadingName: "statusPrintResume",
status: ['paused'],
click: this.btnResumeJob
}, {
text: this.$t("Panels.StatusPanel.CancelPrint"),
color: "red",
icon: "mdi-stop",
loadingName: "statusPrintCancel",
status: this.$store.state.gui.general.displayCancelPrint ? ['paused', 'printing'] : ['paused'],
click: this.btnCancelJob
}, {
text: this.$t("Panels.StatusPanel.ClearPrintStats"),
color: "primary",
icon: "mdi-broom",
loadingName: "statusPrintClear",
status: ['error', 'complete'],
click: this.btnClearJob
}, {
text: this.$t("Panels.StatusPanel.ReprintJob"),
color: "primary",
icon: "mdi-printer",
loadingName: "statusPrintReprint",
status: ['error', 'complete'],
click: this.btnReprintJob
thumbnailBig() {
if (
"thumbnails" in this.current_file &&
this.current_file.thumbnails.length
) {
const thumbnail = this.current_file.thumbnails.find(thumb => thumb.width >= 300 && thumb.width <= 400)
if (thumbnail && 'relative_path' in thumbnail) {
let relative_url = ""
if (this.current_file.filename.lastIndexOf("/") !== -1) {
relative_url = this.current_file.filename.substr(0, this.current_file.filename.lastIndexOf("/")+1)
}
]
}
},
filteredToolbarButtons: {
get() {
return this.toolbarButtons.filter((button) => {
return button.status.includes(this.printer_state)
})
}
},
printPercent: {
get() {
return this.$store.getters["printer/getPrintPercent"];
}
},
max_layers: {
get() {
if (
'first_layer_height' in this.current_file &&
'layer_height' in this.current_file &&
'object_height' in this.current_file
) {
const max = Math.ceil((this.current_file.object_height - this.current_file.first_layer_height) / this.current_file.layer_height + 1)
return max > 0 ? max : 0
if (thumbnail && 'relative_path' in thumbnail) return this.basicUrl+"/server/files/gcodes/"+relative_url+thumbnail.relative_path
}
}
return 0
}
},
current_layer: {
get() {
if (
this.print_time > 0 &&
'first_layer_height' in this.current_file &&
'layer_height' in this.current_file &&
this.gcode_position !== undefined &&
this.gcode_position.length >= 3
) {
let current_layer = Math.ceil((this.gcode_position[2] - this.current_file.first_layer_height) / this.current_file.layer_height + 1)
current_layer = (current_layer <= this.max_layers) ? current_layer : this.max_layers
return current_layer > 0 ? current_layer : 0
}
return 0
}
},
estimated_time_file: {
get() {
return this.$store.getters["printer/getEstimatedTimeFile"]
}
},
estimated_time_filament: {
get() {
return this.$store.getters["printer/getEstimatedTimeFilament"]
}
},
estimated_time_slicer: {
get() {
return this.$store.getters["printer/getEstimatedTimeSlicer"]
}
},
estimated_time_avg: {
get() {
return this.$store.getters["printer/getEstimatedTimeAvg"]
}
},
eta: {
get() {
return this.$store.getters["printer/getEstimatedTimeETA"]
}
},
filament_diameter: {
get() {
return this.$store.state.printer.configfile.settings.extruder?.filament_diameter || 1.75
}
},
basicUrl: {
get() {
return this.$store.getters["socket/getUrl"]
}
},
thumbnailSmall: {
get() {
if (
"thumbnails" in this.current_file &&
this.current_file.thumbnails.length
) {
const thumbnail = this.current_file.thumbnails.find(thumb =>
thumb.width >= 32 && thumb.width <= 64 &&
thumb.height >= 32 && thumb.height <= 64
)
if (thumbnail && 'relative_path' in thumbnail) {
let relative_url = ""
if (this.current_file.filename.lastIndexOf("/") !== -1) {
relative_url = this.current_file.filename.substr(0, this.current_file.filename.lastIndexOf("/")+1)
}
if (thumbnail && 'relative_path' in thumbnail) return this.basicUrl+"/server/files/gcodes/"+relative_url+thumbnail.relative_path
}
}
return ""
}
},
thumbnailBig: {
get() {
if (
"thumbnails" in this.current_file &&
this.current_file.thumbnails.length
) {
const thumbnail = this.current_file.thumbnails.find(thumb => thumb.width >= 300 && thumb.width <= 400)
if (thumbnail && 'relative_path' in thumbnail) {
let relative_url = ""
if (this.current_file.filename.lastIndexOf("/") !== -1) {
relative_url = this.current_file.filename.substr(0, this.current_file.filename.lastIndexOf("/")+1)
}
if (thumbnail && 'relative_path' in thumbnail) return this.basicUrl+"/server/files/gcodes/"+relative_url+thumbnail.relative_path
}
}
return ""
}
return ""
}
},
methods: {
+6 -6
View File
@@ -141,7 +141,7 @@
<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('Panels.ToolsPanel.Min')+': '+sensor.min_temp+'° / ' + $t('Panels.ToolsPanel.Max')+': '+sensor.max_temp+'°'">{{ sensor.icon }}</v-icon>
<v-icon color="grey darken-2" :title="$t('Panels.ToolsPanel.Min')+': '+sensor.min_temp+'° / ' + $t('Panels.ToolsPanel.Max')+': '+sensor.max_temp+'°'">mdi-{{ 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>
@@ -194,7 +194,7 @@
<v-col class="col-12 py-1">
<v-checkbox
v-model="editHeater.boolTemperature"
:label="$t('Panels.ToolsPanel.ShowCurrentTemperatureInChart')"
:label="$t('Panels.ToolsPanel.ShowNameInChart', {name: $t('Panels.ToolsPanel.CurrentTemperature')})"
hide-details
class="mt-0"
@change="setVisible('temperature')"
@@ -205,7 +205,7 @@
<v-col class="col-12 py-1">
<v-checkbox
v-model="editHeater.boolTarget"
:label="$t('Panels.ToolsPanel.ShowTargetTemperatureInChart')"
:label="$t('Panels.ToolsPanel.ShowNameInChart', {name: $t('Panels.ToolsPanel.TargetTemperature')})"
hide-details
class="mt-0"
@change="setVisible('target')"
@@ -216,7 +216,7 @@
<v-col class="col-12 py-1">
<v-checkbox
v-model="editHeater.boolPower"
:label="$t('Panels.ToolsPanel.ShowPWMPowerInChart')"
:label="$t('Panels.ToolsPanel.ShowNameInChart', {name: $t('Panels.ToolsPanel.PwmPower')})"
hide-details
class="mt-0"
@change="setVisible('power')"
@@ -227,7 +227,7 @@
<v-col class="col-12 py-1">
<v-checkbox
v-model="editHeater.boolSpeed"
:label="$t('Panels.ToolsPanel.ShowPWMPowerInChart')"
:label="$t('Panels.ToolsPanel.ShowNameInChart', {name: $t('Panels.ToolsPanel.PwmPower')})"
hide-details
class="mt-0"
@change="setVisible('speed')"
@@ -238,7 +238,7 @@
<v-col class="col-12 py-1">
<v-checkbox
v-model="editHeater.additionSensors[key]"
:label="$t('Panels.ToolsPanel.Show')+key+$t('Panels.ToolsPanel.InList')"
:label="$t('Panels.ToolsPanel.ShowNameInList', {name: key})"
hide-details
class="mt-0"
@change="setVisibleAdditionalSensor(key)"
+7 -2
View File
@@ -55,6 +55,9 @@
<template v-else-if="'service' in this.currentCam && this.currentCam.service === 'mjpegstreamer-adaptive'">
<webcam-mjpegstreamer-adaptive :cam-settings="this.currentCam"></webcam-mjpegstreamer-adaptive>
</template>
<template v-else-if="'service' in this.currentCam && this.currentCam.service === 'uv4l-mjpeg'">
<webcam-uv4l-mjpeg :cam-settings="this.currentCam"></webcam-uv4l-mjpeg>
</template>
<template v-else-if="'service' in this.currentCam && this.currentCam.service === 'ipstream'">
<webcam-ipstreamer :cam-settings="this.currentCam"></webcam-ipstreamer>
</template>
@@ -71,6 +74,7 @@
import Mjpegstreamer from "@/components/webcams/Mjpegstreamer"
import MjpegstreamerAdaptive from "@/components/webcams/MjpegstreamerAdaptive"
import Ipstreamer from "@/components/webcams/Ipstreamer"
import Uv4lMjpeg from "@/components/webcams/Uv4lMjpeg"
import WebcamGrid from "@/components/webcams/WebcamGrid"
export default {
@@ -78,6 +82,7 @@
'webcam-mjpegstreamer': Mjpegstreamer,
'webcam-mjpegstreamer-adaptive': MjpegstreamerAdaptive,
'webcam-ipstreamer': Ipstreamer,
'webcam-uv4l-mjpeg': Uv4lMjpeg,
'webcam-grid': WebcamGrid,
},
data: function() {
@@ -109,8 +114,8 @@
icon: "mdi-view-grid",
}
} else {
const currentCam = this.webcams.find(webcam => webcam.name === this.currentCamName)
if (currentCam) return currentCam
const currentCam = this.webcams.findIndex(webcam => webcam.name === this.currentCamName)
if (currentCam !== -1) return this.webcams[currentCam]
}
return {}
+66
View File
@@ -0,0 +1,66 @@
<style>
.webcamImage {
width: 100%;
}
</style>
<template>
<vue-load-image v-observe-visibility="visibilityChanged">
<img slot="image" :src="url" alt="Preview" :style="webcamStyle" class="webcamImage" />
<div slot="preloader" class="text-center py-5">
<v-progress-circular indeterminate color="primary"></v-progress-circular>
</div>
<div slot="error" class="text-center py-5">
<v-icon x-large>mdi-webcam-off</v-icon>
<div class="subtitle-1 mt-2">{{ $t('Settings.WebcamPanel.UrlNotAvailable') }}</div>
</div>
</vue-load-image>
</template>
<script>
import VueLoadImage from "vue-load-image"
export default {
components: {
'vue-load-image': VueLoadImage
},
data: function() {
return {
isVisible: true,
}
},
props: {
camSettings: Object,
printerUrl: {
type: String,
default: null
}
},
created: function () {
},
computed: {
url() {
const baseUrl = this.camSettings.url
const hostUrl = new URL(this.printerUrl === null ? document.URL : this.printerUrl)
const url = new URL(baseUrl, hostUrl.origin)
return decodeURIComponent(url.toString())
},
webcamStyle() {
let transforms = ""
if ('flipX' in this.camSettings && this.camSettings.flipX) transforms += " scaleX(-1)"
if ('flipX' in this.camSettings && this.camSettings.flipY) transforms += " scaleY(-1)"
if (transforms.trimLeft().length) return { transform: transforms.trimLeft() }
return ""
},
},
methods: {
visibilityChanged(isVisible) {
this.isVisible = isVisible
}
}
}
</script>
+5
View File
@@ -16,6 +16,9 @@
<template v-else-if="'service' in webcam && webcam.service === 'mjpegstreamer-adaptive'">
<webcam-mjpegstreamer-adaptive :cam-settings="webcam"></webcam-mjpegstreamer-adaptive>
</template>
<template v-else-if="'service' in webcam && webcam.service === 'uv4l-mjpeg'">
<webcam-uv4l-mjpeg :cam-settings="webcam"></webcam-uv4l-mjpeg>
</template>
<template v-else-if="'service' in webcam && webcam.service === 'ipstream'">
<webcam-ipstreamer :cam-settings="webcam"></webcam-ipstreamer>
</template>
@@ -30,6 +33,7 @@
<script>
import Mjpegstreamer from "@/components/webcams/Mjpegstreamer"
import MjpegstreamerAdaptive from "@/components/webcams/MjpegstreamerAdaptive"
import Uv4lMjpeg from "@/components/webcams/Uv4lMjpeg"
import Ipstreamer from "@/components/webcams/Ipstreamer"
export default {
@@ -41,6 +45,7 @@
components: {
'webcam-mjpegstreamer': Mjpegstreamer,
'webcam-mjpegstreamer-adaptive': MjpegstreamerAdaptive,
'webcam-uv4l-mjpeg': Uv4lMjpeg,
'webcam-ipstreamer': Ipstreamer,
},
props: {
+3 -3
View File
@@ -339,9 +339,9 @@
"MoveDistancesInMm": "Verfahrwege in mm",
"MoveDistancesXYInMm": "Verfahrwege XY in mm",
"MoveDistancesZInMm": "Verfahrwege Z in mm",
"ReverseXMovement": "X invertieren",
"ReverseYMovement": "Y invertieren",
"ReverseZMovement": "Z invertieren",
"InvertXMovement": "X invertieren",
"InvertYMovement": "Y invertieren",
"InvertZMovement": "Z invertieren",
"SpeedEInMms": "Geschwindigkeit E in mm/s",
"SpeedXY": "Geschwindigkeit XY",
"SpeedZ": "Geschwindigkeit Z"
+30 -12
View File
@@ -6,7 +6,7 @@
"Failed": "failed",
"TryAgain": "try again",
"Printers": "Printers",
"CannotNotConnectTo": "Cannot not connect to",
"CannotNotConnectTo": "Cannot connect to",
"ConnectionTo": "Connection to",
"ConnectionFailed": "Connecting Failed",
"SelectPrinter": "Select Printer",
@@ -77,7 +77,7 @@
"Rename": "Rename",
"Delete": "Delete",
"StartJob": "Start Job",
"DoYouWantToStart": "Do you want to start",
"DoYouWantToStartFilename": "Do you want to start {filename}?",
"No": "No",
"Yes": "Yes",
"NewDirectory": "New Directory",
@@ -89,6 +89,8 @@
"Cancel": "Cancel",
"Create": "Create",
"RenameDirectory": "Rename Directory",
"DeleteDirectory": "Delete Directory",
"DeleteDirectoryQuestion": "Do you really want to delete the \"{name}\" directory with all its contents?",
"Uploading": "Uploading",
"CurrentPath": "Current path",
"Filesize": "Filesize",
@@ -96,8 +98,10 @@
"ObjectHeight": "Object Height",
"LayerHeight": "Layer Height",
"FilamentUsage": "Filament Usage",
"FilamentWeight": "Filament Weight",
"PrintTime": "Print Time",
"Slicer": "Slicer"
"Slicer": "Slicer",
"Downloading": "Downloading"
},
"Console": {
"send": "send",
@@ -142,6 +146,8 @@
"FilamentUsage": "Filament usage",
"PrinttimeAvg": "Printtime AVG",
"PrintHistory": "Print History",
"TitleRefreshHistory": "Refresh History",
"TitleSettings": "Settings",
"Search": "search",
"Jobs": "Jobs",
"AllJobs": "All",
@@ -161,6 +167,7 @@
"PrintTime": "Print Time",
"TotalDuration": "Total Time",
"TotalTime": "Total Time",
"EstimatedFilamentWeight": "Estimated Filament Weight",
"EstimatedFilament": "Estimated Filament",
"FilamentCalc": "Filament Calc",
"FilamentUsed": "Filament Used",
@@ -281,11 +288,11 @@
"Max": "max",
"Avg": "Avg",
"UNKNOWN": "UNKNOWN",
"ShowCurrentTemperatureInChart": "Show current temperature in chart",
"ShowTargetTemperatureInChart": "Show target temperature in chart",
"ShowPWMPowerInChart": "Show PWM-power in chart",
"Show": "Show",
"InList": "in list",
"CurrentTemperature": "current temperature",
"TargetTemperature": "target temperature",
"PwmPower": "PWM-power",
"ShowNameInChart": "Show {name} in chart",
"ShowNameInList": "Show {name} in list",
"TemperaturesInChart": "Temperature [°C]"
},
"WebcamPanel": {
@@ -321,7 +328,10 @@
"Cancel": "Cancel",
"Create": "Create",
"CreateFile": "Create File",
"CreateFolder": "Create Folder",
"CreateDirectory": "Create Directory",
"RenameDirectory": "Rename Directory",
"DeleteDirectory": "Delete Directory",
"DeleteDirectoryQuestion": "Do you really want to delete the \"{name}\" directory with all its contents?",
"Uploading": "Uploading",
"Filesize": "Filesize",
"LastModified": "Last modified"
@@ -330,6 +340,13 @@
"Console": "Console",
"HideTemperatures": "Hide temperatures",
"CustomFilters": "Custom filter",
"CreateHeadline": "Create filter",
"Name": "Name",
"Regex": "Regex",
"StoreButton": "Store filter",
"UpdateButton": "Update filter",
"EditHeadline": "Edit filter",
"AddFilter": "add filter",
"Rules": "Rules"
},
"ControlPanel": {
@@ -338,9 +355,9 @@
"SpeedZ": "Speed Z",
"EnableCross": "Enable movement cross",
"MoveDistancesInMm": "Move distances in mm",
"ReverseXMovement": "Reverse X movement",
"ReverseYMovement": "Reverse Y movement",
"ReverseZMovement": "Reverse Z movement",
"InvertXMovement": "Invert X movement",
"InvertYMovement": "Invert Y movement",
"InvertZMovement": "Invert Z movement",
"MoveDistancesXYInMm": "Move distances XY in mm",
"MoveDistancesZInMm": "Move distances Z in mm",
"MoveDistancesEInMm": "Move distances E in mm",
@@ -449,6 +466,7 @@
"Mjpegstreamer": "MJPEG-Streamer",
"MjpegstreamerAdaptive": "Adaptive MJPEG-Streamer (experimental)",
"Uv4lMjpeg": "UV4L-MJPEG",
"Ipstream": "IP Camera",
"Required": "required",
+464
View File
@@ -0,0 +1,464 @@
{
"title": "Français",
"App": {
"Connecting": "Connection",
"To": "avec",
"Failed": "impossible",
"TryAgain": "re-essayer",
"Printers": "Imprimantes",
"CannotNotConnectTo": "Connection impossible",
"ConnectionTo": "Connection avec",
"ConnectionFailed": "Connection impossible",
"SelectPrinter": "Choix de l'imprimante",
"AddPrinter": "Ajouter imprimante",
"EditPrinter": "Edition imprimante",
"UpdatePrinter": "Enregistrer",
"ChangePrinter": "Selection d'imprimante",
"Hello": "Bonjour et bienvenue dans le mode distance de Mainsail!",
"PleaseRememberToAdd": "N'oubliez pas d'ajouter",
"InMoonrakerConf": "dans moonraker.conf section 'cors_domains'.",
"YouCanFindMore": "Plus de détails sur",
"Remotemode": "https://docs.mainsail.xyz/remotemode",
"KlipperControl": "Contrôle de Klipper",
"Restart": "Redémarrage",
"FirmwareRestart": "Redémarrage FIRMWARE",
"RestartServices": "Redémarrage des services",
"Klipper": "Klipper ",
"Moonraker": "Moonraker ",
"PowerDevices": "Module d'alimentation",
"HostControl": "Contrôle de l'hôte",
"Reboot": "Redémarrage",
"Shutdown": "Arrêt",
"Updating": "Mise à jour",
"Recovering": "Réinitialisation",
"done": "Terminé!",
"Empty": "vide",
"Close": "Fermeture",
"SAVECONFIG": "SAVE CONFIG",
"UploadPrint": "Chargement et impression",
"EmergencyStop": "Arrêt d'urgence",
"Uploading": "Chargement"
},
"Router": {
"Dashboard": "Tableau de bord",
"Printers": "Imprimantes",
"Settings": "Réglages",
"Webcam": "Caméra",
"Console": "Console",
"Heightmap": "Maillage",
"G-Code Files": "Fichiers G-Code",
"History": "Historique",
"Machine": "Machine",
"Interface": "Interface"
},
"Editor": {
"Minimap": "Afficher minimap"
},
"Files": {
"GCodeFiles": "Fichiers G-Code",
"UploadNewGcode": "Charger nouveau Gcode",
"CreateNewDirectory": "Créer un dossier",
"RefreshCurrentDirectory": "Rafraichir le contenu du dossier",
"SetupCurrentList": "Configurer liste",
"HiddenFiles": "Fichiers cachés",
"PrintedFiles": "Fichiers imprimés",
"FreeDisk": "Disque libre",
"Used": "Utilisé",
"Free": "Libre",
"Total": "Total",
"Files": "Fichiers",
"AllFiles": "Tous",
"Search": "Rechercher",
"Empty": "vide",
"DropFilesToAddGcode": "Drop files to add gcode.",
"PrintStart": "Démarrer l'impression",
"Preheat": "Préchauffage",
"Download": "Téléchargement",
"Rename": "Renommer",
"Delete": "Effacer",
"StartJob": "Démarrer",
"DoYouWantToStart": "Voulez-vous imprimer",
"No": "Non",
"Yes": "Oui",
"NewDirectory": "Nouveau dossier",
"PleaseEnterANewDirectoryName": "Entrez le nom du nouveau dossier",
"RenameFile": "Renommer le fichier",
"EditFile": "Editer Fichier",
"SaveClose": "Sauvegarder et fermer",
"Name": "Nom",
"Cancel": "Annuler",
"Create": "Créer",
"RenameDirectory": "Renommer le dossier",
"Uploading": "Chargement",
"CurrentPath": "Chemin actuel",
"Filesize": "Taille",
"LastModified": "Dernière modification",
"ObjectHeight": "Hauteur de l'objet",
"LayerHeight": "Hauteur de couche",
"FilamentUsage": "Utilisation de filament",
"PrintTime": "Temps d'impression",
"Slicer": "Trancheur"
},
"Console": {
"send": "envoi",
"SetupConsole": "Configuration console",
"SendCode": "Envoyer la commande",
"Empty": "vide",
"HideTemperatures": "Cacher les températures",
"CustomFilters": "Filtres utilisateur",
"Date": "Date",
"Event": "Evénement"
},
"Heightmap": {
"Heightmap": "Profil de hauteur",
"TitleHomeAll": "Référence tous",
"Clear": "effacer",
"TitleClear": "Effacer Maillage",
"Calibrate": "calibration",
"TitleCalibrate": "Calibrer nouveau Maillage",
"NoBedMeshHasBeenLoadedYet": "Aucun profil chargé.",
"Probed": "Mesuré",
"Mesh": "Maillage calculé",
"Scale": "Echelle",
"Profiles": "Profils",
"Deleted": "effacé",
"RenameBedMeshProfile": "Renommer profil Maillage",
"Name": "Nom",
"Abort": "Annuler",
"Rename": "renommer",
"BedMeshCalibrate": "Calibration Maillage",
"DoYouReallyWantToCalibrate": "Voulez-vous démarrer la calibration du Maillage plateau ?",
"DeleteBedMeshProfile": "Effacer profil Maillage",
"DoYouReallyWantToDelete": "Voulez-vous effacer le profil ?",
"Remove": "supprimer"
},
"History": {
"Statistics": "Statistiques",
"TotalPrinttime": "Total temps d'impression",
"LongestPrinttime": "Plus longue impression",
"AvgPrinttime": "Temps moyen",
"TotalFilamentUsed": "Total filament utilisé",
"TotalJobs": "Nombre travaux",
"FilamentUsage": "Filament consommé",
"PrinttimeAvg": "Temps moyen d'impression",
"PrintHistory": "Historique",
"TitleRefreshHistory": "Rafraîchir l’historique",
"TitleSettings": "Réglages",
"Search": "Recherche",
"Jobs": "Travaux",
"AllJobs": "Tous",
"Empty": "vide",
"Details": "Details",
"Reprint": "Ré-impression",
"Delete": "Effacer",
"JobDetails": "Détails travaux",
"Filename": "Fichier",
"Filesize": "Taille",
"LastModified": "Dernière modification",
"Status": "Status",
"StartTime": "Heure départ",
"EndTime": "Temps final",
"EstimatedTime": "Estimation Temps",
"PrintDuration": "Temps d'impression",
"PrintTime": "Durée d'impression",
"TotalDuration": "Temps total",
"TotalTime": "Temps total",
"EstimatedFilament": "Estimation filament",
"FilamentCalc": "Filament calculé",
"FilamentUsed": "Filament consommé",
"FirstLayerExtTemp": "Temp. extrudeur 1ère couche",
"FirstLayerBedTemp": "Temp. plateau 1ère couche",
"FirstLayerHeight": "Hauteur 1ère couche",
"LayerHeight": "Hauteur de couche",
"ObjectHeight": "Hauteur de l'objet",
"Slicer": "Trancheur",
"SlicerVersion": "Version trancheur",
"HistoryFilamentUsage": "Filament",
"HistoryPrinttimeAVG": "Impressions"
},
"Panels": {
"ControlPanel": {
"Controls": "Contrôles",
"SetupControls": "Réglages",
"AlternateControls": "Commandes en croix",
"InvertX": "Inversion X",
"InvertY": "Inversion Y",
"InvertZ": "Inversion Z",
"ALL": "Tous",
"QGL": "QGL",
"ZTilt": "Z Tilt",
"X": "X",
"Y": "Y",
"Z": "Z",
"PleaseConfigureSteps": "Configurez Pas",
"SettingsInterfaceControl": "Réglages > Interface > Contrôle",
"Home": "Référence",
"FeedAmountIn": "Longueur à extraire",
"FeedrateIn": "Vitesse d'extrusion",
"Retract": "Rétractation",
"Extrude": "Extrusion",
"Macros": "Macros"
},
"FarmPrinterPanel": {
"WebcamOff": "Arrêt"
},
"KlippyStatePanel": {
"KlippyState": "Etat-Klippy",
"KlippyInfo": "Moonraker ne peut pas se connecter àKlippy!\nContrôlez que le service Klipper est actif et qu'un UDS (Unix Domain Socket) est configuré.",
"Restart": "Redémarrage",
"FirmwareRestart": "Redémarrage Firmware"
},
"MiniconsolePanel": {
"Console": "Console",
"SetupConsole": "Réglage Console",
"HideTemperatures": "Cacher températures",
"CustomFilters": "Filtres utilisateur",
"SendCode": "Envoyer la commande...",
"Send": "Envoi",
"Empty": "vide"
},
"MinSettingsPanel": {
"MissingConfiguration": "Configuration absente",
"IsNotDefinedInConfig": "n'est pas défini dans le fichier de configuration.",
"MoreInformation": "plus d'information"
},
"MiscellaneousPanel": {
"PrintSettings": "Réglages d'impression",
"Miscellaneous": "Divers",
"SpeedFactor": "Facteur de vitesse",
"ExtrusionFactor": "Facteur d'extrusion"
},
"MoonrakerFailedComponentsPanel": {
"MoonrakerFailedComponents": "Composants Moonraker en erreur",
"MoonrakerErrorInfo": "Une erreur a été détectée lors du chargement des composants de Moonraker. Contrôlez le fichier Log pour plus d'informations.",
"FollowingPluginHasAnError": "Le plugin suivant a une erreur:",
"DownloadLog": "Téléchargement fichier Log"
},
"PowerControlPanel": {
"PowerControl": "Alimentation",
"Error": "Erreur",
"On": "Marche",
"Off": "Arrêt"
},
"StatusPanel": {
"Position": "Position",
"Absolute": "absolu",
"Relative": "relatif",
"X": "X",
"Y": "Y",
"Z": "Z",
"PausePrint": "Pause impression",
"ResumePrint": "Reprise impression",
"CancelPrint": "Annuler impression",
"ClearPrintStats": "Effacer statistiques d'impression",
"ReprintJob": "Ré-impression",
"Speed": "Vitesse",
"Flow": "Débit",
"Max": "max",
"Filament": "Filament",
"Layer": "Couche",
"ObjectHeight": "hauteur objet",
"Estimate": "Estimation",
"File": "Fichier",
"Print": "Impression",
"Difference": "Différence",
"Total": "Total",
"Slicer": "Trancheur",
"ETA": "TEA",
"Unknown": "Inconnu"
},
"ToolsPanel": {
"Temperatures": "Températures",
"Presets": "Préréglages",
"Cooldown": "Refroidissement",
"SetupTemperatures": "Réglages Températures",
"ShowChart": "Afficher graphique",
"AutoscaleChart": "Echelle automatique",
"Name": "Nom",
"Color": "Couleur",
"State": "Etat",
"Current": "En cours",
"Target": "Cible",
"Min": "min",
"Max": "max",
"Avg": "Moyenne",
"UNKNOWN": "INCONNU",
"CurrentTemperature": "température actuelle",
"TargetTemperature": "température cible",
"PwmPower": "puissance PWM",
"ShowNameInChart": "Afficher {name} dans le graphique",
"ShowNameInList": "Afficher {name} dans la liste",
"TemperaturesInChart": "Température [°C]"
},
"WebcamPanel": {
"Webcam": "Caméra",
"FPS": "Ips",
"All": "Tous",
"UnknownWebcamService": "Service Caméra inconnu"
},
"ZOffsetPanel": {
"ZBabyStepping": "Z micro pas",
"CurrentOffset": "Offset actuel"
}
},
"Settings": {
"ConfigFilesPanel": {
"ConfigFiles": "Fichiers de configuration",
"SetupCurrentList": "Réglage liste actuelle",
"HiddenFiles": "Fichiers cachés",
"CurrentPath": "Chemin actuel",
"Files": "Fichiers",
"AllFiles": "Tous",
"Empty": "vide",
"EditFile": "Editer fichier",
"Download": "Télécharger",
"Rename": "Renommer",
"Delete": "Effacer",
"PleaseStandBy": "Veuillez attendre...",
"ConfigReference": "Référence de configuration",
"SaveClose": "Sauvegarder et fermer",
"SaveRestart": "Sauvegarder et redémarrer",
"RenameFile": "Renommer fichier",
"Name": "Nom",
"Cancel": "Annuler",
"Create": "Créer",
"CreateFile": "Créer un fichier",
"CreateFolder": "Créer un dossier",
"Uploading": "Téléchargement",
"Filesize": "Taille",
"LastModified": "Dernière modification"
},
"ConsolePanel": {
"Console": "Console",
"HideTemperatures": "Cacher les messages de températures",
"CustomFilters": "Filtres utilisateur",
"Rules": "Règles"
},
"ControlPanel": {
"Control": "Contrôle",
"SpeedXY": "Vitesse XY",
"SpeedZ": "Vitesse Z",
"EnableCross": "Activer les mouvements en croix",
"MoveDistancesInMm": "Distance de déplacement [mm]",
"InvertXMovement": "Mouvement X inverse",
"InvertYMovement": "Mouvement Y inverse",
"InvertZMovement": "Mouvement Z inverse",
"MoveDistancesXYInMm": "Distance de déplacement XY [mm]",
"MoveDistancesZInMm": "Distance de déplacement Z [mm]",
"MoveDistancesEInMm": "Longueur d'extrusion E [mm]",
"Extruder": "Extrudeur",
"SpeedEInMms": "Vitesse d'extrusion E [mm/s]"
},
"DashboardPanel": {
"Dashboard": "Tableau de bord",
"Webcam": "Caméra",
"Tempchart": "Graphique de température",
"Console": "Console",
"ChartUpdateInterval": "Période mise à jour du graphique",
"DatapointInterval": "Intervale entre deux points"
},
"EndstopPanel": {
"Endstops": "Fins de course",
"Endstop": "Fin de course",
"TRIGGERED": "ACTIF",
"open": "OUVERT",
"EndstopInfo": "Pressez le bouton sync en bas à droite afin d'actualiser l'état des fins de course."
},
"GeneralPanel": {
"General": "Général",
"PrinterName": "Nom de l'imprimante",
"Language": "Langue",
"DisplayCANCEL_PRINT": "Afficher CANCEL_PRINT",
"DisplayZOffset": "Afficher le panneau Z-Offset",
"ShowCANCEL_PRINT": "Affiche le bouton CANCEL_PRINT de manière permanente. Pas de confirmation nécessaire.",
"ShowZOffset": "Affiche le panneau Z-Offset de manière permanente.",
"FactoryReset": "Configuration d'origine",
"FactoryInfo": "Voulez-vous vraiment remettre Mainsail à sa configuration d'origine ?",
"ResetMainsail": "MAZ mainsail"
},
"LimitsPanel": {
"MachineLimits": "Limites de l'imprimante",
"Velocity": "Vitesse",
"Acceleration": "Accélération",
"Deceleration": "Décélération",
"SquareCornerVelocity": "Vitesse des angles droits"
},
"LogfilesPanel": {
"Logfiles": "Fichiers Log"
},
"MacrosPanel": {
"Macros": "Macros",
"NOMacros": "Pas de macros trouvées..."
},
"PresetsPanel": {
"PreheatPresets": "Préréglage de préchauffage",
"Cooldown": "Refroidissement",
"AddPreset": "ajouter préréglage",
"CreateHeadline": "Créer préréglage",
"EditHeadline": "Editer préréglage",
"Name": "Nom",
"CustomGCode": "G-Code utilisateur",
"PresetInfo": "Vous devez indiquer au minimum une température cible ou un gcode utilisateur.",
"StoreButton": "Enregistrer préréglage",
"UpdateButton": "Mise à jour préréglage",
"EditCooldown": "Editer refroidissement",
"UpdateCooldown": "Mise à jour refroidissement"
},
"RemotePrintersPanel": {
"RemotePrinters": "Imprimantes distantes",
"AddPrinter": "Ajouter imprimante",
"EditPrinter": "Editer imprimante",
"UpdatePrinter": "Mise à jour imprimante"
},
"RunoutPanel": {
"Detected": "détecté",
"Empty": "vide"
},
"UpdatePanel": {
"UpdateManager": "Contrôleur de mise à jour",
"CheckForUpdates": "Contrôle des mises à jour",
"System": "Système",
"PackagesCanBeUpgraded": "les paquets ne peuvent être mis à jour",
"OSPackages": "Paquets système",
"Commits": "Publications",
"CommittedAt": "publié le",
"UpToDate": "à jour",
"Detached": "non lié",
"Update": "mise à jour",
"Upgrade": "Mise à jour (version)",
"Dirty": "modifié",
"Invalid": "invalide",
"Unknown": "inconnu",
"ERROR": "ERREUR"
},
"WebcamPanel": {
"Webcams": "Caméras",
"ShowInNavigation": "Afficher dans la navigation",
"AddWebcam": "Ajouter caméra",
"CreateWebcam": "Créer caméra",
"EditWebcam": "Editer caméra",
"SaveWebcam": "Sauvegarder Caméra",
"UpdateWebcam": "Mise à jour caméra",
"IconPrinter": "Imprimante",
"IconNozzle": "Buse",
"IconBed": "Plateau",
"IconCam": "Caméra",
"IconFilament": "Filament",
"IconDoor": "Porte",
"IconMcu": "MCU",
"IconHot": "Chaud",
"Mjpegstreamer": "Flux MJPEG",
"MjpegstreamerAdaptive": "Flux MJPEG Adaptif (experimental)",
"Ipstream": "Caméra IP ",
"Required": "requis",
"NameAlreadyExists": "Nom existe déjà",
"UrlNotAvailable": "URL non disponible",
"Name": "Nom",
"WebcamURL": "URL caméra",
"Service": "Service",
"TargetFPS": "Ips cible",
"FlipHorizontally": "Miroir horizontal",
"FlipVertically": "Miroir vertical"
}
}
}
+3 -3
View File
@@ -340,9 +340,9 @@
"MoveDistancesInMm": "Mozgások mm-ben",
"MoveDistancesXYInMm": "XY mozgásai mm-ben",
"MoveDistancesZInMm": "Z mozgásai mm-ben",
"ReverseXMovement": "X mozgása fordítva",
"ReverseYMovement": "Y mozgása fordítva",
"ReverseZMovement": "Z mozgása fordítva",
"InvertXMovement": "X mozgása fordítva",
"InvertYMovement": "Y mozgása fordítva",
"InvertZMovement": "Z mozgása fordítva",
"SpeedEInMms": "E sebessége mm/s-ban",
"SpeedXY": "XY sebessége",
"SpeedZ": "Z sebessége"
+3 -3
View File
@@ -339,9 +339,9 @@
"MoveDistancesInMm": "Spostamento in mm",
"MoveDistancesXYInMm": "Spostamento di XY in mm",
"MoveDistancesZInMm": "Spostamento di Z in mm",
"ReverseXMovement": "Inverti il movimento di X",
"ReverseYMovement": "Inverti il movimento di Y",
"ReverseZMovement": "Inverti il movimento di Z",
"InvertXMovement": "Inverti il movimento di X",
"InvertYMovement": "Inverti il movimento di Y",
"InvertZMovement": "Inverti il movimento di Z",
"SpeedEInMms": "Velocità di E in mm/s",
"SpeedXY": "Velocità di XY",
"SpeedZ": "Velocità di Z"
+3 -3
View File
@@ -339,9 +339,9 @@
"MoveDistancesInMm": "Путешествия в мм",
"MoveDistancesXYInMm": "Путешествия XY в мм",
"MoveDistancesZInMm": "Путешествия Z в мм",
"ReverseXMovement": "Обратное движение Х",
"ReverseYMovement": "Обратное движение Y",
"ReverseZMovement": "Обратное движение Z",
"InvertXMovement": "Обратное движение Х",
"InvertYMovement": "Обратное движение Y",
"InvertZMovement": "Обратное движение Z",
"SpeedEInMms": "Скорость E в мм/s",
"SpeedXY": "Скорость XY",
"SpeedZ": "Скорость Z"
+3 -3
View File
@@ -339,9 +339,9 @@
"MoveDistancesInMm": "移动距离 mm",
"MoveDistancesXYInMm": "移动距离 XY in mm",
"MoveDistancesZInMm": "移动距离 Z in mm",
"ReverseXMovement": "反转 X 移动",
"ReverseYMovement": "反转 Y 移动",
"ReverseZMovement": "反转 Z 移动",
"InvertXMovement": "反转 X 移动",
"InvertYMovement": "反转 Y 移动",
"InvertZMovement": "反转 Z 移动",
"SpeedEInMms": "速度 E in mm/s",
"SpeedXY": "XY 速度",
"SpeedZ": "Z 速度"
+9 -11
View File
@@ -61,8 +61,8 @@
<v-list-item class="minHeight36">
<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="$t('Console.CustomFilters')"></v-checkbox>
<v-list-item class="minHeight36" v-for="(filter, index) in customFilters" v-bind:key="index">
<v-checkbox class="mt-0" v-model="filter.bool" @change="toggleFilter(filter)" hide-details :label="filter.name"></v-checkbox>
</v-list-item>
</v-list>
</v-menu>
@@ -159,14 +159,9 @@
return this.$store.dispatch("gui/setSettings", { console: { hideWaitTemperatures: newVal } })
}
},
boolCustomFilters: {
get() {
return this.$store.state.gui.console.boolCustomFilters
},
set: function(newVal) {
return this.$store.dispatch("gui/setSettings", { console: { boolCustomFilters: newVal } })
}
}
customFilters() {
return this.$store.state.gui.console.customFilters
},
},
methods: {
doSend() {
@@ -237,7 +232,10 @@
});
return items;
}
},
toggleFilter(filter) {
this.$store.dispatch('gui/updateConsoleFilter', filter)
},
},
}
</script>
+46 -24
View File
@@ -136,7 +136,7 @@
@dragover="dragOverFilelist($event, {isDirectory: true, filename: '..'})" @dragleave="dragLeaveFilelist" @drop.prevent.stop="dragDropFilelist($event, {isDirectory: true, filename: '..'})"
>
<td class="pr-0 text-center" style="width: 32px;"><v-icon>mdi-folder-upload</v-icon></td>
<td class=" " colspan="8">..</td>
<td class=" " :colspan="filteredHeaders.length">..</td>
</tr>
</template>
@@ -198,6 +198,7 @@
<td class="text-no-wrap text-right" v-if="headers.find(header => header.value === 'object_height').visible">{{ item.object_height ? item.object_height.toFixed(2)+' mm' : '--' }}</td>
<td class="text-no-wrap text-right" v-if="headers.find(header => header.value === 'layer_height').visible">{{ item.layer_height ? item.layer_height.toFixed(2)+' mm' : '--' }}</td>
<td class="text-no-wrap text-right" v-if="headers.find(header => header.value === 'filament_total').visible">{{ item.filament_total ? item.filament_total.toFixed()+' mm' : '--' }}</td>
<td class="text-no-wrap text-right" v-if="headers.find(header => header.value === 'filament_weight_total').visible">{{ item.filament_weight_total ? item.filament_weight_total.toFixed(2)+' g' : '--' }}</td>
<td class="text-no-wrap text-right" v-if="headers.find(header => header.value === 'estimated_time').visible">{{ formatPrintTime(item.estimated_time) }}</td>
<td class="text-no-wrap text-right" v-if="headers.find(header => header.value === 'slicer').visible">{{ item.slicer ? item.slicer : '--' }}<br /><small v-if="item.slicer_version">{{ item.slicer_version}}</small></td>
</tr>
@@ -239,7 +240,7 @@
<v-list-item @click="removeFile" v-if="!contextMenu.item.isDirectory">
<v-icon class="mr-1">mdi-delete</v-icon> {{ $t('Files.Delete')}}
</v-list-item>
<v-list-item @click="deleteDirectoryAction" v-if="contextMenu.item.isDirectory">
<v-list-item @click="deleteDirectory(contextMenu.item)" v-if="contextMenu.item.isDirectory">
<v-icon class="mr-1">mdi-delete</v-icon> {{ $t('Files.Delete')}}
</v-list-item>
</v-list>
@@ -252,7 +253,7 @@
:src="getBigThumbnail(dialogPrintFile.item)"
></v-img>
<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-text>{{ $t('Files.DoYouWantToStartFilename', {'filename': dialogPrintFile.item.filename}) }}</v-card-text>
<v-card-actions>
<v-spacer></v-spacer>
<v-btn color="red darken-1" text @click="dialogPrintFile.show = false">{{ $t('Files.No')}}</v-btn>
@@ -300,6 +301,19 @@
</v-card-actions>
</v-card>
</v-dialog>
<v-dialog v-model="dialogDeleteDirectory.show" max-width="400">
<v-card>
<v-card-title class="headline">{{ $t('Files.DeleteDirectory') }}</v-card-title>
<v-card-text>
<p class="mb-0">{{ $t('Files.DeleteDirectoryQuestion', { name: dialogDeleteDirectory.item.filename } )}}</p>
</v-card-text>
<v-card-actions>
<v-spacer></v-spacer>
<v-btn color="" text @click="dialogDeleteDirectory.show = false">{{ $t('Files.Cancel') }}</v-btn>
<v-btn color="error" text @click="deleteDirectoryAction">{{ $t('Files.Delete') }}</v-btn>
</v-card-actions>
</v-card>
</v-dialog>
<v-snackbar
:timeout="-1"
:value="true"
@@ -310,7 +324,7 @@
v-model="editor.showLoader"
>
<div>
Downloading<br />
{{ $t('Files.Downloading') }}<br />
<strong>{{ editor.item.filename }}</strong>
</div>
<span v-if="editor.progress.total > 1" class="mr-1">({{ formatFilesize(editor.progress.loaded) }}/{{ formatFilesize(editor.progress.total) }})</span>
@@ -378,7 +392,7 @@
dark
v-model="uploadSnackbar.status"
>
<span v-if="uploadSnackbar.max > 1" class="mr-1">({{ uploadSnackbar.number }}/{{ uploadSnackbar.max }})</span><strong>{{ $t("Files.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 }">
@@ -434,6 +448,11 @@
newName: "",
item: {}
},
dialogDeleteDirectory: {
show: false,
newName: "",
item: {}
},
editor: {
show: false,
showLoader: false,
@@ -516,16 +535,17 @@
}),
headers() {
const headers = [
{ text: '', value: '', align: 'left', configable: false, visible: true, filterable: false },
{ text: this.$t('Files.Name'), value: 'filename', align: 'left', configable: false, visible: true },
{ text: '', value: 'status', 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 },
{ text: '', value: '', align: 'left', configable: false, visible: true, filterable: false },
{ text: this.$t('Files.Name'), value: 'filename', align: 'left', configable: false, visible: true },
{ text: '', value: 'status', 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.FilamentWeight'), value: 'filament_weight_total', align: 'right', configable: true, visible: true },
{ text: this.$t('Files.PrintTime'), value: 'estimated_time', align: 'right', configable: true, visible: true },
{ text: this.$t('Files.Slicer'), value: 'slicer', align: 'right', configable: true, visible: true },
]
headers.forEach((header) => {
@@ -775,13 +795,10 @@
}
},
downloadFile() {
let filename = (this.currentPath+"/"+this.contextMenu.item.filename);
let link = document.createElement("a");
link.download = name;
link.href = '//' + this.hostname + ':' + this.port + '/server/files/' + encodeURI(filename);
document.body.appendChild(link);
link.click();
document.body.removeChild(link);
const filename = (this.currentPath+"/"+this.contextMenu.item.filename)
const href = '//' + this.hostname + ':' + this.port + '/server/files/' + encodeURI(filename)
window.open(href)
},
cancelDownload() {
if (this.editor.token) {
@@ -860,7 +877,7 @@
});
},
async saveFile() {
let file = new File([this.editor.sourcecode], encodeURI(this.editor.item.filename));
let file = new File([this.editor.sourcecode], this.editor.item.filename);
await this.doUploadFile(file);
@@ -907,8 +924,13 @@
this.$socket.sendObj('server.files.post_directory', { path: this.currentPath+"/"+this.dialogCreateDirectory.name }, 'files/getCreateDir');
}
},
deleteDirectory(item) {
this.dialogDeleteDirectory.item = item
this.dialogDeleteDirectory.show = true
},
deleteDirectoryAction: function() {
this.$socket.sendObj('server.files.delete_directory', { path: this.currentPath+"/"+this.contextMenu.item.filename }, 'files/getDeleteDir');
this.dialogDeleteDirectory.show = false
this.$socket.sendObj('server.files.delete_directory', { path: this.currentPath+"/"+this.contextMenu.item.filename, force: true }, 'files/getDeleteDir')
},
clickRow(item, force = false) {
if (!this.contextMenu.shown || force) {
+1 -1
View File
@@ -56,7 +56,7 @@ const routes = [
component: Files,
alwaysShow: false,
showInNavi: true,
klipperComponent: 'virtual_sdcard',
registeredDirectory: 'gcodes',
},
{
title: "History",
+10 -5
View File
@@ -12,7 +12,7 @@ export default {
getPrinters: state => {
return state
},
getPrinterName: (getters) => (namespace) => {
getPrinterName: (state, getters) => (namespace) => {
return getters[namespace+"/getPrinterName"]
}
},
@@ -26,7 +26,8 @@ export default {
commit('addPrinter',{
hostname: printer.hostname,
port: printer.port,
protocol: rootState.socket.protocol
protocol: rootState.socket.protocol,
settings: printer.settings ?? {}
})
})
} catch(e) {
@@ -39,7 +40,8 @@ export default {
hostname: printer.hostname,
port: printer.port,
webPort: printer.webPort,
protocol: rootState.socket.protocol
protocol: rootState.socket.protocol,
settings: printer.settings ?? {}
})
})
}
@@ -52,6 +54,7 @@ export default {
printers.push({
hostname: state[key].socket.hostname,
port: state[key].socket.port,
settings: state[key].settings,
})
}
@@ -62,6 +65,7 @@ export default {
hostname: state[key].socket.hostname,
port: state[key].socket.port,
webPort: state[key].socket.webPort,
settings: state[key].settings,
})
}
@@ -72,7 +76,7 @@ export default {
mutations: {
addPrinter(state, payload) {
if ('hostname' in payload && payload.hostname !== "") {
const pritnerExist = Object.entries(state).findIndex((printer) =>
const printerExist = Object.entries(state).findIndex((printer) =>
printer.length > 0 &&
'socket' in printer[1] &&
'hostname' in printer[1].socket && printer[1].socket.hostname === payload.hostname &&
@@ -80,9 +84,10 @@ export default {
)
const nextPrinterName = 'printer'+Object.entries(state).length
if (pritnerExist === -1 && !this.hasModule(['farm', nextPrinterName])) {
if (printerExist === -1 && !this.hasModule(['farm', nextPrinterName])) {
this.registerModule(['farm', nextPrinterName], printer)
this.commit('farm/'+nextPrinterName+'/setSocketData', {...payload, _namespace: nextPrinterName })
if ('settings' in payload) this.commit('farm/'+nextPrinterName+'/setSettings', payload.settings)
this.dispatch('farm/'+nextPrinterName+'/connect', {}, { root: true })
}
}
+5
View File
@@ -166,6 +166,11 @@ export default {
commit("setData", payload)
},
setSettings({ commit, dispatch }, payload) {
commit("setSettings", payload)
dispatch("farm/savePrinters", {}, { root: true })
},
getMetadataCurrentFile({ commit }, payload) {
commit("setCurrentFile", payload)
},
+4
View File
@@ -18,6 +18,10 @@ export default {
)
},
getSetting: (state) => (name, fallback) => {
return state.settings[name] ?? fallback
},
getPrinterName: (state) => {
if (
'gui' in state.data &&
+3
View File
@@ -21,6 +21,9 @@ export function getDefaultState() {
},
data: {
gui: getGuiDefaultState()
},
settings: {
},
databases: [],
current_file: {},
+7
View File
@@ -45,6 +45,13 @@ export default {
})
},
setSettings(state, payload) {
Vue.set(state, 'settings', {
...state.settings,
...payload
})
},
addWsData(state, payload) {
state.socket.wsData.push(payload)
},
+89 -17
View File
@@ -87,6 +87,7 @@ export default {
let newData = {
estimated_time: safeDefault(payload.estimated_time),
filament_total: safeDefault(payload.filament_total),
filament_weight_total: safeDefault(payload.filament_weight_total),
first_layer_height: safeDefault(payload.first_layer_height),
first_layer_bed_temp: safeDefault(payload.first_layer_bed_temp),
first_layer_extr_temp: safeDefault(payload.first_layer_extr_temp),
@@ -97,7 +98,7 @@ export default {
slicer: safeDefault(payload.slicer),
slicer_version: safeDefault(payload.slicer_version),
thumbnails: safeDefault(payload.thumbnails),
metapayloadPulled: true,
metadataPulled: true,
modified: new Date(payload.modified * 1000),
size: parseInt(payload.size),
};
@@ -107,15 +108,17 @@ export default {
}
},
setUploadFile(state, payload) {
setCreateFile(state, payload) {
let filename = payload.item.path;
if (payload.item.path.lastIndexOf("/") >= 0) filename = payload.item.path.substr(payload.item.path.lastIndexOf("/")).replace("/", "");
let path = payload.item.path.substr(0, payload.item.path.lastIndexOf("/"));
let parent = findDirectory(state.filetree, (payload.item.root+"/"+path).split("/"));
if (parent) {
if (parent.findIndex(element => (!element.isDirectory && element.filename === filename)) === -1) {
let modified = new Date(payload.item.modified * 1000);
const indexFile = parent.findIndex(element => (!element.isDirectory && element.filename === filename))
if (indexFile === -1) {
let modified = new Date(payload.item.modified * 1000)
parent.push({
isDirectory: false,
@@ -123,26 +126,88 @@ export default {
modified: modified,
size: payload.item.size,
metadataPulled: false,
});
} else Vue.prototype.$socket.sendObj("server.files.metadata", { filename: payload.item.path }, "files/getMetadata")
})
} else {
parent[indexFile].modified = new Date(payload.item.modified * 1000)
parent[indexFile].size = payload.item.size
parent[indexFile].metadataPulled = false
Vue.prototype.$socket.sendObj("server.files.metadata", { filename: payload.item.path }, "files/getMetadata")
}
}
},
setMoveItem(state, payload) {
let filenameOld = payload.source_item.path.substr(payload.source_item.path.lastIndexOf("/")+1);
let oldPath = payload.source_item.path.substr(0, payload.source_item.path.lastIndexOf("/") + 1);
setMoveFile(state, payload) {
let filenameOld = payload.source_item.path.substr(payload.source_item.path.lastIndexOf("/")+1)
let oldPath = payload.source_item.path.substr(0, payload.source_item.path.lastIndexOf("/") + 1)
let filenameNew = payload.item.path.substr(payload.item.path.lastIndexOf("/")+1);
let newPath = payload.item.path.substr(0, payload.item.path.lastIndexOf("/") + 1);
let filenameNew = payload.item.path.substr(payload.item.path.lastIndexOf("/")+1)
let newPath = payload.item.path.substr(0, payload.item.path.lastIndexOf("/") + 1)
oldPath = findDirectory(state.filetree, (payload.source_item.root+"/"+oldPath).split("/"));
let indexFile = oldPath.findIndex(element => element.filename === filenameOld);
oldPath = findDirectory(state.filetree, (payload.source_item.root+"/"+oldPath).split("/"))
let indexFile = oldPath.findIndex(element => element.filename === filenameOld)
if (indexFile >= 0 && oldPath[indexFile]) {
let file = oldPath.splice(indexFile, 1)[0];
file.filename = filenameNew;
newPath = findDirectory(state.filetree, (payload.item.root+"/"+newPath).split("/"));
newPath.push(file);
let file = oldPath.splice(indexFile, 1)[0]
file.filename = filenameNew
//cleanup thumbnails and force reload
if (
'metadataPulled' in file &&
file.metadataPulled &&
'thumbnails' in file
) {
file.metadataPulled = false
delete file.thumbnails
}
newPath = findDirectory(state.filetree, (payload.item.root+"/"+newPath).split("/"))
newPath.push(file)
}
},
setModifyFile(state, payload) {
window.console.log(payload)
window.console.log(state)
const filename = payload.item.path.substr(payload.item.path.lastIndexOf("/")+1)
const filepath = payload.item.path.substr(0, payload.item.path.lastIndexOf("/") + 1)
const path = findDirectory(state.filetree, (payload.item.root+"/"+filepath).split("/"))
const indexFile = path.findIndex(element => element.filename === filename)
if (indexFile >= 0 && path[indexFile]) {
if (
'metadataPulled' in path[indexFile] &&
path[indexFile].metadataPulled
) {
path[indexFile].metadataPulled = false
if ('thumbnails' in path[indexFile])
delete path[indexFile].thumbnails
}
path[indexFile].modified = new Date(payload.item.modified*1000)
path[indexFile].size = payload.item.size
}
},
setMoveDir(state, payload) {
const dirnameOld = payload.source_item.path.substr(payload.source_item.path.lastIndexOf("/")+1)
let oldPath = payload.source_item.path.substr(0, payload.source_item.path.lastIndexOf("/") + 1)
const dirnameNew = payload.item.path.substr(payload.item.path.lastIndexOf("/")+1)
let newPath = payload.item.path.substr(0, payload.item.path.lastIndexOf("/") + 1)
oldPath = findDirectory(state.filetree, (payload.source_item.root+"/"+oldPath).split("/"))
let indexDir = oldPath.findIndex(element => element.filename === dirnameOld)
if (indexDir >= 0 && oldPath[indexDir]) {
let dir = oldPath.splice(indexDir, 1)[0]
dir.filename = dirnameNew
newPath = findDirectory(state.filetree, (payload.item.root+"/"+newPath).split("/"))
newPath.push(dir)
}
},
@@ -179,6 +244,13 @@ export default {
if (index >= 0 && currentPath[index]) currentPath.splice(index, 1);
},
setRootUpdate(state, payload) {
const index = state.filetree.findIndex(root => root.filename === payload.item.root)
if (index !== -1 && state.filetree[index].childrens.length) {
state.filetree[index].childrens.splice(0, state.filetree[index].childrens.length)
}
},
setDiskUsage(state, payload) {
let path = payload.path
if (path.indexOf('/') !== -1) path = path.substr(0, path.indexOf('/'))
+52
View File
@@ -22,6 +22,19 @@ export default {
delete payload.value.webcam
}
// upgrade custom console filters
if ('console' in payload.value) {
if (
'customFilters' in payload.value.console &&
typeof payload.value.console.customFilters === "string"
) {
dispatch('upgradeConsoleFilters', payload.value.console.customFilters)
delete payload.value.console.customFilters
}
if ("boolCustomFilters" in payload.value.console) delete payload.value.console.boolCustomFilters
}
commit('setData', payload.value)
if ('tempchart' in payload.value && 'datasetSettings' in payload.value.tempchart) {
@@ -100,6 +113,30 @@ export default {
})
},
addConsoleFilter({ commit, dispatch, state }, payload) {
commit("addConsoleFilter", payload)
dispatch('updateSettings', {
keyName: 'console.customFilters',
newVal: state.console.customFilters
})
},
updateConsoleFilter({ commit, dispatch, state }, payload) {
commit("updateConsoleFilter", payload)
dispatch('updateSettings', {
keyName: 'console.customFilters',
newVal: state.console.customFilters
})
},
deleteConsoleFilter({ commit, dispatch, state }, payload) {
commit("deleteConsoleFilter", payload)
dispatch('updateSettings', {
keyName: 'console.customFilters',
newVal: state.console.customFilters
})
},
addWebcam({ commit, dispatch, state }, payload) {
commit("addWebcam", payload)
dispatch('updateSettings', {
@@ -143,6 +180,21 @@ export default {
})
},
upgradeConsoleFilters({ state, dispatch }, payload) {
const rules = payload.split("\n")
if (rules.length) {
rules.forEach((rule) => {
if (rule !== "") {
dispatch("addConsoleFilter", {
name: "Custom "+(state.console.customFilters.length + 1),
regex: rule,
bool: true
})
}
})
}
},
setTempchartDatasetSetting({ commit, dispatch, state }, payload) {
commit("setTempchartDatasetSetting", payload)
dispatch('updateSettings', {
+28
View File
@@ -12,6 +12,34 @@ export default {
return output.sort(caseInsensitiveNameSort)
},
getConsoleFilters:(state) => {
const output = []
for (const [key, filter] of Object.entries(state.console.customFilters)) {
output.push({ ...filter, index: key })
}
return output.sort(caseInsensitiveNameSort)
},
getConsoleFilterRules:(state) => {
const output = []
if (state.console.hideWaitTemperatures)
output.push('^(?:ok\\s+)?(B|C|T\\d*):')
state.console.customFilters.filter((filter) => filter.bool === true).forEach((filter) => {
const splits = filter.regex.split("\n")
splits.forEach((rule) => {
if (rule !== "") {
output.push(rule)
}
})
})
return output
},
getWebcams:(state) => {
const output = []
+1 -2
View File
@@ -58,8 +58,7 @@ export function getDefaultState() {
},
console: {
hideWaitTemperatures: true,
boolCustomFilters: false,
customFilters: "",
customFilters: [],
},
gcodefiles: {
countPerPage: 10,
+22
View File
@@ -68,6 +68,28 @@ export default {
}
},
addConsoleFilter(state, payload) {
state.console.customFilters.push({
name: payload.name,
regex: payload.regex,
bool: payload.bool
})
},
updateConsoleFilter(state, payload) {
if (state.console.customFilters[payload.index]) {
Vue.set(state.console.customFilters[payload.index], 'name', payload.name)
Vue.set(state.console.customFilters[payload.index], 'regex', payload.regex)
Vue.set(state.console.customFilters[payload.index], 'bool', payload.bool)
}
},
deleteConsoleFilter(state, payload) {
if (state.console.customFilters[payload.index]) {
state.console.customFilters.splice(payload.index, 1)
}
},
addWebcam(state, payload) {
const newWebcam = {
name: payload.name,
+6 -5
View File
@@ -134,13 +134,13 @@ export default {
let nameSplit = key.split(" ")
if (nameSplit[0] === "temperature_sensor") {
let icon = "mdi-thermometer"
let icon = "thermometer"
let min_temp = (state.configfile.config[key] && state.configfile.config[key].min_temp) ? parseInt(state.configfile.config[key].min_temp) : 0
let max_temp = (state.configfile.config[key] && state.configfile.config[key].max_temp) ? parseInt(state.configfile.config[key].max_temp) : 210
let split = (max_temp - min_temp) / 3
if (value.temperature <= min_temp + split) icon = "mdi-thermometer-low"
if (value.temperature >= max_temp - split) icon = "mdi-thermometer-high"
if (value.temperature <= min_temp + split) icon = "thermometer-low"
if (value.temperature >= max_temp - split) icon = "thermometer-high"
@@ -398,13 +398,14 @@ export default {
})
},
getFilamentSwitchSensors: state => {
getFilamentSensors: state => {
const sensorObjectNames = ['filament_switch_sensor', 'filament_motion_sensor']
let sensors = []
for (let [key, value] of Object.entries(state)) {
let nameSplit = key.split(" ")
if (nameSplit[0] === "filament_switch_sensor") {
if (sensorObjectNames.includes(nameSplit[0])) {
sensors.push({
name: nameSplit[1],
enabled: value.enabled,
+6
View File
@@ -100,4 +100,10 @@ export default {
getGcodeRespond({commit}, data) {
commit('addEvent', data);
},
addRootDirectory({ commit, state }, data) {
if (!state.registered_directories.includes(data.item.root)) {
commit('addRootDirectory', { name: data.item.root })
}
}
}
+8 -15
View File
@@ -1,22 +1,15 @@
export default {
getFilterdEvents: (state, getters, rootState) => {
getFilterdEvents: (state, getters, rootState, rootGetters) => {
let events = state.events
if (rootState.gui.console.hideWaitTemperatures) {
const regex = new RegExp('^(?:ok\\s+)?(B|C|T\\d*):')
events = events.filter(event => !regex.test(event.message))
}
if (rootState.gui.console.boolCustomFilters) {
const filters = rootState.gui.console.customFilters.split('\n')
filters.forEach(filter => {
try {
const regex = new RegExp(filter)
events = events.filter(event => !regex.test(event.message))
} catch { window.console.error("Custom console filter '"+filter+"' doesn't work")}
})
}
const filters = rootGetters["gui/getConsoleFilterRules"]
filters.forEach(filter => {
try {
const regex = new RegExp(filter)
events = events.filter(event => !regex.test(event.message))
} catch { window.console.error("Custom console filter '"+filter+"' doesn't work")}
})
return events
},
+4
View File
@@ -76,4 +76,8 @@ export default {
type: type,
})
},
addRootDirectory(state, payload) {
state.registered_directories.push(payload.name)
}
}
+27 -4
View File
@@ -57,26 +57,49 @@ export default {
case 'notify_filelist_changed':
switch(payload.params[0].action) {
case 'upload_file':
commit('files/setUploadFile', payload.params[0], { root: true })
case 'create_file':
commit('files/setCreateFile', payload.params[0], { root: true })
break
case 'move_file':
commit('files/setMoveFile', payload.params[0], { root: true })
break
case 'delete_file':
commit('files/setDeleteFile', payload.params[0], { root: true })
break
case 'move_item':
commit('files/setMoveItem', payload.params[0], { root: true })
case 'modify_file':
commit('files/setModifyFile', payload.params[0], { root: true })
break
case 'create_dir':
commit('files/setCreateDir', payload.params[0], { root: true })
break
case 'move_dir':
commit('files/setMoveDir', payload.params[0], { root: true })
break
case 'delete_dir':
commit('files/setDeleteDir', payload.params[0], { root: true })
break
case 'root_update':
dispatch('server/addRootDirectory', payload.params[0], { root: true })
commit('files/setRootUpdate', payload.params[0], { root: true })
break
//old notify... can delete in july
case 'upload_file':
commit('files/setCreateFile', payload.params[0], { root: true })
break
//old notify... can delete in july
case 'move_item':
commit('files/setMoveFile', payload.params[0], { root: true })
break
default:
window.console.error("Unknown filelist_changed action: "+payload.params[0].action)
break
+3 -3
View File
@@ -4,9 +4,9 @@ import getters from './getters'
export function getDefaultState() {
return {
remoteMode: process.env.VUE_APP_REMOTE_MODE || (document.location.hostname === "my.mainsail.xyz"),
hostname: process.env.VUE_APP_HOSTNAME || (process.env.VUE_APP_REMOTE_MODE || document.location.hostname === "my.mainsail.xyz" ? "" : window.location.hostname),
port: process.env.VUE_APP_PORT || (process.env.VUE_APP_REMOTE_MODE || document.location.hostname === "my.mainsail.xyz" ? 7125 : window.location.port),
remoteMode: process.env.VUE_APP_REMOTE_MODE === "true" || (document.location.hostname === "my.mainsail.xyz"),
hostname: process.env.VUE_APP_HOSTNAME || (process.env.VUE_APP_REMOTE_MODE === "true" || document.location.hostname === "my.mainsail.xyz" ? "" : window.location.hostname),
port: process.env.VUE_APP_PORT || (process.env.VUE_APP_REMOTE_MODE === "true" || document.location.hostname === "my.mainsail.xyz" ? 7125 : window.location.port),
protocol: document.location.protocol === 'https:' ? 'wss' : 'ws',
reconnectInterval: process.env.VUE_APP_RECONNECT_INTERVAL || 2000,
isConnected: false,
+86 -70
View File
@@ -7,75 +7,91 @@ const packageJson = fs.readFileSync('./package.json')
const version = JSON.parse(packageJson).version || 0
module.exports = {
productionSourceMap: false,
"transpileDependencies": [
"vuetify"
],
pluginOptions: {
i18n: {
locale: 'en',
fallbackLocale: 'en',
localeDir: 'locales',
enableInSFC: true
}
},
configureWebpack: {
plugins: [
new MonacoEditorPlugin({
// https://github.com/Microsoft/monaco-editor-webpack-plugin#options
// Include a subset of languages support
// Some language extensions like typescript are so huge that may impact build performance
// e.g. Build full languages support with webpack 4.0 takes over 80 seconds
// Languages are loaded on demand at runtime
languages: ['css', 'javascript', 'html', 'shell']
}),
new webpack.DefinePlugin({
'process.env': {
PACKAGE_VERSION: '"' + version + '"'
}
}),
generate({
file: '.version',
content: 'v'+version
})
]
},
pwa: {
serviceWorker:false,
iconPaths: {
favicon16: 'img/icons/favicon-16x16.png',
favicon32: 'img/icons/favicon-32x32.png',
appleTouchIcon: 'img/icons/apple-touch-icon-152x152.png',
msTileImage: 'img/icons/mstile-150x150.png'
},
manifestPath: 'manifest.json',
name: 'Mainsail',
themeColor: '#121212',
msTileColor: '#121212',
appleMobileWebAppCapable: 'yes',
appleMobileWebAppStatusBarStyle: 'black',
productionSourceMap: false,
"transpileDependencies": [
"vuetify"
],
pluginOptions: {
i18n: {
locale: 'en',
fallbackLocale: 'en',
localeDir: 'locales',
enableInSFC: true
}
},
configureWebpack: {
plugins: [
new MonacoEditorPlugin({
// https://github.com/Microsoft/monaco-editor-webpack-plugin#options
// Include a subset of languages support
// Some language extensions like typescript are so huge that may impact build performance
// e.g. Build full languages support with webpack 4.0 takes over 80 seconds
// Languages are loaded on demand at runtime
languages: ['css', 'javascript', 'html', 'shell']
}),
new webpack.DefinePlugin({
'process.env': {
PACKAGE_VERSION: '"' + version + '"'
}
}),
generate({
file: '.version',
content: 'v' + version
}),
],
},
css: {
loaderOptions: {
sass: {
sassOptions: {
manifestOptions: {
"short_name": "Mainsail",
"name": "Mainsail",
"start_url": "/",
"display": "standalone",
"theme_color": "#D51F26",
"background_color": "#121212",
"icons": [
{
"src": "./img/icons/icon-196-maskable.png",
"sizes": "196x196",
"type": "image/png",
"purpose": "maskable",
},
{
"src": "./img/icons/icon-512-maskable.png",
"sizes": "512x512",
"type": "image/png",
"purpose": "maskable",
},
]
}
}
}
}
}
},
/*chainWebpack: config => {
config.module
.rule('scss')
.use('sass-loader')
.loader('sass-loader')
.end();
},*/
pwa: {
serviceWorker: false,
iconPaths: {
favicon16: 'img/icons/favicon-16x16.png',
favicon32: 'img/icons/favicon-32x32.png',
appleTouchIcon: 'img/icons/apple-touch-icon-152x152.png',
msTileImage: 'img/icons/mstile-150x150.png'
},
manifestPath: 'manifest.json',
name: 'Mainsail',
themeColor: '#121212',
msTileColor: '#121212',
appleMobileWebAppCapable: 'yes',
appleMobileWebAppStatusBarStyle: 'black',
manifestOptions: {
"short_name": "Mainsail",
"name": "Mainsail",
"start_url": "/",
"display": "standalone",
"theme_color": "#D51F26",
"background_color": "#121212",
"icons": [
{
"src": "./img/icons/icon-196-maskable.png",
"sizes": "196x196",
"type": "image/png",
"purpose": "maskable",
},
{
"src": "./img/icons/icon-512-maskable.png",
"sizes": "512x512",
"type": "image/png",
"purpose": "maskable",
},
]
}
}
}