Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6ea4caf28d | ||
|
|
cc20cf4128 | ||
|
|
27a3c17ec8 | ||
|
|
55ae82e4cf | ||
|
|
e864356f26 | ||
|
|
30875ffb5d | ||
|
|
a966c41561 | ||
|
|
9325e9d93a | ||
|
|
437f459b94 | ||
|
|
0430eee826 | ||
|
|
0825d85000 | ||
|
|
42c353df20 | ||
|
|
78549ef587 | ||
|
|
f16d80745a | ||
|
|
70903ae3cf | ||
|
|
309fc4eee2 | ||
|
|
fed5956500 | ||
|
|
cfaae9831e | ||
|
|
526c1800f2 | ||
|
|
2bf8f8e8e2 | ||
|
|
7750a897e2 | ||
|
|
80c53494f9 | ||
|
|
4ee0f4bd46 | ||
|
|
6d90d320d8 | ||
|
|
b1345d09fa | ||
|
|
b0ebc2eee1 | ||
|
|
9856f5d4db | ||
|
|
00574006b3 | ||
|
|
1854c04d7a | ||
|
|
ab6e0c07dc | ||
|
|
3850d6773a | ||
|
|
e22a88d397 | ||
|
|
08b783c160 | ||
|
|
a9d82f547d | ||
|
|
b009aa17ed | ||
|
|
50767fdd44 | ||
|
|
f203cfed0e | ||
|
|
4ed0ec9c52 | ||
|
|
ad56a0e223 | ||
|
|
dd3ef0f81f | ||
|
|
54205d940a | ||
|
|
893a903ce7 | ||
|
|
68b1863ca1 | ||
|
|
ba6700b80c | ||
|
|
a861e74183 | ||
|
|
0ba6455513 | ||
|
|
b0ae84e54c | ||
|
|
64f62c575e | ||
|
|
7eaf8a492a | ||
|
|
281385bf41 | ||
|
|
40cc81077f | ||
|
|
ba7454da11 | ||
|
|
be12d53c0e | ||
|
|
b84fc03c91 | ||
|
|
1736a5163b | ||
|
|
d470d42b6d | ||
|
|
5fc2d5c775 | ||
|
|
29869b47e3 | ||
|
|
3c7dc54bea | ||
|
|
b51eae1740 | ||
|
|
e2125f3c0d | ||
|
|
12a89c93a9 | ||
|
|
b8e7bab442 | ||
|
|
8047b7703c |
No files matched your search
@@ -15,4 +15,4 @@ For support join our discord server -> [https://discord.gg/skWTwTD](https://disc
|
||||
* [Vue.js](https://vuejs.org/): The Progressive JavaScript Framework
|
||||
* [Vuetify](https://vuetifyjs.com/): Material Design Component Framework for Vue.js
|
||||
|
||||
Massive thanks to the whole [Voron Design](http://vorondesign.com/) community. Without them such a project would not be possible.
|
||||
Massive thanks to the whole [Voron Design](http://vorondesign.com/) community. Without them such a project would not be possible.
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 66 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 382 KiB After Width: | Height: | Size: 336 KiB |
@@ -9,7 +9,13 @@ description: >-
|
||||
|
||||
# {{ page.title }}
|
||||
{{ page.description }}
|
||||
Moonraker has compatibility with Octoprint's legacy file upload API.
|
||||
Moonraker has compatibility with Octoprint's API. To enable octoprint api compatibility,
|
||||
add the following to your `moonraker.conf and restart Moonraker.
|
||||
|
||||
```
|
||||
[octoprint_compat]
|
||||
```
|
||||
|
||||
|
||||
### PrusaSlicer/SuperSlicer (prior to v2.3.0)
|
||||
|
||||
@@ -21,3 +27,9 @@ For "API Key" you can type anything.
|
||||
### PrusaSlicer/SuperSlicer (since v2.3.0)
|
||||
A "Physical Printer" must be defined to configure the settings from above.
|
||||
More detailed instructions will follow.
|
||||
|
||||
### Cura with OctoPrint-Connect
|
||||
Install the OctoPrint-Connection plugin via Marketplace. In `Settings > Printer > Manage Printers...`
|
||||
you can find the Button `Connect OctoPrint`. Add your printer and type anything in the `API Key` field.
|
||||
|
||||

|
||||
Generated
+208
-86
@@ -15,7 +15,7 @@
|
||||
"object-assign-deep": "^0.4.0",
|
||||
"plotly.js": "^1.58.4",
|
||||
"prismjs": "^1.23.0",
|
||||
"semver": "^5.7.1",
|
||||
"semver": "^7.3.4",
|
||||
"vue": "^2.6.12",
|
||||
"vue-context": "^6.0.0",
|
||||
"vue-github-api": "^0.1.7",
|
||||
@@ -26,7 +26,7 @@
|
||||
"vue-resource": "^1.5.1",
|
||||
"vue-simple-upload": "^0.1.6",
|
||||
"vue-toast-notification": "^0.6.0",
|
||||
"vuetify": "^2.4.2",
|
||||
"vuetify": "^2.4.5",
|
||||
"vuex": "^3.6.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
@@ -95,6 +95,15 @@
|
||||
"url": "https://opencollective.com/babel"
|
||||
}
|
||||
},
|
||||
"node_modules/@babel/core/node_modules/semver": {
|
||||
"version": "5.7.1",
|
||||
"resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz",
|
||||
"integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==",
|
||||
"dev": true,
|
||||
"bin": {
|
||||
"semver": "bin/semver"
|
||||
}
|
||||
},
|
||||
"node_modules/@babel/generator": {
|
||||
"version": "7.12.11",
|
||||
"resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.12.11.tgz",
|
||||
@@ -140,6 +149,15 @@
|
||||
"@babel/core": "^7.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@babel/helper-compilation-targets/node_modules/semver": {
|
||||
"version": "5.7.1",
|
||||
"resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz",
|
||||
"integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==",
|
||||
"dev": true,
|
||||
"bin": {
|
||||
"semver": "bin/semver"
|
||||
}
|
||||
},
|
||||
"node_modules/@babel/helper-create-class-features-plugin": {
|
||||
"version": "7.12.1",
|
||||
"resolved": "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.12.1.tgz",
|
||||
@@ -1070,6 +1088,15 @@
|
||||
"@babel/core": "^7.0.0-0"
|
||||
}
|
||||
},
|
||||
"node_modules/@babel/plugin-transform-runtime/node_modules/semver": {
|
||||
"version": "5.7.1",
|
||||
"resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz",
|
||||
"integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==",
|
||||
"dev": true,
|
||||
"bin": {
|
||||
"semver": "bin/semver"
|
||||
}
|
||||
},
|
||||
"node_modules/@babel/plugin-transform-shorthand-properties": {
|
||||
"version": "7.12.1",
|
||||
"resolved": "https://registry.npmjs.org/@babel/plugin-transform-shorthand-properties/-/plugin-transform-shorthand-properties-7.12.1.tgz",
|
||||
@@ -1233,6 +1260,15 @@
|
||||
"@babel/core": "^7.0.0-0"
|
||||
}
|
||||
},
|
||||
"node_modules/@babel/preset-env/node_modules/semver": {
|
||||
"version": "5.7.1",
|
||||
"resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz",
|
||||
"integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==",
|
||||
"dev": true,
|
||||
"bin": {
|
||||
"semver": "bin/semver"
|
||||
}
|
||||
},
|
||||
"node_modules/@babel/preset-modules": {
|
||||
"version": "0.1.4",
|
||||
"resolved": "https://registry.npmjs.org/@babel/preset-modules/-/preset-modules-0.1.4.tgz",
|
||||
@@ -5301,6 +5337,15 @@
|
||||
"which": "^1.2.9"
|
||||
}
|
||||
},
|
||||
"node_modules/cross-spawn/node_modules/semver": {
|
||||
"version": "5.7.1",
|
||||
"resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz",
|
||||
"integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==",
|
||||
"dev": true,
|
||||
"bin": {
|
||||
"semver": "bin/semver"
|
||||
}
|
||||
},
|
||||
"node_modules/crypto-browserify": {
|
||||
"version": "3.12.0",
|
||||
"resolved": "https://registry.npmjs.org/crypto-browserify/-/crypto-browserify-3.12.0.tgz",
|
||||
@@ -5546,12 +5591,6 @@
|
||||
"url": "https://opencollective.com/webpack"
|
||||
}
|
||||
},
|
||||
"node_modules/css-loader/node_modules/semver": {
|
||||
"version": "7.3.2",
|
||||
"resolved": "https://registry.npmjs.org/semver/-/semver-7.3.2.tgz",
|
||||
"integrity": "sha512-OrOb32TeeambH6UrhtShmF7CRDqhL6/5XpPNp2DuRH6+9QLw/orhp72j87v8Qa1ScDkvrrBNpZcDejAirJmfXQ==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/css-loader/node_modules/source-map": {
|
||||
"version": "0.6.1",
|
||||
"resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
|
||||
@@ -6795,18 +6834,6 @@
|
||||
"eslint": "^6.2.0 || ^7.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/eslint-plugin-vue/node_modules/semver": {
|
||||
"version": "7.3.2",
|
||||
"resolved": "https://registry.npmjs.org/semver/-/semver-7.3.2.tgz",
|
||||
"integrity": "sha512-OrOb32TeeambH6UrhtShmF7CRDqhL6/5XpPNp2DuRH6+9QLw/orhp72j87v8Qa1ScDkvrrBNpZcDejAirJmfXQ==",
|
||||
"dev": true,
|
||||
"bin": {
|
||||
"semver": "bin/semver.js"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=10"
|
||||
}
|
||||
},
|
||||
"node_modules/eslint-scope": {
|
||||
"version": "4.0.3",
|
||||
"resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-4.0.3.tgz",
|
||||
@@ -6985,12 +7012,6 @@
|
||||
"integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/eslint/node_modules/semver": {
|
||||
"version": "7.3.2",
|
||||
"resolved": "https://registry.npmjs.org/semver/-/semver-7.3.2.tgz",
|
||||
"integrity": "sha512-OrOb32TeeambH6UrhtShmF7CRDqhL6/5XpPNp2DuRH6+9QLw/orhp72j87v8Qa1ScDkvrrBNpZcDejAirJmfXQ==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/eslint/node_modules/shebang-command": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz",
|
||||
@@ -11305,6 +11326,15 @@
|
||||
"semver": "^5.6.0"
|
||||
}
|
||||
},
|
||||
"node_modules/make-dir/node_modules/semver": {
|
||||
"version": "5.7.1",
|
||||
"resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz",
|
||||
"integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==",
|
||||
"dev": true,
|
||||
"bin": {
|
||||
"semver": "bin/semver"
|
||||
}
|
||||
},
|
||||
"node_modules/map-cache": {
|
||||
"version": "0.2.2",
|
||||
"resolved": "https://registry.npmjs.org/map-cache/-/map-cache-0.2.2.tgz",
|
||||
@@ -12072,6 +12102,15 @@
|
||||
"validate-npm-package-license": "^3.0.1"
|
||||
}
|
||||
},
|
||||
"node_modules/normalize-package-data/node_modules/semver": {
|
||||
"version": "5.7.1",
|
||||
"resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz",
|
||||
"integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==",
|
||||
"dev": true,
|
||||
"bin": {
|
||||
"semver": "bin/semver"
|
||||
}
|
||||
},
|
||||
"node_modules/normalize-path": {
|
||||
"version": "3.0.0",
|
||||
"resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz",
|
||||
@@ -12504,6 +12543,15 @@
|
||||
"node": ">=4"
|
||||
}
|
||||
},
|
||||
"node_modules/package-json/node_modules/semver": {
|
||||
"version": "5.7.1",
|
||||
"resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz",
|
||||
"integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==",
|
||||
"dev": true,
|
||||
"bin": {
|
||||
"semver": "bin/semver"
|
||||
}
|
||||
},
|
||||
"node_modules/package-json/node_modules/url-parse-lax": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/url-parse-lax/-/url-parse-lax-1.0.0.tgz",
|
||||
@@ -14734,12 +14782,6 @@
|
||||
"url": "https://opencollective.com/webpack"
|
||||
}
|
||||
},
|
||||
"node_modules/sass-loader/node_modules/semver": {
|
||||
"version": "7.3.2",
|
||||
"resolved": "https://registry.npmjs.org/semver/-/semver-7.3.2.tgz",
|
||||
"integrity": "sha512-OrOb32TeeambH6UrhtShmF7CRDqhL6/5XpPNp2DuRH6+9QLw/orhp72j87v8Qa1ScDkvrrBNpZcDejAirJmfXQ==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/sax": {
|
||||
"version": "1.2.4",
|
||||
"resolved": "https://registry.npmjs.org/sax/-/sax-1.2.4.tgz",
|
||||
@@ -14778,9 +14820,18 @@
|
||||
}
|
||||
},
|
||||
"node_modules/semver": {
|
||||
"version": "5.7.1",
|
||||
"resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz",
|
||||
"integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ=="
|
||||
"version": "7.3.4",
|
||||
"resolved": "https://registry.npmjs.org/semver/-/semver-7.3.4.tgz",
|
||||
"integrity": "sha512-tCfb2WLjqFAtXn4KEdxIhalnRtoKFN7nAwj0B3ZXCbQloV2tq5eDbcTmT68JJD3nRJq24/XgxtQKFIpQdtvmVw==",
|
||||
"dependencies": {
|
||||
"lru-cache": "^6.0.0"
|
||||
},
|
||||
"bin": {
|
||||
"semver": "bin/semver.js"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=10"
|
||||
}
|
||||
},
|
||||
"node_modules/semver-diff": {
|
||||
"version": "2.1.0",
|
||||
@@ -14794,6 +14845,31 @@
|
||||
"node": ">=0.10.0"
|
||||
}
|
||||
},
|
||||
"node_modules/semver-diff/node_modules/semver": {
|
||||
"version": "5.7.1",
|
||||
"resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz",
|
||||
"integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==",
|
||||
"dev": true,
|
||||
"bin": {
|
||||
"semver": "bin/semver"
|
||||
}
|
||||
},
|
||||
"node_modules/semver/node_modules/lru-cache": {
|
||||
"version": "6.0.0",
|
||||
"resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz",
|
||||
"integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==",
|
||||
"dependencies": {
|
||||
"yallist": "^4.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=10"
|
||||
}
|
||||
},
|
||||
"node_modules/semver/node_modules/yallist": {
|
||||
"version": "4.0.0",
|
||||
"resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz",
|
||||
"integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A=="
|
||||
},
|
||||
"node_modules/send": {
|
||||
"version": "0.17.1",
|
||||
"resolved": "https://registry.npmjs.org/send/-/send-0.17.1.tgz",
|
||||
@@ -17226,12 +17302,6 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"node_modules/vue-cli-plugin-vuetify/node_modules/semver": {
|
||||
"version": "7.3.2",
|
||||
"resolved": "https://registry.npmjs.org/semver/-/semver-7.3.2.tgz",
|
||||
"integrity": "sha512-OrOb32TeeambH6UrhtShmF7CRDqhL6/5XpPNp2DuRH6+9QLw/orhp72j87v8Qa1ScDkvrrBNpZcDejAirJmfXQ==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/vue-clickaway": {
|
||||
"version": "2.2.2",
|
||||
"resolved": "https://registry.npmjs.org/vue-clickaway/-/vue-clickaway-2.2.2.tgz",
|
||||
@@ -17558,9 +17628,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/vuetify": {
|
||||
"version": "2.4.2",
|
||||
"resolved": "https://registry.npmjs.org/vuetify/-/vuetify-2.4.2.tgz",
|
||||
"integrity": "sha512-8W1928Fv6GKwLiOThutYf2wtD5C9+vcCavlI8NT0YxNOVvluoL8xrep8mGGwDsCkay+4LzaAX92owKeNi3kpWg==",
|
||||
"version": "2.4.5",
|
||||
"resolved": "https://registry.npmjs.org/vuetify/-/vuetify-2.4.5.tgz",
|
||||
"integrity": "sha512-P4bN9xwyU91Iq1iW/XBCzgVMQ9fHG0HgJeiPDRoHzC0fX6ZPYBZIN6xPCuoG7zLyGSSoc6JnQqnO7H5mPEsVuA==",
|
||||
"funding": {
|
||||
"type": "github",
|
||||
"url": "https://github.com/sponsors/johnleider"
|
||||
@@ -18651,6 +18721,14 @@
|
||||
"lodash": "^4.17.19",
|
||||
"semver": "^5.4.1",
|
||||
"source-map": "^0.5.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"semver": {
|
||||
"version": "5.7.1",
|
||||
"resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz",
|
||||
"integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==",
|
||||
"dev": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"@babel/generator": {
|
||||
@@ -18693,6 +18771,14 @@
|
||||
"@babel/helper-validator-option": "^7.12.1",
|
||||
"browserslist": "^4.14.5",
|
||||
"semver": "^5.5.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"semver": {
|
||||
"version": "5.7.1",
|
||||
"resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz",
|
||||
"integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==",
|
||||
"dev": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"@babel/helper-create-class-features-plugin": {
|
||||
@@ -19446,6 +19532,14 @@
|
||||
"@babel/helper-module-imports": "^7.12.5",
|
||||
"@babel/helper-plugin-utils": "^7.10.4",
|
||||
"semver": "^5.5.1"
|
||||
},
|
||||
"dependencies": {
|
||||
"semver": {
|
||||
"version": "5.7.1",
|
||||
"resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz",
|
||||
"integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==",
|
||||
"dev": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"@babel/plugin-transform-shorthand-properties": {
|
||||
@@ -19585,6 +19679,14 @@
|
||||
"@babel/types": "^7.12.11",
|
||||
"core-js-compat": "^3.8.0",
|
||||
"semver": "^5.5.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"semver": {
|
||||
"version": "5.7.1",
|
||||
"resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz",
|
||||
"integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==",
|
||||
"dev": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"@babel/preset-modules": {
|
||||
@@ -20328,7 +20430,6 @@
|
||||
"integrity": "sha512-IHOyfWqgNNM863NjGmX6s2MIF+ILkJZardHcr7bGrxu5mNBT+p0GOGRQU4sN/adDkEQ9cyAxokm/GIeeoRrnOg==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@babel/core": "^7.11.0",
|
||||
"@babel/helper-compilation-targets": "^7.9.6",
|
||||
"@babel/helper-module-imports": "^7.8.3",
|
||||
"@babel/plugin-proposal-class-properties": "^7.8.3",
|
||||
@@ -20341,7 +20442,6 @@
|
||||
"@vue/babel-plugin-jsx": "^1.0.0-0",
|
||||
"@vue/babel-preset-jsx": "^1.1.2",
|
||||
"babel-plugin-dynamic-import-node": "^2.3.3",
|
||||
"core-js": "^3.6.5",
|
||||
"core-js-compat": "^3.6.5",
|
||||
"semver": "^6.1.0"
|
||||
},
|
||||
@@ -23495,6 +23595,14 @@
|
||||
"semver": "^5.5.0",
|
||||
"shebang-command": "^1.2.0",
|
||||
"which": "^1.2.9"
|
||||
},
|
||||
"dependencies": {
|
||||
"semver": {
|
||||
"version": "5.7.1",
|
||||
"resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz",
|
||||
"integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==",
|
||||
"dev": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"crypto-browserify": {
|
||||
@@ -23687,12 +23795,6 @@
|
||||
"ajv-keywords": "^3.5.2"
|
||||
}
|
||||
},
|
||||
"semver": {
|
||||
"version": "7.3.2",
|
||||
"resolved": "https://registry.npmjs.org/semver/-/semver-7.3.2.tgz",
|
||||
"integrity": "sha512-OrOb32TeeambH6UrhtShmF7CRDqhL6/5XpPNp2DuRH6+9QLw/orhp72j87v8Qa1ScDkvrrBNpZcDejAirJmfXQ==",
|
||||
"dev": true
|
||||
},
|
||||
"source-map": {
|
||||
"version": "0.6.1",
|
||||
"resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
|
||||
@@ -25044,12 +25146,6 @@
|
||||
"integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==",
|
||||
"dev": true
|
||||
},
|
||||
"semver": {
|
||||
"version": "7.3.2",
|
||||
"resolved": "https://registry.npmjs.org/semver/-/semver-7.3.2.tgz",
|
||||
"integrity": "sha512-OrOb32TeeambH6UrhtShmF7CRDqhL6/5XpPNp2DuRH6+9QLw/orhp72j87v8Qa1ScDkvrrBNpZcDejAirJmfXQ==",
|
||||
"dev": true
|
||||
},
|
||||
"shebang-command": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz",
|
||||
@@ -25132,14 +25228,6 @@
|
||||
"natural-compare": "^1.4.0",
|
||||
"semver": "^7.3.2",
|
||||
"vue-eslint-parser": "^7.3.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"semver": {
|
||||
"version": "7.3.2",
|
||||
"resolved": "https://registry.npmjs.org/semver/-/semver-7.3.2.tgz",
|
||||
"integrity": "sha512-OrOb32TeeambH6UrhtShmF7CRDqhL6/5XpPNp2DuRH6+9QLw/orhp72j87v8Qa1ScDkvrrBNpZcDejAirJmfXQ==",
|
||||
"dev": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"eslint-scope": {
|
||||
@@ -29186,6 +29274,14 @@
|
||||
"requires": {
|
||||
"pify": "^4.0.1",
|
||||
"semver": "^5.6.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"semver": {
|
||||
"version": "5.7.1",
|
||||
"resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz",
|
||||
"integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==",
|
||||
"dev": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"map-cache": {
|
||||
@@ -29951,6 +30047,14 @@
|
||||
"resolve": "^1.10.0",
|
||||
"semver": "2 || 3 || 4 || 5",
|
||||
"validate-npm-package-license": "^3.0.1"
|
||||
},
|
||||
"dependencies": {
|
||||
"semver": {
|
||||
"version": "5.7.1",
|
||||
"resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz",
|
||||
"integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==",
|
||||
"dev": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"normalize-path": {
|
||||
@@ -30380,6 +30484,12 @@
|
||||
"url-parse-lax": "^1.0.0"
|
||||
}
|
||||
},
|
||||
"semver": {
|
||||
"version": "5.7.1",
|
||||
"resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz",
|
||||
"integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==",
|
||||
"dev": true
|
||||
},
|
||||
"url-parse-lax": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/url-parse-lax/-/url-parse-lax-1.0.0.tgz",
|
||||
@@ -32570,12 +32680,6 @@
|
||||
"ajv": "^6.12.5",
|
||||
"ajv-keywords": "^3.5.2"
|
||||
}
|
||||
},
|
||||
"semver": {
|
||||
"version": "7.3.2",
|
||||
"resolved": "https://registry.npmjs.org/semver/-/semver-7.3.2.tgz",
|
||||
"integrity": "sha512-OrOb32TeeambH6UrhtShmF7CRDqhL6/5XpPNp2DuRH6+9QLw/orhp72j87v8Qa1ScDkvrrBNpZcDejAirJmfXQ==",
|
||||
"dev": true
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -32617,9 +32721,27 @@
|
||||
}
|
||||
},
|
||||
"semver": {
|
||||
"version": "5.7.1",
|
||||
"resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz",
|
||||
"integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ=="
|
||||
"version": "7.3.4",
|
||||
"resolved": "https://registry.npmjs.org/semver/-/semver-7.3.4.tgz",
|
||||
"integrity": "sha512-tCfb2WLjqFAtXn4KEdxIhalnRtoKFN7nAwj0B3ZXCbQloV2tq5eDbcTmT68JJD3nRJq24/XgxtQKFIpQdtvmVw==",
|
||||
"requires": {
|
||||
"lru-cache": "^6.0.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"lru-cache": {
|
||||
"version": "6.0.0",
|
||||
"resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz",
|
||||
"integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==",
|
||||
"requires": {
|
||||
"yallist": "^4.0.0"
|
||||
}
|
||||
},
|
||||
"yallist": {
|
||||
"version": "4.0.0",
|
||||
"resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz",
|
||||
"integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A=="
|
||||
}
|
||||
}
|
||||
},
|
||||
"semver-diff": {
|
||||
"version": "2.1.0",
|
||||
@@ -32628,6 +32750,14 @@
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"semver": "^5.0.3"
|
||||
},
|
||||
"dependencies": {
|
||||
"semver": {
|
||||
"version": "5.7.1",
|
||||
"resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz",
|
||||
"integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==",
|
||||
"dev": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"send": {
|
||||
@@ -35019,14 +35149,6 @@
|
||||
"null-loader": "^3.0.0",
|
||||
"semver": "^7.1.2",
|
||||
"shelljs": "^0.8.3"
|
||||
},
|
||||
"dependencies": {
|
||||
"semver": {
|
||||
"version": "7.3.2",
|
||||
"resolved": "https://registry.npmjs.org/semver/-/semver-7.3.2.tgz",
|
||||
"integrity": "sha512-OrOb32TeeambH6UrhtShmF7CRDqhL6/5XpPNp2DuRH6+9QLw/orhp72j87v8Qa1ScDkvrrBNpZcDejAirJmfXQ==",
|
||||
"dev": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"vue-clickaway": {
|
||||
@@ -35305,9 +35427,9 @@
|
||||
"requires": {}
|
||||
},
|
||||
"vuetify": {
|
||||
"version": "2.4.2",
|
||||
"resolved": "https://registry.npmjs.org/vuetify/-/vuetify-2.4.2.tgz",
|
||||
"integrity": "sha512-8W1928Fv6GKwLiOThutYf2wtD5C9+vcCavlI8NT0YxNOVvluoL8xrep8mGGwDsCkay+4LzaAX92owKeNi3kpWg==",
|
||||
"version": "2.4.5",
|
||||
"resolved": "https://registry.npmjs.org/vuetify/-/vuetify-2.4.5.tgz",
|
||||
"integrity": "sha512-P4bN9xwyU91Iq1iW/XBCzgVMQ9fHG0HgJeiPDRoHzC0fX6ZPYBZIN6xPCuoG7zLyGSSoc6JnQqnO7H5mPEsVuA==",
|
||||
"requires": {}
|
||||
},
|
||||
"vuetify-loader": {
|
||||
|
||||
+3
-3
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "mainsail",
|
||||
"version": "1.3.0",
|
||||
"version": "1.4.0",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"serve": "vue-cli-service serve",
|
||||
@@ -16,7 +16,7 @@
|
||||
"object-assign-deep": "^0.4.0",
|
||||
"plotly.js": "^1.58.4",
|
||||
"prismjs": "^1.23.0",
|
||||
"semver": "^5.7.1",
|
||||
"semver": "^7.3.4",
|
||||
"vue": "^2.6.12",
|
||||
"vue-context": "^6.0.0",
|
||||
"vue-github-api": "^0.1.7",
|
||||
@@ -27,7 +27,7 @@
|
||||
"vue-resource": "^1.5.1",
|
||||
"vue-simple-upload": "^0.1.6",
|
||||
"vue-toast-notification": "^0.6.0",
|
||||
"vuetify": "^2.4.2",
|
||||
"vuetify": "^2.4.5",
|
||||
"vuex": "^3.6.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
|
||||
+15
-6
@@ -1,6 +1,8 @@
|
||||
<style>
|
||||
@import './assets/styles/fonts.css';
|
||||
@import './assets/styles/toastr.css';
|
||||
@import './assets/styles/page.scss';
|
||||
@import './assets/styles/utils.scss';
|
||||
|
||||
.button-min-width-auto {
|
||||
min-width: auto !important;
|
||||
@@ -80,14 +82,14 @@
|
||||
<v-app-bar app elevate-on-scroll>
|
||||
<v-app-bar-nav-icon @click.stop="drawer = !drawer"></v-app-bar-nav-icon>
|
||||
<v-spacer></v-spacer>
|
||||
<input type="file" ref="fileUploadAndStart" accept=".gcode, .ufp" style="display: none" @change="uploadAndStart" />
|
||||
<input type="file" ref="fileUploadAndStart" :accept="validGcodeExtensions.join(', ')" style="display: none" @change="uploadAndStart" />
|
||||
<v-btn color="primary" class="mr-5 d-none d-sm-flex" v-if="isConnected && save_config_pending" :disabled="['printing', 'paused'].includes(printer_state)" :loading="loadings.includes['topbarSaveConfig']" @click="clickSaveConfig">SAVE CONFIG</v-btn>
|
||||
<v-btn color="primary" class="mr-5 d-none d-sm-flex" v-if="isConnected && ['standby', 'complete'].includes(printer_state)" :loading="loadings.includes['btnUploadAndStart']" @click="btnUploadAndStart"><v-icon class="mr-2">mdi-file-upload</v-icon>Upload & Print</v-btn>
|
||||
<v-btn color="error" class="button-min-width-auto px-3" v-if="isConnected" :loading="loadings.includes['topbarEmergencyStop']" @click="clickEmergencyStop"><v-icon class="mr-sm-2">mdi-alert-circle-outline</v-icon><span class="d-none d-sm-flex">Emergency Stop</span></v-btn>
|
||||
<top-corner-menu></top-corner-menu>
|
||||
</v-app-bar>
|
||||
|
||||
<v-main id="content">
|
||||
<v-main id="content" v-bind:style="{background:mainBackground,backgroundAttachment:'fixed',backgroundSize: 'cover',backgroundRepeat: 'no-repeat'}">
|
||||
<v-scroll-y-transition>
|
||||
<v-container fluid id="page-container" class="container px-3 px-sm-6 py-sm-6 mx-auto">
|
||||
<keep-alive>
|
||||
@@ -133,10 +135,11 @@
|
||||
import { mapState, mapGetters } from 'vuex'
|
||||
import TopCornerMenu from "@/components/TopCornerMenu"
|
||||
import UpdateDialog from "@/components/UpdateDialog"
|
||||
import ConnectingDialog from "@/components/ConnectingDialog";
|
||||
import SelectPrinterDialog from "@/components/SelectPrinterDialog";
|
||||
import ConnectingDialog from "@/components/ConnectingDialog"
|
||||
import SelectPrinterDialog from "@/components/SelectPrinterDialog"
|
||||
import PrinterSelecter from "@/components/PrinterSelecter"
|
||||
import axios from "axios";
|
||||
import axios from "axios"
|
||||
import { validGcodeExtensions } from "@/store/variables"
|
||||
|
||||
export default {
|
||||
props: {
|
||||
@@ -165,7 +168,8 @@ export default {
|
||||
time: 0,
|
||||
loaded: 0
|
||||
}
|
||||
}
|
||||
},
|
||||
validGcodeExtensions: validGcodeExtensions
|
||||
}),
|
||||
created () {
|
||||
this.$vuetify.theme.dark = true;
|
||||
@@ -219,6 +223,11 @@ export default {
|
||||
return this.$store.getters["files/getSidebarBackground"]
|
||||
}
|
||||
},
|
||||
mainBackground: {
|
||||
get() {
|
||||
return this.$store.getters["files/getMainBackground"]
|
||||
}
|
||||
},
|
||||
customStylesheet: {
|
||||
get() {
|
||||
return this.$store.getters["files/getCustomStylesheet"]
|
||||
|
||||
@@ -0,0 +1,35 @@
|
||||
.fill-width {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.mb-fix-2 {
|
||||
margin-bottom: -8px!important;
|
||||
}
|
||||
.mr-fix-2 {
|
||||
margin-right: -8px!important;
|
||||
}
|
||||
.mr-fix-1 {
|
||||
margin-right: -4px!important;
|
||||
}
|
||||
|
||||
.gutter-2 {
|
||||
margin: -2px!important;
|
||||
}
|
||||
.gutter-2 > .col, .gutter-2 > [class*=col-] {
|
||||
padding: 1px!important;
|
||||
}
|
||||
|
||||
.w-100 {
|
||||
width: 100%!important;
|
||||
}
|
||||
.h-100 {
|
||||
height: 100%!important;
|
||||
}
|
||||
|
||||
.p-abs {
|
||||
position: absolute!important;
|
||||
}
|
||||
|
||||
.p-rel {
|
||||
position: relative!important;
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
@mixin no-select {
|
||||
-webkit-touch-callout: none;
|
||||
-webkit-user-select: none;
|
||||
-khtml-user-select: none;
|
||||
-moz-user-select: none;
|
||||
-ms-user-select: none;
|
||||
user-select: none;
|
||||
}
|
||||
|
||||
.user-select-none {
|
||||
-webkit-touch-callout: none;
|
||||
-webkit-user-select: none;
|
||||
-khtml-user-select: none;
|
||||
-moz-user-select: none;
|
||||
-ms-user-select: none;
|
||||
user-select: none;
|
||||
}
|
||||
@@ -65,7 +65,6 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
connect() {
|
||||
window.console.log("save connection")
|
||||
Vue.prototype.$socket.setUrl(this.protocol+"://"+this.hostname+":"+this.port+"/websocket")
|
||||
Vue.prototype.$socket.connect()
|
||||
},
|
||||
|
||||
@@ -120,7 +120,7 @@
|
||||
<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-col class="rounded transition-swing secondary py-2 px-2 mb-6" style="cursor: pointer;" @click="connect(printer)">
|
||||
<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">
|
||||
<v-progress-circular
|
||||
@@ -142,7 +142,7 @@
|
||||
<v-col>
|
||||
<p class="text-center" v-if="this['farm/countPrinters'] === 0">Hello and welcome to the remote mode of Mainsail!</p>
|
||||
<p class="text-center">Please remember to add <code>{{ currentUrl }}</code> in moonraker.conf within "cors_domains".</p>
|
||||
<p class="text-center">You can find more details at <a href="https://docs.mainsail.xyz/remotemode" target="_blank">docs.mainsail.xyz/remotemode</a>.</p>
|
||||
<p class="text-center mb-0">You can find more details at <a href="https://docs.mainsail.xyz/remotemode" target="_blank">docs.mainsail.xyz/remotemode</a>.</p>
|
||||
</v-col>
|
||||
</v-row>
|
||||
<v-row>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<div id="tempchart" style="height: 250px; width: 100%;"></div>
|
||||
<div id="tempchart" style="height: 250px; width: 100%;" v-observe-visibility="visibilityChanged"></div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
@@ -16,7 +16,7 @@ export default {
|
||||
chart : null,
|
||||
timerChart: '',
|
||||
timerDataset: '',
|
||||
chartFocus: false,
|
||||
isVisable: true,
|
||||
chartOptions: {
|
||||
darkMode: true,
|
||||
animation: false,
|
||||
@@ -36,7 +36,7 @@ export default {
|
||||
let outputTime = datasets[0]['axisValueLabel']
|
||||
outputTime = outputTime.substr(outputTime.indexOf(" "))
|
||||
|
||||
output += "<div class=\"row mb-2\">" +
|
||||
output += "<div class=\"row\">" +
|
||||
"<div class=\"col py-1\" style='border-bottom: 1px solid rgba(255, 255, 255, 0.24);'>" +
|
||||
"<span class='v-icon mdi mdi-clock theme-dark' style='font-size: 14px; margin-right: 5px;'></span>" +
|
||||
"<span class='font-weight-bold'>"+outputTime+"</span>" +
|
||||
@@ -51,7 +51,7 @@ export default {
|
||||
!dataset.seriesName.endsWith('_speed')
|
||||
) {
|
||||
output += "<div class=\"row\">"
|
||||
output += "<div class=\"col-auto pt-2 pb-1\">"
|
||||
output += "<div class=\"col-auto py-0\">"
|
||||
|
||||
const mainDataset = this.series.find(tmpDataset => tmpDataset.name === dataset.seriesName)
|
||||
if (mainDataset)
|
||||
@@ -67,7 +67,7 @@ export default {
|
||||
output += convertName(dataset.seriesName)+":"
|
||||
|
||||
output += "</div>"
|
||||
output += "<div class=\"col text-right pt-2 pb-1 font-weight-bold\">"
|
||||
output += "<div class=\"col text-right py-0 font-weight-bold\">"
|
||||
|
||||
if (dataset.value[1]) output += dataset.value[1].toFixed(1)
|
||||
|
||||
@@ -93,7 +93,7 @@ export default {
|
||||
grid: {
|
||||
top: 35,
|
||||
right: 25,
|
||||
bottom: 25,
|
||||
bottom: 30,
|
||||
left: 25,
|
||||
},
|
||||
dataZoom: [{
|
||||
@@ -180,43 +180,6 @@ export default {
|
||||
},
|
||||
],
|
||||
series: [],
|
||||
media: [{
|
||||
query: {
|
||||
minWidth: 500,
|
||||
},
|
||||
option: {
|
||||
xAxis: {
|
||||
//splitNumber: 10,
|
||||
}
|
||||
}
|
||||
}, {
|
||||
query: {
|
||||
minWidth: 500,
|
||||
},
|
||||
option: {
|
||||
grid: {
|
||||
right: 40,
|
||||
left: 40,
|
||||
},
|
||||
yAxis: [
|
||||
{
|
||||
maxInterval: 50,
|
||||
axisLabel: {
|
||||
showMinLabel: false,
|
||||
showMaxLabel: true,
|
||||
rotate: 0
|
||||
}
|
||||
},
|
||||
{
|
||||
maxInterval: 25,
|
||||
axisLabel: {
|
||||
showMinLabel: false,
|
||||
rotate: 0
|
||||
}
|
||||
},
|
||||
],
|
||||
}
|
||||
}],
|
||||
},
|
||||
}
|
||||
},
|
||||
@@ -255,6 +218,11 @@ export default {
|
||||
get() {
|
||||
return this.$store.getters["printer/tempHistory/getCurrentMaxTemp"]
|
||||
}
|
||||
},
|
||||
boolDisplayPwmAxis: {
|
||||
get() {
|
||||
return this.$store.getters["printer/tempHistory/getBoolDisplayPwmAxis"]
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
@@ -266,23 +234,70 @@ export default {
|
||||
this.createChart()
|
||||
}, 500)
|
||||
},
|
||||
visibilityChanged (isVisible) {
|
||||
this.isVisible = isVisible
|
||||
if(isVisible) this.chart.resize()
|
||||
},
|
||||
},
|
||||
created() {
|
||||
this.timerChart = setInterval(() => {
|
||||
if (
|
||||
this.chart &&
|
||||
this.boolTempchart &&
|
||||
document.visibilityState === "visible" &&
|
||||
this.$route.path === "/"
|
||||
this.isVisable
|
||||
) {
|
||||
this.chart.setOption({
|
||||
series: this.series,
|
||||
grid: {
|
||||
left: 25,
|
||||
right: this.boolDisplayPwmAxis ? 25 : 15,
|
||||
},
|
||||
xAxis: {
|
||||
min: new Date() - this.maxHistory * 1000,
|
||||
max: new Date(),
|
||||
},
|
||||
yAxis: [{
|
||||
axisLabel: {
|
||||
rotate: 90,
|
||||
showMinLabel: true,
|
||||
margin: 5,
|
||||
},
|
||||
max: this.autoscale ? this.currentMaxTemp : this.maxTemp,
|
||||
}, {
|
||||
show: this.boolDisplayPwmAxis,
|
||||
axisLabel: {
|
||||
showMinLabel: true,
|
||||
rotate: 90,
|
||||
margin: 5,
|
||||
}
|
||||
}],
|
||||
media: [{
|
||||
query: {
|
||||
minWidth: 500,
|
||||
},
|
||||
option: {
|
||||
grid: {
|
||||
right: this.boolDisplayPwmAxis ? 40 : 15,
|
||||
left: 40,
|
||||
},
|
||||
yAxis: [
|
||||
{
|
||||
maxInterval: 50,
|
||||
axisLabel: {
|
||||
showMinLabel: false,
|
||||
showMaxLabel: true,
|
||||
rotate: 0
|
||||
}
|
||||
},
|
||||
{
|
||||
maxInterval: 25,
|
||||
axisLabel: {
|
||||
showMinLabel: false,
|
||||
rotate: 0
|
||||
}
|
||||
},
|
||||
],
|
||||
}
|
||||
}],
|
||||
})
|
||||
}
|
||||
@@ -298,6 +313,6 @@ export default {
|
||||
},
|
||||
mounted: function() {
|
||||
this.createChart()
|
||||
}
|
||||
},
|
||||
}
|
||||
</script>
|
||||
@@ -1,58 +1,280 @@
|
||||
<style>
|
||||
.btnHomeAxis {
|
||||
width: 36px;
|
||||
min-width: 36px !important;
|
||||
}
|
||||
<style lang="scss">
|
||||
.btnHomeAxis {
|
||||
width: 36px;
|
||||
min-width: 36px !important;
|
||||
}
|
||||
|
||||
.btnMinWidthAuto {
|
||||
min-width: auto !important;
|
||||
.btnMinWidthAuto {
|
||||
min-width: auto !important;
|
||||
}
|
||||
|
||||
.steps {
|
||||
width: 100%;
|
||||
> div {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
> button {
|
||||
flex-grow: 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
<template>
|
||||
<v-card>
|
||||
<v-container class="pt-0">
|
||||
<v-row no-gutters class="" v-if="['standby', 'paused', 'complete', 'error'].includes(printer_state)">
|
||||
<v-col class="col-12 mt-3 pb-0 text-center">
|
||||
<v-btn small @click="doHome" :loading="loadings.includes('homeAll')" :color="homedAxes.includes('xyz') ? 'primary' : 'warning'"><v-icon class="mr-1">mdi-home</v-icon><span class="d-none d-sm-inline">Home </span>all</v-btn>
|
||||
<v-btn small @click="doQGL" :loading="loadings.includes('qgl')" color="primary" class="ml-2" v-if="'quad_gantry_level' in config">QGL</v-btn>
|
||||
<v-btn small @click="doZtilt" :loading="loadings.includes('zTilt')" color="primary" class="ml-2" v-if="'z_tilt' in config">Z Tilt</v-btn>
|
||||
</v-col>
|
||||
</v-row>
|
||||
<v-row no-gutters class="mt-3" v-if="['standby', 'paused', 'complete', 'error'].includes(printer_state)">
|
||||
<v-col class="text-center">
|
||||
<v-btn-toggle dense no-gutters class="row no-gutters mx-auto" style="flex-wrap: nowrap;" >
|
||||
<v-btn @click="doSendMove('X-'+steps, feedrateXY)" class="btnMinWidthAuto col" v-for="steps of stepsXYsorted" v-bind:key="'x-'+steps"><span class="body-2">-{{ steps }}</span></v-btn>
|
||||
<v-btn @click="doHomeX" :color="homedAxes.includes('x') ? 'primary' : 'warning'" :loading="loadings.includes('homeX')" class="font-weight-bold btnHomeAxis">X</v-btn>
|
||||
<v-btn @click="doSendMove('X+'+steps, feedrateXY)" class="btnMinWidthAuto col" v-for="steps of stepsXYsortedReverse" v-bind:key="'x+'+steps"><span class="body-2">+{{ steps }}</span></v-btn>
|
||||
</v-btn-toggle>
|
||||
</v-col>
|
||||
</v-row>
|
||||
<v-row no-gutters class="mt-3" v-if="['standby', 'paused', 'complete', 'error'].includes(printer_state)">
|
||||
<v-col class="text-center">
|
||||
<v-btn-toggle dense no-gutters class="row no-gutters mx-auto" style="flex-wrap: nowrap;" >
|
||||
<v-btn @click="doSendMove('Y-'+steps, feedrateXY)" class="btnMinWidthAuto col" v-for="steps of stepsXYsorted" v-bind:key="'y-'+steps"><span class="body-2">-{{ steps }}</span></v-btn>
|
||||
<v-btn @click="doHomeY" :color="homedAxes.includes('y') ? 'primary' : 'warning'" :loading="loadings.includes('homeY')" class="font-weight-bold btnHomeAxis">Y</v-btn>
|
||||
<v-btn @click="doSendMove('Y+'+steps, feedrateXY)" class="btnMinWidthAuto col" v-for="steps of stepsXYsortedReverse" v-bind:key="'y+'+steps"><span class="body-2">+{{ steps }}</span></v-btn>
|
||||
</v-btn-toggle>
|
||||
</v-col>
|
||||
</v-row>
|
||||
<v-row no-gutters class="mt-3" v-if="['standby', 'paused', 'complete', 'error'].includes(printer_state)">
|
||||
<v-col class="text-center">
|
||||
<v-btn-toggle dense no-gutters class="row no-gutters mx-auto" style="flex-wrap: nowrap;" >
|
||||
<v-btn @click="doSendMove('Z-'+steps, feedrateZ)" class="btnMinWidthAuto col" v-for="steps of stepsZsorted" v-bind:key="'z-'+steps"><span class="body-2">-{{ steps }}</span></v-btn>
|
||||
<v-btn @click="doHomeZ" :color="homedAxes.includes('z') ? 'primary' : 'warning'" :loading="loadings.includes('homeZ')" class="font-weight-bold btnHomeAxis">Z</v-btn>
|
||||
<v-btn @click="doSendMove('Z+'+steps, feedrateZ)" class="btnMinWidthAuto col" v-for="steps of stepsZsortedReverse" v-bind:key="'z+'+steps"><span class="body-2">+{{ steps }}</span></v-btn>
|
||||
</v-btn-toggle>
|
||||
</v-col>
|
||||
</v-row>
|
||||
<v-row no-gutters v-if="this['printer/getMacros'].length > 0">
|
||||
<v-col class="text-center">
|
||||
<v-btn v-for="(macro, index) in this['printer/getMacros']" v-bind:key="index+99" small color="primary" class="mx-1 mt-3" :loading="loadings.includes('macro_'+macro.name)" @click="doSendMacro(macro.name)">{{ macro.name.replace(/_/g, " ") }}</v-btn>
|
||||
</v-col>
|
||||
</v-row>
|
||||
</v-container>
|
||||
</v-card>
|
||||
<div>
|
||||
<v-card class="mb-4" v-if="['standby', 'paused', 'complete', 'error'].includes(printer_state)">
|
||||
<v-toolbar flat dense>
|
||||
<v-toolbar-title>
|
||||
<span class="subheading"><v-icon left>mdi-gamepad</v-icon>Controls</span>
|
||||
</v-toolbar-title>
|
||||
<v-spacer></v-spacer>
|
||||
<v-menu :offset-y="true" :close-on-content-click="false" title="Setup Controls" left>
|
||||
<template v-slot:activator="{ on, attrs }">
|
||||
<v-btn small class="px-2 minwidth-0" color="grey darken-3" v-bind="attrs" v-on="on"><v-icon small>mdi-cog</v-icon></v-btn>
|
||||
</template>
|
||||
<v-list>
|
||||
<v-list-item class="minHeight36">
|
||||
<v-checkbox v-model="useCross" class="mt-0" hide-details label="Alternate controls"></v-checkbox>
|
||||
</v-list-item>
|
||||
<v-list-item class="minHeight36" v-if="useCross">
|
||||
<v-checkbox v-model="reverseZ" class="mt-0" hide-details label="Invert Z"></v-checkbox>
|
||||
</v-list-item>
|
||||
</v-list>
|
||||
</v-menu>
|
||||
</v-toolbar>
|
||||
<v-container>
|
||||
<template v-if="useCross">
|
||||
<v-row>
|
||||
<v-col :cols="homeCols">
|
||||
<v-row dense class="mb-1">
|
||||
<v-col cols="3"></v-col>
|
||||
<v-col cols="3">
|
||||
<v-btn class="btnMinWidthAuto fill-width"
|
||||
:disabled="selectedCrossStep === null || selectedCrossStep === undefined"
|
||||
@click="doSendMove('Y+'+stepsReversed[selectedCrossStep], feedrateXY)"
|
||||
>
|
||||
<v-icon>mdi-chevron-up</v-icon>
|
||||
</v-btn>
|
||||
</v-col>
|
||||
<v-col cols="3"></v-col>
|
||||
<v-col cols="3">
|
||||
<v-btn class="btnMinWidthAuto fill-width"
|
||||
:disabled="selectedCrossStep === null || selectedCrossStep === undefined"
|
||||
@click="doSendMove('Z'+(reverseZ ? '-' : '+')+stepsReversed[selectedCrossStep], feedrateZ)"
|
||||
>
|
||||
<v-icon>mdi-chevron-up</v-icon>
|
||||
</v-btn>
|
||||
</v-col>
|
||||
</v-row>
|
||||
<v-row dense>
|
||||
<v-col cols="3" class="p-rel">
|
||||
<v-btn class="btnMinWidthAuto fill-width p-abs" style="top: -50%; width: calc(100% - 8px);"
|
||||
:disabled="selectedCrossStep === null || selectedCrossStep === undefined"
|
||||
@click="doSendMove('X-'+stepsReversed[selectedCrossStep], feedrateXY)"
|
||||
>
|
||||
<v-icon>mdi-chevron-left</v-icon>
|
||||
</v-btn>
|
||||
</v-col>
|
||||
<v-col cols="3">
|
||||
<v-btn class="btnMinWidthAuto fill-width"
|
||||
:disabled="selectedCrossStep === null || selectedCrossStep === undefined"
|
||||
@click="doSendMove('Y-'+stepsReversed[selectedCrossStep], feedrateXY)"
|
||||
>
|
||||
<v-icon>mdi-chevron-down</v-icon>
|
||||
</v-btn>
|
||||
</v-col>
|
||||
<v-col cols="3" class="p-rel">
|
||||
<v-btn class="btnMinWidthAuto fill-width p-abs" style="top: -50%; width: calc(100% - 8px);"
|
||||
:disabled="selectedCrossStep === null || selectedCrossStep === undefined"
|
||||
@click="doSendMove('X+'+stepsReversed[selectedCrossStep], feedrateXY)"
|
||||
>
|
||||
<v-icon>mdi-chevron-right</v-icon>
|
||||
</v-btn>
|
||||
</v-col>
|
||||
<v-col cols="3">
|
||||
<v-btn class="btnMinWidthAuto fill-width"
|
||||
:disabled="selectedCrossStep === null || selectedCrossStep === undefined"
|
||||
@click="doSendMove('Z'+(reverseZ ? '+' : '-')+stepsReversed[selectedCrossStep], feedrateZ)"
|
||||
>
|
||||
<v-icon>mdi-chevron-down</v-icon>
|
||||
</v-btn>
|
||||
</v-col>
|
||||
</v-row>
|
||||
</v-col>
|
||||
<v-col :cols="homeCols" class="d-flex align-center">
|
||||
<div class="flex-grow-1" style="border-radius: 4px; overflow: hidden;">
|
||||
<v-row dense class="" style="margin-bottom: -2px!important;">
|
||||
<v-col :cols="'quad_gantry_level' in config || 'z_tilt' in config ? 6 : 12">
|
||||
<v-btn class="w-100"
|
||||
tile
|
||||
@click="doHome"
|
||||
height="30"
|
||||
:loading="loadings.includes('homeAll')"
|
||||
:color="homedAxes.includes('xyz') ? 'primary' : 'warning'"
|
||||
>
|
||||
<div class="d-flex align-center">
|
||||
<v-icon>mdi-home</v-icon>
|
||||
<span class="ml-1">ALL</span>
|
||||
</div>
|
||||
</v-btn>
|
||||
</v-col>
|
||||
<v-col v-if="'quad_gantry_level' in config || 'z_tilt' in config" cols="6" class="d-flex">
|
||||
<v-btn v-if="'quad_gantry_level' in config"
|
||||
class="btnMinWidthAuto flex-grow-1 px-0"
|
||||
tile
|
||||
dense
|
||||
color="primary"
|
||||
height="30"
|
||||
:loading="loadings.includes('qgl')"
|
||||
@click="doQGL"
|
||||
>QGL</v-btn>
|
||||
<v-btn v-if="'z_tilt' in config"
|
||||
class="btnMinWidthAuto flex-grow-1 px-0"
|
||||
tile
|
||||
dense
|
||||
color="primary"
|
||||
height="30"
|
||||
:loading="loadings.includes('zTilt')"
|
||||
@click="doZtilt"
|
||||
>Z-Tilt</v-btn>
|
||||
</v-col>
|
||||
</v-row>
|
||||
<v-row dense class="">
|
||||
<v-col cols="4" class="flex-grow-1">
|
||||
<v-btn class="btnMinWidthAuto w-100"
|
||||
tile
|
||||
height="30"
|
||||
:loading="loadings.includes('homeX')"
|
||||
:color="homedAxes.includes('x') ? 'primary' : 'warning'"
|
||||
@click="doHomeX"
|
||||
>
|
||||
X
|
||||
</v-btn>
|
||||
</v-col>
|
||||
<v-col cols="4" class="flex-grow-1">
|
||||
<v-btn class="btnMinWidthAuto w-100"
|
||||
tile
|
||||
height="30"
|
||||
:loading="loadings.includes('homeY')"
|
||||
:color="homedAxes.includes('y') ? 'primary' : 'warning'"
|
||||
@click="doHomeY"
|
||||
>
|
||||
Y
|
||||
</v-btn>
|
||||
</v-col>
|
||||
<v-col cols="4" class="flex-grow-1">
|
||||
<v-btn class="btnMinWidthAuto w-100"
|
||||
tile
|
||||
height="30"
|
||||
:loading="loadings.includes('homeZ')"
|
||||
:color="homedAxes.includes('z') ? 'primary' : 'warning'"
|
||||
@click="doHomeZ"
|
||||
>
|
||||
Z
|
||||
</v-btn>
|
||||
</v-col>
|
||||
</v-row>
|
||||
</div>
|
||||
</v-col>
|
||||
</v-row>
|
||||
<v-row no-gutters>
|
||||
<v-col class="col-12">
|
||||
<v-btn-toggle v-if="stepsReversed.length > 0" dense no-gutters style="flex-wrap: nowrap; width: 100%;" v-model="selectedCrossStep">
|
||||
<v-btn dense class="btnMinWidthAuto flex-grow-1 px-0" v-for="steps of stepsReversed" :key="'all-'+steps">
|
||||
<span class="body-2">{{ steps }}</span>
|
||||
</v-btn>
|
||||
</v-btn-toggle>
|
||||
<div class="font-weight-bold warning rounded pa-2" v-else>
|
||||
Please configure steps<br>
|
||||
<router-link style="color: white;" to="/settings/interface">Settings > Interface > Control</router-link>
|
||||
</div>
|
||||
</v-col>
|
||||
</v-row>
|
||||
</template>
|
||||
<template v-else>
|
||||
<v-row no-gutters>
|
||||
<v-col class="col-12 pb-0 text-center">
|
||||
<v-btn small @click="doHome" :loading="loadings.includes('homeAll')" :color="homedAxes.includes('xyz') ? 'primary' : 'warning'"><v-icon class="mr-1">mdi-home</v-icon><span class="d-none d-sm-inline">Home </span>all</v-btn>
|
||||
<v-btn small @click="doQGL" :loading="loadings.includes('qgl')" color="primary" class="ml-2" v-if="'quad_gantry_level' in config">QGL</v-btn>
|
||||
<v-btn small @click="doZtilt" :loading="loadings.includes('zTilt')" color="primary" class="ml-2" v-if="'z_tilt' in config">Z Tilt</v-btn>
|
||||
</v-col>
|
||||
</v-row>
|
||||
<v-row no-gutters class="mt-2">
|
||||
<v-col class="text-center">
|
||||
<v-btn-toggle dense no-gutters class="row no-gutters mx-auto" style="flex-wrap: nowrap;" >
|
||||
<v-btn @click="doSendMove('X-'+steps, feedrateXY)" class="btnMinWidthAuto col" v-for="steps of stepsXYsorted" v-bind:key="'x-'+steps"><span class="body-2">-{{ steps }}</span></v-btn>
|
||||
<v-btn @click="doHomeX" :color="homedAxes.includes('x') ? 'primary' : 'warning'" :loading="loadings.includes('homeX')" class="font-weight-bold btnHomeAxis">X</v-btn>
|
||||
<v-btn @click="doSendMove('X+'+steps, feedrateXY)" class="btnMinWidthAuto col" v-for="steps of stepsXYsortedReverse" v-bind:key="'x+'+steps"><span class="body-2">+{{ steps }}</span></v-btn>
|
||||
</v-btn-toggle>
|
||||
</v-col>
|
||||
</v-row>
|
||||
<v-row no-gutters class="mt-3">
|
||||
<v-col class="text-center">
|
||||
<v-btn-toggle dense no-gutters class="row no-gutters mx-auto" style="flex-wrap: nowrap;" >
|
||||
<v-btn @click="doSendMove('Y-'+steps, feedrateXY)" class="btnMinWidthAuto col" v-for="steps of stepsXYsorted" v-bind:key="'y-'+steps"><span class="body-2">-{{ steps }}</span></v-btn>
|
||||
<v-btn @click="doHomeY" :color="homedAxes.includes('y') ? 'primary' : 'warning'" :loading="loadings.includes('homeY')" class="font-weight-bold btnHomeAxis">Y</v-btn>
|
||||
<v-btn @click="doSendMove('Y+'+steps, feedrateXY)" class="btnMinWidthAuto col" v-for="steps of stepsXYsortedReverse" v-bind:key="'y+'+steps"><span class="body-2">+{{ steps }}</span></v-btn>
|
||||
</v-btn-toggle>
|
||||
</v-col>
|
||||
</v-row>
|
||||
<v-row no-gutters class="mt-3">
|
||||
<v-col class="text-center">
|
||||
<v-btn-toggle dense no-gutters class="row no-gutters mx-auto" style="flex-wrap: nowrap;" >
|
||||
<v-btn @click="doSendMove('Z-'+steps, feedrateZ)" class="btnMinWidthAuto col" v-for="steps of stepsZsorted" v-bind:key="'z-'+steps"><span class="body-2">-{{ steps }}</span></v-btn>
|
||||
<v-btn @click="doHomeZ" :color="homedAxes.includes('z') ? 'primary' : 'warning'" :loading="loadings.includes('homeZ')" class="font-weight-bold btnHomeAxis">Z</v-btn>
|
||||
<v-btn @click="doSendMove('Z+'+steps, feedrateZ)" class="btnMinWidthAuto col" v-for="steps of stepsZsortedReverse" v-bind:key="'z+'+steps"><span class="body-2">+{{ steps }}</span></v-btn>
|
||||
</v-btn-toggle>
|
||||
</v-col>
|
||||
</v-row>
|
||||
</template>
|
||||
<v-row>
|
||||
<v-col class="pa-0">
|
||||
<v-divider></v-divider>
|
||||
</v-col>
|
||||
</v-row>
|
||||
<v-row class="">
|
||||
<v-col class="col col-md-6 pt-2">
|
||||
<span class="text--disabled" style="font-size: .9em">Feed amount [mm]</span>
|
||||
<v-btn-toggle class="mt-1" dense no-gutters style="flex-wrap: nowrap; width: 100%;" >
|
||||
<v-btn v-for="amount in feedamountsSorted" v-bind:key="amount" @click="setFeedAmount(amount)" dense :class="(amount === currentFeedAmount ? 'v-btn--active' : '') + ' btnMinWidthAuto flex-grow-1 px-0 _btnFeedrate'">{{ amount }}</v-btn>
|
||||
</v-btn-toggle>
|
||||
</v-col>
|
||||
<v-col class="col col-md-6 pt-2">
|
||||
<span class="text--disabled" style="font-size: .9em">Feedrate [mm/s]</span>
|
||||
<v-btn-toggle class="mt-1" dense no-gutters style="flex-wrap: nowrap; width: 100%;" >
|
||||
<v-btn v-for="rate in feedratesSorted" v-bind:key="rate" @click="setFeedrate(rate)" dense :class="(rate === currentFeedRate ? 'v-btn--active' : '') + ' btnMinWidthAuto flex-grow-1 px-0 _btnFeedrate'">{{ rate }}</v-btn>
|
||||
</v-btn-toggle>
|
||||
</v-col>
|
||||
</v-row>
|
||||
<v-row class="">
|
||||
<v-col class="col text-center pt-0">
|
||||
<v-btn small @click="sendRetract()" class="mx-3" :loading="loadings.includes('btnRetract')" :disabled="!this['printer/getExtrudePossible']"><v-icon small class="mr-1">mdi-arrow-up-bold</v-icon> Retract</v-btn>
|
||||
<v-btn small @click="sendDetract()" class="mx-3" :loading="loadings.includes('btnDetract')" :disabled="!this['printer/getExtrudePossible']"><v-icon small class="mr-1">mdi-arrow-down-bold</v-icon> Extrude</v-btn>
|
||||
</v-col>
|
||||
</v-row>
|
||||
</v-container>
|
||||
</v-card>
|
||||
<v-card class="mt-6" v-if="this['printer/getMacros'].length > 0">
|
||||
<v-toolbar flat dense>
|
||||
<v-toolbar-title>
|
||||
<span class="subheading"><v-icon left>mdi-code-tags</v-icon>Macros</span>
|
||||
</v-toolbar-title>
|
||||
</v-toolbar>
|
||||
<v-container>
|
||||
<v-row no-gutters v-if="this['printer/getMacros'].length > 0">
|
||||
<v-col class="text-center mr-fix-2 mb-fix-2">
|
||||
<v-btn v-for="(macro, index) in this['printer/getMacros']"
|
||||
:key="index+99"
|
||||
small
|
||||
color="primary"
|
||||
class="mr-2 mb-2"
|
||||
:loading="loadings.includes('macro_'+macro.name)"
|
||||
@click="doSendMacro(macro.name)">{{ macro.name.replace(/_/g, " ") }}</v-btn>
|
||||
</v-col>
|
||||
</v-row>
|
||||
</v-container>
|
||||
</v-card>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
@@ -63,9 +285,11 @@
|
||||
components: {
|
||||
|
||||
},
|
||||
data: function() {
|
||||
data() {
|
||||
return {
|
||||
|
||||
crossWidth: 40,
|
||||
crossHeight: 40,
|
||||
homeCols: 6
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
@@ -74,15 +298,48 @@
|
||||
config: state => state.printer.configfile.config,
|
||||
loadings: state => state.socket.loadings,
|
||||
printer_state: state => state.printer.print_stats.state,
|
||||
extruder: state => state.printer.extruder,
|
||||
absolute_coordinates: state => state.printer.gcode_move.absolute_coordinates,
|
||||
|
||||
feedamounts: state => state.gui.dashboard.extruder.feedamounts,
|
||||
feedrates: state => state.gui.dashboard.extruder.feedrates,
|
||||
|
||||
feedrateXY: state => state.gui.dashboard.control.feedrateXY,
|
||||
stepsXY: state => state.gui.dashboard.control.stepsXY,
|
||||
feedrateZ: state => state.gui.dashboard.control.feedrateZ,
|
||||
stepsZ: state => state.gui.dashboard.control.stepsZ,
|
||||
stepsAll: state => state.gui.dashboard.control.stepsAll,
|
||||
useCross: state => state.gui.dashboard.control.useCross,
|
||||
reverseZ: state => state.gui.dashboard.control.reverseZ,
|
||||
}),
|
||||
...mapGetters([
|
||||
'printer/getMacros',
|
||||
'printer/getExtrudePossible',
|
||||
]),
|
||||
reverseZ: {
|
||||
get() {
|
||||
return this.$store.state.gui.dashboard.control.reverseZ;
|
||||
},
|
||||
set(reverseZ) {
|
||||
return this.$store.dispatch('gui/setSettings', { dashboard: { control: { reverseZ } } })
|
||||
}
|
||||
},
|
||||
useCross: {
|
||||
get() {
|
||||
return this.$store.state.gui.dashboard.control.useCross;
|
||||
},
|
||||
set(useCross) {
|
||||
return this.$store.dispatch('gui/setSettings', { dashboard: { control: { useCross } } })
|
||||
}
|
||||
},
|
||||
selectedCrossStep: {
|
||||
get() {
|
||||
return this.$store.state.gui.dashboard.control.selectedCrossStep;
|
||||
},
|
||||
set(selectedCrossStep) {
|
||||
return this.$store.dispatch('gui/setSettings', { dashboard: { control: { selectedCrossStep } } })
|
||||
}
|
||||
},
|
||||
stepsXYsorted: {
|
||||
get() {
|
||||
return [...this.$store.state.gui.dashboard.control.stepsXY].sort(function(a, b) { return b-a })
|
||||
@@ -102,9 +359,63 @@
|
||||
get() {
|
||||
return [...this.$store.state.gui.dashboard.control.stepsZ].sort(function(a, b) { return a-b })
|
||||
}
|
||||
},
|
||||
steps: {
|
||||
get() {
|
||||
return Array.from(new Set([
|
||||
...(this.stepsAll ?? [])
|
||||
])).entries().sort((a, b) => b-a)
|
||||
}
|
||||
},
|
||||
stepsReversed: {
|
||||
get() {
|
||||
return Array.from(new Set([
|
||||
...(this.stepsAll ?? []),
|
||||
])).sort((a, b) => a-b)
|
||||
}
|
||||
},
|
||||
feedamountsSorted: {
|
||||
get() {
|
||||
return [...this.feedamounts].sort((a,b) => { return b-a })
|
||||
}
|
||||
},
|
||||
feedratesSorted: {
|
||||
get() {
|
||||
return [...this.feedrates].sort((a,b) => { return b-a })
|
||||
}
|
||||
},
|
||||
currentFeedAmount: {
|
||||
get() {
|
||||
return parseFloat(this.$store.state.gui.dashboard.extruder.feedamount)
|
||||
},
|
||||
set(newVal) {
|
||||
return this.$store.dispatch('gui/setSettings', { dashboard: { extruder: { feedamount: newVal } } })
|
||||
}
|
||||
},
|
||||
currentFeedRate: {
|
||||
get() {
|
||||
return parseFloat(this.$store.state.gui.dashboard.extruder.feedrate)
|
||||
},
|
||||
set(newVal) {
|
||||
return this.$store.dispatch('gui/setSettings', { dashboard: { extruder: { feedrate: newVal } } })
|
||||
}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
window.addEventListener('resize', this.onResize);
|
||||
},
|
||||
mounted() {
|
||||
if (window.screen.width < 330) {
|
||||
this.homeCols = 12;
|
||||
}
|
||||
},
|
||||
destroyed() {
|
||||
window.removeEventListener('resize', this.onResize);
|
||||
},
|
||||
methods: {
|
||||
onResize() {
|
||||
this.homeCols = window.screen.width < 360 ? 12 : 6;
|
||||
},
|
||||
doHome() {
|
||||
this.$store.commit('server/addEvent', { message: "G28", type: 'command' });
|
||||
this.$store.commit('socket/addLoading', { name: 'homeAll' });
|
||||
@@ -136,9 +447,11 @@
|
||||
this.$socket.sendObj('printer.gcode.script', { script: "Z_TILT_ADJUST" }, "socket/removeLoading", { name: 'zTilt' });
|
||||
},
|
||||
doSendMove(gcode, feedrate) {
|
||||
gcode = "G91" + "\n" +
|
||||
"G1 " + gcode + " F"+feedrate*60 + "\n" +
|
||||
"G90";
|
||||
if (this.absolute_coordinates) {
|
||||
gcode = "G91" + "\n" +
|
||||
"G1 " + gcode + " F"+feedrate*60 + "\n" +
|
||||
"G90"
|
||||
} else gcode = "G1 " + gcode + " F"+feedrate*60
|
||||
|
||||
this.doSend(gcode);
|
||||
},
|
||||
@@ -151,6 +464,24 @@
|
||||
this.$store.commit('socket/addLoading', { name: 'macro_'+gcode });
|
||||
Vue.prototype.$socket.sendObj('printer.gcode.script', { script: gcode }, "socket/removeLoading", { name: 'macro_'+gcode });
|
||||
},
|
||||
setFeedAmount(value) {
|
||||
this.currentFeedAmount = value;
|
||||
},
|
||||
setFeedrate(value) {
|
||||
this.currentFeedRate = value;
|
||||
},
|
||||
sendRetract() {
|
||||
let gcode = "M83\nG1 E-"+this.currentFeedAmount+" F"+(this.currentFeedRate * 60);
|
||||
this.$store.commit('server/addEvent', { message: gcode, type: 'command' });
|
||||
this.$store.commit('socket/addLoading', { name: 'btnRetract' });
|
||||
Vue.prototype.$socket.sendObj('printer.gcode.script', { script: gcode }, "socket/removeLoading", { name: 'btnRetract' });
|
||||
},
|
||||
sendDetract() {
|
||||
let gcode = "M83\nG1 E"+this.currentFeedAmount+" F"+(this.currentFeedRate * 60);
|
||||
this.$store.commit('server/addEvent', { message: gcode, type: 'command' });
|
||||
this.$store.commit('socket/addLoading', { name: 'btnDetract' });
|
||||
Vue.prototype.$socket.sendObj('printer.gcode.script', { script: gcode }, "socket/removeLoading", { name: 'btnDetract' });
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
</script>
|
||||
@@ -1,98 +0,0 @@
|
||||
<style>
|
||||
|
||||
</style>
|
||||
|
||||
<template>
|
||||
<v-card v-if="(['standby', 'paused', 'complete'].includes(printer_state))">
|
||||
<v-container>
|
||||
<v-row class="">
|
||||
<v-col class="col col-md-6">
|
||||
<v-label>Feed amount in mm:</v-label>
|
||||
<v-btn-toggle class="mt-2" dense no-gutters style="flex-wrap: nowrap; width: 100%;" >
|
||||
<v-btn v-for="amount in feedamountsSorted" v-bind:key="amount" @click="setFeedAmount(amount)" dense :class="(amount === currentFeedAmount ? 'v-btn--active' : '') + ' btnMinWidthAuto flex-grow-1 px-0 _btnFeedrate'">{{ amount }}</v-btn>
|
||||
</v-btn-toggle>
|
||||
</v-col>
|
||||
<v-col class="col col-md-6">
|
||||
<v-label>Feedrate in mm/s:</v-label>
|
||||
<v-btn-toggle class="mt-2" dense no-gutters style="flex-wrap: nowrap; width: 100%;" >
|
||||
<v-btn v-for="rate in feedratesSorted" v-bind:key="rate" @click="setFeedrate(rate)" dense :class="(rate === currentFeedRate ? 'v-btn--active' : '') + ' btnMinWidthAuto flex-grow-1 px-0 _btnFeedrate'">{{ rate }}</v-btn>
|
||||
</v-btn-toggle>
|
||||
</v-col>
|
||||
</v-row>
|
||||
<v-row class="">
|
||||
<v-col class="col text-center">
|
||||
<v-btn small @click="sendRetract()" class="mx-2" :loading="loadings.includes('btnRetract')" :disabled="!this['printer/getExtrudePossible']"><v-icon small class="mr-1">mdi-arrow-up-bold</v-icon> Retract</v-btn>
|
||||
<v-btn small @click="sendDetract()" class="mx-2" :loading="loadings.includes('btnDetract')" :disabled="!this['printer/getExtrudePossible']"><v-icon small class="mr-1">mdi-arrow-down-bold</v-icon> Extrude</v-btn>
|
||||
</v-col>
|
||||
</v-row>
|
||||
</v-container>
|
||||
</v-card>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapState, mapGetters } from 'vuex'
|
||||
import Vue from "vue";
|
||||
|
||||
export default {
|
||||
computed: {
|
||||
...mapState({
|
||||
loadings: state => state.socket.loadings,
|
||||
printer_state: state => state.printer.print_stats.state,
|
||||
extruder: state => state.printer.extruder,
|
||||
config: state => state.printer.configfile.config,
|
||||
|
||||
feedamounts: state => state.gui.dashboard.extruder.feedamounts,
|
||||
feedrates: state => state.gui.dashboard.extruder.feedrates,
|
||||
}),
|
||||
...mapGetters([
|
||||
'printer/getExtrudePossible',
|
||||
]),
|
||||
feedamountsSorted: {
|
||||
get() {
|
||||
return [...this.feedamounts].sort((a,b) => { return b-a })
|
||||
}
|
||||
},
|
||||
feedratesSorted: {
|
||||
get() {
|
||||
return [...this.feedrates].sort((a,b) => { return b-a })
|
||||
}
|
||||
},
|
||||
currentFeedAmount: {
|
||||
get() {
|
||||
return parseFloat(this.$store.state.gui.dashboard.extruder.feedamount)
|
||||
},
|
||||
set(newVal) {
|
||||
return this.$store.dispatch('gui/setSettings', { dashboard: { extruder: { feedamount: newVal } } })
|
||||
}
|
||||
},
|
||||
currentFeedRate: {
|
||||
get() {
|
||||
return parseFloat(this.$store.state.gui.dashboard.extruder.feedrate)
|
||||
},
|
||||
set(newVal) {
|
||||
return this.$store.dispatch('gui/setSettings', { dashboard: { extruder: { feedrate: newVal } } })
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
setFeedAmount(value) {
|
||||
this.currentFeedAmount = value;
|
||||
},
|
||||
setFeedrate(value) {
|
||||
this.currentFeedRate = value;
|
||||
},
|
||||
sendRetract() {
|
||||
let gcode = "M83\nG1 E-"+this.currentFeedAmount+" F"+(this.currentFeedRate * 60);
|
||||
this.$store.commit('server/addEvent', { message: gcode, type: 'command' });
|
||||
this.$store.commit('socket/addLoading', { name: 'btnRetract' });
|
||||
Vue.prototype.$socket.sendObj('printer.gcode.script', { script: gcode }, "socket/removeLoading", { name: 'btnRetract' });
|
||||
},
|
||||
sendDetract() {
|
||||
let gcode = "M83\nG1 E"+this.currentFeedAmount+" F"+(this.currentFeedRate * 60);
|
||||
this.$store.commit('server/addEvent', { message: gcode, type: 'command' });
|
||||
this.$store.commit('socket/addLoading', { name: 'btnDetract' });
|
||||
Vue.prototype.$socket.sendObj('printer.gcode.script', { script: gcode }, "socket/removeLoading", { name: 'btnDetract' });
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -35,7 +35,17 @@
|
||||
</v-toolbar>
|
||||
<div v-for="(object, index) of this['printer/getMiscellaneous']" v-bind:key="index">
|
||||
<v-divider v-if="index"></v-divider>
|
||||
<miscellaneous-slider :name="object.name" :type="object.type" :target="object.power" :controllable="object.controllable" :pwm="object.pwm" :multi="parseInt(object.scale)"></miscellaneous-slider>
|
||||
<miscellaneous-slider
|
||||
:name="object.name"
|
||||
:type="object.type"
|
||||
:target="object.power"
|
||||
:rpm="object.rpm"
|
||||
:controllable="object.controllable"
|
||||
:pwm="object.pwm"
|
||||
:off_below="object.off_below"
|
||||
:max="object.max_power"
|
||||
:multi="parseInt(object.scale)"
|
||||
></miscellaneous-slider>
|
||||
</div>
|
||||
</v-card>
|
||||
</div>
|
||||
|
||||
@@ -81,9 +81,10 @@
|
||||
|
||||
<template #item="{ item }">
|
||||
<tr
|
||||
v-longpress:600="(e) => showContextMenu(e, item)"
|
||||
@contextmenu="showContextMenu($event, item)"
|
||||
@click="clickRow(item)"
|
||||
class="file-list-cursor"
|
||||
class="file-list-cursor user-select-none"
|
||||
:data-name="item.filename">
|
||||
<td class="pr-0 text-center" style="width: 32px;">
|
||||
<v-icon v-if="item.isDirectory">mdi-folder</v-icon>
|
||||
@@ -98,7 +99,7 @@
|
||||
</v-card>
|
||||
<v-menu v-model="contextMenu.shown" :position-x="contextMenu.x" :position-y="contextMenu.y" absolute offset-y>
|
||||
<v-list>
|
||||
<v-list-item @click="clickRow(contextMenu.item)" v-if="!contextMenu.item.isDirectory">
|
||||
<v-list-item @click="clickRow(contextMenu.item, true)" v-if="!contextMenu.item.isDirectory">
|
||||
<v-icon class="mr-1">mdi-file-document-edit-outline</v-icon> Edit file
|
||||
</v-list-item>
|
||||
<v-list-item @click="downloadFile" v-if="!contextMenu.item.isDirectory">
|
||||
@@ -321,7 +322,7 @@
|
||||
highlighter(code) {
|
||||
return highlight(code, languages.ini); //returns html
|
||||
},
|
||||
refreshFileList: function() {
|
||||
refreshFileList() {
|
||||
if (this.currentPath === "") {
|
||||
this.$socket.sendObj('server.files.get_directory', { path: 'config' }, 'files/getDirectory');
|
||||
this.$socket.sendObj('server.files.get_directory', { path: 'config_examples' }, 'files/getDirectory');
|
||||
@@ -377,7 +378,7 @@
|
||||
}
|
||||
return items;
|
||||
},
|
||||
loadPath: function() {
|
||||
loadPath() {
|
||||
let dirArray = this.currentPath.substring(1).split("/");
|
||||
|
||||
this.files = findDirectory(this.filetree, dirArray);
|
||||
@@ -389,30 +390,35 @@
|
||||
this.files = this.files.filter(file => file.filename.substr(0, 1) !== ".");
|
||||
}
|
||||
},
|
||||
clickRow: function(item) {
|
||||
if (!item.isDirectory) {
|
||||
this.editor.showLoader = true;
|
||||
this.editor.sourcecode = "";
|
||||
this.editor.item = item;
|
||||
clickRow(item, force = false) {
|
||||
if (!this.contextMenu.shown || force) {
|
||||
if (force) {
|
||||
this.contextMenu.shown = false;
|
||||
}
|
||||
if (!item.isDirectory) {
|
||||
this.editor.showLoader = true;
|
||||
this.editor.sourcecode = "";
|
||||
this.editor.item = item;
|
||||
|
||||
let url = '//'+this.hostname+':'+this.port+'/server/files'+this.currentPath+'/'+item.filename+'?time='+Date.now();
|
||||
fetch(url, { cache: "no-cache" }).then(res => res.text()).then(file => {
|
||||
this.editor.sourcecode = file;
|
||||
this.editor.show = true;
|
||||
this.editor.showLoader = false;
|
||||
this.editor.readonly = false;
|
||||
if (this.currentPath === '/config_examples') this.editor.readonly = true;
|
||||
});
|
||||
let url = '//' + this.hostname + ':' + this.port + '/server/files' + this.currentPath + '/' + item.filename + '?time=' + Date.now();
|
||||
fetch(url, {cache: "no-cache"}).then(res => res.text()).then(file => {
|
||||
this.editor.sourcecode = file;
|
||||
this.editor.show = true;
|
||||
this.editor.showLoader = false;
|
||||
this.editor.readonly = false;
|
||||
if (this.currentPath === '/config_examples') this.editor.readonly = true;
|
||||
});
|
||||
|
||||
} else {
|
||||
this.currentPath += "/"+item.filename;
|
||||
this.currentPage = 1;
|
||||
} else {
|
||||
this.currentPath += "/" + item.filename;
|
||||
this.currentPage = 1;
|
||||
}
|
||||
}
|
||||
},
|
||||
clickRowGoBack: function() {
|
||||
clickRowGoBack() {
|
||||
this.currentPath = this.currentPath.substr(0, this.currentPath.lastIndexOf("/"));
|
||||
},
|
||||
saveFile: function(boolRestart = false) {
|
||||
saveFile(boolRestart = false) {
|
||||
let file = new File([this.editor.sourcecode], this.editor.item.filename);
|
||||
|
||||
let formData = new FormData();
|
||||
@@ -440,14 +446,16 @@
|
||||
});
|
||||
},
|
||||
showContextMenu (e, item) {
|
||||
e.preventDefault();
|
||||
this.contextMenu.shown = true;
|
||||
this.contextMenu.x = e.clientX;
|
||||
this.contextMenu.y = e.clientY;
|
||||
this.contextMenu.item = item;
|
||||
this.$nextTick(() => {
|
||||
this.contextMenu.shown = true
|
||||
});
|
||||
if (!this.contextMenu.shown) {
|
||||
e?.preventDefault();
|
||||
this.contextMenu.shown = true;
|
||||
this.contextMenu.x = e?.clientX || e?.pageX || window.screenX / 2;
|
||||
this.contextMenu.y = e?.clientY || e?.pageY || window.screenY / 2;
|
||||
this.contextMenu.item = item;
|
||||
this.$nextTick(() => {
|
||||
this.contextMenu.shown = true
|
||||
});
|
||||
}
|
||||
},
|
||||
downloadFile() {
|
||||
let filename = (this.currentPath+"/"+this.contextMenu.item.filename);
|
||||
@@ -507,10 +515,10 @@
|
||||
removeFile() {
|
||||
this.$socket.sendObj('server.files.delete_file', { path: this.currentPath+"/"+this.contextMenu.item.filename }, 'files/getDeleteFile');
|
||||
},
|
||||
deleteDirectoryAction: function() {
|
||||
deleteDirectoryAction() {
|
||||
this.$socket.sendObj('server.files.delete_directory', { path: this.currentPath+"/"+this.contextMenu.item.filename }, 'files/getDeleteDir');
|
||||
},
|
||||
uploadFileButton: function() {
|
||||
uploadFileButton() {
|
||||
this.$refs.fileUpload.click()
|
||||
},
|
||||
async uploadFile() {
|
||||
@@ -533,7 +541,7 @@
|
||||
this.$refs.fileUpload.value = ''
|
||||
}
|
||||
},
|
||||
doUploadFile: function(file) {
|
||||
doUploadFile(file) {
|
||||
let toast = this.$toast;
|
||||
let formData = new FormData();
|
||||
let filename = file.name.replace(" ", "_");
|
||||
@@ -579,7 +587,7 @@
|
||||
})
|
||||
})
|
||||
},
|
||||
cancelUpload: function() {
|
||||
cancelUpload() {
|
||||
this.uploadSnackbar.cancelTokenSource.cancel()
|
||||
this.uploadSnackbar.status = false
|
||||
},
|
||||
|
||||
@@ -42,43 +42,76 @@
|
||||
</v-col>
|
||||
</v-row>
|
||||
<v-row>
|
||||
<v-col>
|
||||
<v-combobox
|
||||
label="Move distances XY in mm"
|
||||
v-model="stepsXY"
|
||||
hide-selected
|
||||
hide-details="auto"
|
||||
multiple
|
||||
small-chips
|
||||
:deletable-chips="true"
|
||||
append-icon=""
|
||||
type="number"
|
||||
:rules="[
|
||||
v => v.length > 0 || 'Minimum 1 value',
|
||||
v => v.length < 4 || 'For narrow screens it is recommended to enter max. 3 values.',
|
||||
]"
|
||||
></v-combobox>
|
||||
</v-col>
|
||||
</v-row>
|
||||
<v-row>
|
||||
<v-col>
|
||||
<v-combobox
|
||||
label="Move distances Z in mm"
|
||||
v-model="stepsZ"
|
||||
hide-selected
|
||||
hide-details="auto"
|
||||
multiple
|
||||
small-chips
|
||||
:deletable-chips="true"
|
||||
append-icon=""
|
||||
type="number"
|
||||
:rules="[
|
||||
v => v.length > 0 || 'Minimum 1 value',
|
||||
v => v.length < 4 || 'For narrow screens it is recommended to enter max. 3 values.',
|
||||
]"
|
||||
></v-combobox>
|
||||
<v-col class="py-0">
|
||||
<v-switch v-model="useCross" label="Enable movement cross" hide-details="auto" class="mt-0"></v-switch>
|
||||
</v-col>
|
||||
</v-row>
|
||||
<template v-if="useCross">
|
||||
<v-row>
|
||||
<v-col>
|
||||
<v-combobox
|
||||
label="Move distances in mm"
|
||||
v-model="stepsAll"
|
||||
hide-selected
|
||||
hide-details="auto"
|
||||
multiple
|
||||
small-chips
|
||||
:deletable-chips="true"
|
||||
append-icon=""
|
||||
type="number"
|
||||
:rules="[
|
||||
v => v.length > 0 || 'Minimum 1 value',
|
||||
v => v.length < 9 || 'For narrow screens it is recommended to enter max. 3 values.',
|
||||
]"
|
||||
></v-combobox>
|
||||
</v-col>
|
||||
</v-row>
|
||||
<v-row>
|
||||
<v-col class="pt-0">
|
||||
<v-switch v-model="reverseZ" label="Reverse Z movement" hide-details="auto" class="mt-0"></v-switch>
|
||||
</v-col>
|
||||
</v-row>
|
||||
</template>
|
||||
<template v-else>
|
||||
<v-row>
|
||||
<v-col>
|
||||
<v-combobox
|
||||
label="Move distances XY in mm"
|
||||
v-model="stepsXY"
|
||||
hide-selected
|
||||
hide-details="auto"
|
||||
multiple
|
||||
small-chips
|
||||
:deletable-chips="true"
|
||||
append-icon=""
|
||||
type="number"
|
||||
:rules="[
|
||||
v => v.length > 0 || 'Minimum 1 value',
|
||||
v => v.length < 4 || 'For narrow screens it is recommended to enter max. 3 values.',
|
||||
]"
|
||||
></v-combobox>
|
||||
</v-col>
|
||||
</v-row>
|
||||
<v-row>
|
||||
<v-col>
|
||||
<v-combobox
|
||||
label="Move distances Z in mm"
|
||||
v-model="stepsZ"
|
||||
hide-selected
|
||||
hide-details="auto"
|
||||
multiple
|
||||
small-chips
|
||||
:deletable-chips="true"
|
||||
append-icon=""
|
||||
type="number"
|
||||
:rules="[
|
||||
v => v.length > 0 || 'Minimum 1 value',
|
||||
v => v.length < 4 || 'For narrow screens it is recommended to enter max. 3 values.',
|
||||
]"
|
||||
></v-combobox>
|
||||
</v-col>
|
||||
</v-row>
|
||||
</template>
|
||||
</v-container>
|
||||
</v-card-text>
|
||||
</v-card>
|
||||
@@ -145,6 +178,22 @@
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
reverseZ: {
|
||||
get() {
|
||||
return this.$store.state.gui.dashboard.control.reverseZ;
|
||||
},
|
||||
set(reverseZ) {
|
||||
return this.$store.dispatch('gui/setSettings', { dashboard: { control: { reverseZ } } })
|
||||
}
|
||||
},
|
||||
useCross: {
|
||||
get() {
|
||||
return this.$store.state.gui.dashboard.control.useCross;
|
||||
},
|
||||
set(useCross) {
|
||||
return this.$store.dispatch('gui/setSettings', { dashboard: { control: { useCross } } })
|
||||
}
|
||||
},
|
||||
feedrateXY: {
|
||||
get() {
|
||||
return this.$store.state.gui.dashboard.control.feedrateXY
|
||||
@@ -153,6 +202,17 @@
|
||||
return this.$store.dispatch('gui/setSettings', { dashboard: { control: { feedrateXY: feedrate } } })
|
||||
}
|
||||
},
|
||||
stepsAll: {
|
||||
get() {
|
||||
const steps = this.$store.state.gui.dashboard.control.stepsAll
|
||||
return (steps ?? []).sort(function (a,b) { return b-a })
|
||||
},
|
||||
set(steps) {
|
||||
const absSteps = []
|
||||
for(const value of steps) absSteps.push(Math.abs(value))
|
||||
return this.$store.dispatch('gui/setSettings', { dashboard: { control: { stepsAll: absSteps } } })
|
||||
}
|
||||
},
|
||||
stepsXY: {
|
||||
get() {
|
||||
const steps = this.$store.state.gui.dashboard.control.stepsXY
|
||||
@@ -218,4 +278,4 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</script>
|
||||
@@ -99,7 +99,7 @@
|
||||
return this.$store.state.gui.tempchart.intervalChartUpdate
|
||||
},
|
||||
set(newVal) {
|
||||
if (newVal >= 500) return this.$store.dispatch('gui/setSettings', { gui: { tempchart: { intervalChartUpdate: newVal } } })
|
||||
if (newVal >= 500) return this.$store.dispatch('gui/setSettings', { tempchart: { intervalChartUpdate: newVal } })
|
||||
}
|
||||
},
|
||||
intervalDatasetUpdate: {
|
||||
@@ -107,7 +107,7 @@
|
||||
return this.$store.state.gui.tempchart.intervalDatasetUpdate
|
||||
},
|
||||
set(newVal) {
|
||||
if (newVal >= 500) return this.$store.dispatch('gui/setSettings', { gui: { tempchart: { intervalDatasetUpdate: newVal } } })
|
||||
if (newVal >= 500) return this.$store.dispatch('gui/setSettings', { tempchart: { intervalDatasetUpdate: newVal } })
|
||||
}
|
||||
},
|
||||
},
|
||||
|
||||
@@ -1,23 +1,78 @@
|
||||
<style>
|
||||
.webcamImage {
|
||||
width: 100%;
|
||||
}
|
||||
</style>
|
||||
|
||||
<template>
|
||||
<v-card>
|
||||
<v-toolbar flat dense >
|
||||
<v-toolbar-title>
|
||||
<span class="subheading"><v-icon left>mdi-cog</v-icon>General</span>
|
||||
</v-toolbar-title>
|
||||
</v-toolbar>
|
||||
<v-card-text class="pt-2 pb-0">
|
||||
<v-text-field
|
||||
v-model="printerName"
|
||||
label="Printer Name"
|
||||
></v-text-field>
|
||||
</v-card-text>
|
||||
</v-card>
|
||||
<div>
|
||||
<v-card>
|
||||
<v-toolbar flat dense >
|
||||
<v-toolbar-title>
|
||||
<span class="subheading"><v-icon left>mdi-cog</v-icon>General</span>
|
||||
</v-toolbar-title>
|
||||
</v-toolbar>
|
||||
<v-card-text class="pt-2 pb-0">
|
||||
<v-row>
|
||||
<v-col>
|
||||
<v-text-field
|
||||
v-model="printerName"
|
||||
label="Printer Name"
|
||||
hide-details
|
||||
></v-text-field>
|
||||
</v-col>
|
||||
</v-row>
|
||||
<v-row>
|
||||
<v-col class="py-2">
|
||||
<v-switch v-model="displayCancelPrint" hide-details class="mt-0">
|
||||
<template v-slot:label>
|
||||
Display CANCEL_PRINT
|
||||
<v-tooltip right>
|
||||
<template v-slot:activator="{ on, attrs }">
|
||||
<v-icon class="text--secondary ml-2" v-bind="attrs" v-on="on">mdi mdi-information</v-icon>
|
||||
</template>
|
||||
<span>Shows the CANCEL_PRINT button permanently - no second layer confirmation needed.</span>
|
||||
</v-tooltip>
|
||||
</template>
|
||||
</v-switch>
|
||||
</v-col>
|
||||
</v-row>
|
||||
<v-row>
|
||||
<v-col class="text-center">
|
||||
<v-btn @click="dialogResetMainsail=true" >factory reset</v-btn>
|
||||
</v-col>
|
||||
</v-row>
|
||||
</v-card-text>
|
||||
</v-card>
|
||||
<v-dialog v-model="dialogResetMainsail" persistent :width="300">
|
||||
<v-card dark>
|
||||
<v-toolbar flat dense color="primary">
|
||||
<v-toolbar-title>
|
||||
<span class="subheading">
|
||||
<v-icon class="mdi mdi-help-circle" left></v-icon> Factory reset
|
||||
</span>
|
||||
</v-toolbar-title>
|
||||
<v-spacer></v-spacer>
|
||||
<v-btn small class="minwidth-0" @click="dialogResetMainsail = 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-row>
|
||||
<v-col>
|
||||
<p class="text-center mb-0">Do you really want to reset mainsail to factory settings?</p>
|
||||
</v-col>
|
||||
</v-row>
|
||||
|
||||
<v-row>
|
||||
<v-col class="text-center">
|
||||
<v-btn
|
||||
color="red"
|
||||
@click="resetMainsail"
|
||||
>
|
||||
reset mainsail
|
||||
</v-btn>
|
||||
</v-col>
|
||||
</v-row>
|
||||
</v-container>
|
||||
</v-card-text>
|
||||
</v-card>
|
||||
</v-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
@@ -27,21 +82,32 @@
|
||||
},
|
||||
data: function() {
|
||||
return {
|
||||
|
||||
dialogResetMainsail: false,
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
printerName: {
|
||||
get() {
|
||||
return this.$store.state.gui.general.printername;
|
||||
return this.$store.state.gui.general.printername
|
||||
},
|
||||
set(newName) {
|
||||
return this.$store.dispatch('gui/setSettings', { general: { printername: newName } });
|
||||
return this.$store.dispatch('gui/setSettings', { general: { printername: newName } })
|
||||
}
|
||||
},
|
||||
displayCancelPrint: {
|
||||
get() {
|
||||
return this.$store.state.gui.general.displayCancelPrint;
|
||||
},
|
||||
set(displayCancelPrint) {
|
||||
return this.$store.dispatch('gui/setSettings', { general: { displayCancelPrint: displayCancelPrint } });
|
||||
}
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
|
||||
resetMainsail() {
|
||||
this.$store.dispatch('gui/resetMoonrakerDB')
|
||||
this.dialogResetMainsail = false
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -34,10 +34,10 @@
|
||||
current_accel_to_decel: state => state.printer.toolhead.max_accel_to_decel,
|
||||
current_square_corner_velocity: state => state.printer.toolhead.square_corner_velocity,
|
||||
config: state => state.printer.configfile.settings,
|
||||
max_velocity: state => state.printer.configfile.settings.printer.max_velocity,
|
||||
max_accel: state => state.printer.configfile.settings.printer.max_accel,
|
||||
max_accel_to_decel: state => state.printer.configfile.settings.printer.max_accel_to_decel,
|
||||
max_square_corner_velocity: state => state.printer.configfile.settings.printer.square_corner_velocity,
|
||||
max_velocity: state => state.printer.configfile.settings.printer.max_velocity || 0,
|
||||
max_accel: state => state.printer.configfile.settings.printer.max_accel || 0,
|
||||
max_accel_to_decel: state => state.printer.configfile.settings.printer.max_accel_to_decel || 0,
|
||||
max_square_corner_velocity: state => state.printer.configfile.settings.printer.square_corner_velocity || 0,
|
||||
}),
|
||||
},
|
||||
watch: {
|
||||
|
||||
@@ -13,6 +13,11 @@
|
||||
<settings-macro-switch :name="macro.name"></settings-macro-switch>
|
||||
</v-col>
|
||||
</v-row>
|
||||
<v-row v-if="this['printer/getAllMacros'].length === 0">
|
||||
<v-col>
|
||||
<p class="mb-0 text-center font-italic">No macros found...</p>
|
||||
</v-col>
|
||||
</v-row>
|
||||
</v-container>
|
||||
</v-card-text>
|
||||
</v-card>
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
<v-card-text class="py-3">
|
||||
<v-container>
|
||||
<v-row v-for="(preset, index) in this['gui/getPreheatPresets']" v-bind:key="index">
|
||||
<v-col class="rounded transition-swing secondary py-2 px-2 mb-6" style="cursor: pointer;">
|
||||
<v-col class="rounded transition-swing secondary py-2 px-2 mb-3" style="cursor: pointer;">
|
||||
<v-row align="center">
|
||||
<v-col class="pl-6">
|
||||
<strong>{{ preset.name }}</strong>
|
||||
@@ -25,7 +25,7 @@
|
||||
</v-col>
|
||||
</v-row>
|
||||
<v-row>
|
||||
<v-col class="rounded transition-swing secondary py-2 px-2 mb-6" style="cursor: pointer;">
|
||||
<v-col class="rounded transition-swing secondary py-2 px-2 mb-2" style="cursor: pointer;">
|
||||
<v-row align="center">
|
||||
<v-col class="pl-6">
|
||||
<strong>Cooldown</strong>
|
||||
@@ -170,6 +170,7 @@
|
||||
label="Custom G-Code"
|
||||
v-model="cooldownDialog.gcode"
|
||||
:rules="[rules.required]"
|
||||
hide-details="auto"
|
||||
></v-textarea>
|
||||
</v-col>
|
||||
</v-row>
|
||||
@@ -225,7 +226,7 @@
|
||||
computed: {
|
||||
...mapState({
|
||||
orgState: state => state.gui.presets,
|
||||
cooldownGcode: state => state.gui.cooldownGcode,
|
||||
cooldownGcode: state => state.gui.cooldown_gcode,
|
||||
}),
|
||||
...mapGetters([
|
||||
'printer/getHeaters',
|
||||
@@ -336,7 +337,7 @@
|
||||
},
|
||||
saveCooldown() {
|
||||
if (this.cooldownDialog.valid) {
|
||||
this.$store.dispatch("gui/setSettings", {cooldownGcode: this.cooldownDialog.gcode})
|
||||
this.$store.dispatch("gui/setSettings", { cooldown_gcode: this.cooldownDialog.gcode })
|
||||
this.cooldownDialog.bool = false
|
||||
}
|
||||
},
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
<v-card-text class="py-3">
|
||||
<v-container>
|
||||
<v-row v-for="(printer, index) in this['farm/getPrinters']" v-bind:key="index">
|
||||
<v-col class="rounded transition-swing secondary py-2 px-2 mb-6" style="cursor: pointer;">
|
||||
<v-col class="rounded transition-swing secondary py-2 px-2 mb-3" style="cursor: pointer;">
|
||||
<v-row align="center">
|
||||
<v-col class="col-auto pr-0">
|
||||
<v-progress-circular
|
||||
|
||||
@@ -22,12 +22,12 @@
|
||||
<v-card-text class="px-0 py-0">
|
||||
<v-container py-0 px-0>
|
||||
|
||||
<div v-for="(value, key) of updateableSoftwares" v-bind:key="key">
|
||||
<v-divider class="my-0" ></v-divider>
|
||||
<div v-for="(value, key, index) of updateableSoftwares" v-bind:key="key">
|
||||
<v-divider class="my-0" v-if="index" ></v-divider>
|
||||
<v-row class="py-2">
|
||||
<v-col class="pl-6">
|
||||
<strong>{{ 'name' in value ? value.name : key }}</strong><br />
|
||||
<span @click="openCommitsOverlay(key, value)" :class="getVersionClickable(value) ? 'primary--text cursor--pointer' : ''">{{ getVersionOutput(value) }}</span>
|
||||
<span @click="openCommitsOverlay(key, value)" :class="getVersionClickable(value) ? 'primary--text cursor--pointer' : ''"><v-icon v-if="getVersionClickable(value)" small color="primary" class="mr-1">mdi mdi-information</v-icon>{{ getVersionOutput(value) }}</span>
|
||||
</v-col>
|
||||
<v-col class="col-auto pr-6 text-right" align-self="center">
|
||||
<v-chip
|
||||
@@ -154,7 +154,13 @@
|
||||
if ('is_dirty' in object && object.is_dirty) return 'orange'
|
||||
if ('is_valid' in object && !object.is_valid) return 'red'
|
||||
|
||||
if ('version' in object && 'remote_version' in object && semver.gt(object.remote_version, object.version)) return 'primary'
|
||||
if (
|
||||
'version' in object &&
|
||||
'remote_version' in object &&
|
||||
semver.valid(object.remote_version) &&
|
||||
semver.valid(object.version) &&
|
||||
semver.gt(object.remote_version, object.version)
|
||||
) return 'primary'
|
||||
|
||||
return 'green'
|
||||
}
|
||||
@@ -167,7 +173,13 @@
|
||||
if ('is_valid' in object && !object.is_valid) return 'invalid'
|
||||
if ('is_dirty' in object && object.is_dirty) return 'dirty'
|
||||
|
||||
if ('version' in object && 'remote_version' in object && semver.gt(object.remote_version, object.version)) return 'update'
|
||||
if (
|
||||
'version' in object &&
|
||||
'remote_version' in object &&
|
||||
semver.valid(object.remote_version) &&
|
||||
semver.valid(object.version) &&
|
||||
semver.gt(object.remote_version, object.version)
|
||||
) return 'update'
|
||||
|
||||
return 'up-to-date'
|
||||
}
|
||||
@@ -180,7 +192,13 @@
|
||||
if ('is_valid' in object && !object.is_valid) return 'alert-circle'
|
||||
if ('is_dirty' in object && object.is_dirty) return 'alert-circle'
|
||||
|
||||
if ('version' in object && 'remote_version' in object && semver.gt(object.remote_version, object.version)) return 'progress-upload'
|
||||
if (
|
||||
'version' in object &&
|
||||
'remote_version' in object &&
|
||||
semver.valid(object.remote_version) &&
|
||||
semver.valid(object.version) &&
|
||||
semver.gt(object.remote_version, object.version)
|
||||
) return 'progress-upload'
|
||||
|
||||
return 'check'
|
||||
}
|
||||
@@ -193,7 +211,13 @@
|
||||
|
||||
if (typeof object === 'object' && object !== false) {
|
||||
if ('is_valid' in object && !object.is_valid) return true
|
||||
if ('version' in object && 'remote_version' in object && semver.gt(object.remote_version, object.version)) return false
|
||||
if (
|
||||
'version' in object &&
|
||||
'remote_version' in object &&
|
||||
semver.valid(object.remote_version) &&
|
||||
semver.valid(object.version) &&
|
||||
semver.gt(object.remote_version, object.version)
|
||||
) return false
|
||||
}
|
||||
|
||||
return true
|
||||
@@ -211,7 +235,10 @@
|
||||
}
|
||||
if (output !== "") output += ": "
|
||||
|
||||
output += semver.gt(remote_version, local_version) ? local_version+" > "+remote_version : local_version
|
||||
if (semver.valid(remote_version) && semver.valid(local_version) && semver.gt(remote_version, local_version))
|
||||
output += local_version+" > "+remote_version
|
||||
else
|
||||
output += local_version
|
||||
|
||||
return output
|
||||
},
|
||||
@@ -221,7 +248,8 @@
|
||||
object.branch === "master" &&
|
||||
'current_hash' in object &&
|
||||
'remote_hash' in object &&
|
||||
object.current_hash !== object.remote_hash
|
||||
object.current_hash !== object.remote_hash &&
|
||||
'owner' in object
|
||||
)
|
||||
},
|
||||
updateModule(key) {
|
||||
@@ -234,23 +262,13 @@
|
||||
openCommitsOverlay(key, object) {
|
||||
if (
|
||||
['klipper', 'moonraker'].includes(key) &&
|
||||
this.getVersionClickable(object)
|
||||
this.getVersionClickable(object) &&
|
||||
'owner' in object
|
||||
) {
|
||||
this.commitsOverlay.bool = true
|
||||
this.commitsOverlay.loading = true
|
||||
|
||||
let owner = ""
|
||||
switch(key) {
|
||||
case 'klipper':
|
||||
owner = "kevinOConnor"
|
||||
break
|
||||
|
||||
case 'moonraker':
|
||||
owner = "arksine"
|
||||
break
|
||||
}
|
||||
|
||||
const apiUrl = "https://api.github.com/repos/"+owner+"/"+key+"/commits"
|
||||
const apiUrl = "https://api.github.com/repos/"+object.owner+"/"+key+"/commits"
|
||||
if (apiUrl) {
|
||||
axios
|
||||
.get(apiUrl)
|
||||
|
||||
@@ -78,7 +78,7 @@
|
||||
return this.$store.state.gui.webcam.url;
|
||||
},
|
||||
set(url) {
|
||||
return this.$store.dispatch('gui/setSettings', { webcam: { url } });
|
||||
return this.$store.dispatch('gui/setSettings', { webcam: { url: url } })
|
||||
}
|
||||
},
|
||||
flipX: {
|
||||
@@ -86,7 +86,7 @@
|
||||
return this.$store.state.gui.webcam.flipX;
|
||||
},
|
||||
set(flipX) {
|
||||
return this.$store.dispatch('gui/setSettings', { webcam: { flipX } });
|
||||
return this.$store.dispatch('gui/setSettings', { webcam: { flipX: flipX } });
|
||||
}
|
||||
},
|
||||
flipY: {
|
||||
@@ -94,7 +94,7 @@
|
||||
return this.$store.state.gui.webcam.flipY;
|
||||
},
|
||||
set(flipY) {
|
||||
return this.$store.dispatch('gui/setSettings', { webcam: { flipY } });
|
||||
return this.$store.dispatch('gui/setSettings', { webcam: { flipY: flipY } });
|
||||
}
|
||||
},
|
||||
rotate: {
|
||||
@@ -110,7 +110,7 @@
|
||||
return this.$store.state.gui.webcam.rotateDegrees;
|
||||
},
|
||||
set(rotateDegrees) {
|
||||
return this.$store.dispatch('gui/setSettings', { webcam: { rotateDegrees } });
|
||||
return this.$store.dispatch('gui/setSettings', { webcam: { rotateDegrees: rotateDegrees } });
|
||||
}
|
||||
},
|
||||
boolNavi: {
|
||||
|
||||
@@ -30,14 +30,6 @@
|
||||
<span>Pause print</span>
|
||||
</v-tooltip>
|
||||
</v-btn>
|
||||
<v-btn small class="px-2 minwidth-0" color="red" v-if="(printer_state === 'paused')" :loading="loadings.includes('statusPrintCancel')" @click="btnCancelJob">
|
||||
<v-tooltip top>
|
||||
<template v-slot:activator="{ on, attrs }">
|
||||
<v-icon v-bind="attrs" v-on="on" small>mdi-stop</v-icon>
|
||||
</template>
|
||||
<span>Cancel print</span>
|
||||
</v-tooltip>
|
||||
</v-btn>
|
||||
<v-btn small class="px-2 minwidth-0" color="orange" v-if="(printer_state === 'paused')" :loading="loadings.includes('statusPrintResume')" @click="btnResumeJob">
|
||||
<v-tooltip top>
|
||||
<template v-slot:activator="{ on, attrs }">
|
||||
@@ -46,6 +38,14 @@
|
||||
<span>Resume print</span>
|
||||
</v-tooltip>
|
||||
</v-btn>
|
||||
<v-btn small class="px-2 minwidth-0" color="red" v-if="(printer_state === 'paused' || (displayCancelPrint && printer_state === 'printing'))" :loading="loadings.includes('statusPrintCancel')" @click="btnCancelJob">
|
||||
<v-tooltip top>
|
||||
<template v-slot:activator="{ on, attrs }">
|
||||
<v-icon v-bind="attrs" v-on="on" small>mdi-stop</v-icon>
|
||||
</template>
|
||||
<span>Cancel print</span>
|
||||
</v-tooltip>
|
||||
</v-btn>
|
||||
<v-btn small class="px-2 minwidth-0" color="primary" v-if="['error', 'complete'].includes(printer_state)" :loading="loadings.includes('statusPrintClear')" @click="btnClearJob">
|
||||
<v-tooltip top>
|
||||
<template v-slot:activator="{ on, attrs }">
|
||||
@@ -108,22 +108,22 @@
|
||||
current_file.thumbnails.length &&
|
||||
current_file.thumbnails.find(element => element.width >= 300 && element.width <= 400)) ? 'col-12 col-sm-8' : 'col-12'
|
||||
">
|
||||
<v-row class="text-center" align="center">
|
||||
<v-col class="flex-grow-0 py-2">
|
||||
<v-row class="text-center py-4" align="center">
|
||||
<v-col class="flex-grow-0 py-0">
|
||||
<v-icon>mdi-axis-arrow</v-icon>
|
||||
</v-col>
|
||||
<v-col class="equal-width py-2">
|
||||
<v-row><v-col class="px-0 pb-1"><strong>X</strong></v-col></v-row>
|
||||
<v-row><v-col class="px-0 pt-1">{{ position.length ? position[0].toFixed(2) : "--" }}</v-col></v-row>
|
||||
<v-col class="equal-width py-0">
|
||||
<v-row><v-col class="pa-0"><strong>X</strong></v-col></v-row>
|
||||
<v-row><v-col class="pa-0">{{ position.length ? position[0].toFixed(2) : "--" }}</v-col></v-row>
|
||||
</v-col>
|
||||
<v-col class="equal-width py-2">
|
||||
<v-row><v-col class="px-0 pb-1"><strong>Y</strong></v-col></v-row>
|
||||
<v-row><v-col class="px-0 pt-1">{{ position.length ? position[1].toFixed(2) : "--" }}</v-col></v-row>
|
||||
<v-col class="equal-width py-0">
|
||||
<v-row><v-col class="pa-0"><strong>Y</strong></v-col></v-row>
|
||||
<v-row><v-col class="pa-0">{{ position.length ? position[1].toFixed(2) : "--" }}</v-col></v-row>
|
||||
</v-col>
|
||||
<v-col class="equal-width py-2">
|
||||
<v-row><v-col class="px-0 pb-1"><strong>Z</strong></v-col></v-row>
|
||||
<v-col class="equal-width py-0">
|
||||
<v-row><v-col class="pa-0"><strong>Z</strong></v-col></v-row>
|
||||
<v-row>
|
||||
<v-col class="px-0 pt-1">
|
||||
<v-col class="pa-0">
|
||||
|
||||
<v-tooltip top>
|
||||
<template v-slot:activator="{ on, attrs }">
|
||||
@@ -136,18 +136,18 @@
|
||||
</v-col>
|
||||
</v-row>
|
||||
<v-row v-if="['printing', 'paused', 'complete', 'error'].includes(printer_state) ">
|
||||
<v-col class="px-0">
|
||||
<v-col class="pa-0">
|
||||
<v-divider></v-divider>
|
||||
</v-col>
|
||||
</v-row>
|
||||
<v-row class="text-center" align="center" v-if="['printing', 'paused', 'complete', 'error'].includes(printer_state) ">
|
||||
<v-col class="flex-grow-0 py-2">
|
||||
<v-row class="text-center py-4" align="center" v-if="['printing', 'paused', 'complete', 'error'].includes(printer_state) ">
|
||||
<v-col class="flex-grow-0 py-0">
|
||||
<v-icon>mdi-poll</v-icon>
|
||||
</v-col>
|
||||
<v-col class="equal-width py-2">
|
||||
<v-row><v-col class="px-0 pb-1"><strong>Filament</strong></v-col></v-row>
|
||||
<v-col class="equal-width py-0">
|
||||
<v-row><v-col class="pa-0"><strong>Filament</strong></v-col></v-row>
|
||||
<v-row>
|
||||
<v-col class="px-0 pt-1">
|
||||
<v-col class="pa-0">
|
||||
<v-tooltip top>
|
||||
<template v-slot:activator="{ on, attrs }">
|
||||
<span v-bind="attrs" v-on="on" v-if="filament_used >= 1000" class=" text-no-wrap">{{ (filament_used / 1000).toFixed(2) }} m</span>
|
||||
@@ -158,57 +158,58 @@
|
||||
</v-col>
|
||||
</v-row>
|
||||
</v-col>
|
||||
<v-col class="equal-width py-2">
|
||||
<v-row><v-col class="px-0 pb-1"><strong>Print</strong></v-col></v-row>
|
||||
<v-row><v-col class="px-0 pt-1">{{ formatTime(print_time) }}</v-col></v-row>
|
||||
<v-col class="equal-width py-0">
|
||||
<v-row><v-col class="pa-0"><strong>Print</strong></v-col></v-row>
|
||||
<v-row><v-col class="pa-0">{{ formatTime(print_time) }}</v-col></v-row>
|
||||
</v-col>
|
||||
<v-col class="equal-width py-2">
|
||||
<v-row><v-col class="px-0 pb-1"><strong>Total</strong></v-col></v-row>
|
||||
<v-row><v-col class="px-0 pt-1">{{ formatTime(print_time_total) }}</v-col></v-row>
|
||||
<v-col class="equal-width py-0">
|
||||
<v-row><v-col class="pa-0"><strong>Total</strong></v-col></v-row>
|
||||
<v-row><v-col class="pa-0">{{ formatTime(print_time_total) }}</v-col></v-row>
|
||||
</v-col>
|
||||
</v-row>
|
||||
<v-row v-if="['printing', 'paused', 'error'].includes(printer_state) ">
|
||||
<v-col class="px-0">
|
||||
<v-col class="pa-0">
|
||||
<v-divider></v-divider>
|
||||
</v-col>
|
||||
</v-row>
|
||||
<v-row class="text-center" align="center" v-if="['printing', 'paused', 'error'].includes(printer_state)">
|
||||
<v-col class="flex-grow-0 py-2">
|
||||
<v-row class="text-center py-4" align="center" v-if="['printing', 'paused', 'error'].includes(printer_state)">
|
||||
<v-col class="flex-grow-0 py-0">
|
||||
<v-icon>mdi-printer-3d</v-icon>
|
||||
</v-col>
|
||||
<v-col class="equal-width py-2">
|
||||
<v-row><v-col class="px-0 pb-1"><strong>Speed</strong></v-col></v-row>
|
||||
<v-row><v-col class="px-0 pt-1 text-no-wrap">{{ (requested_speed / 60).toFixed(0) }} mm/s</v-col></v-row>
|
||||
<v-col class="equal-width py-0">
|
||||
<v-row><v-col class="pa-0"><strong>Speed</strong></v-col></v-row>
|
||||
<v-row><v-col class="pa-0 text-no-wrap">{{ (requested_speed / 60 * speed_factor).toFixed(0) }} mm/s</v-col></v-row>
|
||||
</v-col>
|
||||
<v-col class="equal-width py-2">
|
||||
<v-row><v-col class="px-0 pb-1"><strong>Layer</strong></v-col></v-row>
|
||||
<v-row><v-col class="px-0 pt-1 text-no-wrap">{{ current_layer }} of {{ max_layers }}</v-col></v-row>
|
||||
<v-col class="equal-width py-0">
|
||||
<v-row><v-col class="pa-0"><strong>Layer</strong></v-col></v-row>
|
||||
<v-row><v-col class="pa-0 text-no-wrap">{{ current_layer }} of {{ max_layers }}</v-col></v-row>
|
||||
</v-col>
|
||||
<v-col class="equal-width py-2">
|
||||
<v-row><v-col class="px-0 pb-1"><strong>ETA</strong></v-col></v-row>
|
||||
<v-row><v-col class="px-0 pt-1">{{ eta ? formatDateTime(eta) : '--' }}</v-col></v-row>
|
||||
<v-col class="equal-width py-0">
|
||||
<v-row><v-col class="pa-0"><strong>ETA</strong></v-col></v-row>
|
||||
<v-row><v-col class="pa-0">{{ eta ? formatDateTime(eta) : '--' }}</v-col></v-row>
|
||||
</v-col>
|
||||
</v-row>
|
||||
<v-row v-if="['printing', 'paused', 'error'].includes(printer_state) ">
|
||||
<v-col class="px-0">
|
||||
<v-col class="pa-0">
|
||||
<v-divider></v-divider>
|
||||
</v-col>
|
||||
</v-row>
|
||||
<v-row class="text-center" align="center" v-if="['printing', 'paused', 'error'].includes(printer_state) ">
|
||||
<v-col class="flex-grow-0 py-2">
|
||||
<v-row class="text-center py-4" align="center" v-if="['printing', 'paused', 'error'].includes(printer_state) ">
|
||||
<v-col class="flex-grow-0 py-0">
|
||||
<v-icon>mdi-clock-outline</v-icon>
|
||||
</v-col>
|
||||
<v-col class="equal-width py-2 ">
|
||||
<v-row><v-col class="px-0 pb-1"><strong>File</strong></v-col></v-row>
|
||||
<v-row><v-col class="px-0 pt-1">{{ estimated_time_file ? formatTime(estimated_time_file) : '--' }}</v-col></v-row>
|
||||
<v-col class="equal-width py-0 ">
|
||||
<v-row><v-col class="pa-0"><strong>File</strong></v-col></v-row>
|
||||
<v-row><v-col class="pa-0">{{ estimated_time_file ? formatTime(estimated_time_file) : '--' }}</v-col></v-row>
|
||||
|
||||
</v-col>
|
||||
<v-col class="equal-width py-2">
|
||||
<v-row><v-col class="px-0 pb-1"><strong>Filament</strong></v-col></v-row>
|
||||
<v-row><v-col class="px-0 pt-1">{{ estimated_time_filament ? formatTime(estimated_time_filament) : '--' }}</v-col></v-row>
|
||||
<v-col class="equal-width py-0">
|
||||
<v-row><v-col class="pa-0"><strong>Filament</strong></v-col></v-row>
|
||||
<v-row><v-col class="pa-0">{{ estimated_time_filament ? formatTime(estimated_time_filament) : '--' }}</v-col></v-row>
|
||||
</v-col>
|
||||
<v-col class="equal-width py-2">
|
||||
<v-row><v-col class="px-0 pb-1"><strong>Slicer</strong></v-col></v-row>
|
||||
<v-row><v-col class="px-0 pt-1">{{ estimated_time_slicer ? formatTime(estimated_time_slicer) : '--' }}</v-col></v-row>
|
||||
<v-col class="equal-width py-0">
|
||||
<v-row><v-col class="pa-0"><strong>Slicer</strong></v-col></v-row>
|
||||
<v-row><v-col class="pa-0">{{ estimated_time_slicer ? formatTime(estimated_time_slicer) : '--' }}</v-col></v-row>
|
||||
</v-col>
|
||||
</v-row>
|
||||
</v-col>
|
||||
@@ -233,6 +234,7 @@
|
||||
position: state => state.printer.toolhead.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,
|
||||
|
||||
printProgress: state => state.printer.virtual_sdcard.progress,
|
||||
file_position: state => state.printer.virtual_sdcard.file_position,
|
||||
@@ -247,6 +249,8 @@
|
||||
|
||||
display_message: state => state.printer.display_status.message,
|
||||
loadings: state => state.socket.loadings,
|
||||
|
||||
displayCancelPrint: state => state.gui.general.displayCancelPrint,
|
||||
}),
|
||||
printPercent: {
|
||||
get() {
|
||||
|
||||
@@ -73,7 +73,7 @@
|
||||
</v-menu>
|
||||
</v-item-group>
|
||||
</v-toolbar>
|
||||
<v-card-text class="px-0 py-2 content">
|
||||
<v-card-text class="pa-0 content">
|
||||
<v-container class="px-0">
|
||||
<v-row align="center">
|
||||
<v-col class="py-2 font-weight-bold" style="padding-left: 68px;">Name</v-col>
|
||||
@@ -112,10 +112,13 @@
|
||||
<v-col class="py-2 flex-grow-0 text-center d-none d-sm-block" v-if="boolTempchart" style="min-width: 70px;">
|
||||
<div :style="'background-color: '+fan.chartColor+'cc;'" class="datasetColorSymbol d-inline-block" @click="openHeater(fan)"></div>
|
||||
</v-col>
|
||||
<v-col class="py-2 text-center d-none d-sm-block"><small>{{ fan.target > 0 && fan.speed > 0 ? (fan.speed * 100).toFixed(0)+"%" : (fan.target > 0 ? "standby" : "off") }}</small></v-col>
|
||||
<v-col class="py-2 text-center d-none d-sm-block">
|
||||
<small class="d-block">{{ fan.target > 0 && fan.speed > 0 ? (fan.speed * 100).toFixed(0)+"%" : (fan.target > 0 ? "standby" : "off") }}</small>
|
||||
</v-col>
|
||||
<v-col class="py-2 text-center">
|
||||
<span class="d-block">{{ fan.temperature ? fan.temperature.toFixed(1) : 0}}°C</span>
|
||||
<span v-for="(values, key) of fan.tempListAdditionValues" v-bind:key="key" class="d-block"><small>{{ values.value.toFixed(1) }} {{ values.unit }}</small></span>
|
||||
<small v-if="fan.rpm || fan.rpm === 0" :class="'d-block ' + (fan.rpm === 0 && fan.speed > 0 ? 'red--text' : '')">{{ Math.round(fan.rpm) }} RPM</small>
|
||||
</v-col>
|
||||
<v-col class="text-center py-2 pr-8 pr-0 vertical_align_center">
|
||||
<toolInput :name="fan.name" :target="fan.target" command="SET_TEMPERATURE_FAN_TARGET" attribute-name="temperature_fan" :items="fan.presets" ></toolInput>
|
||||
@@ -279,7 +282,7 @@
|
||||
datasets: state => state.printer.tempHistory.datasets,
|
||||
boolTempchart: state => state.gui.dashboard.boolTempchart,
|
||||
printer: state => state.printer,
|
||||
cooldownGcode: state => state.gui.cooldownGcode,
|
||||
cooldownGcode: state => state.gui.cooldown_gcode,
|
||||
printer_state: state => state.printer.print_stats.state,
|
||||
}),
|
||||
...mapGetters([
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
<v-card-text class="px-0 py-0">
|
||||
<v-container>
|
||||
<v-row class="py-0">
|
||||
<v-col class="col text-center">
|
||||
<v-col class="pb-0 text-center">
|
||||
<p class="mb-0">Current Offset: {{ homing_origin.length > 1 ? homing_origin[2].toFixed(2) : 0.00 }}mm</p>
|
||||
</v-col>
|
||||
</v-row>
|
||||
|
||||
@@ -6,7 +6,6 @@ import MinSettingsPanel from './MinSettingsPanel.vue'
|
||||
import MoonrakerFailedPluginsPanel from './MoonrakerFailedPluginsPanel.vue'
|
||||
import ToolsPanel from './ToolsPanel.vue'
|
||||
import ControlPanel from "./ControlPanel";
|
||||
import ExtruderPanel from "./ExtruderPanel";
|
||||
import ZOffsetPanel from "./ZOffsetPanel";
|
||||
import Miscellaneous from "./MiscellaneousPanel";
|
||||
import WebcamPanel from "./WebcamPanel";
|
||||
@@ -20,7 +19,6 @@ Vue.component('min-settings-panel', MinSettingsPanel);
|
||||
Vue.component('moonraker-failed-plugins-panel', MoonrakerFailedPluginsPanel);
|
||||
Vue.component('tools-panel', ToolsPanel);
|
||||
Vue.component('control-panel', ControlPanel);
|
||||
Vue.component('extruder-panel', ExtruderPanel);
|
||||
Vue.component('zoffset-panel', ZOffsetPanel);
|
||||
Vue.component('miscellaneous-panel', Miscellaneous);
|
||||
Vue.component('webcam-panel', WebcamPanel);
|
||||
|
||||
@@ -7,23 +7,26 @@
|
||||
<template>
|
||||
<v-container class="px-0 py-2">
|
||||
<v-row>
|
||||
<v-col>
|
||||
<v-col :class="pwm ? 'pb-1' : 'pb-3'">
|
||||
<v-subheader class="_fan-slider-subheader">
|
||||
<v-icon small :class="'mr-2 '+(value ? 'icon-rotate' : '')" v-if="type !== 'output_pin'">mdi-fan</v-icon>
|
||||
<v-icon small :class="'mr-2 '+(value >= off_below && value > 0 ? 'icon-rotate' : '')" v-if="type !== 'output_pin'">mdi-fan</v-icon>
|
||||
<span>{{ convertName(this.name) }}</span>
|
||||
<v-spacer></v-spacer>
|
||||
<span class="font-weight-bold" v-if="!controllable || (controllable && pwm)">{{ Math.round(value*100) }} %</span>
|
||||
<small v-if="rpm || rpm === 0" :class="'mr-3 ' + (rpm === 0 && value > 0 ? 'red--text' : '')">{{ Math.round(rpm) }} RPM</small>
|
||||
<span class="font-weight-bold" v-if="!controllable || (controllable && pwm)">{{ Math.round(parseFloat(value)*100) }} %</span>
|
||||
<v-icon v-if="controllable && !pwm" @click="switchOutputPin">{{ value ? "mdi-toggle-switch" : "mdi-toggle-switch-off-outline" }}</v-icon>
|
||||
</v-subheader>
|
||||
<v-card-text class="py-0" v-if="controllable && pwm">
|
||||
<v-slider
|
||||
v-model="value"
|
||||
:min="0"
|
||||
:max="1"
|
||||
:min="0.0"
|
||||
:max="1.0"
|
||||
:step="0.01"
|
||||
@change="sendCmd"
|
||||
hide-details>
|
||||
|
||||
:color="value < off_below && value > 0 ? 'red' : undefined"
|
||||
@start="sliding = true"
|
||||
@end="sendCmd()"
|
||||
hide-details
|
||||
>
|
||||
<template v-slot:prepend>
|
||||
<v-icon @click="decrement">mdi-minus</v-icon>
|
||||
</template>
|
||||
@@ -43,16 +46,16 @@
|
||||
import {convertName} from "@/plugins/helpers";
|
||||
|
||||
export default {
|
||||
data: function() {
|
||||
return {
|
||||
value: this.target,
|
||||
}
|
||||
},
|
||||
props: {
|
||||
target: {
|
||||
type: Number,
|
||||
required: true,
|
||||
},
|
||||
max: {
|
||||
type: Number,
|
||||
required: false,
|
||||
default: 1,
|
||||
},
|
||||
name: {
|
||||
type: String,
|
||||
required: true,
|
||||
@@ -73,24 +76,57 @@
|
||||
required: false,
|
||||
default: false
|
||||
},
|
||||
rpm: {
|
||||
type: [Number, Boolean],
|
||||
required: false,
|
||||
default: false
|
||||
},
|
||||
multi: {
|
||||
type: Number,
|
||||
required: false,
|
||||
default: 1
|
||||
},
|
||||
off_below: {
|
||||
type: Number,
|
||||
required: false,
|
||||
default: 0
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
min: 0,
|
||||
value: this.target,
|
||||
sliding: false,
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
convertName: convertName,
|
||||
sendCmd() {
|
||||
let gcode = "";
|
||||
if (this.sliding) {
|
||||
let gcode = "";
|
||||
|
||||
if (this.type === "fan") gcode = "M106 S"+(this.value * this.multi).toFixed(0)
|
||||
if (this.type === "fan_generic") gcode = "SET_FAN_SPEED FAN="+this.name+" SPEED="+(this.value*this.multi)
|
||||
if (this.type === "output_pin") gcode = "SET_PIN PIN="+this.name+" VALUE="+(this.value*this.multi).toFixed(2)
|
||||
if (this.value < this.min) {
|
||||
this.value = 0;
|
||||
}
|
||||
|
||||
if (gcode !== "") {
|
||||
this.$store.commit('server/addEvent', { message: gcode, type: 'command' })
|
||||
this.$socket.sendObj('printer.gcode.script', { script: gcode })
|
||||
if (this.target === this.value) {
|
||||
return;
|
||||
}
|
||||
|
||||
const l_value = this.value * this.multi;
|
||||
|
||||
if (this.type === "fan") gcode = "M106 S" + (l_value).toFixed(0)
|
||||
if (this.type === "fan_generic") {
|
||||
gcode = "SET_FAN_SPEED FAN=" + this.name + " SPEED=" + (l_value)
|
||||
}
|
||||
if (this.type === "output_pin") gcode = "SET_PIN PIN=" + this.name + " VALUE=" + (l_value).toFixed(2)
|
||||
|
||||
if (gcode !== "") {
|
||||
this.$store.commit('server/addEvent', {message: gcode, type: 'command'})
|
||||
this.$socket.sendObj('printer.gcode.script', {script: gcode})
|
||||
}
|
||||
|
||||
this.sliding = false;
|
||||
}
|
||||
},
|
||||
switchOutputPin() {
|
||||
@@ -100,21 +136,23 @@
|
||||
this.$socket.sendObj('printer.gcode.script', { script: gcode })
|
||||
},
|
||||
decrement() {
|
||||
this.value = this.value > 0 ? (this.value - 0.01).toFixed(2) : 0;
|
||||
this.sendCmd();
|
||||
this.value = this.value > 0 ? (this.value - 0.01).toFixed(2) : 0
|
||||
this.sliding = true
|
||||
this.sendCmd()
|
||||
},
|
||||
increment() {
|
||||
this.value = this.value < 1 ? (this.value + 0.01).toFixed(2) : 100;
|
||||
this.sendCmd();
|
||||
this.value = this.value < 1.0 ? (this.value + 0.01).toFixed(2) : 1.0;
|
||||
if (this.value < this.off_below) {
|
||||
this.value = this.off_below
|
||||
}
|
||||
this.sliding = true
|
||||
this.sendCmd()
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
target: function(newVal) {
|
||||
this.value = newVal;
|
||||
},
|
||||
},
|
||||
created: function() {
|
||||
|
||||
},
|
||||
target(newVal) {
|
||||
this.value = newVal / this.max
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -26,12 +26,14 @@
|
||||
},
|
||||
methods: {
|
||||
setValue() {
|
||||
if (this.value) {
|
||||
let index = this.hiddenMacros.indexOf(this.name.toUpperCase());
|
||||
if (index > -1) this.hiddenMacros.splice(index, 1)
|
||||
} else this.hiddenMacros.push(this.name.toUpperCase())
|
||||
let hiddenMacros = this.hiddenMacros
|
||||
|
||||
this.$store.dispatch("gui/upload")
|
||||
if (this.value) {
|
||||
let index = hiddenMacros.indexOf(this.name.toUpperCase());
|
||||
if (index > -1) hiddenMacros.splice(index, 1)
|
||||
} else hiddenMacros.push(this.name.toUpperCase())
|
||||
|
||||
this.$store.dispatch("gui/setSettings", { dashboard: { hiddenMacros: hiddenMacros }})
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
|
||||
@@ -162,6 +162,12 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
max: {
|
||||
immediate: true,
|
||||
handler(newVal) {
|
||||
this.processedMax = newVal
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
sendCmd(btnPress = false) {
|
||||
|
||||
@@ -2,6 +2,7 @@ import Vue from 'vue'
|
||||
import WebSocketClient from './plugins/wsClient'
|
||||
import App from './App.vue'
|
||||
import vuetify from './plugins/vuetify'
|
||||
import './plugins/longpress';
|
||||
import VueResource from 'vue-resource'
|
||||
import './components'
|
||||
import store from './store'
|
||||
|
||||
@@ -8,7 +8,6 @@
|
||||
<webcam-panel class="mt-6" v-if="showDashboardWebcam"></webcam-panel>
|
||||
<z-offset-panel class="mt-6" v-if="klippy_state === 'ready'"></z-offset-panel>
|
||||
<control-panel class="mt-6" v-if="klippy_state === 'ready'"></control-panel>
|
||||
<extruder-panel class="mt-6" v-if="klippy_state === 'ready'"></extruder-panel>
|
||||
<miscellaneous-panel v-if="klippy_state === 'ready'"></miscellaneous-panel>
|
||||
</v-col>
|
||||
<v-col class="col-sm-12 col-md-7" v-if="klippy_connected">
|
||||
|
||||
+31
-29
@@ -53,7 +53,7 @@
|
||||
<v-card-title>
|
||||
G-Code Files
|
||||
<v-spacer class="d-none d-sm-block"></v-spacer>
|
||||
<input type="file" ref="fileUpload" accept=".gcode, .ufp" style="display: none" multiple @change="uploadFile" />
|
||||
<input type="file" ref="fileUpload" :accept="validGcodeExtensions.join(', ')" style="display: none" multiple @change="uploadFile" />
|
||||
<v-item-group class="v-btn-toggle my-5 my-sm-0 col-12 col-sm-auto px-0 py-0" name="controllers">
|
||||
<v-btn @click="clickUploadButton" title="Upload new Gcode" class="primary flex-grow-1" :loading="loadings.includes('gcodeUpload')"><v-icon>mdi-upload</v-icon></v-btn>
|
||||
<v-btn @click="createDirectory" title="Create new Directory" class="flex-grow-1"><v-icon>mdi-folder-plus</v-icon></v-btn>
|
||||
@@ -137,9 +137,10 @@
|
||||
|
||||
<template #item="{ item }">
|
||||
<tr
|
||||
v-longpress:600="(e) => showContextMenu(e, item)"
|
||||
@contextmenu="showContextMenu($event, item)"
|
||||
@click="clickRow(item)"
|
||||
class="file-list-cursor"
|
||||
class="file-list-cursor user-select-none"
|
||||
draggable="true"
|
||||
@drag="dragFile($event, item)"
|
||||
@dragend="dragendFile($event)"
|
||||
@@ -175,7 +176,7 @@
|
||||
</v-card>
|
||||
<v-menu v-model="contextMenu.shown" :position-x="contextMenu.x" :position-y="contextMenu.y" absolute offset-y>
|
||||
<v-list>
|
||||
<v-list-item @click="clickRow(contextMenu.item)" :disabled="is_printing" v-if="!contextMenu.item.isDirectory">
|
||||
<v-list-item @click="clickRow(contextMenu.item, true)" :disabled="is_printing" v-if="!contextMenu.item.isDirectory">
|
||||
<v-icon class="mr-1">mdi-play</v-icon> Print start
|
||||
</v-list-item>
|
||||
<v-list-item
|
||||
@@ -293,6 +294,7 @@
|
||||
import { mapState, mapGetters } from 'vuex'
|
||||
import axios from 'axios'
|
||||
import { findDirectory } from "@/plugins/helpers"
|
||||
import { validGcodeExtensions } from "@/store/variables"
|
||||
|
||||
export default {
|
||||
data () {
|
||||
@@ -368,7 +370,8 @@
|
||||
time: 0,
|
||||
loaded: 0
|
||||
}
|
||||
}
|
||||
},
|
||||
validGcodeExtensions: validGcodeExtensions
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
@@ -545,12 +548,16 @@
|
||||
return '--'
|
||||
},
|
||||
showContextMenu (e, item) {
|
||||
e.preventDefault()
|
||||
this.contextMenu.shown = true
|
||||
this.contextMenu.x = e.clientX
|
||||
this.contextMenu.y = e.clientY
|
||||
this.contextMenu.item = item
|
||||
this.$nextTick(() => { this.contextMenu.shown = true })
|
||||
if (!this.contextMenu.shown) {
|
||||
e?.preventDefault();
|
||||
this.contextMenu.shown = true
|
||||
this.contextMenu.x = e?.clientX || e?.pageX || window.screenX / 2;
|
||||
this.contextMenu.y = e?.clientY || e?.pageY || window.screenY / 2;
|
||||
this.contextMenu.item = item
|
||||
this.$nextTick(() => {
|
||||
this.contextMenu.shown = true
|
||||
})
|
||||
}
|
||||
},
|
||||
preheat() {
|
||||
if (
|
||||
@@ -621,13 +628,18 @@
|
||||
deleteDirectoryAction: function() {
|
||||
this.$socket.sendObj('server.files.delete_directory', { path: this.currentPath+"/"+this.contextMenu.item.filename }, 'files/getDeleteDir');
|
||||
},
|
||||
clickRow: function(item) {
|
||||
if (!item.isDirectory) {
|
||||
this.dialogPrintFile.show = true;
|
||||
this.dialogPrintFile.item = item;
|
||||
} else {
|
||||
this.currentPath += "/"+item.filename;
|
||||
this.loadPath();
|
||||
clickRow(item, force = false) {
|
||||
if (!this.contextMenu.shown || force) {
|
||||
if (force) {
|
||||
this.contextMenu.shown = false;
|
||||
}
|
||||
if (!item.isDirectory) {
|
||||
this.dialogPrintFile.show = true;
|
||||
this.dialogPrintFile.item = item;
|
||||
} else {
|
||||
this.currentPath += "/" + item.filename;
|
||||
this.loadPath();
|
||||
}
|
||||
}
|
||||
},
|
||||
clickRowGoBack: function() {
|
||||
@@ -642,8 +654,8 @@
|
||||
}
|
||||
},
|
||||
startPrint(filename = "") {
|
||||
filename = (this.currentPath+"/"+filename).substring(7);
|
||||
this.dialogPrintFile.show = false;
|
||||
filename = (this.currentPath+"/"+filename).substring(7)
|
||||
this.dialogPrintFile.show = false
|
||||
this.$socket.sendObj('printer.print.start', { filename: filename }, 'switchToDashboard');
|
||||
},
|
||||
dragOverUpload(e) {
|
||||
@@ -866,16 +878,6 @@
|
||||
if (headerElement) headerElement.visible = false
|
||||
})
|
||||
}
|
||||
/*headers: {
|
||||
deep: true,
|
||||
handler(newVal) {
|
||||
window.console.log(newVal)
|
||||
newVal.forEach((element) => {
|
||||
if (element.visible && this.hideMetadataColums.includes(element.value)) this.hideMetadataColums.splice(this.hideMetadataColums.indexOf(element.value), 1)
|
||||
else if (!element.visible && !this.hideMetadataColums.includes(element.value)) this.hideMetadataColums.push(element.value)
|
||||
})
|
||||
}
|
||||
}*/
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -71,7 +71,15 @@
|
||||
<template v-slot:default>
|
||||
<tbody>
|
||||
<tr v-for="(profile, index) in profiles" :key="index" >
|
||||
<td>{{ profile.name }}<small class="ml-2" v-if="'deleted' in profile.data">(deleted)</small></td>
|
||||
<td><span @click="loadProfile(profile.name)" :class="('profile_name' in bed_mesh && bed_mesh.profile_name === profile.name) ? 'font-weight-bold' : ''" style="cursor: pointer;">{{ profile.name }}</span><small class="ml-2" v-if="'deleted' in profile.data">(deleted)</small></td>
|
||||
<td>
|
||||
<v-tooltip top color="rgba(0,0,0,0.8)">
|
||||
<template v-slot:activator="{ on, attrs }">
|
||||
<small v-bind="attrs" v-on="on">{{ profile.variance.toFixed(3) }}</small>
|
||||
</template>
|
||||
<span>min: {{ profile.min }}<br/>max: {{ profile.max }}</span>
|
||||
</v-tooltip>
|
||||
</td>
|
||||
<td class="text-right">
|
||||
<v-btn-toggle dense no-gutters>
|
||||
<v-btn class="btnMinWidthAuto" @click="loadProfile(profile.name)" :loading="loadings.includes('bedMeshLoad_'+profile.name)" :disabled="('profile_name' in bed_mesh && bed_mesh.profile_name === profile.name) || 'deleted' in profile.data" ><v-icon small>mdi-view-grid-plus</v-icon></v-btn>
|
||||
@@ -250,7 +258,6 @@
|
||||
},
|
||||
methods: {
|
||||
showBedMesh: function() {
|
||||
window.console.log("showBedMesh")
|
||||
this.data[0].x = [];
|
||||
this.data[0].y = [];
|
||||
this.data[0].z = [];
|
||||
|
||||
@@ -0,0 +1,100 @@
|
||||
import Vue from 'vue';
|
||||
|
||||
Vue.directive('longpress', {
|
||||
bind: function (el, binding, vNode) {
|
||||
// Make sure expression provided is a function
|
||||
if (typeof binding.value !== 'function') {
|
||||
// Fetch name of component
|
||||
const compName = vNode.context.name
|
||||
// pass warning to console
|
||||
let warn = `[longpress:] provided expression '${binding.expression}' is not a function, but has to be`
|
||||
if (compName) { warn += ` Found in component '${compName}' ` }
|
||||
|
||||
console.warn(warn)
|
||||
}
|
||||
|
||||
const debounceTime = parseInt(binding.arg ?? 1000);
|
||||
|
||||
// Run Function
|
||||
const handler = (e) => {
|
||||
binding.value(e)
|
||||
}
|
||||
|
||||
// Define variable
|
||||
let pressTimer = null
|
||||
|
||||
// Define funtion handlers
|
||||
// Create timeout ( run function after 1s )
|
||||
let before = null;
|
||||
let start = (e) => {
|
||||
if ((e.type === 'click' && e.button !== 0)) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!e.touches || e.touches.length < 1) {
|
||||
return;
|
||||
}
|
||||
|
||||
before = document.querySelector('body').getAttribute('style');
|
||||
document.querySelector('body').setAttribute('style', (before ?? '') + 'user-select: none; -webkit-user-select: none; -moz-user-select: none;');
|
||||
|
||||
if (pressTimer === null) {
|
||||
pressTimer = setTimeout(() => {
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
e.stopImmediatePropagation();
|
||||
e.cancelBubble = true;
|
||||
// Run function
|
||||
handler({
|
||||
clientX: e.touches[0].clientX,
|
||||
clientY: e.touches[0].clientY,
|
||||
force: e.touches[0].force,
|
||||
identifier: e.touches[0].identifier,
|
||||
pageX: e.touches[0].pageX,
|
||||
pageY: e.touches[0].pageY,
|
||||
radiusX: e.touches[0].radiusX,
|
||||
radiusY: e.touches[0].radiusY,
|
||||
rotationAngle: e.touches[0].rotationAngle,
|
||||
screenX: e.touches[0].screenX,
|
||||
screenY: e.touches[0].screenY,
|
||||
preventDefault: () => e.preventDefault()
|
||||
});
|
||||
setTimeout(() => {
|
||||
if (before) {
|
||||
document.querySelector('body').setAttribute('style', before);
|
||||
}
|
||||
}, 100);
|
||||
}, debounceTime);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
// Cancel Timeout
|
||||
let cancel = () => {
|
||||
// Check if timer has a value or not
|
||||
if (pressTimer !== null) {
|
||||
clearTimeout(pressTimer)
|
||||
pressTimer = null
|
||||
if (before) {
|
||||
document.querySelector('body').setAttribute('style', before);
|
||||
}
|
||||
/*console.log(e.type);
|
||||
if (e.type === "touchend" && vNode.data.on.click) {
|
||||
vNode.data.on.click();
|
||||
}*/
|
||||
}
|
||||
}
|
||||
|
||||
// Add Event listeners
|
||||
// el.addEventListener("mousedown", start);
|
||||
el.addEventListener("touchstart", start);
|
||||
// Cancel timeouts if this events happen
|
||||
//el.addEventListener("click", cancel);
|
||||
//el.addEventListener("mouseout", cancel);
|
||||
el.addEventListener("touchmove", cancel);
|
||||
el.addEventListener("touchend", cancel);
|
||||
el.addEventListener("touchcancel", cancel);
|
||||
|
||||
document.addEventListener("scroll", cancel);
|
||||
}
|
||||
});
|
||||
@@ -34,7 +34,7 @@ export default {
|
||||
}
|
||||
}
|
||||
} else {
|
||||
rootState.gui.remotePrinters.forEach((printer) => {
|
||||
rootState.gui.remote_printers.forEach((printer) => {
|
||||
commit('addPrinter',{
|
||||
hostname: printer.hostname,
|
||||
port: printer.port,
|
||||
@@ -65,7 +65,7 @@ export default {
|
||||
})
|
||||
}
|
||||
|
||||
dispatch("gui/setSettings", { remotePrinters: printers }, { root: true })
|
||||
dispatch("gui/setSettings", { remote_printers: printers }, { root: true })
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
@@ -122,6 +122,11 @@ export default {
|
||||
action: "getConfigDir",
|
||||
params: { root: "config"}
|
||||
})
|
||||
|
||||
dispatch("sendObj", {
|
||||
method: "server.database.list",
|
||||
action: "getDatabases"
|
||||
})
|
||||
},
|
||||
|
||||
getObjectsList({ dispatch }, payload) {
|
||||
@@ -172,4 +177,20 @@ export default {
|
||||
getConfigDir({ commit }, payload) {
|
||||
commit("setConfigDir", payload)
|
||||
},
|
||||
|
||||
getDatabases({ commit, dispatch }, payload) {
|
||||
commit("setDatabases", payload.namespaces)
|
||||
|
||||
if (payload.namespaces.includes("mainsail")) {
|
||||
dispatch("sendObj", {
|
||||
method: 'server.database.get_item',
|
||||
params: { namespace: "mainsail" },
|
||||
action: "getMainsailData"
|
||||
})
|
||||
}
|
||||
},
|
||||
|
||||
getMainsailData({ commit }, payload) {
|
||||
commit("setMainsailData", payload.value)
|
||||
}
|
||||
}
|
||||
@@ -21,6 +21,7 @@ export function getDefaultState() {
|
||||
data: {
|
||||
|
||||
},
|
||||
databases: [],
|
||||
current_file: {},
|
||||
theme_files: []
|
||||
}
|
||||
|
||||
@@ -59,20 +59,11 @@ export default {
|
||||
if ("filename" in file) {
|
||||
if (file.filename.startsWith(".theme/")) {
|
||||
state.theme_files.push(file.filename)
|
||||
} else if (file.filename === ".mainsail.json") {
|
||||
fetch('//'+state.socket.hostname+':'+state.socket.port+'/server/files/config/.mainsail.json?time='+Date.now())
|
||||
.then(res => res.json()).then(file => {
|
||||
this.commit("farm/"+state._namespace+"/setMainsailJson", file)
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
setMainsailJson(state, payload) {
|
||||
Vue.set(state.data, 'gui', payload.state)
|
||||
},
|
||||
|
||||
notifyFilelistChanged( state, payload) {
|
||||
if (
|
||||
payload.action === "upload_file" &&
|
||||
@@ -84,5 +75,13 @@ export default {
|
||||
this.commit("farm/"+state._namespace+"/setMainsailJson", file)
|
||||
})
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
setDatabases(state, payload) {
|
||||
Vue.set(state, 'databases', payload.namespaces)
|
||||
},
|
||||
|
||||
setMainsailData(state, payload) {
|
||||
Vue.set(state.data, 'gui', payload)
|
||||
},
|
||||
}
|
||||
@@ -34,6 +34,21 @@ export default {
|
||||
return '/img/sidebar-background.png'
|
||||
},
|
||||
|
||||
getMainBackground: (state, getters, rootState, rootGetters) => {
|
||||
let configDir = findDirectory(state.filetree, ['config', themeDir])
|
||||
|
||||
let file = configDir.find(element =>
|
||||
element.filename !== undefined && (
|
||||
element.filename === 'main-background.jpg' ||
|
||||
element.filename === 'main-background.png' ||
|
||||
element.filename === 'main-background.gif'
|
||||
)
|
||||
)
|
||||
if (file) return 'url('+rootGetters["socket/getUrl"]+'/server/files/config/'+themeDir+'/'+file.filename+')'
|
||||
|
||||
return 'transparent'
|
||||
},
|
||||
|
||||
getCustomStylesheet: (state, getters, rootState, rootGetters) => {
|
||||
let configDir = findDirectory(state.filetree, ['config', themeDir])
|
||||
|
||||
|
||||
@@ -20,6 +20,7 @@ export default {
|
||||
for (const [key, item] of Object.entries(parent)) {
|
||||
if (
|
||||
item.isDirectory &&
|
||||
'filename' in item &&
|
||||
'dirs' in payload &&
|
||||
payload.dirs.length > 0 &&
|
||||
payload.dirs.findIndex(element => element.dirname === item.filename) < 0
|
||||
|
||||
+110
-53
@@ -1,90 +1,147 @@
|
||||
import axios from "axios";
|
||||
import Vue from "vue";
|
||||
import objectAssignDeep from "object-assign-deep"
|
||||
|
||||
export default {
|
||||
reset({ commit }) {
|
||||
commit('reset')
|
||||
},
|
||||
|
||||
getData({ commit, dispatch }, payload) {
|
||||
commit('setData', payload)
|
||||
getData({ commit, dispatch, rootState }, payload) {
|
||||
commit('setData', payload.value)
|
||||
|
||||
if (
|
||||
'state' in payload &&
|
||||
'tempchart' in payload.state &&
|
||||
'datasetSettings' in payload.state.tempchart
|
||||
) {
|
||||
for (const key of Object.keys(payload.state.tempchart.datasetSettings)) {
|
||||
if (
|
||||
'color' in payload.state.tempchart.datasetSettings[key] &&
|
||||
typeof payload.state.tempchart.datasetSettings[key].color === "object"
|
||||
) {
|
||||
dispatch('setTempchartDatasetSetting', { name: key, type: 'color', value: payload.state.tempchart.datasetSettings[key].color.hex })
|
||||
}
|
||||
}
|
||||
if ('tempchart' in payload.value && 'datasetSettings' in payload.value.tempchart) {
|
||||
commit('setTempchartDatasetSettings', payload.value.tempchart.datasetSettings)
|
||||
}
|
||||
|
||||
if (!rootState.socket.remoteMode) {
|
||||
dispatch('farm/readStoredPrinters', {}, { root: true })
|
||||
}
|
||||
|
||||
dispatch('printer/init', null, { root: true })
|
||||
},
|
||||
|
||||
setSettings({ commit, dispatch }, payload) {
|
||||
setSettings({ commit }, payload) {
|
||||
commit('setSettings', payload)
|
||||
|
||||
if ('tempchart' in payload && 'boolPowerDatasets' in payload.tempchart) {
|
||||
if (payload.tempchart.boolPowerDatasets) commit('printer/tempHistory/showPowerDatasets', {}, { root: true })
|
||||
else commit('printer/tempHistory/hidePowerDatasets', {}, { root: true })
|
||||
Object.keys(payload).forEach(key => {
|
||||
Vue.prototype.$socket.sendObj('server.database.get_item', { namespace: 'mainsail' }, 'gui/updateSettings', { newVal: payload[key], keyName: key })
|
||||
})
|
||||
},
|
||||
|
||||
updateSettings({ commit }, payload) {
|
||||
const keyName = payload.keyName
|
||||
let newState = payload.newVal
|
||||
if ('value' in payload && keyName in payload.value && typeof payload.value[keyName] !== "string") {
|
||||
newState = objectAssignDeep(payload.value[keyName], newState)
|
||||
}
|
||||
|
||||
dispatch('upload')
|
||||
Vue.prototype.$socket.sendObj('server.database.post_item', { namespace: 'mainsail', key: keyName, value: newState })
|
||||
|
||||
commit('void', {}, { root: true })
|
||||
},
|
||||
|
||||
upload({ state, rootState }) {
|
||||
let file = new File([JSON.stringify({ state })], '.mainsail.json')
|
||||
|
||||
let formData = new FormData();
|
||||
formData.append('file', file);
|
||||
formData.append('root', 'config');
|
||||
|
||||
axios.post('//' + rootState.socket.hostname + ':' + rootState.socket.port + '/server/files/upload',
|
||||
formData, {
|
||||
headers: { 'Content-Type': 'multipart/form-data' }
|
||||
}
|
||||
).then(() => {
|
||||
|
||||
}).catch(() => {
|
||||
window.console.error("Error save .mainsail.json!")
|
||||
});
|
||||
},
|
||||
|
||||
setGcodefilesMetadata({ commit, dispatch }, data) {
|
||||
setGcodefilesMetadata({ commit, dispatch, state }, data) {
|
||||
commit('setGcodefilesMetadata', data)
|
||||
dispatch('upload')
|
||||
dispatch('updateSettings', {
|
||||
keyName: 'gcodefiles',
|
||||
newVal: state.gcodefiles
|
||||
})
|
||||
},
|
||||
|
||||
setGcodefilesShowHiddenFiles({ commit, dispatch }, data) {
|
||||
setGcodefilesShowHiddenFiles({ commit, dispatch, state }, data) {
|
||||
commit('setGcodefilesShowHiddenFiles', data)
|
||||
dispatch('upload')
|
||||
dispatch('updateSettings', {
|
||||
keyName: 'gcodefiles',
|
||||
newVal: state.gcodefiles
|
||||
})
|
||||
},
|
||||
|
||||
addPreset({ commit, dispatch }, payload) {
|
||||
addPreset({ commit, dispatch, state }, payload) {
|
||||
commit("addPreset", payload)
|
||||
dispatch("upload")
|
||||
dispatch('updateSettings', {
|
||||
keyName: 'presets',
|
||||
newVal: state.presets
|
||||
})
|
||||
},
|
||||
|
||||
updatePreset({ commit, dispatch }, payload) {
|
||||
updatePreset({ commit, dispatch, state }, payload) {
|
||||
commit("updatePreset", payload)
|
||||
dispatch("upload")
|
||||
dispatch('updateSettings', {
|
||||
keyName: 'presets',
|
||||
newVal: state.presets
|
||||
})
|
||||
},
|
||||
|
||||
deletePreset({ commit, dispatch }, payload) {
|
||||
deletePreset({ commit, dispatch, state }, payload) {
|
||||
commit("deletePreset", payload)
|
||||
dispatch("upload")
|
||||
dispatch('updateSettings', {
|
||||
keyName: 'presets',
|
||||
newVal: state.presets
|
||||
})
|
||||
},
|
||||
|
||||
setTempchartDatasetSetting({ commit, dispatch }, payload) {
|
||||
setTempchartDatasetSetting({ commit, dispatch, state }, payload) {
|
||||
commit("setTempchartDatasetSetting", payload)
|
||||
dispatch("upload")
|
||||
dispatch('updateSettings', {
|
||||
keyName: 'tempchart',
|
||||
newVal: state.tempchart
|
||||
})
|
||||
},
|
||||
|
||||
setTempchartDatasetAdditionalSensorSetting({ commit, dispatch }, payload) {
|
||||
setTempchartDatasetAdditionalSensorSetting({ commit, dispatch, state }, payload) {
|
||||
commit("setTempchartDatasetAdditionalSensorSetting", payload)
|
||||
dispatch("upload")
|
||||
dispatch('updateSettings', {
|
||||
keyName: 'tempchart',
|
||||
newVal: state.tempchart
|
||||
})
|
||||
},
|
||||
|
||||
resetMoonrakerDB() {
|
||||
Vue.prototype.$socket.sendObj('server.database.list', { }, 'gui/resetMoonrakerDB2')
|
||||
},
|
||||
|
||||
resetMoonrakerDB2({ commit }, payload) {
|
||||
if ('namespaces' in payload && payload.namespaces.includes('mainsail')) {
|
||||
Vue.prototype.$socket.sendObj('server.database.get_item', { namespace: 'mainsail' }, 'gui/resetMoonrakerDB3')
|
||||
}
|
||||
|
||||
commit('void', {}, { root: true })
|
||||
},
|
||||
|
||||
resetMoonrakerDB3({ commit }, payload) {
|
||||
if ('value' in payload && Object.keys(payload.value).length) {
|
||||
Object.keys(payload.value).forEach(key => {
|
||||
Vue.prototype.$socket.sendObj('server.database.delete_item', { namespace: 'mainsail', key: key })
|
||||
})
|
||||
|
||||
window.location.reload()
|
||||
}
|
||||
|
||||
commit('void', {}, { root: true })
|
||||
},
|
||||
|
||||
//TODO: remove it after a short time of migration. maybe april release
|
||||
migrateMainsailJson({ state, dispatch, rootState }, payload) {
|
||||
const settings = {}
|
||||
|
||||
Object.keys(payload.state).forEach(key => {
|
||||
if (key in state) {
|
||||
settings[key] = {...payload.state[key]}
|
||||
}
|
||||
|
||||
if (key === "cooldownGcode") settings["cooldown_gcode"] = payload.state[key]
|
||||
if (key === "remotePrinters") settings["remote_printers"] = payload.state[key]
|
||||
})
|
||||
|
||||
if (Object.keys(settings).length) {
|
||||
dispatch('setSettings', settings)
|
||||
}
|
||||
|
||||
Vue.prototype.$socket.sendObj('server.files.delete_file', { path: 'config/.mainsail.json' })
|
||||
|
||||
if (!rootState.socket.remoteMode) {
|
||||
dispatch('farm/readStoredPrinters', {}, { root: true })
|
||||
}
|
||||
dispatch('printer/init', null, { root: true })
|
||||
}
|
||||
}
|
||||
+11
-4
@@ -6,6 +6,7 @@ export function getDefaultState() {
|
||||
return {
|
||||
general: {
|
||||
printername: "",
|
||||
displayCancelPrint: false
|
||||
},
|
||||
dashboard: {
|
||||
boolWebcam: false,
|
||||
@@ -18,6 +19,10 @@ export function getDefaultState() {
|
||||
stepsXY: [ 100, 10, 1 ],
|
||||
feedrateZ: 25,
|
||||
stepsZ: [ 25, 1, 0.1 ],
|
||||
stepsAll: [0.1, 1, 10, 25, 50, 100],
|
||||
selectedCrossStep: null,
|
||||
reverseZ: false,
|
||||
useCross: false
|
||||
},
|
||||
extruder: {
|
||||
feedamount: 25,
|
||||
@@ -29,7 +34,7 @@ export function getDefaultState() {
|
||||
webcam: {
|
||||
service: 'mjpegstreamer',
|
||||
targetFps: 25,
|
||||
url: "",
|
||||
url: "/webcam/?action=stream",
|
||||
rotate: false,
|
||||
rotateDegrees: 90,
|
||||
flipX: false,
|
||||
@@ -60,9 +65,11 @@ export function getDefaultState() {
|
||||
showHiddenFiles: false,
|
||||
}
|
||||
},
|
||||
remotePrinters: [],
|
||||
//moonraker DB api dont accept camel case key names
|
||||
remote_printers: [],
|
||||
presets: [],
|
||||
cooldownGcode: "TURN_OFF_HEATERS"
|
||||
//moonraker DB api dont accept camel case key names
|
||||
cooldown_gcode: "TURN_OFF_HEATERS"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -75,4 +82,4 @@ export default {
|
||||
getters,
|
||||
actions,
|
||||
mutations
|
||||
}
|
||||
}
|
||||
@@ -9,16 +9,15 @@ export default {
|
||||
},
|
||||
|
||||
setData(state, payload) {
|
||||
if ("state" in payload) payload = payload.state
|
||||
if ("gui" in payload) payload = payload.gui
|
||||
let setDataDeep = function(currentState, payload) {
|
||||
Object.entries(payload).forEach(([key, value]) => {
|
||||
if (typeof value === 'object' && !Array.isArray(value) && key in currentState) {
|
||||
setDataDeep(currentState[key], value)
|
||||
} else if (key in currentState) Vue.set(currentState, key, value)
|
||||
})
|
||||
}
|
||||
|
||||
Object.entries(payload).forEach(([key, value]) => {
|
||||
if (typeof value === 'object' && !Array.isArray(value) && key in state) {
|
||||
Object.entries(value).forEach(([key2, value2]) => {
|
||||
if (key2 in state[key]) Vue.set(state[key], key2, value2)
|
||||
})
|
||||
} else if (key in state) Vue.set(state, key, value)
|
||||
})
|
||||
setDataDeep(state, payload)
|
||||
},
|
||||
|
||||
// override special setting
|
||||
@@ -67,6 +66,10 @@ export default {
|
||||
}
|
||||
},
|
||||
|
||||
setTempchartDatasetSettings(state, payload) {
|
||||
Vue.set(state.tempchart, 'datasetSettings', payload)
|
||||
},
|
||||
|
||||
setTempchartDatasetSetting(state, payload) {
|
||||
if (!(payload.name in state.tempchart.datasetSettings))
|
||||
Vue.set(state.tempchart.datasetSettings, payload.name, {})
|
||||
|
||||
@@ -111,6 +111,7 @@ export default {
|
||||
additionValues: getters.getAdditionSensors(nameSplit[1]),
|
||||
tempListAdditionValues: getters.getTempListAdditionSensors(nameSplit[1]),
|
||||
speed: value.speed,
|
||||
rpm: 'rpm' in value ? value.rpm : false,
|
||||
presets: rootGetters["gui/getPresetsFromHeater"]({ name: key }),
|
||||
chartColor: getters["tempHistory/getDatasetColor"](nameSplit[1]),
|
||||
chartTemperature: getters["tempHistory/getSeries"](nameSplit[1]),
|
||||
@@ -231,6 +232,7 @@ export default {
|
||||
if (!name.startsWith("_")) {
|
||||
let controllable = controllableFans.includes(nameSplit[0].toLowerCase())
|
||||
let power = 'speed' in value ? value.speed : ('value' in value ? value.value : 0)
|
||||
let rpm = 'rpm' in value ? value.rpm : false
|
||||
let pwm = controllable
|
||||
let scale = 1
|
||||
|
||||
@@ -239,31 +241,36 @@ export default {
|
||||
if (nameSplit[0].toLowerCase() === "output_pin") {
|
||||
controllable = true
|
||||
pwm = false
|
||||
if (
|
||||
'config' in state.configfile &&
|
||||
key in state.configfile.config
|
||||
) {
|
||||
if (
|
||||
'pwm' in state.configfile.config[key] &&
|
||||
state.configfile.config[key].pwm.toLowerCase() === "true"
|
||||
) pwm = true
|
||||
if ('settings' in state.configfile && key in state.configfile.settings) {
|
||||
if ('pwm' in state.configfile.settings[key])
|
||||
pwm = state.configfile.settings[key].pwm
|
||||
|
||||
if (
|
||||
'scale' in state.configfile.config[key]
|
||||
) scale = state.configfile.config[key].scale
|
||||
if ('scale' in state.configfile.settings[key])
|
||||
scale = state.configfile.settings[key].scale
|
||||
}
|
||||
}
|
||||
|
||||
output.push({
|
||||
const tmp = {
|
||||
name: name,
|
||||
type: nameSplit[0],
|
||||
power: power,
|
||||
controllable: controllable,
|
||||
pwm: pwm,
|
||||
rpm: rpm,
|
||||
scale: scale,
|
||||
object: value,
|
||||
config: state.configfile.config[key]
|
||||
})
|
||||
config: state.configfile.settings[key]
|
||||
}
|
||||
|
||||
if ('settings' in state.configfile && key in state.configfile.settings) {
|
||||
if ('off_below' in state.configfile.settings[key])
|
||||
tmp['off_below'] = state.configfile.settings[key].off_below
|
||||
|
||||
if ('max_power' in state.configfile.settings[key])
|
||||
tmp['max_power'] = state.configfile.settings[key].max_power
|
||||
}
|
||||
|
||||
output.push(tmp)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -418,9 +425,25 @@ export default {
|
||||
let nameSplit = key.split(" ");
|
||||
|
||||
if (nameSplit.length > 1 && nameSplit[0] === "bed_mesh" && nameSplit[1] !== undefined) {
|
||||
let points = []
|
||||
value.points.split("\n").forEach(function(row) {
|
||||
if (row !== "") {
|
||||
row.split(', ').forEach(function(col) {
|
||||
points.push(parseFloat(col))
|
||||
})
|
||||
}
|
||||
})
|
||||
|
||||
const min = Math.min(...points)
|
||||
const max = Math.max(...points)
|
||||
|
||||
profiles.push({
|
||||
name: nameSplit[1],
|
||||
data: value,
|
||||
points: points,
|
||||
min: min,
|
||||
max: max,
|
||||
variance: Math.abs(min - max),
|
||||
is_active: (currentProfile === nameSplit[1]),
|
||||
});
|
||||
}
|
||||
|
||||
@@ -65,6 +65,11 @@ export function getDefaultState() {
|
||||
|
||||
}
|
||||
},
|
||||
settings: {
|
||||
printer: {
|
||||
|
||||
}
|
||||
},
|
||||
config_changed: false,
|
||||
},
|
||||
helplist: [],
|
||||
|
||||
@@ -38,5 +38,15 @@ export default {
|
||||
})
|
||||
|
||||
return Math.ceil((maxTemp + 1) / 10) * 10
|
||||
},
|
||||
|
||||
getBoolDisplayPwmAxis: state => {
|
||||
return state.series.findIndex(serie =>
|
||||
serie.name.lastIndexOf("_") &&
|
||||
['power', 'speed'].includes(serie.name.substr(serie.name.lastIndexOf("_")+1)) &&
|
||||
'lineStyle' in serie &&
|
||||
'opacity' in serie.lineStyle &&
|
||||
serie.lineStyle.opacity > 0
|
||||
) !== -1
|
||||
}
|
||||
}
|
||||
@@ -58,8 +58,10 @@ export default {
|
||||
if (datasetIndex !== -1) {
|
||||
if (payload.type === "target" && 'areaStyle' in state.series[datasetIndex]) {
|
||||
Vue.set(state.series[datasetIndex].areaStyle, 'opacity', payload.value ? 0.1 : 0)
|
||||
Vue.set(state.series[datasetIndex].emphasis.areaStyle, 'opacity', payload.value ? 0.1 : 0)
|
||||
} else if ('lineStyle' in state.series[datasetIndex]) {
|
||||
Vue.set(state.series[datasetIndex].lineStyle, 'opacity', payload.value ? 0.9 : 0)
|
||||
Vue.set(state.series[datasetIndex].emphasis.lineStyle, 'opacity', payload.value ? 0.9 : 0)
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
@@ -10,7 +10,23 @@ export default {
|
||||
init() {
|
||||
Vue.prototype.$socket.sendObj('server.info', {}, 'server/getInfo')
|
||||
Vue.prototype.$socket.sendObj('server.config', {}, 'server/getConfig')
|
||||
Vue.prototype.$socket.sendObj('server.files.list', { root: 'config' }, 'server/checkMainsailJson')
|
||||
Vue.prototype.$socket.sendObj('server.database.list', { root: 'config' }, 'server/checkDatabases')
|
||||
},
|
||||
|
||||
checkDatabases({ commit }, payload) {
|
||||
if (
|
||||
'namespaces' in payload &&
|
||||
payload.namespaces.includes('mainsail')
|
||||
) {
|
||||
Vue.prototype.$socket.sendObj('server.database.get_item', { namespace: 'mainsail' }, 'gui/getData')
|
||||
} else {
|
||||
//fallback for a short time...
|
||||
Vue.prototype.$socket.sendObj('server.files.list', { root: 'config' }, 'server/checkMainsailJson')
|
||||
|
||||
//after this short migration time...
|
||||
//dispatch('printer/init', null, { root: true })
|
||||
commit('void', { }, { root: true })
|
||||
}
|
||||
},
|
||||
|
||||
checkMainsailJson({ dispatch, rootState }, payload) {
|
||||
@@ -22,9 +38,7 @@ export default {
|
||||
|
||||
fetch('//'+rootState.socket.hostname+':'+rootState.socket.port+'/server/files/config/.mainsail.json?time='+Date.now())
|
||||
.then(res => res.json()).then(file => {
|
||||
dispatch('gui/getData', file, { root: true })
|
||||
if (!rootState.socket.remoteMode) dispatch('farm/readStoredPrinters', {}, { root: true })
|
||||
dispatch('printer/init', null, { root: true })
|
||||
dispatch('gui/migrateMainsailJson', file, { root: true })
|
||||
})
|
||||
}
|
||||
})
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
export default {
|
||||
import semver from "semver"
|
||||
|
||||
export default {
|
||||
getUpdateableSoftwares(state) {
|
||||
const output = {}
|
||||
const sortKeys = Object.keys(state.version_info).sort((a,b) => {
|
||||
@@ -27,7 +28,9 @@ export default {
|
||||
if (
|
||||
'version' in state.version_info[key] &&
|
||||
'remote_version' in state.version_info[key] &&
|
||||
state.version_info[key].version !== state.version_info[key].remote_version
|
||||
semver.valid(state.version_info[key].version) &&
|
||||
semver.valid(state.version_info[key].remote_version) &&
|
||||
semver.gt(state.version_info[key].remote_version, state.version_info[key].version)
|
||||
) return true
|
||||
}
|
||||
|
||||
|
||||
@@ -106,7 +106,6 @@ export default {
|
||||
payload.error.message !== "Klippy Request Timed Out" &&
|
||||
payload.error.message !== "Klippy Disconnected"
|
||||
) window.console.error("JSON-RPC: " + payload.error.message)
|
||||
else if (!payload.error) window.console.log(payload)
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
@@ -10,7 +10,6 @@ export const colorArray = [
|
||||
|
||||
export const colorHeaterBed = '#2196F3'
|
||||
export const colorChamber = '#4CAF50'
|
||||
export const temperaturChartSampleLength = 1200
|
||||
export const themeDir = '.theme'
|
||||
export const datasetTypes = [
|
||||
"temperature",
|
||||
@@ -27,4 +26,12 @@ export const datasetTypesInPercents = [
|
||||
export const additionalSensors = [
|
||||
"bme280",
|
||||
"htu21d",
|
||||
]
|
||||
|
||||
export const validGcodeExtensions = [
|
||||
'.gcode',
|
||||
'.g',
|
||||
'.gco',
|
||||
'.ufp',
|
||||
'.nc',
|
||||
]
|
||||
Reference in new issue
Block a user