Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
25a4c3e476 | ||
|
|
19496a1f0a | ||
|
|
1a8a9558d3 | ||
|
|
d94543207f | ||
|
|
9c70a0cafa | ||
|
|
c5aaa2f79f | ||
|
|
595c937d50 | ||
|
|
28a6f5a813 | ||
|
|
4901d4992c | ||
|
|
56d61ce6ae | ||
|
|
be2efac9fd | ||
|
|
7b19c902de | ||
|
|
bf60aef344 | ||
|
|
674ad36ddb | ||
|
|
f535ccf493 | ||
|
|
06bf0acdc3 | ||
|
|
5307412484 | ||
|
|
bd7cf76076 | ||
|
|
aa4c269eab | ||
|
|
d7c2dc5033 | ||
|
|
9da5c356f7 | ||
|
|
bd5723dda6 | ||
|
|
3ab0a5952a | ||
|
|
d76343b7bb | ||
|
|
d94e9f18f3 | ||
|
|
4610eb70bc | ||
|
|
649bbaa7dc | ||
|
|
887da6745a | ||
|
|
b7e94ba25e | ||
|
|
629e0f2f7c | ||
|
|
e919a81536 | ||
|
|
d6b98639c1 | ||
|
|
4ac9b56775 | ||
|
|
e0c1330c4a | ||
|
|
0d89f42935 | ||
|
|
1e5c6c39de | ||
|
|
ff782d9d04 | ||
|
|
61c2ba38b0 | ||
|
|
65cb342cb8 | ||
|
|
81e78e770c | ||
|
|
5ed63ed27f | ||
|
|
c831d33873 | ||
|
|
55df4da104 | ||
|
|
e3db2731ab | ||
|
|
f81c253e85 | ||
|
|
ec67ab3033 | ||
|
|
8acf2b3b7e | ||
|
|
3d14e8ba46 | ||
|
|
450c3db1e6 | ||
|
|
39dbebb2d2 | ||
|
|
94f60516c1 | ||
|
|
098c946dde | ||
|
|
97020863d2 | ||
|
|
d1218aa0f5 | ||
|
|
dc4a322420 | ||
|
|
2ff9e5a111 | ||
|
|
058688d470 | ||
|
|
26ed70b4a7 | ||
|
|
7b3781ebaf | ||
|
|
52ad699f92 | ||
|
|
b2335b16f2 | ||
|
|
a339cabc7d | ||
|
|
b6966f05ee | ||
|
|
c1b344e94c | ||
|
|
35f30aef4f | ||
|
|
da72a4e272 | ||
|
|
e5b0ad292b | ||
|
|
a54813a167 | ||
|
|
95a13c9c44 | ||
|
|
d1905f100a | ||
|
|
a3a12882f8 | ||
|
|
ffa05ee1d5 | ||
|
|
ea49345138 | ||
|
|
83e10bde0c | ||
|
|
9895622cfa | ||
|
|
c38716ba2a | ||
|
|
88ecdcc3c6 | ||
|
|
11f97d6289 | ||
|
|
706ed470c4 | ||
|
|
a6c927508f | ||
|
|
eeac987784 | ||
|
|
275a268c43 | ||
|
|
9c37383787 | ||
|
|
bc353a060d | ||
|
|
5286be32b1 | ||
|
|
3bb52a566e | ||
|
|
64e7626e04 | ||
|
|
deb81094d0 | ||
|
|
667bb2976d | ||
|
|
f404895126 | ||
|
|
6a2617075b | ||
|
|
2f984a6d5b | ||
|
|
d16f0e0fdf | ||
|
|
d91e3a64ba | ||
|
|
81a7289194 | ||
|
|
4f65bd4ba2 | ||
|
|
1934e29bad | ||
|
|
73f445d005 | ||
|
|
e45d7d69d2 | ||
|
|
cd6a5c3b4a | ||
|
|
0c4601e23a | ||
|
|
abec546575 | ||
|
|
93dd1e3034 | ||
|
|
1decdd2c57 | ||
|
|
093cd7c5d4 | ||
|
|
a20bab62a5 | ||
|
|
02ebeb8371 | ||
|
|
814f23213e | ||
|
|
f2a33a8e48 | ||
|
|
9df182f44a | ||
|
|
ec832488a9 | ||
|
|
07d9b75425 | ||
|
|
a150d11e81 | ||
|
|
cb87b4c198 | ||
|
|
f4b393053d | ||
|
|
97ace01908 | ||
|
|
63f438671f | ||
|
|
9a8c208930 | ||
|
|
f8bbc5e97c | ||
|
|
25d1267a07 | ||
|
|
1e090484ae | ||
|
|
62f95cddf5 | ||
|
|
5e865aa670 | ||
|
|
5b33db421d | ||
|
|
684e65ed59 | ||
|
|
7f6e6e5bdf | ||
|
|
c4181443e6 | ||
|
|
a51d2167d0 | ||
|
|
6c4bbdb5f9 | ||
|
|
b0e7e503ed | ||
|
|
fae1cc4ab6 | ||
|
|
dda7a488bb | ||
|
|
a33d26f17a | ||
|
|
53d85223e8 | ||
|
|
003586cb7a | ||
|
|
253ff4900c | ||
|
|
91f2b2fa05 | ||
|
|
f6f7fce424 | ||
|
|
f0e3a0a77a | ||
|
|
d190657221 | ||
|
|
0ba9d9c6b6 | ||
|
|
36b8acdcd9 | ||
|
|
648bbe581e | ||
|
|
0bbab2182f | ||
|
|
1298da15f2 | ||
|
|
945a3f8eaf | ||
|
|
abe66b4557 | ||
|
|
37a08a3a37 | ||
|
|
6844e6242c | ||
|
|
de4efb514c | ||
|
|
9d9e914533 | ||
|
|
4037715c8d | ||
|
|
f1724206f6 | ||
|
|
7005b87870 | ||
|
|
06cb14db46 | ||
|
|
25062e5a36 | ||
|
|
ca368867e2 | ||
|
|
d654518c65 | ||
|
|
8021d5a7ad | ||
|
|
cb4910758e | ||
|
|
af1809e025 | ||
|
|
6277a7380d | ||
|
|
3bfeb4613c | ||
|
|
e68bc016b6 | ||
|
|
0cf0311c54 | ||
|
|
8110b2f7b7 | ||
|
|
04ead521b0 | ||
|
|
f6fe02a347 | ||
|
|
8ef89d42f0 | ||
|
|
fe264e6142 | ||
|
|
dd3c897b75 | ||
|
|
d3ee2f920b | ||
|
|
95ebc25434 | ||
|
|
b533955bc3 | ||
|
|
501b012bdb | ||
|
|
69eb41923d | ||
|
|
1187216d5b | ||
|
|
61bb2dcac1 | ||
|
|
79b42aa588 | ||
|
|
9f506f8cbf | ||
|
|
b6527b471a | ||
|
|
85436a0cd6 | ||
|
|
1a6792b6b5 | ||
|
|
7b66065e77 | ||
|
|
7aad8f905d | ||
|
|
881ebbd49a | ||
|
|
8a87d8a144 | ||
|
|
6912dc027e | ||
|
|
123426c6ec | ||
|
|
869423f4c6 | ||
|
|
d92543e1c3 | ||
|
|
460fa71c70 | ||
|
|
1a7a23205b | ||
|
|
3f0f76e2d9 | ||
|
|
46381879e3 | ||
|
|
5218b0baea | ||
|
|
ce09984983 | ||
|
|
9bcbfa48de | ||
|
|
43674bf2d5 | ||
|
|
2ebd3a8396 | ||
|
|
eaba28e24b | ||
|
|
51602fe69c | ||
|
|
ee6a603fae | ||
|
|
34f2eb3189 | ||
|
|
b6cfb0fd88 | ||
|
|
5d2400ccbe | ||
|
|
a75b133dea | ||
|
|
f1ab29e4e6 | ||
|
|
bc5731e0bf | ||
|
|
44309b37df | ||
|
|
fbead2efb1 | ||
|
|
b6c2901908 | ||
|
|
3f4eeadb6f | ||
|
|
678eda0e8c | ||
|
|
3784d8e9c0 | ||
|
|
ae1fa8736a | ||
|
|
30b0469ffd | ||
|
|
7ab6f32d3a | ||
|
|
f60811255f | ||
|
|
47dd6ad6d9 | ||
|
|
64f7c2bebd | ||
|
|
d4b1be9fcc | ||
|
|
1779cca828 | ||
|
|
46e8821821 | ||
|
|
470a00c288 | ||
|
|
ad52728131 | ||
|
|
5d94063973 | ||
|
|
0bcfc4b582 | ||
|
|
57aa96420c | ||
|
|
eef899c19e | ||
|
|
94c1f35f9c | ||
|
|
ed82856140 | ||
|
|
a581be6aec | ||
|
|
a2d90df97c | ||
|
|
6fa1c28bc4 | ||
|
|
86ab389b32 | ||
|
|
88c78518d2 | ||
|
|
0a2a2fd3c5 | ||
|
|
f4e07b7278 | ||
|
|
96578bb95c | ||
|
|
3262e0cfc1 | ||
|
|
ae6667e259 | ||
|
|
7553d4e6c8 | ||
|
|
97298f92dc | ||
|
|
05e88f6ee9 | ||
|
|
216099c524 | ||
|
|
c38d770b69 | ||
|
|
4ab2def2f8 | ||
|
|
41584b47f7 | ||
|
|
8a4a4ce234 | ||
|
|
5a44322ac2 | ||
|
|
9069617de6 | ||
|
|
08b60c0072 | ||
|
|
6b8f56985a | ||
|
|
de673810c3 | ||
|
|
5efbd50024 | ||
|
|
19928e3244 | ||
|
|
fb714fc904 | ||
|
|
45a4113420 | ||
|
|
09e92caa43 | ||
|
|
ceb4ff395c | ||
|
|
ced16fbc1b | ||
|
|
d6e4fc09d6 | ||
|
|
f12d0dd89b | ||
|
|
4c681d5de1 | ||
|
|
d161cf875c | ||
|
|
a9bb288407 | ||
|
|
5495d53cd3 | ||
|
|
bb9d10e00c | ||
|
|
6597c9cdc2 | ||
|
|
8ded071403 | ||
|
|
4fdd49fb27 | ||
|
|
34f44a00b7 | ||
|
|
8bc17d01b3 | ||
|
|
ec44294441 | ||
|
|
4cc9c90a30 | ||
|
|
645575ea31 | ||
|
|
d12f1cbb32 | ||
|
|
877c7ee861 | ||
|
|
c6934d751f | ||
|
|
9cb63ee193 | ||
|
|
a24c6bd90e | ||
|
|
b6fa2e3d83 | ||
|
|
b7e58d98ff | ||
|
|
6a9aef4785 | ||
|
|
890d32c2cf | ||
|
|
16a09e006f | ||
|
|
9a270c5054 | ||
|
|
806ac9cd6a | ||
|
|
bf3077d858 | ||
|
|
2a85e8999f | ||
|
|
875035f6f3 | ||
|
|
60c218fe18 | ||
|
|
89f2b2ce0b | ||
|
|
7e9a274ff7 | ||
|
|
d4cd31291d | ||
|
|
840d8c1c96 | ||
|
|
4340b15ee0 | ||
|
|
eb88bc703b | ||
|
|
eecd24a8d6 | ||
|
|
2f1fd2788e | ||
|
|
6554f5b084 | ||
|
|
0338efd914 | ||
|
|
e8583181e1 | ||
|
|
feeee61ffb | ||
|
|
e6eb4fae18 | ||
|
|
cb2da07479 | ||
|
|
bad3a842e8 | ||
|
|
6e97cf24f2 | ||
|
|
4a88b74bb7 | ||
|
|
ca298eba0f | ||
|
|
ed3ef6adfc | ||
|
|
e7e87eb20d | ||
|
|
e3f15325c1 | ||
|
|
55ab7395e2 | ||
|
|
310e0342c1 | ||
|
|
5f784aa4f5 | ||
|
|
03b8b591b4 | ||
|
|
581cd2b306 | ||
|
|
48b84f9ffd | ||
|
|
9627f6248d | ||
|
|
94896ac4f8 | ||
|
|
adf31153eb | ||
|
|
8ed9f33dc0 | ||
|
|
931d0a6d50 | ||
|
|
c81311bc61 | ||
|
|
c6d4e0630f | ||
|
|
f0481501d5 | ||
|
|
7a9f601a4a | ||
|
|
a307b4e784 | ||
|
|
c9696ad1f8 | ||
|
|
dd9c71a3bb | ||
|
|
1aeaf7d36f | ||
|
|
4d52d9660e | ||
|
|
d1a1d43701 | ||
|
|
a45d6d2c2e | ||
|
|
42ed8bb548 | ||
|
|
e9b1b7963b | ||
|
|
0909dc1357 | ||
|
|
b5b1b44c8d | ||
|
|
76f98caa25 | ||
|
|
4ef29d3ad3 | ||
|
|
922143554b | ||
|
|
bd1fd1fb12 | ||
|
|
4335175daa | ||
|
|
5e0198e259 | ||
|
|
ee18b4cc33 | ||
|
|
bafde49d15 | ||
|
|
243f0d7df0 | ||
|
|
86d75bce77 | ||
|
|
330dee04ed | ||
|
|
0a0c456faa | ||
|
|
4ece97a535 | ||
|
|
3984a40fd9 | ||
|
|
f90fc81634 | ||
|
|
2f81bf390f | ||
|
|
e53d5056dd | ||
|
|
ae82bfe7f7 | ||
|
|
05f5da93d3 | ||
|
|
20a969ebcd | ||
|
|
b99463ee99 | ||
|
|
332ed154d4 | ||
|
|
1e10e34449 | ||
|
|
ec8bcc7fd8 | ||
|
|
8c60877ffe | ||
|
|
a15ddd82bb | ||
|
|
a02963cc88 | ||
|
|
182d7f146e | ||
|
|
1582d886aa | ||
|
|
62ccb1f97d | ||
|
|
5f93aac095 | ||
|
|
6b7894eadc | ||
|
|
d21b080c2b | ||
|
|
c75b621951 | ||
|
|
f8f730e379 | ||
|
|
fc06389f32 | ||
|
|
4d2a61b8b7 | ||
|
|
92a848747a | ||
|
|
af6254a8a7 | ||
|
|
89bc5d6e7d | ||
|
|
39fd77d065 | ||
|
|
ea67e9fa38 | ||
|
|
13233ca878 | ||
|
|
f8842ff070 | ||
|
|
b43cb4efb4 | ||
|
|
7979eaac9b | ||
|
|
951de0e5e7 | ||
|
|
239b4d8525 | ||
|
|
89876a2500 | ||
|
|
7ce9dc30a6 | ||
|
|
11c64e084e | ||
|
|
49b806a10e | ||
|
|
e294a5cdc0 | ||
|
|
4803df5d5d | ||
|
|
2144888ef8 | ||
|
|
ebc61c4e4b | ||
|
|
3dae42edb0 | ||
|
|
d147a92695 | ||
|
|
4ea2721b75 | ||
|
|
5b3e662062 | ||
|
|
9d2ba3b022 | ||
|
|
31327e581d | ||
|
|
ea95381410 | ||
|
|
af6b45bd92 | ||
|
|
a81a486602 | ||
|
|
dd2c8c58ca | ||
|
|
32310bad29 | ||
|
|
eadc796e01 | ||
|
|
dc9d3361a0 | ||
|
|
6d5a31cc39 | ||
|
|
10a867227f | ||
|
|
f93ee19b9a | ||
|
|
d3c1d1409d | ||
|
|
5eab1917bd | ||
|
|
c8551abdda | ||
|
|
fbc3afd69e | ||
|
|
65acd0f190 | ||
|
|
58bbe40a8c | ||
|
|
638dd0dcb3 | ||
|
|
5b622fdcd9 | ||
|
|
395ead7ce1 | ||
|
|
2c38aad7fd | ||
|
|
1c1ce285bd | ||
|
|
bb15bbec08 | ||
|
|
542e094348 | ||
|
|
61232dfd95 | ||
|
|
5dbffdb167 | ||
|
|
7ae0fe2209 | ||
|
|
855959a1f9 | ||
|
|
4d38b019be | ||
|
|
2cf4d8ba58 | ||
|
|
62afec1934 | ||
|
|
5f40c54160 | ||
|
|
3c570cadfe | ||
|
|
4f42092159 | ||
|
|
b2f6e7dc08 | ||
|
|
44c43a6fb5 | ||
|
|
f83d33b20d | ||
|
|
c0a1bdd1d6 | ||
|
|
3e4c73e381 | ||
|
|
005ed8814b | ||
|
|
41b21aa66e | ||
|
|
62e2147f0b | ||
|
|
f482b57c71 | ||
|
|
673fd9f879 | ||
|
|
586977cc89 | ||
|
|
2f88def03a | ||
|
|
cc85e2a441 | ||
|
|
13e305e9e7 | ||
|
|
fb0bc9755e | ||
|
|
b2447ee9d9 | ||
|
|
f1094e9c29 | ||
|
|
29364f7403 | ||
|
|
b078b141f1 | ||
|
|
5659365588 | ||
|
|
c27857d1bb | ||
|
|
b8c93bdb0f | ||
|
|
c8df1418d1 | ||
|
|
e896590eb0 | ||
|
|
99dde5405d | ||
|
|
c346510cdf | ||
|
|
aed9caef6b | ||
|
|
3cf493db73 | ||
|
|
a13f9d9a92 | ||
|
|
eb1e1d4f5c | ||
|
|
0f13d2efc1 | ||
|
|
166ffff875 | ||
|
|
be065e88f8 | ||
|
|
65855544eb | ||
|
|
dd5197f1ce | ||
|
|
54d3484d02 | ||
|
|
d39e6b587c | ||
|
|
ff0c58a901 | ||
|
|
f7e9b50806 | ||
|
|
af098460df | ||
|
|
5af6c07fdf | ||
|
|
e58ce07db1 | ||
|
|
be470f91f7 | ||
|
|
601c52af40 | ||
|
|
0cf99e8bba | ||
|
|
9437da4444 | ||
|
|
189c7e428f | ||
|
|
4f0e06f285 | ||
|
|
c6c67996b5 | ||
|
|
8cc9018b58 | ||
|
|
037e610136 | ||
|
|
105a493a74 | ||
|
|
824c68f766 | ||
|
|
7c60c9dd35 | ||
|
|
30fce076bd | ||
|
|
5a5f0c5fb3 | ||
|
|
d197b78490 | ||
|
|
bf06dd67c5 | ||
|
|
382943ab7c | ||
|
|
183b5d8e8e | ||
|
|
069e689306 | ||
|
|
f53d895f4e | ||
|
|
b325224dbe | ||
|
|
885df927e8 | ||
|
|
2ecb3e461c |
No files matched your search
@@ -0,0 +1,44 @@
|
||||
{
|
||||
"root": true,
|
||||
"env": {
|
||||
"browser": true,
|
||||
"es6": true,
|
||||
"node": true
|
||||
},
|
||||
"extends": [
|
||||
"plugin:vue/essential",
|
||||
"eslint:recommended",
|
||||
"@vue/typescript"
|
||||
],
|
||||
"globals": {
|
||||
"Atomics": "readonly",
|
||||
"SharedArrayBuffer": "readonly"
|
||||
},
|
||||
"parser": "vue-eslint-parser",
|
||||
"parserOptions": {
|
||||
"parser": "@typescript-eslint/parser",
|
||||
"ecmaVersion": 2018,
|
||||
"sourceType": "module"
|
||||
},
|
||||
"plugins": [
|
||||
"vue"
|
||||
],
|
||||
"rules": {
|
||||
"indent": [
|
||||
"error",
|
||||
4
|
||||
],
|
||||
"linebreak-style": [
|
||||
"error",
|
||||
"unix"
|
||||
],
|
||||
"quotes": [
|
||||
"error",
|
||||
"single"
|
||||
],
|
||||
"semi": [
|
||||
"error",
|
||||
"never"
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
# Contributor Code of Conduct
|
||||
|
||||
As contributors and maintainers of this project, we pledge to respect all people who contribute through reporting issues, posting feature requests, updating documentation, submitting pull requests or patches, and other activities.
|
||||
|
||||
We are committed to making participation in this project a harassment-free experience for everyone, regardless of the level of experience, gender, gender identity and expression, sexual orientation, disability, personal appearance, body size, race, age, or religion.
|
||||
|
||||
Examples of unacceptable behavior by participants include the use of sexual language or imagery, derogatory comments or personal attacks, trolling, public or private harassment, insults, or other unprofessional conduct.
|
||||
|
||||
Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct. Project maintainers who do not follow the Code of Conduct may be removed from the project team.
|
||||
|
||||
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by opening an issue or contacting one or more of the project maintainers.
|
||||
|
||||
This Code of Conduct is adapted from the [Contributor Covenant](http://contributor-covenant.org), version 1.0.0, available at [http://contributor-covenant.org/version/1/0/0/](http://contributor-covenant.org/version/1/0/0/)
|
||||
@@ -0,0 +1,45 @@
|
||||
# This is a basic workflow to help you get started with Actions
|
||||
|
||||
name: Build
|
||||
|
||||
# Controls when the workflow will run
|
||||
on:
|
||||
# Triggers the workflow on push or pull request events but only for the develop branch
|
||||
push:
|
||||
branches: [ develop ]
|
||||
pull_request:
|
||||
branches: [ develop ]
|
||||
|
||||
# Allows you to run this workflow manually from the Actions tab
|
||||
workflow_dispatch:
|
||||
|
||||
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
|
||||
jobs:
|
||||
# This workflow contains a single job called "build"
|
||||
build:
|
||||
# The type of runner that the job will run on
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
# Steps represent a sequence of tasks that will be executed as part of the job
|
||||
steps:
|
||||
- name: Fetch repo
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Install node
|
||||
uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: '16'
|
||||
|
||||
- name: Install dependencies
|
||||
run: npm install
|
||||
|
||||
- name: Build
|
||||
run: npm run build
|
||||
|
||||
- name: Copy output
|
||||
run: cp ${{ github.workspace }}/dist/mainsail.zip mainsail-latest.zip
|
||||
|
||||
- uses: actions/upload-artifact@v2.2.4
|
||||
with:
|
||||
name: mainsail-latest.zip
|
||||
path: mainsail-latest.zip
|
||||
@@ -20,3 +20,4 @@ docker/config/*.cfg
|
||||
docker/config/*.conf
|
||||
docker/config/.mainsail.json
|
||||
docker/config/.theme
|
||||
.env
|
||||
@@ -0,0 +1,42 @@
|
||||
# Mainsail Contributing Guide
|
||||
|
||||
Hi! I'm really excited that you are interested in contributing to Mainsail. Before submitting your contribution, please make sure to take a moment and read through the following guidelines:
|
||||
|
||||
- [Code of Conduct](https://github.com/meteyou/mainsail/.github/CODE_OF_CONDUCT.md)
|
||||
- [Issue Reporting Guidelines](#issue-reporting-guidelines)
|
||||
- [Pull Request Guidelines](#pull-request-guidelines)
|
||||
|
||||
## Issue Reporting Guidelines
|
||||
|
||||
- Use [https://github.com/meteyou/mainsail/issues](https://github.com/meteyou/mainsail/issues) to create new issues.
|
||||
|
||||
## Pull Request Guidelines
|
||||
|
||||
- The `master` branch is just a snapshot of the latest stable release. All development should be done in dedicated branches. **Do not submit PRs against the `master` branch.**
|
||||
|
||||
- Checkout a topic branch from the relevant branch, e.g. `develop`, and merge back against that branch.
|
||||
|
||||
- It's OK to have multiple small commits as you work on the PR - GitHub will automatically squash it before merging.
|
||||
|
||||
- If adding a new feature:
|
||||
- Provide a convincing reason to add this feature. Ideally, you should open a suggestion issue first and have it approved before working on it.
|
||||
|
||||
- If fixing bug:
|
||||
- If you are resolving a special issue, add `(fix #xxxx[,#xxxx])` (#xxxx is the issue id) in your PR title for a better release log, e.g. `update entities encoding/decoding (fix #3899)`.
|
||||
- Provide a detailed description of the bug in the PR. Live demo preferred.
|
||||
- Add appropriate test coverage if applicable.
|
||||
|
||||
## Committing Changes
|
||||
|
||||
Commit messages should follow the [commit message convention](https://www.conventionalcommits.org/en/v1.0.0/) so that changelogs can be automatically generated.
|
||||
|
||||
## Financial Contribution
|
||||
|
||||
As a pure community-driven project without major corporate backing, we also welcome financial contributions via Patreon and OpenCollective.
|
||||
|
||||
- [Become a supporter on Patreon](https://patreon.com/meteyou)
|
||||
- [One-time donation via Ko-Fi](https://ko-fi.com/mainsail)
|
||||
|
||||
## Credits
|
||||
|
||||
Thank you to all the people who have already contributed to Mainsail!
|
||||
@@ -1,5 +1,5 @@
|
||||
module.exports = {
|
||||
presets: [
|
||||
'@vue/cli-plugin-babel/preset'
|
||||
]
|
||||
presets: [
|
||||
'@vue/cli-plugin-babel/preset'
|
||||
]
|
||||
}
|
||||
@@ -6,16 +6,16 @@ services:
|
||||
dockerfile: api/Dockerfile
|
||||
image: mainsail-stack-api/1
|
||||
volumes:
|
||||
- ./docker/config:/home/node/printer_config
|
||||
- ./docker/logs:/tmp/logs
|
||||
- ./docker/config:/home/node/klipper_config
|
||||
- ./docker/logs:/home/node/klipper_logs
|
||||
- ./docker/gcode:/home/node/gcode
|
||||
- ./docker/config/moonraker:/home/node/.moonraker_database
|
||||
container_name: ${APP_NAME}-stack-api
|
||||
ports:
|
||||
- 7125:7125
|
||||
- "7125:7125"
|
||||
networks:
|
||||
- dev_net
|
||||
application:
|
||||
npm:
|
||||
build:
|
||||
context: ./docker
|
||||
dockerfile: Dockerfile
|
||||
@@ -24,7 +24,7 @@ services:
|
||||
- ./:/home/node/mainsail
|
||||
container_name: ${APP_NAME}-stack-npm
|
||||
ports:
|
||||
- 8080:8080
|
||||
- "8080:8080"
|
||||
depends_on:
|
||||
- api
|
||||
networks:
|
||||
|
||||
@@ -1,21 +1,17 @@
|
||||
FROM debian:buster AS base
|
||||
FROM python:3-slim-buster AS base
|
||||
|
||||
RUN groupadd --force -g 1000 node
|
||||
RUN useradd -ms /bin/bash --no-user-group -g 1000 -u 1000 node
|
||||
|
||||
RUN apt-get update
|
||||
RUN apt-get install -y sudo wget cmake swig git virtualenv python-dev libffi-dev build-essential libncurses-dev libusb-dev avrdude gcc-avr binutils-avr avr-libc dfu-util libnewlib-arm-none-eabi gcc-arm-none-eabi binutils-arm-none-eabi libusb-1.0
|
||||
RUN apt-get install -y sudo wget cmake swig git virtualenv python-dev libffi-dev \
|
||||
build-essential libncurses-dev libusb-dev avrdude gcc-avr binutils-avr avr-libc \
|
||||
dfu-util libnewlib-arm-none-eabi gcc-arm-none-eabi binutils-arm-none-eabi libusb-1.0
|
||||
RUN mkdir /src
|
||||
WORKDIR /src
|
||||
RUN wget http://download.savannah.nongnu.org/releases/simulavr/libsim_1.1.0_amd64.deb
|
||||
RUN apt install /src/libsim_1.1.0_amd64.deb
|
||||
|
||||
#prebuild files for simulavr, not needed currently, because we just build the python lib later
|
||||
#RUN wget http://download.savannah.nongnu.org/releases/simulavr/simulavr_1.1.0_amd64.deb
|
||||
#RUN apt install /src/simulavr_1.1.0_amd64.deb
|
||||
#RUN wget http://download.savannah.nongnu.org/releases/simulavr/python3-simulavr_1.1.0_amd64.deb
|
||||
#RUN apt install /src/python3-simulavr_1.1.0_amd64.deb
|
||||
|
||||
RUN cat /etc/passwd
|
||||
|
||||
RUN echo 'node ALL=(ALL:ALL) NOPASSWD: ALL' > /etc/sudoers.d/node && \
|
||||
@@ -27,7 +23,7 @@ RUN ln -s /bin/true /bin/systemctl
|
||||
USER node
|
||||
|
||||
WORKDIR /home/node
|
||||
RUN git clone https://github.com/KevinOConnor/klipper
|
||||
RUN git clone https://github.com/klipper3d/klipper
|
||||
WORKDIR /home/node/klipper
|
||||
COPY api/simulavr.config /home/node/klipper/.config
|
||||
RUN make
|
||||
@@ -46,7 +42,6 @@ RUN sed -E 's/check_klipper\(\)/check_klipper() { return 0; }\nold()/' /home/nod
|
||||
RUN chmod +x /home/node/moonraker/scripts/install-moonraker2.sh
|
||||
RUN /home/node/moonraker/scripts/install-moonraker2.sh
|
||||
|
||||
RUN sudo rm -f /bin/systemctl
|
||||
#restore backed up systemctl command
|
||||
#RUN sudo mv /bin/systemctl.bak /bin/systemctl
|
||||
|
||||
@@ -54,13 +49,17 @@ WORKDIR /home/node/
|
||||
RUN git clone https://git.savannah.nongnu.org/git/simulavr.git
|
||||
WORKDIR /home/node/simulavr
|
||||
RUN make python
|
||||
RUN make build
|
||||
RUN make build -j8
|
||||
|
||||
USER root
|
||||
RUN rm /bin/systemctl
|
||||
|
||||
COPY api/run-api /usr/local/bin/run-api
|
||||
RUN chmod +x /usr/local/bin/run-api
|
||||
RUN apt-get -y install supervisor
|
||||
|
||||
USER node
|
||||
RUN ln -s /usr/bin/supervisorctl /bin/systemctl
|
||||
|
||||
ENTRYPOINT ["run-api"]
|
||||
RUN mkdir -p /var/log/supervisor
|
||||
COPY api/supervisord.conf /etc/supervisor/conf.d/supervisord.conf
|
||||
COPY api/start-api /bin/start-api
|
||||
RUN chmod +x /bin/start-api
|
||||
ENTRYPOINT ["/bin/start-api"]
|
||||
@@ -1,6 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
PYTHONPATH="/home/node/simulavr/build/pysimulavr/" /home/node/klipper/scripts/avrsim.py -m atmega644 -s 20000000 -b 250000 /home/node/klipper/simulavr.elf &
|
||||
/home/node/klippy-env/bin/python /home/node/klipper/klippy/klippy.py /home/node/printer_config/printer.cfg -l /tmp/logs/klippy.log -a /tmp/klippy_uds &
|
||||
/home/node/moonraker-env/bin/python /home/node/moonraker/moonraker/moonraker.py -l /tmp/logs/moonraker.log -c /home/node/printer_config/moonraker.conf &
|
||||
echo "Starting ..." >> /tmp/logs/klippy.log
|
||||
tail -f /tmp/logs/klippy.log
|
||||
@@ -0,0 +1,3 @@
|
||||
#!/bin/bash
|
||||
chown -hR node:node /home/node/klipper_logs
|
||||
/usr/bin/supervisord
|
||||
@@ -0,0 +1,38 @@
|
||||
[supervisord]
|
||||
#logfile=/tmp/supervisord.log ; (main log file;default $CWD/supervisord.log)
|
||||
logfile_maxbytes=50MB ; (max main logfile bytes b4 rotation;default 50MB)
|
||||
logfile_backups=10 ; (num of main logfile rotation backups;default 10)
|
||||
loglevel=info ; (log level;default info; others: debug,warn,trace)
|
||||
pidfile=/var/run/supervisord.pid ; (supervisord pidfile;default supervisord.pid)
|
||||
nodaemon=true ; (start in foreground if true;default false)
|
||||
minfds=1024 ; (min. avail startup file descriptors;default 1024)
|
||||
minprocs=200 ; (min. avail process descriptors;default 200)
|
||||
|
||||
[program:simulavr]
|
||||
command=bash -c 'sleep 10 && /home/node/klipper/scripts/avrsim.py -m atmega644 -s 20000000 -b 250000 /home/node/klipper/simulavr.elf'
|
||||
environment=PYTHONPATH=/home/node/simulavr/build/pysimulavr/
|
||||
user=node
|
||||
process_name=simulavr
|
||||
directory=/home/node
|
||||
autostart=true
|
||||
autorestart=true
|
||||
redirect_stderr=true
|
||||
|
||||
[program:klipper]
|
||||
command=/home/node/klippy-env/bin/python /home/node/klipper/klippy/klippy.py /home/node/klipper_config/printer.cfg -l /home/node/klipper_logs/klippy.log -a /tmp/klippy_uds
|
||||
user=node
|
||||
process_name=klipper
|
||||
directory=/home/node
|
||||
autostart=true
|
||||
autorestart=true
|
||||
redirect_stderr=true
|
||||
|
||||
|
||||
[program:moonraker]
|
||||
command=/home/node/moonraker-env/bin/python /home/node/moonraker/moonraker/moonraker.py -l /home/node/klipper_logs/moonraker.log -c /home/node/klipper_config/moonraker.conf
|
||||
user=node
|
||||
process_name=moonraker
|
||||
directory=/home/node
|
||||
autostart=true
|
||||
autorestart=true
|
||||
redirect_stderr=true
|
||||
@@ -6,7 +6,7 @@ path: ~/gcode
|
||||
|
||||
[mcu]
|
||||
serial: /tmp/pseudoserial
|
||||
pin_map: arduino
|
||||
restart_method: arduino
|
||||
baud: 250000
|
||||
|
||||
[stepper_x]
|
||||
@@ -110,70 +110,3 @@ max_z_accel: 100
|
||||
# G28 Y0
|
||||
# G28 X0
|
||||
# G28 Z0
|
||||
|
||||
[gcode_macro PAUSE]
|
||||
rename_existing: BASE_PAUSE
|
||||
default_parameter_X: 230 #edit to your park position
|
||||
default_parameter_Y: 230 #edit to your park position
|
||||
default_parameter_Z: 10 #edit to your park position
|
||||
default_parameter_E: 1 #edit to your retract length
|
||||
gcode:
|
||||
SAVE_GCODE_STATE NAME=PAUSE_state
|
||||
BASE_PAUSE
|
||||
G91
|
||||
G1 E-{E} F2100
|
||||
G1 Z{Z}
|
||||
G90
|
||||
G1 X{X} Y{Y} F6000
|
||||
[gcode_macro RESUME]
|
||||
rename_existing: BASE_RESUME
|
||||
default_parameter_E: 1 #edit to your retract length
|
||||
gcode:
|
||||
G91
|
||||
G1 E{E} F2100
|
||||
G90
|
||||
RESTORE_GCODE_STATE NAME=PAUSE_state MOVE=1
|
||||
BASE_RESUME
|
||||
[gcode_macro CANCEL_PRINT]
|
||||
rename_existing: BASE_CANCEL_PRINT
|
||||
gcode:
|
||||
TURN_OFF_HEATERS
|
||||
CLEAR_PAUSE
|
||||
SDCARD_RESET_FILE
|
||||
BASE_CANCEL_PRINT
|
||||
|
||||
[gcode_macro START_PRINT]
|
||||
default_parameter_BED_TEMP: 103.3
|
||||
default_parameter_EXTRUDER_TEMP: 103.3
|
||||
gcode:
|
||||
# Start bed heating
|
||||
M140 S103.3
|
||||
# Use absolute coordinates
|
||||
G90
|
||||
# Reset the G-Code Z offset (adjust Z offset if needed)
|
||||
SET_GCODE_OFFSET Z=0.0
|
||||
# Home the printer
|
||||
G28
|
||||
# Move the nozzle near the bed
|
||||
G1 Z5 F3000
|
||||
# Move the nozzle very close to the bed
|
||||
G1 Z0.15 F300
|
||||
# Wait for bed to reach temperature
|
||||
M190 S103.3
|
||||
# Set and wait for nozzle to reach temperature
|
||||
M109 S103.3
|
||||
|
||||
[gcode_macro END_PRINT]
|
||||
gcode:
|
||||
# Turn off bed, extruder, and fan
|
||||
M140 S0
|
||||
M104 S0
|
||||
M106 S0
|
||||
# Move nozzle away from print while retracting
|
||||
G91
|
||||
G1 X-2 Y-2 E-3 F300
|
||||
# Raise nozzle by 10mm
|
||||
G1 Z10 F3000
|
||||
G90
|
||||
# Disable steppers
|
||||
M84
|
||||
@@ -20,6 +20,7 @@ source "https://rubygems.org"
|
||||
group :jekyll_plugins do
|
||||
gem "jekyll-feed", "~> 0.12"
|
||||
gem "jekyll-remote-theme"
|
||||
gem "jekyll-redirect-from"
|
||||
end
|
||||
|
||||
# Windows and JRuby does not include zoneinfo files, so bundle the tzinfo-data gem
|
||||
|
||||
@@ -226,7 +226,7 @@ GEM
|
||||
jekyll-seo-tag (~> 2.1)
|
||||
minitest (5.14.4)
|
||||
multipart-post (2.1.1)
|
||||
nokogiri (1.12.3)
|
||||
nokogiri (1.12.5)
|
||||
mini_portile2 (~> 2.6.1)
|
||||
racc (~> 1.4)
|
||||
octokit (4.21.0)
|
||||
|
||||
@@ -1 +1 @@
|
||||
Welcome to the Mainsail documentation. The [index](http://meteyou.github.io/mainsail) of the docs is here.
|
||||
Welcome to the Mainsail documentation. The [index](https://docs.mainsail.xyz) of the docs is here.
|
||||
@@ -8,13 +8,15 @@ color_scheme: "mainsail"
|
||||
search_enabled: true
|
||||
aux_links:
|
||||
"Mainsail on GitHub":
|
||||
- "//github.com/meteyou/mainsail"
|
||||
- "//github.com/mainsail-crew/mainsail"
|
||||
aux_links_new_tab: true
|
||||
|
||||
|
||||
defaults:
|
||||
-
|
||||
scope:
|
||||
path: "" # an empty string here means all files in the project
|
||||
values:
|
||||
image: assets/img/rtfm.png
|
||||
|
||||
plugins:
|
||||
- jekyll-redirect-from
|
||||
@@ -2,3 +2,5 @@ name,short_note,author,repo
|
||||
Dracula,,steadyjaw,dracula-mainsail-theme
|
||||
Cyberpunk,,Dario-Ciceri,cp2077-mainsail-theme
|
||||
Mainsail x Voron Toolhead,Various toolhead images inside the theme folder can be renamed to 'sidebar-background.png',eriroh,Mainsail-x-Voron-Toolhead-Theme
|
||||
Rat Rig (unofficial), includes various sidebar images which can be renamed to ‘sidebar-background.png’,Raabi91,ratrig-mainsail-theme
|
||||
Cryd,,cryd-s,Mainsail-Theme-by-Cryd
|
||||
|
@@ -49,6 +49,21 @@ $btn-primary-color: $red-300;
|
||||
content: url("/assets/img/alert.svg");
|
||||
}
|
||||
|
||||
.youtube-container {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
height: 0;
|
||||
padding-bottom: 56.25%; /* 9/16 */
|
||||
}
|
||||
|
||||
.youtube-container > iframe {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.key {
|
||||
padding: 0px 5px;
|
||||
border-radius: 3px;
|
||||
|
||||
|
After Width: | Height: | Size: 2.1 KiB |
|
Before Width: | Height: | Size: 17 KiB After Width: | Height: | Size: 6.0 KiB |
|
After Width: | Height: | Size: 63 KiB |
|
Before Width: | Height: | Size: 336 KiB After Width: | Height: | Size: 692 KiB |
|
After Width: | Height: | Size: 90 KiB |
|
After Width: | Height: | Size: 75 KiB |
|
After Width: | Height: | Size: 34 KiB |
|
After Width: | Height: | Size: 82 KiB |
|
After Width: | Height: | Size: 82 KiB |
|
After Width: | Height: | Size: 32 KiB |
|
After Width: | Height: | Size: 61 KiB |
|
After Width: | Height: | Size: 43 KiB |
|
After Width: | Height: | Size: 32 KiB |
|
After Width: | Height: | Size: 85 KiB |
|
After Width: | Height: | Size: 19 KiB |
|
After Width: | Height: | Size: 85 KiB |
|
After Width: | Height: | Size: 11 KiB |
|
After Width: | Height: | Size: 11 KiB |
|
After Width: | Height: | Size: 29 KiB |
|
After Width: | Height: | Size: 30 KiB |
@@ -0,0 +1,142 @@
|
||||
---
|
||||
layout: default
|
||||
title: Configuration
|
||||
nav_order: 5
|
||||
has_children: false
|
||||
permalink: /configuration
|
||||
redirect_from:
|
||||
- /necessary-configuration
|
||||
---
|
||||
|
||||
# Required configuration
|
||||
|
||||
**Mainsail requires a minimum configuration to function properly and will display a warning at startup if the required parts are not found in your configuration file(s).**
|
||||
{: .warning}
|
||||
|
||||
The following configuration elements are mandatory and must be configured for Mainsail to operate correctly:
|
||||
|
||||
* [Virtual SD Card](configuration#virtual_sdcard)
|
||||
* [Display Status](configuration#display_status)
|
||||
* [Pause / Resume](configuration#pause_resume)
|
||||
* [GCode Macros](configuration#pause--resume--cancel)
|
||||
|
||||
The following configuration elements are optional, including making tweaks and alterations to Klipper's default commands:
|
||||
* [Custom Commands](configuration#customisation)
|
||||
|
||||
## Virtual SD Card
|
||||
The `Virtual SD Card` allows gcode file uploads.
|
||||
```yaml
|
||||
[virtual_sdcard]
|
||||
path: ~/gcode_files
|
||||
```
|
||||
|
||||
## Display Status
|
||||
`Display Status` is required for messages in your status panel, if you don't have `[display]` in your configuration.
|
||||
```yaml
|
||||
[display_status]
|
||||
```
|
||||
|
||||
## Pause, Resume, Cancel
|
||||
These macros enable pause and resume in Klipper.
|
||||
|
||||
```yaml
|
||||
[pause_resume]
|
||||
```
|
||||
|
||||
# Macros
|
||||
## Add pause / resume / cancel functionality
|
||||
You can modify the below macros to fit your needs.
|
||||
{% raw %}
|
||||
```yaml
|
||||
[gcode_macro PAUSE]
|
||||
description: Pause the actual running print
|
||||
rename_existing: PAUSE_BASE
|
||||
gcode:
|
||||
##### set defaults #####
|
||||
{% set x = params.X|default(230) %} #edit to your park position
|
||||
{% set y = params.Y|default(230) %} #edit to your park position
|
||||
{% set z = params.Z|default(10)|float %} #edit to your park position
|
||||
{% set e = params.E|default(1) %} #edit to your retract length
|
||||
##### calculate save lift position #####
|
||||
{% set max_z = printer.toolhead.axis_maximum.z|float %}
|
||||
{% set act_z = printer.toolhead.position.z|float %}
|
||||
{% set lift_z = z|abs %}
|
||||
{% if act_z < (max_z - lift_z) %}
|
||||
{% set z_safe = lift_z %}
|
||||
{% else %}
|
||||
{% set z_safe = max_z - act_z %}
|
||||
{% endif %}
|
||||
##### end of definitions #####
|
||||
PAUSE_BASE
|
||||
G91
|
||||
{% if printer.extruder.can_extrude|lower == 'true' %}
|
||||
G1 E-{e} F2100
|
||||
{% else %}
|
||||
{action_respond_info("Extruder not hot enough")}
|
||||
{% endif %}
|
||||
{% if "xyz" in printer.toolhead.homed_axes %}
|
||||
G1 Z{z_safe}
|
||||
G90
|
||||
G1 X{x} Y{y} F6000
|
||||
{% else %}
|
||||
{action_respond_info("Printer not homed")}
|
||||
{% endif %}
|
||||
```
|
||||
|
||||
```yaml
|
||||
[gcode_macro RESUME]
|
||||
description: Resume the actual running print
|
||||
rename_existing: RESUME_BASE
|
||||
gcode:
|
||||
##### set defaults #####
|
||||
{% set e = params.E|default(1) %} #edit to your retract length
|
||||
#### get VELOCITY parameter if specified ####
|
||||
{% if 'VELOCITY' in params|upper %}
|
||||
{% set get_params = ('VELOCITY=' + params.VELOCITY) %}
|
||||
{%else %}
|
||||
{% set get_params = "" %}
|
||||
{% endif %}
|
||||
##### end of definitions #####
|
||||
G91
|
||||
{% if printer.extruder.can_extrude|lower == 'true' %}
|
||||
G1 E{e} F2100
|
||||
{% else %}
|
||||
{action_respond_info("Extruder not hot enough")}
|
||||
{% endif %}
|
||||
RESUME_BASE {get_params}
|
||||
```
|
||||
|
||||
|
||||
```yaml
|
||||
[gcode_macro CANCEL_PRINT]
|
||||
description: Cancel the actual running print
|
||||
rename_existing: CANCEL_PRINT_BASE
|
||||
gcode:
|
||||
TURN_OFF_HEATERS
|
||||
CANCEL_PRINT_BASE
|
||||
```
|
||||
{% endraw %}
|
||||
|
||||
# Optional
|
||||
|
||||
## Customisation
|
||||
Klipper has a number of preset commands that are also just macros.
|
||||
|
||||
The default configuration of these may not suit your needs or preferences, though they are usually a good place to start. It's possible to adjust these by including them in your config, along with any additional code you would like to run.
|
||||
|
||||
## Example
|
||||
Adjusting the `BED_MESH_CALIBRATE` command, which is found in the menu at Sidebar > Heightmap > Calibrate.
|
||||
{% raw %}
|
||||
```yaml
|
||||
[gcode_macro BED_MESH_CALIBRATE]
|
||||
rename_existing: BASE_BED_MESH_CALIBRATE
|
||||
gcode:
|
||||
#before the original gcode
|
||||
BED_MESH_CLEAR
|
||||
QUAD_GANTRY_LEVEL
|
||||
G1 X125 Y125 Z5 F6000
|
||||
#the original gcode
|
||||
BASE_BED_MESH_CALIBRATE
|
||||
#after the original gcode
|
||||
```
|
||||
{% endraw %}
|
||||
@@ -13,15 +13,15 @@ description: >-
|
||||
<!-- {{ page.description }} -->
|
||||
|
||||
|
||||
We would like to say "thank you" to all the
|
||||
We would like acknowledge the valuable contributions that many people and projects have made to Mainsail, especially the following:
|
||||
|
||||
- contributors, who help make Mainsail better
|
||||
- testers, who help find bugs in Mainsail, so they can be quickly fixed
|
||||
- supporters via patreon/ko-fi
|
||||
- supporters via Patreon and Ko-fi
|
||||
|
||||
and of course the projects Mainsail is built on, especially [Klipper](https://github.com/KevinOConnor/klipper){:target="_blank"}, [Moonraker](https://github.com/Arksine/moonraker){:target="_blank"} and [MainsailOS](https://github.com/raymondh2/MainsailOS/){:target="_blank"}.
|
||||
We would like to thank the projects Mainsail is built on, especially [Klipper](https://github.com/KevinOConnor/klipper){:target="_blank"}, [Moonraker](https://github.com/Arksine/moonraker){:target="_blank"}, and [MainsailOS](https://github.com/mainsail-crew/MainsailOS/){:target="_blank"}.
|
||||
|
||||
**THANK YOU for YOUR support. ❤️**
|
||||
**THANK YOU for your continued support.**
|
||||
|
||||
- TOC
|
||||
{:toc}
|
||||
@@ -38,4 +38,4 @@ and of course the projects Mainsail is built on, especially [Klipper](https://gi
|
||||
| project | license | link |
|
||||
|:--------|:-------:|:-----|
|
||||
{% for deps in site.data.licenses %}| **{{ deps[0] }}**<br>{{ deps[1].description }} | [{{ deps[1].licenses }}]({{ deps[1].licenseUrl }}){:target="_blank"} | [{{ deps[1].repository }}]({{ deps[1].repository }}){:target="_blank"} |
|
||||
{% endfor %}
|
||||
{% endfor %}
|
||||
@@ -0,0 +1,42 @@
|
||||
---
|
||||
layout: default
|
||||
title: Data Privacy
|
||||
nav_order: 99
|
||||
has_children: false
|
||||
permalink: /data-privacy
|
||||
has_toc: false
|
||||
---
|
||||
|
||||
# Data Privacy
|
||||
|
||||
Mainsail understands the need for data privacy and it has been designed to only run in your browser locally.
|
||||
|
||||
The following table applies to Mainsail when installed locally or accessed remotely at [my.mainsail.xyz](http://my.mainsail.xyz).
|
||||
|
||||
| YES | NO |
|
||||
| :--------------: | :---------------: |
|
||||
| Store static files in browser storage (.html, .js, .css) | ‘Telemetry’ |
|
||||
| Communicate directly with your printer via the Moonraker API | Send or transfer any data externally |
|
||||
|
||||
## Will my data be safe if I use the hosted version?
|
||||
Accessing [my.mainsail.xyz](http://my.mainsail.xyz) stores the .html, .js and .css files for Mainsail locally in your brower's storage in exactly the same way that an instance running on your local hardware would do. There is no functional difference or concerns between accessing Mainsail locally or in a remotely public hosted instance.
|
||||
|
||||
|
||||
Running Mainsail both locally and remotely in parallel is also possible.
|
||||
|
||||
# Third party software
|
||||
|
||||
Mainsail does not modify any third party packages and does not control Data Privacy for any third party packages you choose to install.
|
||||
|
||||
If you are concerned, please review the privacy policies for the following third party software:
|
||||
|
||||
* [RaspberryOS](https://www.raspberrypi.org/privacy/)
|
||||
* Klipper
|
||||
* Moonraker
|
||||
|
||||
Please contact the developers of any of the above software if you have any concerns.
|
||||
|
||||
It is worth noting that Klipper, Moonraker and RaspberryOS are open source software. This does not bring a guarantee of privacy and security, but the source code is available and open to peer review.
|
||||
{: .info}
|
||||
The Raspberry Foundation is a registered charity in the United Kingdom with extensive Privacy and Safeguarding policies.
|
||||
{: .info}
|
||||
@@ -19,8 +19,8 @@ You can contribute in a couple of different ways:
|
||||
(For Example: [BabelEdit](https://www.codeandweb.com/babeledit), [i18N-Manager](https://www.electronjs.org/apps/i18n-manager))
|
||||
2. Create/Update translations using [VSCode](https://code.visualstudio.com/) and [i18n Ally](https://github.com/lokalise/i18n-ally).
|
||||
|
||||
If you have a finished translation file, you can make a [PR (pull request)](https://github.com/meteyou/mainsail/pulls)
|
||||
on github or create an [issue](https://github.com/meteyou/mainsail/issues) on github and attach the translation.
|
||||
If you have a finished translation file, you can make a [PR (pull request)](https://github.com/mainsail-crew/mainsail/pulls)
|
||||
on github or create an [issue](https://github.com/mainsail-crew/mainsail/issues) on github and attach the translation.
|
||||
|
||||
## Testing
|
||||
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
---
|
||||
layout: default
|
||||
title: FAQ
|
||||
nav_order: 110
|
||||
has_children: true
|
||||
permalink: /faq/
|
||||
has_toc: false
|
||||
---
|
||||
# Frequently Askes Questions
|
||||
|
||||
We are still gathering some "frequently asked questions" and will publish them here soon.
|
||||
|
||||
The primary reason why this section already exists, is because of the Klipper warnings in the subcategory, that needed to be fixed fast.
|
||||
@@ -0,0 +1,48 @@
|
||||
---
|
||||
layout: default
|
||||
title: Command format mismatch
|
||||
parent: Klipper Errors
|
||||
grand_parent: FAQ
|
||||
nav_order: 10
|
||||
has_children: false
|
||||
permalink: /faq/klipper_errors/command_format_mismatch
|
||||
has_toc: false
|
||||
description: >-
|
||||
You have updated Klipper and now you get this cryptic error message? We would like to help...
|
||||
---
|
||||
|
||||
# Klipper Error - Command format mismatch
|
||||
|
||||
You have updated Klipper and now you get this cryptic error message?
|
||||
|
||||

|
||||
|
||||
This is an error and needs to be fixed to make Mainsail and Klipper work again.
|
||||
{: .info}
|
||||
|
||||
## TL;DR
|
||||
|
||||
Klipper on your host and on your MCU have different versions.
|
||||
Recompile and flash your MCUs and it will work again. Please also pay attention to the "Linux MCU", if you had e.g. an adxl345 in use.
|
||||
|
||||
The following links should help you to solve the problem:
|
||||
[Klipper SD-Card Updates](https://www.klipper3d.org/SDCard_Updates.html){:target="_blank"}
|
||||
[Klipper Building and flashing the micro-controller](https://www.klipper3d.org/Installation.html#building-and-flashing-the-micro-controller){:target="_blank"}
|
||||
|
||||
## More detailed
|
||||
|
||||
Klipper consists of two parts:
|
||||
The software on your host (e.g. Raspberry Pi) and the firmware on your microcontroller (MCU).
|
||||
|
||||
Under normal circumstances, Klipper (on your host) can simply be updated from Mainsail without any problems and everything will work as expected.
|
||||
|
||||
From time to time it happens that there are changes in Klipper that make it necessary to update all your MCUs. Assuming you have run a Klipper update and Klipper on your host now supports commands that your MCUs does not understand. Then you will get the above error message.
|
||||
|
||||
Fortunately, these kind of updates don't happen very often, but now it has happened to you. ;-)
|
||||
|
||||
In order to solve the problem, you need to update all your MCUs. We are talking about multiple MCUs here, as people tend to forget that they have multiple microcontrollers in use. One of these candidates is the "Linux MCU" that many people install on their Raspberry Pi to measure resonances with an adxl345.
|
||||
|
||||
Detailed information on how to update the firmware can be found in the Klipper Documentation linked above (under TL;DR).
|
||||
|
||||
As far as we know, work is in progress to let Klipper update the firmware on its own.
|
||||
{: .info}
|
||||
@@ -0,0 +1,9 @@
|
||||
---
|
||||
layout: default
|
||||
title: Klipper Errors
|
||||
parent: FAQ
|
||||
nav_order: 50
|
||||
has_children: true
|
||||
permalink: /faq/klipper_errors
|
||||
has_toc: false
|
||||
---
|
||||
@@ -0,0 +1,95 @@
|
||||
---
|
||||
layout: default
|
||||
title: Deprecated Options
|
||||
parent: Klipper Warnings
|
||||
grand_parent: FAQ
|
||||
nav_order: 20
|
||||
has_children: false
|
||||
permalink: /faq/klipper_warnings/deprecated_option
|
||||
has_toc: false
|
||||
---
|
||||
|
||||
# Deprecated Options
|
||||
|
||||
###### default_parameter
|
||||
## Removal of `default_parameter_` for gcode macros.
|
||||
|
||||
In the past, default parameters for gcode macros were defined like so:
|
||||
|
||||
```yaml
|
||||
[gcode_macro PRINT_START]
|
||||
default_parameter_EXTRUDER: 230
|
||||
gcode:
|
||||
...
|
||||
```
|
||||
This would define a macro called `PRINT_START` that can be called with an `EXTRUDER` parameter like so: `PRINT_START EXTRUDER=200`. If no value is passed for `EXTRUDER` the default value of 230 is used. This style of default parameters has been deprecated. Instead, define your macro like so:
|
||||
|
||||
{% raw %}
|
||||
```yaml
|
||||
[gcode_macro PRINT_START]
|
||||
gcode:
|
||||
{% set EXTRUDER_TEMP = params.EXTRUDER|default(230)|int %}
|
||||
```
|
||||
{% endraw %}
|
||||
Take note of the following important aspects:
|
||||
- Parameters passed to gcode macros are stored in the `params` object. So if your macro is called with `VALUE=50`, `params.VALUE` will contain the value 50. After the deprecation, only the `params` object will contain these values.
|
||||
- Make sure to name your "set variable" something else as the name of the variable in the `params` object (see how I used `EXTRUDER_TEMP` for the "set variable" and `EXTRUDER` for the actual macro parameter above) to avoid confusion and possible parsing errors.
|
||||
- If you want to pass a default, add `|default(<default value>)` to the end of the params variable (see above, where my default value is 10).
|
||||
- To ensure that `EXTRUDER_TEMP` will have an integer value, add `|int` to the end of the command, to turn passed parameters (if they exist) and the default into an integer. Depending on what kind of parameter you're passing, there are `|int` `|float` `|bool` or `|string` converters available. Make sure that you convert to int if you want to compare the values in your gcode macro.
|
||||
|
||||
The above description was provided by our community member [FHeilmann](https://github.com/FHeilmann){:target="_blank"} and we have his permission to publish it here. Thanks a lot!
|
||||
[Source](https://gist.github.com/FHeilmann/a8097b3e908e85de7255bbe6246ddfd5){:target="_blank"}.
|
||||
{: .info}
|
||||
|
||||
###### step_distance
|
||||
## Removal of `step_distance`
|
||||
|
||||
`step_distance` describes the distance covered by a certain axis with 1 stepper (micro-)step. The downside of this parameter (and one of the reasons for its removal, is that if one were to change the microstepping of a stepper, the step_distance changes as well. Klipper therefore removed the `step_distance` parameter in favor of `rotation_distance` and `full_steps_per_rotation`. These two parameters are unaffected by microstepping, and can be easily determined by inspecting the used hardware.
|
||||
|
||||
Perform the following steps to convert your config:
|
||||
- comment out the old `step_distance` parameter
|
||||
- add three new parameters:
|
||||
- `full_steps_per_rotation` this is 400 for 0.9 degree stepper motors and 200 for 1.8 degree stepper motors.
|
||||
- `rotation_distance` this can be determined either according to hardware, or by converting the old `step_distance` using math.
|
||||
- `gear_ratio` can additionally be used to describe an axis that uses a reduction gear (like the Voron-2 Z axis)
|
||||
- The easiest way to obtain the correct values for `rotation_distance` and `gear_ratio` is to check the official Voron printer github repositories. All example configs have been updated to include the correct values for the new parameters. Keep in mind that you'll still have to calibrate your extruder steps/mm if you choose to copy the values for the extruder. Instructions on how to convert and recalibrate the extruder values can be found [here](https://github.com/Klipper3d/klipper/blob/master/docs/Rotation_Distance.md#extruder).
|
||||
- The formulas to convert `step_distance` to `rotation distance` can be found [here](https://github.com/Klipper3d/klipper/blob/master/docs/Rotation_Distance.md#obtaining-rotation_distance-from-steps_per_mm-or-step_distance)
|
||||
- Guidance on how to inspect your hardware to determine your conversion distance can be found [here](https://github.com/Klipper3d/klipper/blob/master/docs/Rotation_Distance.md#obtaining-rotation_distance-by-inspecting-the-hardware). Make sure to also consider any reduction gearing, if applicable, by checking [this section](https://github.com/Klipper3d/klipper/blob/master/docs/Rotation_Distance.md#using-a-gear_ratio) as well.
|
||||
- For every stepper, except your extruder, you should end up with even numbers (e.g. 40 instead of 39.9683).
|
||||
|
||||
The above description was provided by our community member [FHeilmann](https://github.com/FHeilmann){:target="_blank"} and we have his permission to publish it here. Thanks a lot!
|
||||
[Source](https://gist.github.com/FHeilmann/a8097b3e908e85de7255bbe6246ddfd5){:target="_blank"}.
|
||||
{: .info}
|
||||
|
||||
###### pin_map
|
||||
## Removal of `pin_map`
|
||||
|
||||
For Voron printers, this is only relevant if you're running an arduino based controller board and use pins named similar to `ar19` etc. These pin declarations are no longer valid and need to be replaced with their hardware pin identifiers. To find the appropriate hardware pin identifier perform a google image search for your board plus `pinout`. E.g.:
|
||||
|
||||
`arduino mega 2560 pinout`
|
||||
|
||||
which will yield images such as this one:
|
||||
|
||||

|
||||
|
||||
There, find the pin you're trying to replace. The old pin maps use the digital number of the pin. For example, if your old pin was `ar10`, looking at the image you will find that the `D10` pin corresponds to `PB4`. Replace all pins in your config accordingly, and finally remove the `pin_map:` configuration parameter from your `mcu` section.
|
||||
|
||||
Alternatively, you can copy an appropriate `[board_pins]` block from [this location](https://github.com/Klipper3d/klipper/blob/master/config/sample-aliases.cfg) to your config. If you're using multiple arduinos, make sure to add the appropriate mcu to each block like so:
|
||||
|
||||
```yaml
|
||||
[board_pins arduino-mega]
|
||||
mcu: mcu
|
||||
```
|
||||
|
||||
The above description was provided by our community member [FHeilmann](https://github.com/FHeilmann){:target="_blank"} and we have his permission to publish it here. Thanks a lot!
|
||||
[Source](https://gist.github.com/FHeilmann/a8097b3e908e85de7255bbe6246ddfd5){:target="_blank"}.
|
||||
{: .info}
|
||||
|
||||
###### pid_integral_max
|
||||
## Removal of `pid_integral_max`
|
||||
|
||||
Remove any instances of `pid_integral_max` from your config.
|
||||
|
||||
The above description was provided by our community member [FHeilmann](https://github.com/FHeilmann){:target="_blank"} and we have his permission to publish it here. Thanks a lot!
|
||||
[Source](https://gist.github.com/FHeilmann/a8097b3e908e85de7255bbe6246ddfd5){:target="_blank"}.
|
||||
{: .info}
|
||||
@@ -0,0 +1,33 @@
|
||||
---
|
||||
layout: default
|
||||
title: Deprecated Values
|
||||
parent: Klipper Warnings
|
||||
grand_parent: FAQ
|
||||
nav_order: 10
|
||||
has_children: false
|
||||
permalink: /faq/klipper_warnings/deprecated_value
|
||||
has_toc: false
|
||||
---
|
||||
|
||||
# Deprecated Values
|
||||
|
||||
###### NTC 100K beta 3950
|
||||
## Removal of `NTC 100K beta 3950` sensor type.
|
||||
|
||||
The "NTC 100K beta 3950" temperature sensor is _deprecated_ and will be removed in the near future.
|
||||
|
||||
In order to solve the problem search in your config for `sensor_type: NTC 100K beta 3950` and replace it with `sensor_type: Generic 3950`.
|
||||
|
||||
Most users will find the "Generic 3950" temperature sensor more accurate. Anyway you can continue to use the older (typically less accurate) definition. Therefor define a custom thermistor with `temperature1: 25`, `resistance1: 100000`, and `beta: 3950`.
|
||||
|
||||
[Source](https://www.klipper3d.org/Config_Changes.html){:target="_blank"} Klipper Configuration Changes
|
||||
{: .info}
|
||||
|
||||
###### rpi_temperature
|
||||
## Removal of `rpi_temperature` sensor alias.
|
||||
|
||||
Replace `sensor_type: rpi_temperature` by `sensor_type: temperature_host` everywhere in your config.
|
||||
|
||||
The above description was provided by our community member [FHeilmann](https://github.com/FHeilmann){:target="_blank"} and we have his permission to publish it here. Thanks a lot!
|
||||
[Source](https://gist.github.com/FHeilmann/a8097b3e908e85de7255bbe6246ddfd5){:target="_blank"}.
|
||||
{: .info}
|
||||
@@ -0,0 +1,9 @@
|
||||
---
|
||||
layout: default
|
||||
title: Klipper Warnings
|
||||
parent: FAQ
|
||||
nav_order: 10
|
||||
has_children: true
|
||||
permalink: /faq/klipper_warnings
|
||||
has_toc: false
|
||||
---
|
||||
@@ -6,41 +6,41 @@ has_children: false
|
||||
---
|
||||
|
||||
# Welcome to Mainsail!
|
||||
Mainsail is a lightweight & responsive web interface for Klipper, the 3D printer firmware. It focuses especially on an intuitive and consistent interface.
|
||||
Mainsail makes Klipper more accessible by adding a lightweight, responsive web user interface, centred around an intuitive and consistent design philosophy..
|
||||
{: .fs-5 }
|
||||
|
||||
[Getting Started](/setup){: .btn .btn-primary }
|
||||
[GitHub](https://github.com/meteyou/mainsail){: .btn}{:target="_blank"}
|
||||
[Release Notes](https://github.com/meteyou/mainsail/releases){: .btn}{:target="_blank"}
|
||||
[GitHub](https://github.com/mainsail-crew/mainsail){: .btn}{:target="_blank"}
|
||||
[Release Notes](https://github.com/mainsail-crew/mainsail/releases){: .btn}{:target="_blank"}
|
||||
|
||||
## Screenshots
|
||||

|
||||
|
||||
## Features
|
||||
- Optimized for desktops, tablets and mobile devices
|
||||
- Responsive web interface, optimized for desktops, tablets and mobile devices
|
||||
- Supports multiple 3D printers (Printer Farm)
|
||||
- Localization (i18n)
|
||||
- File Manager (gcode and config files)
|
||||
- File Editor (gcode and config files)
|
||||
- Print History / Stats
|
||||
- Temperature Presets (with custom gcode)
|
||||
- File Manager (G-Code and config files)
|
||||
- File Editor (G-Code and config files)
|
||||
- Print History and Statistics
|
||||
- Temperature Presets (with custom G-Code)
|
||||
- Bed Mesh Leveling
|
||||
- Multi-Webcam support
|
||||
- Control power devices (relays, TPLink, Tasmota, ..)
|
||||
- Customizable UI (logos, backgrounds & even custom css)
|
||||
- Control power devices such as relays, TPLink and Tasmota devices, and more
|
||||
- Customizable user interface including logos, backgrounds, and custom CSS
|
||||
|
||||
## Get support & assistance
|
||||
Do you need help or just want to talk? Join us on discord. We have a very active community.
|
||||
Have you found a bug? Then we would like you to create an Issue on GitHub.
|
||||
## Help and Support
|
||||
Do you need help or just want to talk? Join our active community on Discord.
|
||||
Have you found a bug? Please create an Issue in GitHub and let us know.
|
||||
|
||||
[Discord](https://discord.gg/skWTwTD){: .btn}{:target="_blank"}
|
||||
[GitHub Issues](https://github.com/meteyou/mainsail/issues){: .btn}{:target="_blank"}
|
||||
[GitHub Issues](https://github.com/mainsail-crew/mainsail/issues){: .btn}{:target="_blank"}
|
||||
|
||||
## Support this project
|
||||
The project is primarily developed and maintained by meteyou. To keep the project going he invests his free time, almost every day. To motivate him (☕🍺😜) there are several ways to support the project.
|
||||
## Support Mainsail
|
||||
Mainsail is primarily developed and maintained by `meteyou`. To keep the project going he invests his free time, almost every day. To motivate him (☕🍺😜) there are several ways to support him:
|
||||
|
||||
- [Patreon (recurring)](https://patreon.com/meteyou){:target="_blank"}
|
||||
- [Ko-Fi (one-time)](https://ko-fi.com/mainsail){:target="_blank"}
|
||||
|
||||
However, we would also like to ask you to support the regular contributors.
|
||||
{: .info}
|
||||
Please also support all of our maintainers and contributors.
|
||||
{: .info}
|
||||
@@ -1,7 +1,7 @@
|
||||
---
|
||||
layout: default
|
||||
title: Necessary Configuration
|
||||
nav_order: 5
|
||||
nav_exclude: true
|
||||
has_children: false
|
||||
permalink: /necessary-configuration
|
||||
---
|
||||
@@ -120,4 +120,4 @@ gcode:
|
||||
BASE_BED_MESH_CALIBRATE
|
||||
#after the original gcode
|
||||
```
|
||||
{% endraw %}
|
||||
{% endraw %}
|
||||
@@ -5,7 +5,7 @@ parent: Quicktips
|
||||
has_children: false
|
||||
permalink: /quicktips/additional-sensors
|
||||
description: >-
|
||||
Integrate additional sensors into the temperature graph. For example Raspberry Pi, MCU, BMExxx, HTU21D, LM75 and more..
|
||||
You can integrate additional sensors [supported by Klipper](https://www.klipper3d.org/Config_Reference.html#temperature-sensors) into the temperature graph in Mainsail.
|
||||
---
|
||||
|
||||
# {{ page.title }}
|
||||
@@ -13,7 +13,7 @@ description: >-
|
||||
|
||||
## Raspberry Pi temperature sensor
|
||||
|
||||
Append the following section to your printer.cfg:
|
||||
Append the following section to your `printer.cfg`:
|
||||
|
||||
```yaml
|
||||
[temperature_sensor raspberry_pi]
|
||||
@@ -24,7 +24,7 @@ max_temp: 100
|
||||
|
||||
## ATSAM, ATAMD, and STM32 temperature sensor
|
||||
|
||||
Append the following section to your printer.cfg:
|
||||
Append the following section to your `printer.cfg`:
|
||||
|
||||
```yaml
|
||||
[temperature_sensor mcu_temp]
|
||||
|
||||
@@ -5,22 +5,22 @@ parent: Quicktips
|
||||
has_children: false
|
||||
permalink: /quicktips/console-shortcuts
|
||||
description: >-
|
||||
Similar to a terminal of your OS, there are some keyboard shortcuts in Mainsail that make your everyday life easier.
|
||||
Keyboard shortcuts are available for those who prefer shortcuts.
|
||||
---
|
||||
|
||||
# {{ page.title }}
|
||||
{{ page.description }}
|
||||
|
||||
## Help command
|
||||
## List of Commands
|
||||
|
||||
Issue a `HELP` command to get a list of possible commands.
|
||||
Issue a `HELP` command in the console to get a list of all available commands.
|
||||
|
||||
## Autocomplete
|
||||
|
||||
You can start typing a command and then complete it with the tab-key. If there are several possibilities, you will get a list of choices.
|
||||
You can start typing a command and then complete it with the Tab key. If there are several possibilities, a list of choices will be displayed.
|
||||
|
||||

|
||||
|
||||
## Scroll through commands
|
||||
|
||||
Using the ↑ up / ↓ down arrow keys you can scroll through previous commands.
|
||||
Use the ↑ up and ↓ down arrow keys to scroll through previously used commands in the console.
|
||||
@@ -5,14 +5,14 @@ parent: Quicktips
|
||||
has_children: false
|
||||
permalink: /quicktips/disable-octoprint-lcd-menu
|
||||
description: >-
|
||||
Klipper is shipped with an Octoprint entry in the LCD menu. These menu points don't work with Mainsail.
|
||||
Klipper ships with an Octoprint entry in the LCD menu which does not work with Mainsail.
|
||||
---
|
||||
|
||||
# {{ page.title }}
|
||||
{{ page.description }}
|
||||
|
||||
## Modify printer.cfg
|
||||
Just add the following entry to your printer.cfg:
|
||||
Add the following entry to your printer.cfg to disable Octoprint:
|
||||
|
||||
```yaml
|
||||
[menu __main __octoprint]
|
||||
|
||||
@@ -5,7 +5,7 @@ parent: Quicktips
|
||||
has_children: false
|
||||
permalink: /quicktips/hide-gcode_macros
|
||||
description: >-
|
||||
As you probably already noticed, you can show and hide the gcode macros in the interface settings, but there is more...
|
||||
You can show and hide G-Code macros in the interface settings
|
||||
---
|
||||
|
||||
# {{ page.title }}
|
||||
@@ -25,10 +25,10 @@ gcode:
|
||||
M300
|
||||
```
|
||||
|
||||
`MY_AWESOME_GCODE` appears in your interface settings, `_MY_HELPER_CODE` not.
|
||||
`MY_AWESOME_GCODE` appears in your interface settings, `_MY_HELPER_CODE` does not.
|
||||
|
||||

|
||||
|
||||
By the way, this also works for other configuration sections like, **fans and outputs.**
|
||||
This also works for other configuration sections including **fans and outputs.**
|
||||
{: .info}
|
||||
|
||||
@@ -1,24 +1,25 @@
|
||||
---
|
||||
layout: default
|
||||
title: Print History/Stats
|
||||
title: Print History and Statistics
|
||||
parent: Quicktips
|
||||
has_children: false
|
||||
permalink: /quicktips/history
|
||||
description: >-
|
||||
Since Mainsail 1.5.0 it is possible to report and visualize print statistics. These contain various information such as print status, print duration, amount of filament used, etc.
|
||||
You can view your print history and statistics in the History section of Mainsail.
|
||||
|
||||
---
|
||||
|
||||
# {{ page.title }}
|
||||
{{ page.description }}
|
||||
It's also possible to reprint jobs.
|
||||
This includes print job status, duration, amount of filament used, and more. You can also reprint a print job.
|
||||
|
||||
{: style="width: 50%;"}
|
||||
|
||||
## Enable print history tracking
|
||||
|
||||
For this, it is necessary to enable print history tracking in moonraker.
|
||||
To enable print history tracking, you must first enable this feature in Moonraker.
|
||||
|
||||
Just add `[history]` to your moonraker.conf and restart moonraker.
|
||||
Add `[history]` to your `moonraker.conf ` configuration file and restart Moonraker.
|
||||
|
||||
The new history entry will appear in Mainsails sidebar.
|
||||
The new history entry will appear in Mainsail's sidebar.
|
||||
|
||||
@@ -5,7 +5,7 @@ nav_order: 10
|
||||
has_children: true
|
||||
permalink: /quicktips
|
||||
description: >-
|
||||
quick tips, without much explanation
|
||||
Quick tips for Mainsail users.
|
||||
---
|
||||
|
||||
# {{ page.title }}
|
||||
|
||||
@@ -0,0 +1,130 @@
|
||||
---
|
||||
layout: default
|
||||
title: Multicam
|
||||
parent: Quicktips
|
||||
has_children: false
|
||||
permalink: /quicktips/multicam
|
||||
description: >-
|
||||
How to setup multi Webcams with mainsailOS.
|
||||
---
|
||||
|
||||
# {{ page.title }}
|
||||
{{ page.description }}
|
||||
|
||||
__Disclaimer__
|
||||
Thank you to [Charlie_Powell](https://community.octoprint.org/u/Charlie_Powell) for letting us adapt his guide for MainsailOS!
|
||||
The original guide can be found [here](https://community.octoprint.org/t/setting-up-multiple-webcams-in-octopi-the-right-way/32669).
|
||||
{: .info}
|
||||
|
||||
## Prerequisites
|
||||
For multicam to work, you will need:
|
||||
|
||||
- MainsailOS v0.5.0 or higher
|
||||
- SSH access
|
||||
- Two or more cameras
|
||||
|
||||
__WARNING__
|
||||
**If you are working with an existing installation, make a backup!**
|
||||
{: .warning}
|
||||
|
||||
## Creating the configuration files
|
||||
MainsailOS supports an infinite number of `webcam*.txt` style configuration files. They should be placed in
|
||||
`/home/pi/klipper_config`.
|
||||
|
||||
In Mainsail's user interface, go to 'Settings > Interface' and click on (1) and save as `webcam2.txt`.
|
||||
|
||||
:image:
|
||||
|
||||
You should now have two identical files with different names:
|
||||
1. `/home/pi/klipper_config/webcam.txt`
|
||||
2. `/home/pi/klipper_config/webcam2.txt`
|
||||
|
||||
## Edit the original configuration file for a specific camera
|
||||
Find the path to the camera by its ID. This makes it easier to stop `dev/video0` and `/dev/video1` from being switchedin the future.
|
||||
|
||||
In a terminal, run the command `ls /dev/v4l/by-id`, copy your camera id and paste it into the editor in Mainsail. For example:
|
||||
|
||||
```bash
|
||||
$ ls /dev/v4l/by-id/
|
||||
```
|
||||
|
||||
returns
|
||||
|
||||
```
|
||||
usb-046d_0825_88C56B60-video-index0 usb-046d_0825_88C56B60-video-index1
|
||||
```
|
||||
This example will use the first one: `usb-046d_0825_88C56B60-video-index0`
|
||||
|
||||
|
||||
__Note__
|
||||
Not sure which device is which? You can run `lsusb` to match a camera name to an ID.
|
||||
{: .info}
|
||||
|
||||
Edit `/home/pi/klipper_config/webcam.txt` by clicking on it in Mainsail.
|
||||
|
||||
Insert two lines at the beginning of `webcam.txt`:
|
||||
|
||||
```
|
||||
camera="usb"
|
||||
camera_usb_options="-r 640x480 -f 10 -d /dev/v4l/by-id/<device long id>"
|
||||
```
|
||||
|
||||
The `device long id` should match the camera name from running `lsusb`.
|
||||
|
||||
__Note__
|
||||
If you are using a Raspberry Pi branded camera, set camera="raspi" at the top of the file and you do not have to reference the cameras by device ID.
|
||||
|
||||
{: .info}
|
||||
|
||||
## 3. Editing the second configuration file
|
||||
When using a second camera, you must add the port `mjpg_streamer` runs under and the device.
|
||||
|
||||
__Note__
|
||||
If you are using one Raspberry Pi branded camera and a different USB camera you don't need to reference them by ID, as camera="raspi" and camera="usb" is enough.
|
||||
{: .info}
|
||||
|
||||
Similar to finding the first camera, run `ls` and copy the ID of the second camera:
|
||||
|
||||
```bash
|
||||
ls /dev/v4l/by-id/
|
||||
```
|
||||
|
||||
Edit `/home/pi/klipper_config/webcam2.txt` as described above and add:
|
||||
`camera="usb"` and `set camera_usb_options` but this time using the ID for the second camera:
|
||||
|
||||
```bash
|
||||
camera_usb_options="-r 640x480 -f 10 -d /dev/v4l/by-id/<device long id>"
|
||||
```
|
||||
|
||||
Adjust the port by editing `camera_http_options`:
|
||||
|
||||
`camera_http_options="-n -p 8081"`
|
||||
|
||||
The port should reflect the number in `webcam*.txt`:
|
||||
```
|
||||
webcam.txt => -p 8080
|
||||
webcam1.txt => -p 8081
|
||||
webcam2.txt => -p 8082
|
||||
webcam3.txt => -p 8083
|
||||
```
|
||||
|
||||
__INFO__
|
||||
MainsailOS comes setup with four nginx reverse proxies for port 8080 through 8083, so you can configure 4 webcams with this guide.
|
||||
For more webcams you will need to edit the nginx configuration, which is not recommended. It can be easy to make a mistake when editing nginx, which will also cause Mainsail to stop working.
|
||||
If you need more than four webcams, visit us on [Discord](https://discord.gg/skWTwTD){:target="_blank"} and we will help you.
|
||||
{: .warning}
|
||||
|
||||
## 4. Test that it works
|
||||
Restart `webcamd` by clicking the power button icon in the upper right corner of Mainsail and click `Webcamd` to restart it.
|
||||
Find your second camera under `http://<your-ip>/webcam2/`.
|
||||
If it doesn't work, check in the webcam log in the filemanager log section for details.
|
||||
|
||||
If it works, you can use the URLs in Mainsail:
|
||||
|
||||
Stream: `http://<your-ip>/webcam2/`
|
||||
|
||||
__DONE__
|
||||
Congratulations, you set up multi webcam with Mainsail!
|
||||
If you want to add more, follow the guide again and increment the `webcam*.txt` number, i.e. `webcam**3**.txt` and so on.
|
||||
The webcams are accessible through your `http://<your-ip>/webcam`, `http://<your-ip>/webcam2`, etc.
|
||||
{: .success}
|
||||
@@ -16,16 +16,15 @@ In Mainsails interface settings you will find a section called "Preheat Presets"
|
||||
|
||||
### Preheat
|
||||
|
||||
Enter a name \(e.g. name, color and type of filament\) and the temperatures obtained. You can disable individual heaters and even specify a custom gcode for the preheat phase. The gcode will be executed after the selected temperatures are set.
|
||||
Enter a name for your preset, such as filament, color or other text and the temperature you wish to set the preset at. You can disable individual heaters and even specify a custom gcode for the preheat phase. The G-Code will be executed after the selected temperatures are set.
|
||||
|
||||

|
||||
|
||||
### Further Examples
|
||||
|
||||
#### Z-Offset
|
||||
You can add custom G-Code to make it easier to switch between different Z-Offsets. This makes it easier to work with different surfaces and flexplates.
|
||||
|
||||
To quickly switch between different Z-offsets \(flexplates with smooth and textured surfaces\), you can create presets and deactivate the heaters.
|
||||
|
||||
As G-Code you simply enter `SET_GCODE_OFFSET Z=0.2`, of course with your determined offset.
|
||||
To configure the G-Code enter `SET_GCODE_OFFSET Z=0.2`, and change `0.2` to the offset you need.
|
||||
|
||||

|
||||
@@ -11,26 +11,20 @@ description: >-
|
||||
{{ page.description }}
|
||||
|
||||
__Notice__
|
||||
This is not a complete guide with every single step in detail, but rather a recommendation of what to do and especially what not to do to get access to the printer from somewhere remote from your network.
|
||||
This guide does not include every step in detail, but is a recommendation for safe remote access.
|
||||
{: .info}
|
||||
|
||||
You have to decide if you ..
|
||||
- only want to have status messages on your smartphone
|
||||
- or you need full remote access to Mainsail from everywhere
|
||||
|
||||
Of course, you can also use a combination of both.
|
||||
You will need to decide if you want to receive status messages on your smartphone, have full remote access to Mainsail, or both.
|
||||
|
||||
## Status messages
|
||||
|
||||
For simple status messages there are a couple of additional tools that can be used:
|
||||
- __discord:__ Mooncord is a bot that sends you status messages over discord.
|
||||
[https://github.com/eliteSchwein/mooncord](https://github.com/eliteSchwein/mooncord)
|
||||
- __telegram:__ moonraker-telegram is a bot that sends you status messages over telegram.
|
||||
[https://github.com/Raabi91/moonraker-telegram](https://github.com/Raabi91/moonraker-telegram)
|
||||
For simple status messages there are a two additional tools that can be used:
|
||||
- __Discord:__ Mooncord is a bot that sends you status messages over Discord: [https://github.com/eliteSchwein/mooncord](https://github.com/eliteSchwein/mooncord)
|
||||
- __Telegram:__ moonraker-telegram is a bot that sends you status messages over the messaging application Telegram: [https://github.com/Raabi91/moonraker-telegram](https://github.com/Raabi91/moonraker-telegram)
|
||||
|
||||
These tools are installed on the local machine and send the status messages via the respective platforms. Thus, no access to your local network from outside is necessary.
|
||||
These tools are installed on the local machine and send status messages to their respective platforms. No changes are needed to externally access your local network.
|
||||
|
||||
For details, please refer to the projects instructions.
|
||||
For details, please refer to each project's instructions and documentation.
|
||||
|
||||
## Remote Access to Mainsail
|
||||
|
||||
@@ -45,9 +39,9 @@ What <b>not to do</b>:
|
||||
<div class="warning">
|
||||
What you <b>could do</b>:
|
||||
<ul>
|
||||
<li>Use an external service provider (e.g. tailscale) to gain access to your home network.
|
||||
<li>Use an external service provider such as Tailscale to gain access to your home network.
|
||||
<ul>
|
||||
<li>Con: you give the control out of your hand</li>
|
||||
<li>A potential downside is not having personal control of the connection.</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>Reverse Proxy</li>
|
||||
@@ -59,8 +53,8 @@ What you <b>could do</b>:
|
||||
<ul>
|
||||
<li>Set up your own secured VPN tunnel.
|
||||
<ul>
|
||||
<li>either in the router</li>
|
||||
<li>or your Pi</li>
|
||||
<li>In your router</li>
|
||||
<li>Or your Raspberry Pi</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
@@ -68,18 +62,15 @@ What you <b>could do</b>:
|
||||
|
||||
## Set up VPN
|
||||
|
||||
Several routers allow you to set up a VPN tunnel without much effort.
|
||||
After you have entered the login data into e.g. your smartphone, you will have secure access to your entire network, including Mainsail.
|
||||
Several routers allow you to set up a VPN tunnel. After you have configured the VPN and logged in from another device, you will have secure access to your entire network, including Mainsail.
|
||||
|
||||
If your router does not support this, you can also set up your own VPN, e.g. on your Pi.
|
||||
Therefore you could use: [OpenVPN](https://openvpn.net/), [WireGuard](https://www.wireguard.com/) or [PiVPN](https://www.pivpn.io/)
|
||||
If your router does not support this, you can also set up your own VPN, for example, using your Raspberry Pi.
|
||||
[OpenVPN](https://openvpn.net/), [WireGuard](https://www.wireguard.com/) or [PiVPN](https://www.pivpn.io/) are all options that could work.
|
||||
|
||||
To be able to reach your home network even with a non-static IP address, you should use a dynamic DNS service. This will forward a domain directly to your IP address. Often, these DynDNS services can also be set up directly in the router, so that the IP address gets automatically updated on a change.
|
||||
|
||||
Some free services: [DuckDNS](https://www.duckdns.org) or [FreeDNS ](https://freedns.afraid.org/)
|
||||
To be able to reach your home network even with a non-static IP address, you will need to use a Dynamic DNS service. This will forward a domain directly to your IP address. Often these DynDNS services can also be set up directly in your router so when your external IP address changes, your domain will be automatically updated. Free Dynamic DNS services include [DuckDNS](https://www.duckdns.org) or [FreeDNS ](https://freedns.afraid.org/)
|
||||
|
||||
__Notice__
|
||||
The devices that dial in via the VPN tunnel are assigned to a different address range. This address range must be configured in moonraker under _trusted_clients_ and _cors_domains_. [https://moonraker.readthedocs.io/en/latest/configuration/#authorization](https://moonraker.readthedocs.io/en/latest/configuration/#authorization) <br/><br/>
|
||||
The devices that you use to access VPN tunnel are assigned to a different address range. This address range must be configured in Moonraker under _trusted_clients_ and _cors_domains_. See also [Moonraker's documentation on network authorization.](https://moonraker.readthedocs.io/en/latest/configuration/#authorization) <br/><br/>
|
||||
For example:
|
||||
__192.168.1__.x _// devices on your regular LAN_
|
||||
__192.168.50__.x _// devices connected through your VPN tunnel_
|
||||
|
||||
@@ -9,27 +9,26 @@ description: >-
|
||||
|
||||
# {{ page.title }}
|
||||
{{ page.description }}
|
||||
Moonraker has compatibility with Octoprint's API. To enable octoprint api compatibility,
|
||||
add the following to your `moonraker.conf` and restart Moonraker.
|
||||
Moonraker is compatible 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)
|
||||
### PrusaSlicer / SuperSlicer (PrusaSlicer v2.3.0 and up)
|
||||
Enable advanced or expert mode and change the options under `Printer Settings / General` as shown in the screenshot below. A "Physical Printer" must be configured in `Printer Settings / General`.
|
||||
|
||||
If not already been done, switch to advanced or expert mode and set the options under `Printer Settings / General` as shown in the screenshot below.
|
||||
### PrusaSlicer / SuperSlicer (prior to PrusaSlicer v2.3.0)
|
||||
|
||||
Enable advanced or expert mode and change the options under `Printer Settings / General` as shown in the screenshot below.
|
||||
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.
|
||||
Install the OctoPrint-Connection plugin in Cura's Marketplace. In Cura go to `Settings > Printer > Manage Printers`
|
||||
and find the Button `Connect OctoPrint`. Add your printer and type anything in the `API Key` field.
|
||||
|
||||

|
||||
@@ -8,35 +8,52 @@ description: >-
|
||||
---
|
||||
|
||||
# {{ page.title }}
|
||||
{: .no_toc}
|
||||
{{ page.description }}
|
||||
|
||||

|
||||
|
||||
### PrusaSlicer (since v2.3.0)
|
||||
<details open markdown="block">
|
||||
<summary>
|
||||
Slicers
|
||||
</summary>
|
||||
{: .text-delta }
|
||||
1. TOC
|
||||
{:toc}
|
||||
</details>
|
||||
|
||||
## PrusaSlicer (since v2.3.0)
|
||||
|
||||
In "Expert" mode PrusaSlicer has an option in the "Printer Settings" tab to activate previews.
|
||||
Under `General / Firmware`, enter `32x32,400x300` as "G-code thumbnails".
|
||||
|
||||

|
||||
|
||||
### SuperSlicer (since v2.2.54.0)
|
||||
<div class="youtube-container">
|
||||
<iframe type="text/html" src="https://www.youtube.com/embed/4nFqfq8kikU" frameborder="0"></iframe>
|
||||
</div>
|
||||
|
||||
## SuperSlicer (since v2.2.54.0)
|
||||
|
||||
In "Expert" mode SuperSlicer has some very convenient options in the "Printer Settings" tab to activate and customize the previews.
|
||||
|
||||

|
||||
|
||||
### PrusaSlicer/SuperSlicer
|
||||
<div class="youtube-container">
|
||||
<iframe type="text/html" src="https://www.youtube.com/embed/xdOM5Uco9hM" frameborder="0"></iframe>
|
||||
</div>
|
||||
|
||||
To enable thumbnails, click on `Help > Show Configuration Folder` and navigate to your printer profiles inside the `printer` folder.
|
||||
Open your printer profile in a text editor and find `thumbnails =` and add the resolutions `32x32,400x300`. Save the file and restart your Slicer.
|
||||
|
||||

|
||||
|
||||
From now on the gcode files contain thumbnails displayed by mainsail.
|
||||
|
||||
### Cura
|
||||
## Cura
|
||||
|
||||
The Cura plugin "Cura2Moonraker" is required for this. You can find this plugin and a install guide
|
||||
here: [https://github.com/emtrax-ltd/Cura2MoonrakerPlugin](https://github.com/emtrax-ltd/Cura2MoonrakerPlugin)
|
||||
|
||||

|
||||

|
||||
|
||||
## ideaMaker (since v4.2.1)
|
||||
|
||||
To enable thumbnails, open the `Advanced` tab in the `printer settings`, enable the `GCode Thumbnails for Octoprint and Mainsail` option and
|
||||
enter your prefered *square format* image size in the `Resolution` fields (e.g. `400 X 400`).
|
||||
It's necessary that the thumbnail width and height resolution is equal.
|
||||
|
||||

|
||||
@@ -13,21 +13,21 @@ description: >-
|
||||
|
||||
## Moonraker.conf
|
||||
|
||||
Add the following section to your printers moonraker.conf:
|
||||
To enable updates in Mainsail's web interface, add the following section to your printer's `moonraker.conf`:
|
||||
|
||||
```yaml
|
||||
[update_manager]
|
||||
|
||||
[update_manager client mainsail]
|
||||
type: web
|
||||
repo: meteyou/mainsail
|
||||
repo: mainsail-crew/mainsail
|
||||
path: ~/mainsail
|
||||
```
|
||||
|
||||
Once you have restarted the moonraker service, the Update Manager will appear in Mainsails machine settings.
|
||||
Restart the Moonraker service and the Update Manager will appear in Mainsail's machine settings.
|
||||
|
||||

|
||||
|
||||
|
||||
You can find further information on this topic by checking out the [Moonraker documentation](https://github.com/Arksine/moonraker/blob/master/docs/configuration.md#update_manager){:target="_blank"}.
|
||||
You can find further information on this topic by visiting the [Moonraker documentation](https://github.com/Arksine/moonraker/blob/master/docs/configuration.md#update_manager){:target="_blank"}.
|
||||
{: .info}
|
||||
@@ -8,26 +8,18 @@ has_toc: false
|
||||
---
|
||||
# Setup Guides
|
||||
|
||||
To get started, you first have to decide which route you want to follow for the installation. There are several ways to install Mainsail on a Raspberry Pi.
|
||||
## Local installation
|
||||
You will need to choose which way you want to install Mainsail on a Raspberry Pi:
|
||||
|
||||
- [MainsailOS](mainsail-os.md) <span class="label label-red">recommended</span>
|
||||
A prebuilt image for your Raspberry Pi. Flash it and you are almost ready to go.
|
||||
A prebuilt image for your Raspberry Pi. Preconfigured and requires the least amount of setup.
|
||||
- [KIAUH](kiauh.md) - _Klipper Installation And Update Helper_
|
||||
A script toolbox to install and keep Klipper, Moonraker and Mainsail up to date. It contains many additional features and is the way to go for multiprinter setups.
|
||||
A script toolbox to install and update Klipper, Moonraker and Mainsail. KIAUH contains additional features and is recommended for multi-printer setups.
|
||||
- [Manual Setup](manual-setup/index.md)
|
||||
The rocky road. If you want to know how everything is set up by hand, you will get all the information here.
|
||||
The rocky road for the daring. For those who want to know how everything is set up manually.
|
||||
|
||||
## my.mainsail.xyz
|
||||
In addition to these guides, there is [my.mainsail.xyz](http://my.mainsail.xyz){: target="_blank"}. The latest Mainsail version is always hosted there. This obviates the need to set up a web server for Mainsail on your hardware.
|
||||
## Hosted
|
||||
|
||||
To use [my.mainsail.xyz](http://my.mainsail.xyz){: target="_blank"}, the following requirements must be met:
|
||||
- Klipper must be installed.
|
||||
- Moonraker must be installed.
|
||||
- my.mainsail.xyz must be configured as a CORS domain in moonraker.conf.
|
||||
|
||||
**MainsailOS & KIAUH already fulfill these requirements.**
|
||||
|
||||
_Note_, only the static .html, .js and .css files are loaded into your browser storage. No further information is transferred to the server. The communication to your printer is then done locally directly between your browser and your Moonraker installation.
|
||||
If you have any concerns, you can of course still install Mainsail on your hardware locally. Parallel operation is also possible.
|
||||
{: .info}
|
||||
You an also setup [remote access](../quicktips/remote-access) without installing or configuring a web server.
|
||||
|
||||
You can test and review a hosted version of Mainsail at [my.mainsail.xyz](http://my.mainsail.xyz). Please read the [documentation](mainsail-hosted) for usage and configuration.
|
||||
@@ -8,8 +8,8 @@ permalink: /setup/kiauh
|
||||
---
|
||||
# Installing Mainsail with KIAUH
|
||||
|
||||
[KIAUH](https://github.com/th33xitus/kiauh) is a handy tool that helps you install or upgrade Klipper, Moonraker, Mainsail and various other extensions easily and comfortably.
|
||||
[KIAUH](https://github.com/th33xitus/kiauh) is a tool that helps you install or upgrade Klipper, Moonraker, Mainsail, and other extensions.
|
||||
|
||||

|
||||
|
||||
For more information and get to the guide click [here](https://github.com/th33xitus/kiauh).
|
||||
You can visit [KIAUH on GitHub](https://github.com/th33xitus/kiauh) to learn more and view its documentation.
|
||||
@@ -0,0 +1,48 @@
|
||||
---
|
||||
layout: default
|
||||
title: my.mainsail.xyz
|
||||
parent: Setup Guides
|
||||
nav_order: 4
|
||||
has_children: false
|
||||
has_toc: false
|
||||
permalink: /setup/mainsail-hosted
|
||||
---
|
||||
|
||||
# my.mainsail.xyz
|
||||
|
||||
Mainsail and MainsailOS respect [Data Privacy](../data-privacy).
|
||||
{: .info}
|
||||
|
||||
The hosted version of Mainsail can be used on the same local network with your printer or on a different remote to network and requires you to setup [remote access](../quicktips/remote-access).
|
||||
|
||||
## Requirements
|
||||
|
||||
- MainsailOS and KIAUH are preconfigured to meet the requirements for the hosted service.
|
||||
- If you have a manual installation, the following requirements must be met:
|
||||
* Klipper
|
||||
* Moonraker
|
||||
* `my.mainsail.xyz` must be configured as a CORS domain in `moonraker.conf`.
|
||||
|
||||
### Editing moonraker.conf for remote access
|
||||
|
||||
You can learn more about editing Moonraker's authorization [configuration documentation here.](https://moonraker.readthedocs.io/en/latest/configuration/#authorization)
|
||||
{: .info}
|
||||
|
||||
To configure [my.mainsail.xyz](http://my.mainsail.xyz) for access with your local installation, open `moonraker.conf` and add the following `authorization` section:
|
||||
|
||||
```yml
|
||||
[authorization]
|
||||
cors_domains:
|
||||
https://my.mainsail.xyz
|
||||
http://my.mainsail.xyz
|
||||
http://*.local
|
||||
trusted_clients:
|
||||
10.0.0.0/8
|
||||
127.0.0.0/8
|
||||
169.254.0.0/16
|
||||
172.16.0.0/12
|
||||
192.168.0.0/16
|
||||
FE80::/10
|
||||
::1/128
|
||||
|
||||
```
|
||||
@@ -3,100 +3,20 @@ layout: default
|
||||
title: MainsailOS
|
||||
parent: Setup Guides
|
||||
nav_order: 1
|
||||
has_children: false
|
||||
has_children: true
|
||||
has_toc: false
|
||||
permalink: /setup/mainsail-os
|
||||
---
|
||||
|
||||
# Installing Mainsail with MainsailOS
|
||||
# Installing MainsailOS
|
||||
|
||||
Our recommended way to install Mainsail on a Raspberry Pi is to use [MainsailOS](https://github.com/raymondh2/MainsailOS),
|
||||
as pre-packaged disk image. If you are building a custom configuration, you may need to skip
|
||||
these instructions and install Mainsail [manually](manual-setup/index.md).
|
||||
MainsailOS builds upon Raspberry Pi OS Lite by including Klipper, Moonraker, and Mainsail into the disc image, making setup quick and Mainsail easier to use with Klipper and Moonraker.
|
||||
|
||||
**Note: To avoid confusion, the described way is available for Windows, Linux and MacOS because RPI Imager is a Multiplatform Tool!**
|
||||
{: .info}
|
||||
Advanced users may want more complex and custom configurations and Mainsail can be [manually installed](manual-setup/index.md).
|
||||
|
||||
_Note: It is a good idea to use a premium SDcard from a reputable manufacturer such as Sandisk, Kingston or Samsung. Perfomancewise you should consider using a "A1" or better, marked SDCard. Low end cards will often fail quickly when used in this application
|
||||
**PLEASE OBEY THAT THIS WILL DESTROY ALL DATA ON YOUR CARD**_
|
||||
{: .alert}
|
||||
If you are familiar with process to flash the firmware, then please use your preferred method as you normally would.
|
||||
|
||||
1. Download the latest [mainsailOS Release](https://github.com/raymondh2/MainsailOS/releases).
|
||||
2. Download the latest [Raspberry Pi Imager](https://www.raspberrypi.org/software/), henceforth rpi-imager.
|
||||
3. Install and Open rpi-imager. Now you should see a Window like this.
|
||||
If however you are unfamiliar with the flashing process we have documented two methods to flash MainsailOS to your SD card:
|
||||
|
||||

|
||||
|
||||
_Window Appereance depends on OS, in this case Linux with XFCE was used._
|
||||
{: .info}
|
||||
|
||||
4. Now click on "CHOOSE OS", this will open a popup as shown below.
|
||||
Click on "Use Custom"
|
||||
|
||||

|
||||
|
||||
This will open a Popup Window to browse your local files. Please navigate to your recently downloaded MainsailOS Zip Archive
|
||||
|
||||
_**DO NOT UNPACK THE ZIP FILE!**_
|
||||
{: .alert}
|
||||
|
||||
After you've done that, it should look like this
|
||||
|
||||

|
||||
|
||||
5. Click on "Storage" and select your desired SDCard.
|
||||
|
||||

|
||||
_As an Example..._
|
||||
|
||||
6. Now it's time to setup things like Hostname, Wifi, Language and more.
|
||||
It depends on your needs what you setup, but it has to be WIFI and SSH at least!
|
||||
Grab your keyboard and hit:
|
||||
|
||||
|
||||
<kbd>CTRL</kbd><span>+</span><kbd>SHIFT</kbd><span>+</span><kbd>X</kbd>
|
||||
|
||||
This opens up a Setup Page
|
||||
|
||||

|
||||
|
||||

|
||||
|
||||
7. As the last Step click on "Write", rpi-imager will give you a Warning. Click "YES" to continue...
|
||||
|
||||

|
||||
|
||||
8. Watch the Progressbar and wait until you see:
|
||||
|
||||

|
||||
Hit the "Continue" Button and safely remove your SDCard. ( eg. unmount on Linux )
|
||||
|
||||
9. Insert the SDcard into your Pi, and power on the Pi.
|
||||
|
||||
_Note: Please give the PI some time, during the first boot MainsailOS (like every PI Image) will expand your "root" filesystem accordingly to your SDCard Size! The greater your SDCard is, it will take longer time! Watch out for the little green LED if it turn off or blink from time to time it has finished the resizing._
|
||||
{: .warning}
|
||||
_**Make sure that your MCU(s) is connected to your pi, If you will be using wired networking, also make sure your ethernet cable is connected.**_
|
||||
{: .alert}
|
||||
|
||||
|
||||
10. Find your pi on the network, open up your preferred Browser and type either your IP or Hostname (Depends on your Network configuration)
|
||||
|
||||
- If your network supports bonjour, the pi should show up as `mainsailos.local` or the given Hostname in the Setup Section.
|
||||
- If your network automatically assigns DNS hostnames, it may simply show up as `mainsailos` or accordingly given Hostname.
|
||||
- Failing these two options, you may need to check your router's DHCP server, and find out what IP address has been assigned to the device.
|
||||
|
||||
_**After you're able to get to the Mainsail Webinterface you should consider updating the System to get the latest features. Mainsail, Klipper and Moonraker got a relatively fast Development Cycle. We can't provide MainsailOS Image with all the latest and greatest. So we encourage you to Update on first Login**_
|
||||
{: .info}
|
||||
|
||||
_If you decide to update, you should update in following order:_
|
||||
|
||||
1. System Update (Bring latest RaspberryOS Updates to the System)
|
||||
2. Klipper Update ( To get latest Firmware, often flashing the MCU can wear out his memory )
|
||||
3. Moonraker ( Having latest Version, could lead to more Features in Frontend )
|
||||
4. Update Mainsail ( The most important! :P )
|
||||
|
||||
5. **Important:** Include the mainsail.cfg into your printer.cfg
|
||||
This could be done by:
|
||||
|
||||
[include mainsail.cfg]
|
||||
|
||||
6. Enjoy Mainsail!
|
||||
* [Raspberry Pi Imager](mainsailos/pi-imager) (cross-platform, easiest) <span class="label label-red">recommended</span>
|
||||
* [Balena Etcher](mainsailos/balena-etcher) (requires manual setup)
|
||||
@@ -0,0 +1,126 @@
|
||||
---
|
||||
layout: default
|
||||
title: balenaEtcher
|
||||
parent: MainsailOS
|
||||
grand_parent: Setup Guides
|
||||
nav_order: 2
|
||||
has_children: false
|
||||
permalink: /setup/mainsailos/balena-etcher
|
||||
---
|
||||
|
||||
This method requires manual setup for SSH and Wi-Fi.
|
||||
{: .info}
|
||||
This method is cross-platform and works with Windows, Linux and MacOS.
|
||||
{: .info}
|
||||
|
||||
We **strongly** recommend you use a premium SD card from a reputable manufacturer such as Sandisk, Kingston or Samsung, using an "A1" (or better) grade SD card. \
|
||||
\
|
||||
Low end cards will often fail quickly when used in this application.
|
||||
{: .warning}
|
||||
|
||||
**FLASHING WILL DESTROY ALL DATA ON YOUR SD CARD AND CANNOT BE REVERSED**
|
||||
{: .alert}
|
||||
|
||||
____
|
||||
|
||||
# Preparation
|
||||
|
||||
Whilst this guide makes specific use of balenaEtcher it is entirely possible to use any flashing software of your choice and then follow the manual steps to enable SSH / network after.
|
||||
|
||||
* [Download](https://github.com/mainsail-crew/MainsailOS/releases) the latest MainsailOS release (don't unpack the zip; you don't need to).
|
||||
* [Download](https://www.balena.io/etcher/) and install the latest balenaEtcher.
|
||||
|
||||
# Flashing MainsailOS
|
||||
|
||||
balenaEtcher appearance may vary depending on the host OS.
|
||||
{: .info}
|
||||
|
||||
|
||||
* When opening balenaEtcher you will be presented with the following:
|
||||

|
||||
|
||||
* Select the 'Flash from file' button ('Select image' on Windows) and navigate to the downloaded MainsailOS zip.
|
||||

|
||||
|
||||
* Select the 'Select target' button and choose the SD card you want to flash.
|
||||

|
||||

|
||||
|
||||
* Return the the main screen, and select 'Flash'. Accept any warnings to continue.
|
||||
|
||||
**FLASHING WILL DESTROY ALL DATA ON YOUR SD CARD AND CANNOT BE REVERSED**
|
||||
{: .alert}
|
||||
|
||||

|
||||
|
||||
* balenaEtcher will now decompress (unzip) the MainsailOS archive, write the disc image to the card and verify the flash.
|
||||

|
||||

|
||||

|
||||
|
||||
* balenaEtcher will confirm the flash is complete.
|
||||

|
||||
|
||||
# Enabling SSH
|
||||
You may need to safely remove (eject) the SD card and reinsert it for the /boot partition to show.
|
||||
{: .info}
|
||||
|
||||
Before you move on, it is important to check SSH is enabled.
|
||||
|
||||
This is done by creating an empty file with no extension named 'SSH', or 'SSH.txt' in the /boot partition of the SD card. MainsailOS includes this file.
|
||||
|
||||

|
||||
|
||||
If for some reason the file is not present, then on linux it can be created by navigating to the /boot partition and opening a terminal:
|
||||
|
||||
```bash
|
||||
sudo touch SSH
|
||||
sudo touch SSH.txt
|
||||
```
|
||||
|
||||
RaspberryOS will check if /boot/SSH(.txt) is present at first boot. If the file is present then SSH will be enabled.
|
||||
|
||||
|
||||
# Setting up Wi-Fi / Network
|
||||
|
||||
SSID's are case-sensitive!
|
||||
{: .info}
|
||||
Don't forget to set the country!
|
||||
{: .warning}
|
||||
|
||||
|
||||
To setup Wi-Fi for a headless Pi install the network SSID and password must be entered into mainsailos-wpa-supplicant.txt
|
||||
|
||||
With the SD card inserted into the computer, navigate to the SD card's /boot partition and open mainsail-wpa-supplicant.txt.
|
||||
|
||||
Locate the relevant section to your network, remove the comment marks (#) and enter the SSID and password. WPA/WPA2 is the most common.
|
||||
|
||||
```yml
|
||||
Original:
|
||||
## WPA/WPA2 secured
|
||||
#network={
|
||||
# ssid="put SSID here"
|
||||
# psk="put password here"
|
||||
#}
|
||||
|
||||
Filled out:
|
||||
## WPA/WPA2 secured
|
||||
network={
|
||||
ssid="CaseSensitive_WIFI"
|
||||
psk="SuperSecrets"
|
||||
}
|
||||
|
||||
...
|
||||
|
||||
# Uncomment the country your Pi is in to activate Wifi in RaspberryPi 3 B+ and above
|
||||
# For full list see: https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2
|
||||
country=GB # United Kingdom
|
||||
|
||||
```
|
||||
Save and exit the mainsailos-wpa-supplicant.txt file.
|
||||
|
||||
You are now ready to move on to the [first boot](first-boot) of MainsailOS.
|
||||
|
||||
|
||||
---
|
||||
[< tool selection](../mainsail-os.md){: .btn } [next step >](first-boot){: .btn }
|
||||
@@ -0,0 +1,66 @@
|
||||
---
|
||||
layout: default
|
||||
title: First boot
|
||||
parent: MainsailOS
|
||||
grand_parent: Setup Guides
|
||||
nav_order: 3
|
||||
has_children: false
|
||||
permalink: /setup/mainsailos/first-boot
|
||||
---
|
||||
|
||||
|
||||
# First boot
|
||||
|
||||
Insert the flashed SD card into your Pi and connect any other hardware such a network cable, USB cable to the 3D printer, or a webcam.
|
||||
|
||||
Power on the Pi and let it boot up.
|
||||
|
||||
**The initial boot of MainsailOS may take some time to expand your "root" filesystem. The larger the SD card, the longer the first boot will take.**
|
||||
{: .warning}
|
||||
|
||||
Initially the green LED on the Pi will be extremely active. After some time it will only intermittently flicker, indicating it has likely completed the boot sequence.
|
||||
|
||||
The web interface should now be ready to access on your local network:
|
||||
|
||||
```
|
||||
http://mainsailos.local
|
||||
```
|
||||
or
|
||||
```
|
||||
http://<IP address of your Pi>
|
||||
```
|
||||
|
||||
## Mainsail.cfg
|
||||
|
||||
**Important:** Include `mainsail.cfg` in your printer.cfg file
|
||||
{: .warning}
|
||||
|
||||
Mainsail will not work correctly until `mainsail.cfg` is included in Klipper's configuration file. Open Klipper's default `printer.cfg` file in Mainsail's file manager located in `Settings > Machine`. If you do not have a `printer.cfg` file, you can create one. Add the following line to `printer.cfg`
|
||||
|
||||
```
|
||||
[include mainsail.cfg]
|
||||
```
|
||||
|
||||

|
||||
|
||||

|
||||
|
||||
and click on the`Save & Restart` button.
|
||||
|
||||
## Updates
|
||||
|
||||
Once you've successfully navigated to the Mainsail's web interface it is _strongly_ recommend that you run any available updates.
|
||||
{: .info}
|
||||
|
||||
Klipper, Moonraker and Mainsail have fast development cycles and while we do our best to ensure MainsailOS ships as close to upstream as we can, there will always be a short delay before releases make it into MainsailOS' image.
|
||||
|
||||
It is recommended that you enable and use the [built in update-manager](../../update/update-manager) to perform any system updates, then update Klipper, Moonraker, Mainsail as needed.
|
||||
|
||||

|
||||
|
||||
|
||||
MainsailOS is now configured, and Klipper's configuration file, [printer.cfg], can be setup.
|
||||
|
||||
---
|
||||
[< tool selection](../mainsail-os.md){: .btn } [next step >](klipper-setup){: .btn }
|
||||
|
||||
@@ -0,0 +1,45 @@
|
||||
---
|
||||
layout: default
|
||||
title: Klipper
|
||||
parent: MainsailOS
|
||||
grand_parent: Setup Guides
|
||||
nav_order: 4
|
||||
has_children: false
|
||||
permalink: /setup/mainsailos/klipper-setup
|
||||
---
|
||||
|
||||
# Klipper setup
|
||||
|
||||
Please read and follow the [Klipper documentation](https://klipper3d.org) in order to setup your machine.
|
||||
{: .info}
|
||||
You do not need to follow instructions pertaining to Octopi or Octoprint found in the Klipper documentation.
|
||||
{: .info}
|
||||
|
||||
Klipper is a highly versatile piece of software and can run with almost any machine. Due to the plethora of stock and custom hardware options available, it is impossible to ship MainsailOS / Klipper with a default configuration that would work for everyone.
|
||||
|
||||
## Modifying/constructing printer.cfg
|
||||
|
||||
**You must enter parts of this configuration manually, as it is specific to your printer and MCU hardware**
|
||||
{: .warning}
|
||||
|
||||
To customise your printer.cfg you will need to SSH to your Pi and:
|
||||
|
||||
```yml
|
||||
cd ~/klipper_config
|
||||
nano printer.cfg
|
||||
```
|
||||
Then follow the [Klipper documentation](https://klipper3d.org) to construct your printer.cfg file.
|
||||
|
||||
---
|
||||
|
||||
Before progressing to the next step, ensure that you have:
|
||||
|
||||
* Correctly built the firmware and [flashed the MCU](https://www.klipper3d.org/Installation.html#building-and-flashing-the-micro-controller)
|
||||
* Correctly written/customised your printer.cfg file using the [Klipper configuration reference](https://www.klipper3d.org/Config_Reference.html).
|
||||
* Checked and then [verified your printer.cfg](https://www.klipper3d.org/Config_checks.html).
|
||||
|
||||
|
||||
---
|
||||
[< first boot](first-boot){: .btn } [next step >](../pre-flight){: .btn }
|
||||
|
||||
|
||||
@@ -0,0 +1,75 @@
|
||||
---
|
||||
layout: default
|
||||
title: Raspberry Pi Imager
|
||||
parent: MainsailOS
|
||||
grand_parent: Setup Guides
|
||||
nav_order: 1
|
||||
has_children: false
|
||||
permalink: /setup/mainsailos/pi-imager
|
||||
---
|
||||
|
||||
This method is cross-platform and works with Windows, Linux and MacOS
|
||||
{: .info}
|
||||
|
||||
We **strongly** recommend you use a premium SD card from a reputable manufacturer such as Sandisk, Kingston or Samsung, using an "A1" (or better) grade SD card. \
|
||||
\
|
||||
Low end cards will often fail quickly when used in this application.
|
||||
{: .warning}
|
||||
|
||||
**FLASHING WILL DESTROY ALL DATA ON YOUR SD CARD AND CANNOT BE REVERSED**
|
||||
{: .alert}
|
||||
|
||||
____
|
||||
|
||||
# Preparation
|
||||
|
||||
* [Download](https://github.com/mainsail-crew/MainsailOS/releases) the latest MainsailOS release (don't unpack the zip; you don't need to).
|
||||
* [Download](https://www.raspberrypi.org/software/) and install the latest Raspberry Pi Imager (aka. rpi-imager).
|
||||
|
||||
# Flashing MainsailOS
|
||||
|
||||
Raspberry Pi Imager appearance may vary depending on the host OS.
|
||||
{: .info}
|
||||
|
||||
|
||||
* When opening rpi-imager you will be presented with the following:
|
||||
|
||||

|
||||
|
||||
* Select "CHOOSE OS", and a popup will open as illustrated below. Select "Use custom" and navigate to the MainsailOS zip you downloaded.
|
||||
|
||||

|
||||

|
||||
|
||||
* Click on "STORAGE" and select your desired SD card.
|
||||
|
||||

|
||||
|
||||
* Hostname, wi-fi, language and numerous other settings can now be scrolled through and pre-configured in a hidden setup menu, opened by pressing:
|
||||
|
||||
```bash
|
||||
CTRL+SHIFT+X
|
||||
```
|
||||
As a bare minimumm setup SSH and a network connection (unless wired) at this point, especially if performing a 'headless' installation.
|
||||
{: .info}
|
||||
|
||||

|
||||
|
||||

|
||||
|
||||
* With all desired options preconfigured, click on "WRITE" and accept the warning.
|
||||
|
||||

|
||||
|
||||
* Imager will take some time to write the disc image to the SD card. When it's finished, click continue.
|
||||
|
||||

|
||||
|
||||
Select the "CONTINUE" button and unmount (safely remove) your newly flashed MainsailOS SD card.
|
||||
|
||||
You are now ready to move on to the [first boot](first-boot) of MainsailOS.
|
||||
|
||||
|
||||
---
|
||||
[< tool selection](../mainsail-os.md){: .btn } [next step >](first-boot){: .btn }
|
||||
|
||||
@@ -9,57 +9,78 @@ permalink: /setup/manual-setup/klipper
|
||||
|
||||
# Klipper
|
||||
## Installation
|
||||
The following commands will clone Klipper to an appropriate directory in HOME and run the setup script.
|
||||
At first we have to install some OS dependencies:
|
||||
```bash
|
||||
sudo apt install virtualenv python-dev libffi-dev build-essential libncurses-dev libusb-dev avrdude gcc-avr binutils-avr avr-libc stm32flash dfu-util libnewlib-arm-none-eabi gcc-arm-none-eabi binutils-arm-none-eabi libusb-1.0
|
||||
```
|
||||
|
||||
The following commands will clone Klipper to an appropriate directory in HOME.
|
||||
```bash
|
||||
cd ~
|
||||
git clone https://github.com/KevinOConnor/klipper
|
||||
cd ~/klipper
|
||||
./scripts/install-octopi.sh
|
||||
```
|
||||
|
||||
## Configuration
|
||||
After Klipper is installed, you will need to change the default location of the printer.cfg and add the UDS (unix domain socket). This is defined in the file `/etc/default/klipper`
|
||||
Then we can initialize the python virtual environment and install the python dependencies:
|
||||
```bash
|
||||
cd ~
|
||||
virtualenv -p python2 ./klippy-env
|
||||
./klippy-env/bin/pip install -r ./klipper/scripts/klippy-requirements.txt
|
||||
```
|
||||
|
||||
## Configuration & startup service
|
||||
After Klipper is installed, you will need to create a startup script to define log, config & UDS service location:
|
||||
|
||||
To edit this file type:
|
||||
```bash
|
||||
sudo nano /etc/default/klipper
|
||||
sudo nano /etc/systemd/system/klipper.service
|
||||
```
|
||||
|
||||
find the following line:
|
||||
```
|
||||
KLIPPY_ARGS="/home/pi/klipper/klippy/klippy.py /home/pi/printer.cfg -l /tmp/klippy.log"
|
||||
```
|
||||
and change the config location to `/home/pi/klipper_config/printer.cfg` and add `-a /tmp/klippy_uds` to define UDS.
|
||||
```
|
||||
KLIPPY_ARGS="/home/pi/klipper/klippy/klippy.py /home/pi/klipper_config/printer.cfg -l /tmp/klippy.log -a /tmp/klippy_uds"
|
||||
fill in these lines:
|
||||
```yaml
|
||||
#Systemd Klipper Service
|
||||
|
||||
[Unit]
|
||||
Description=Starts Klipper and provides klippy Unix Domain Socket API
|
||||
Documentation=https://www.klipper3d.org/
|
||||
After=network.target
|
||||
Before=moonraker.service
|
||||
Wants=udev.target
|
||||
|
||||
[Install]
|
||||
Alias=klippy
|
||||
WantedBy=multi-user.target
|
||||
|
||||
[Service]
|
||||
Environment=KLIPPER_CONFIG=/home/pi/klipper_config/printer.cfg
|
||||
Environment=KLIPPER_LOG=/home/pi/klipper_logs/klippy.log
|
||||
Environment=KLIPPER_SOCKET=/tmp/klippy_uds
|
||||
Type=simple
|
||||
User=pi
|
||||
RemainAfterExit=yes
|
||||
ExecStart= /home/pi/klippy-env/bin/python /home/pi/klipper/klippy/klippy.py ${KLIPPER_CONFIG} -l ${KLIPPER_LOG} -a ${KLIPPER_SOCKET}
|
||||
Restart=always
|
||||
RestartSec=10
|
||||
```
|
||||
Save the file with `CTRL+O` and close the editor with `CTRL+X`.
|
||||
|
||||
You have to create the directories for your klipper configuration and the virtual_sdcard directory:
|
||||
**Please check and modify the username!**
|
||||
If you do not use the user `pi`, you must replace it in each path and in the variable user in the service file.
|
||||
{: .warning }
|
||||
|
||||
To enable and start the Klipper service execute these commands:
|
||||
```bash
|
||||
sudo systemctl enable klipper.service
|
||||
```
|
||||
|
||||
You have to create the directories for your klipper configuration, logs and the virtual_sdcard directory:
|
||||
|
||||
```bash
|
||||
mkdir ~/klipper_config
|
||||
mkdir ~/klipper_logs
|
||||
mkdir ~/gcode_files
|
||||
touch ~/klipper_config/printer.cfg
|
||||
```
|
||||
|
||||
Move your printer.cfg to ~/klipper_config and check if the following entries are present in the config.
|
||||
```ini
|
||||
[virtual_sdcard]
|
||||
# for gcode upload
|
||||
path: ~/gcode_files
|
||||
|
||||
[display_status]
|
||||
# for display messages in status panel
|
||||
|
||||
[pause_resume]
|
||||
# for pause/resume functionality.
|
||||
# Mainsail needs gcode macros for `PAUSE`, `RESUME` and `CANCEL_PRINT` to make the buttons work.
|
||||
```
|
||||
**These entries are very important.**
|
||||
For the full functionality of mainsail, you should also define gcode macros for `PAUSE`, `RESUME` and `CANCEL_PRINT`. You'll find further information in [this](../../necessary-cfg.md){: target="_blank"} document.
|
||||
{: .info }
|
||||
|
||||
After your config is in place, restart klipper with `sudo service klipper restart`. Check the `/tmp/klippy.log` for errors, if Klipper starts correctly you can continue the guide.
|
||||
After your config is in place, restart klipper with `sudo systemctl start klipper`.
|
||||
|
||||
---
|
||||
[< previous step](operating-system.md){: .btn } [next step >](moonraker.md){: .btn}
|
||||
@@ -31,16 +31,29 @@ Each file can be filled with the following content:
|
||||
# /etc/nginx/conf.d/upstreams.conf
|
||||
|
||||
upstream apiserver {
|
||||
#if you need to change your api port, edit it here
|
||||
ip_hash;
|
||||
server 127.0.0.1:7125;
|
||||
}
|
||||
|
||||
upstream mjpgstreamer {
|
||||
#if you need to change your webcam port, edit it here
|
||||
upstream mjpgstreamer1 {
|
||||
ip_hash;
|
||||
server 127.0.0.1:8080;
|
||||
}
|
||||
|
||||
upstream mjpgstreamer2 {
|
||||
ip_hash;
|
||||
server 127.0.0.1:8081;
|
||||
}
|
||||
|
||||
upstream mjpgstreamer3 {
|
||||
ip_hash;
|
||||
server 127.0.0.1:8082;
|
||||
}
|
||||
|
||||
upstream mjpgstreamer4 {
|
||||
ip_hash;
|
||||
server 127.0.0.1:8083;
|
||||
}
|
||||
```
|
||||
Save the file with `CTRL+O` and close the editor with `CTRL+X`.
|
||||
|
||||
@@ -64,12 +77,11 @@ Save the file with `CTRL+O` and close the editor with `CTRL+X`.
|
||||
|
||||
server {
|
||||
listen 80 default_server;
|
||||
listen [::]:80 default_server;
|
||||
|
||||
access_log /var/log/nginx/mainsail-access.log;
|
||||
error_log /var/log/nginx/mainsail-error.log;
|
||||
|
||||
#disable this section on smaller hardware like a pi zero
|
||||
# disable this section on smaller hardware like a pi zero
|
||||
gzip on;
|
||||
gzip_vary on;
|
||||
gzip_proxied any;
|
||||
@@ -77,21 +89,24 @@ server {
|
||||
gzip_comp_level 4;
|
||||
gzip_buffers 16 8k;
|
||||
gzip_http_version 1.1;
|
||||
gzip_types text/plain text/css text/xml text/javascript application/x-javascript application/json application/xml;
|
||||
gzip_types text/plain text/css text/xml text/javascript application/javascript application/x-javascript application/json application/xml;
|
||||
|
||||
#web_path from mainsail static files
|
||||
# web_path from mainsail static files
|
||||
root /home/pi/mainsail;
|
||||
|
||||
index index.html;
|
||||
server_name _;
|
||||
|
||||
#disable max upload size
|
||||
# disable max upload size checks
|
||||
client_max_body_size 0;
|
||||
|
||||
# disable proxy request buffering
|
||||
proxy_request_buffering off;
|
||||
|
||||
location / {
|
||||
try_files $uri $uri/ /index.html;
|
||||
}
|
||||
|
||||
|
||||
location = /index.html {
|
||||
add_header Cache-Control "no-store, no-cache, must-revalidate";
|
||||
}
|
||||
@@ -114,9 +129,21 @@ server {
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Scheme $scheme;
|
||||
}
|
||||
|
||||
|
||||
location /webcam/ {
|
||||
proxy_pass http://mjpgstreamer/;
|
||||
proxy_pass http://mjpgstreamer1/;
|
||||
}
|
||||
|
||||
location /webcam2/ {
|
||||
proxy_pass http://mjpgstreamer2/;
|
||||
}
|
||||
|
||||
location /webcam3/ {
|
||||
proxy_pass http://mjpgstreamer3/;
|
||||
}
|
||||
|
||||
location /webcam4/ {
|
||||
proxy_pass http://mjpgstreamer4/;
|
||||
}
|
||||
}
|
||||
```
|
||||
@@ -128,13 +155,13 @@ Create directory for static files and active nginx config:
|
||||
mkdir ~/mainsail
|
||||
sudo rm /etc/nginx/sites-enabled/default
|
||||
sudo ln -s /etc/nginx/sites-available/mainsail /etc/nginx/sites-enabled/
|
||||
sudo service nginx restart
|
||||
sudo systemctl restart nginx
|
||||
```
|
||||
|
||||
Now you can check again the API if it works with the reverse proxy. Open the url http://\<printer-ip\>/printer/info in your browser. if you see a content like this:
|
||||
|
||||
```
|
||||
{"result": {"hostname": "voron250", "error_detected": false, "version": "v0.8.0-479-gd586fb06", "is_ready": true, "message": "Printer is ready", "cpu": "4 core ARMv7 Processor rev 4 (v7l)"}}
|
||||
{"result": {"state_message": "Printer is ready", "klipper_path": "/home/pi/klipper", "config_file": "/home/pi/klipper_config/printer.cfg", "software_version": "v0.9.1-785-g1be19177", "hostname": "raspberrypi", "cpu_info": "4 core ARMv7 Processor rev 4 (v7l)", "state": "ready", "python_path": "/home/pi/klippy-env/bin/python", "log_file": "/home/pi/klipper_log/klippy.log"}}
|
||||
```
|
||||
|
||||
Now we can install Mainsail (static httpdocs).
|
||||
@@ -145,7 +172,7 @@ Now you can download the current mainsail static data
|
||||
|
||||
```
|
||||
cd ~/mainsail
|
||||
wget -q -O mainsail.zip https://github.com/meteyou/mainsail/releases/latest/download/mainsail.zip && unzip mainsail.zip && rm mainsail.zip
|
||||
wget -q -O mainsail.zip https://github.com/mainsail-crew/mainsail/releases/latest/download/mainsail.zip && unzip mainsail.zip && rm mainsail.zip
|
||||
```
|
||||
|
||||
Now it should be possible to open the interface: `http://<printer-ip>/`.
|
||||
|
||||
@@ -10,16 +10,22 @@ permalink: /setup/manual-setup/moonraker
|
||||
Moonraker is a web server that exposes APIs which lets Mainsail interact with Klipper.
|
||||
|
||||
## Installation
|
||||
At first we have to install some OS dependencies:
|
||||
```bash
|
||||
sudo apt install python3-virtualenv python3-dev libopenjp2-7 python3-libgpiod curl libcurl4-openssl-dev libssl-dev liblmdb-dev libsodium-dev zlib1g-dev libjpeg-dev
|
||||
```
|
||||
|
||||
Clone Moonraker into your HOME directory:
|
||||
```bash
|
||||
cd ~
|
||||
git clone https://github.com/Arksine/moonraker.git
|
||||
```
|
||||
|
||||
Run Moonrakers install script:
|
||||
Then we can initialize the python virtual environment and install the python dependencies:
|
||||
```bash
|
||||
cd ~/moonraker/scripts
|
||||
./install-moonraker.sh -c /home/pi/klipper_config/moonraker.conf
|
||||
cd ~
|
||||
virtualenv -p python3 ./moonraker-env
|
||||
./moonraker-env/bin/pip install -r ./moonraker/scripts/moonraker-requirements.txt
|
||||
```
|
||||
|
||||
## Configuration
|
||||
@@ -31,32 +37,49 @@ For Moonraker you'll need to create a separate config file.
|
||||
|
||||
`nano ~/klipper_config/moonraker.conf`
|
||||
|
||||
Insert the following part and modify `trusted_clients` according to arksines description below.
|
||||
Also consider further IP ranges, e.g. when connecting via VPN. To determine your local ip `ip a` and `ifconfig -a` are common ways to do so on Linux and `ipconfig` on Windows.
|
||||
Insert the following part:
|
||||
```
|
||||
[server]
|
||||
host: 0.0.0.0
|
||||
port: 7125
|
||||
enable_debug_logging: False
|
||||
config_path: ~/klipper_config
|
||||
log_path: ~/klipper_logs
|
||||
|
||||
[authorization]
|
||||
cors_domains:
|
||||
https://my.mainsail.xyz
|
||||
http://my.mainsail.xyz
|
||||
http://*.local
|
||||
http://*.lan
|
||||
trusted_clients:
|
||||
10.0.0.0/8
|
||||
127.0.0.0/8
|
||||
169.254.0.0/16
|
||||
172.16.0.0/12
|
||||
192.168.0.0/16
|
||||
FE80::/10
|
||||
::1/128
|
||||
|
||||
# enables partial support of Octoprint API
|
||||
[octoprint_compat]
|
||||
|
||||
# enables moonraker to track and store print history.
|
||||
[history]
|
||||
|
||||
# this enables moonraker's update manager
|
||||
[update_manager]
|
||||
|
||||
[update_manager mainsail]
|
||||
type: web
|
||||
repo: mainsail-crew/mainsail
|
||||
path: ~/mainsail
|
||||
```
|
||||
|
||||
**This is a very basic config**
|
||||
For more options and detailed explanations you should follow [arksines instructions](https://github.com/Arksine/moonraker/blob/master/docs/installation.md).
|
||||
{: .info }
|
||||
|
||||
```
|
||||
[server]
|
||||
host: 0.0.0.0
|
||||
config_path: ~/klipper_config
|
||||
|
||||
[authorization]
|
||||
enabled: true
|
||||
trusted_clients:
|
||||
192.168.1.0/24
|
||||
2a02:810d:9340:33f6::/64
|
||||
|
||||
[update_manager]
|
||||
|
||||
[update_manager client mainsail]
|
||||
type: web
|
||||
repo: meteyou/mainsail
|
||||
path: ~/mainsail
|
||||
```
|
||||
|
||||
🔥 **trusted_clients - read carefully** 🔥
|
||||
A list of newline separated ip addresses and/or ip ranges that are
|
||||
trusted. Trusted clients are given full access to the API. Both IPv4
|
||||
@@ -70,11 +93,47 @@ trusted.
|
||||
|
||||
Save the file with `CTRL+O` and close the editor with `CTRL+X`.
|
||||
|
||||
Restart Moonraker
|
||||
## Startup service
|
||||
To edit this file type:
|
||||
```bash
|
||||
sudo service moonraker restart
|
||||
sudo nano /etc/systemd/system/moonraker.service
|
||||
```
|
||||
|
||||
fill in these lines:
|
||||
```yaml
|
||||
#Systemd moonraker Service
|
||||
|
||||
[Unit]
|
||||
Description=Moonraker provides Web API for klipper
|
||||
Documentation=https://moonraker.readthedocs.io/en/latest/
|
||||
After=network.target klipper.service
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
|
||||
[Service]
|
||||
Environment=MOONRAKER_CONFIG=/home/pi/klipper_config/moonraker.conf
|
||||
Environment=MOONRAKER_LOG=/home/pi/klipper_logs/moonraker.log
|
||||
Type=simple
|
||||
User=pi
|
||||
RemainAfterExit=yes
|
||||
ExecStart=/home/pi/moonraker-env/bin/python /home/pi/moonraker/moonraker/moonraker.py -c ${MOONRAKER_CONFIG} -l ${MOONRAKER_LOG}
|
||||
Restart=always
|
||||
RestartSec=10
|
||||
```
|
||||
Save the file with `CTRL+O` and close the editor with `CTRL+X`.
|
||||
|
||||
**Please check and modify the username!**
|
||||
If you do not use the user `pi`, you must replace it in each path and in the variable user in the service file.
|
||||
{: .warning }
|
||||
|
||||
To enable Moonraker service execute these commands:
|
||||
```bash
|
||||
sudo systemctl enable moonraker.service
|
||||
```
|
||||
|
||||
After your config is in place, start Moonraker with `sudo systemctl start moonraker`.
|
||||
|
||||
Open the following url with your printers IP in your browser
|
||||
```
|
||||
http://<printer-ip>:7125/printer/info
|
||||
@@ -82,7 +141,7 @@ http://<printer-ip>:7125/printer/info
|
||||
|
||||
If everything has been set up successfully, a message like this should appear:
|
||||
```
|
||||
{"result": {"hostname": "voron250", "error_detected": false, "version": "v0.8.0-643-g528f9f25", "is_ready": true, "message": "Printer is ready", "cpu": "4 core ARMv7 Processor rev 4 (v7l)"}}
|
||||
{"result": {"state_message": "Printer is ready", "klipper_path": "/home/pi/klipper", "config_file": "/home/pi/klipper_config/printer.cfg", "software_version": "v0.9.1-785-g1be19177", "hostname": "raspberrypi", "cpu_info": "4 core ARMv7 Processor rev 4 (v7l)", "state": "ready", "python_path": "/home/pi/klippy-env/bin/python", "log_file": "/home/pi/klipper_log/klippy.log"}}
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
@@ -12,25 +12,32 @@ description: >-
|
||||
# {{ page.title }}
|
||||
{{ page.description }}
|
||||
|
||||
**Please don't use an OctoPi image!**
|
||||
It can cause unforeseeable events, like rips in the space-time continuum. So be aware!
|
||||
No seriously. Experiences have shown that it is advisable not to use an OctoPi image (especially for beginners).
|
||||
Do **not** use an OctoPi image as it can cause unforeseen (avoidable) problems.
|
||||
{: .warning }
|
||||
Don't forget to enable SSH and configure a network if using Wi-Fi.
|
||||
{: .info}
|
||||
|
||||
It is recommended to use a clean Raspberry Pi OS 32-bit Lite image (previously called Raspbian). You can download it [here](https://downloads.raspberrypi.org/raspios_lite_armhf_latest){:target="_blank"}.
|
||||
For more information about installing Raspberry Pi OS click [here](https://www.raspberrypi.org/documentation/installation/installing-images/){:target="_blank"}. Don't forget to enable ssh.
|
||||
It is recommended to use a clean [Raspberry Pi OS 32-bit Lite](https://downloads.raspberrypi.org/raspios_lite_armhf_latest){:target="_blank"} image (previously called Raspbian).
|
||||
|
||||
Once you have finished the installation and are connected via ssh, you can continue.
|
||||
We recommend you follow the RaspberryOS official [documentation](https://www.raspberrypi.org/documentation/installation/installing-images/){:target="_blank"} to flash and install the operating system to your SD card.
|
||||
|
||||
Once you have finished the installation and are connected via SSH, you can continue.
|
||||
|
||||
## Requirements
|
||||
|
||||
Install the required packages and update the system:
|
||||
|
||||
```bash
|
||||
sudo apt update && sudo apt upgrade
|
||||
sudo apt update --allow-releaseinfo-change && sudo apt upgrade
|
||||
sudo apt install git dfu-util unzip
|
||||
```
|
||||
|
||||
**Moonraker requires Python 3.7 or greater,** verify that your distribution's Python 3 packages meet this requirement.
|
||||
**Verify that your distribution's Python 3 package(s) are version 3.7 or newer.**
|
||||
{: .alert }
|
||||
|
||||
Moonraker requires Python 3.7 and will not operate without it.
|
||||
|
||||
You can check the current Python version installed to your operating system with the following terminal command:
|
||||
```
|
||||
python3 --version
|
||||
```
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
---
|
||||
layout: default
|
||||
title: Pre-flight
|
||||
parent: Setup Guides
|
||||
nav_order: 5
|
||||
has_children: false
|
||||
has_toc: false
|
||||
permalink: /setup/pre-flight
|
||||
---
|
||||
|
||||
# Preflight Checklist
|
||||
|
||||
You may wish to review the list below to make sure you have not missed any important steps during the setup process.
|
||||
|
||||
| Installed software components: | Configured: | Completed: |
|
||||
| :-- | :-- | :-- |
|
||||
| ✅ MainsailOS<br> **OR** <br> ✅ Klipper<br> ✅ Moonraker<br> ✅ Mainsail<br> | ✅ Network<br> ✅ [Configured printer.cfg](mainsailos/klipper-setup)<br> ✅ [Included mainsail.cfg](mainsailos/first-boot#mainsailcfg)| ✅ Updates<br> ✅ Klipper verification(s)|
|
||||
|
||||
# Time to print!
|
||||
|
||||
If you have performed all of the installation steps, your installation should be complete and you are ready to start calibrating and printing with your 3D printer.
|
||||
|
||||
**Thank you for choosing Mainsail**
|
||||
@@ -11,4 +11,8 @@ description: >-
|
||||
# {{ page.title }}
|
||||
{{ page.description }}
|
||||
|
||||
Start with [prepare](/theming/prepare) to create a basic structure for your own theme, or take a look in [themes](/theming/themes) to see if there are already suitable themes from the Mainsail community.
|
||||
Start with [prepare](/theming/prepare) to create a basic structure for your own theme, or take a look in [themes](/theming/themes) to see if there are already suitable themes from the Mainsail community.
|
||||
|
||||
<div class="youtube-container">
|
||||
<iframe type="text/html" src="https://www.youtube.com/embed/kbSfLQtl4tA" frameborder="0"></iframe>
|
||||
</div>
|
||||
@@ -1,9 +1,16 @@
|
||||
---
|
||||
layout: default
|
||||
title: Update Guide
|
||||
title: Update Guides
|
||||
nav_order: 3
|
||||
has_children: true
|
||||
permalink: /update/
|
||||
has_toc: false
|
||||
---
|
||||
|
||||
This is a guide to update up Klipper, Moonraker & Mainsail on your Raspberry Pi.
|
||||
There are two methods to update Mainsail: from Mainsail's interface in your web browser or by manually updating.
|
||||
|
||||
|
||||
- [Update Manager Guide](update-manager) <span class="label label-red">(Recommended)</span>
|
||||
Update Klipper, Moonraker and Mainsail in your web browser using Mainsail. This is the recommended method.
|
||||
- [Manual Update Guide](manual-update)
|
||||
Review the included guides on how to manually update each component, including Klipper, Moonraker, and Mainsail.
|
||||
@@ -8,16 +8,18 @@ permalink: /update/klipper
|
||||
|
||||
## Klipper
|
||||
### Update from Repository
|
||||
|
||||
To update Klipper directly from its repository, run the following command in a terminal:
|
||||
|
||||
```bash
|
||||
cd ~/klipper
|
||||
git pull
|
||||
```
|
||||
|
||||
Restart Klipper (`sudo service klipper restart`) and check the `klippy.log`, if Klipper starts
|
||||
correctly and then continue the guide.
|
||||
Restart Klipper using the command `sudo service klipper restart` and check the `klippy.log`. if Klipper started correctly without any errors you may continue.
|
||||
|
||||
### Klipper config changes
|
||||
If you have issues after update your Klipper instance, you can check config changes [here](https://github.com/KevinOConnor/klipper/blob/master/docs/Config_Changes.md).
|
||||
### Klipper configuration changes
|
||||
If you have any issues after updating your Klipper instance, you can check the configuration changes [here](https://github.com/KevinOConnor/klipper/blob/master/docs/Config_Changes.md).
|
||||
|
||||
---
|
||||
[< table of contents](index.md){: .btn } [next step >](moonraker.md){: .btn}
|
||||
@@ -6,20 +6,26 @@ nav_order: 4
|
||||
permalink: /update/mainsail
|
||||
---
|
||||
|
||||
## Mainsail
|
||||
## Updating Mainsail
|
||||
|
||||
To update Mainsail manually, run the commands below in your terminal:
|
||||
|
||||
```bash
|
||||
cd ~/mainsail
|
||||
rm -R ./*
|
||||
wget -q -O mainsail.zip https://github.com/meteyou/mainsail/releases/latest/download/mainsail.zip && unzip mainsail.zip && rm mainsail.zip
|
||||
wget -q -O mainsail.zip https://github.com/mainsail-crew/mainsail/releases/latest/download/mainsail.zip && unzip mainsail.zip && rm mainsail.zip
|
||||
```
|
||||
|
||||
### Move gui.json from gcodes to klipper_config
|
||||
This is only necessary if you update from 0.2.2 to 0.2.3 or higher. If you use MainsailOS, the virtual_sdcard directory is `gcode_files` instead of `sdcard`.
|
||||
### Updating from 0.2.2 to 0.2.3 or higher
|
||||
|
||||
If you are updating from Mainsail version 0.2.2 to a newer version, you must move the file `gui.json` from the `gcodes` directory to the `klipper_config' directory.
|
||||
|
||||
This is only necessary when updating from 0.2.2 to 0.2.3 or higher. If you use MainsailOS, the virtual_sdcard directory is `gcode_files` instead of `sdcard`.
|
||||
```
|
||||
mv ~/sdcard/gui.json ~/klipper_config/
|
||||
```
|
||||
|
||||
Now it should be possible to open the interface: `http://<printer-ip>/`.
|
||||
You should now be able to open Mainsail in your web browser at `http://<printer-ip>/`.
|
||||
|
||||
---
|
||||
[< previous step](moonraker.md){: .btn }
|
||||
@@ -0,0 +1,13 @@
|
||||
---
|
||||
layout: default
|
||||
title: Manual Update
|
||||
parent: Update Guides
|
||||
nav_order: 3
|
||||
has_children: true
|
||||
permalink: /update/manual-update
|
||||
has_toc: true
|
||||
---
|
||||
|
||||
# Updating Mainsail the manual way
|
||||
|
||||
This section covers the individual methods for updating each component of the stack manually.
|
||||
@@ -0,0 +1,24 @@
|
||||
---
|
||||
layout: default
|
||||
title: Klipper
|
||||
parent: Manual Update
|
||||
grand_parent: Update Guides
|
||||
nav_order: 2
|
||||
permalink: /update/manual-update/klipper
|
||||
---
|
||||
|
||||
## Klipper
|
||||
### Update from Repository
|
||||
```bash
|
||||
cd ~/klipper
|
||||
git pull
|
||||
```
|
||||
|
||||
Restart Klipper (`sudo service klipper restart`) and check the `klippy.log`, if Klipper starts
|
||||
correctly and then continue the guide.
|
||||
|
||||
### Klipper config changes
|
||||
If you have issues after update your Klipper instance, you can check config changes [here](https://www.klipper3d.org/Config_Changes.html){:target="_blank"}.
|
||||
|
||||
---
|
||||
[< table of contents](index.md){: .btn } [next step >](moonraker.md){: .btn}
|
||||
@@ -0,0 +1,20 @@
|
||||
---
|
||||
layout: default
|
||||
title: Mainsail
|
||||
parent: Manual Update
|
||||
grand_parent: Update Guides
|
||||
nav_order: 4
|
||||
permalink: /update/manual-update/mainsail
|
||||
---
|
||||
|
||||
## Mainsail
|
||||
```bash
|
||||
cd ~/mainsail
|
||||
rm -R ./*
|
||||
wget -q -O mainsail.zip https://github.com/mainsail-crew/mainsail/releases/latest/download/mainsail.zip && unzip mainsail.zip && rm mainsail.zip
|
||||
```
|
||||
|
||||
Now it should be possible to open the interface: `http://<printer-ip>/`.
|
||||
|
||||
---
|
||||
[< previous step](moonraker.md){: .btn }
|
||||
@@ -0,0 +1,33 @@
|
||||
---
|
||||
layout: default
|
||||
title: Moonraker
|
||||
parent: Manual Update
|
||||
grand_parent: Update Guides
|
||||
nav_order: 3
|
||||
permalink: /update/manual-update/moonraker
|
||||
---
|
||||
|
||||
## Moonraker
|
||||
```bash
|
||||
cd ~/moonraker
|
||||
git pull
|
||||
```
|
||||
|
||||
Restart Moonraker (`sudo service moonraker restart`) and open the url `http://<printer-ip>:7125/printer/info` in your browser.
|
||||
|
||||
If you see a content like this
|
||||
```
|
||||
{"result": {"hostname": "voron250", "error_detected": false, "version": "v0.8.0-643-g528f9f25", "is_ready": true, "message": "Printer is ready", "cpu": "4 core ARMv7 Processor rev 4 (v7l)"}}
|
||||
```
|
||||
|
||||
### Update Moonraker dependence
|
||||
This is only nessasary, if you see missing modules in the moonraker log.
|
||||
```bash
|
||||
~/moonraker/scripts/install-moonraker.sh -r
|
||||
```
|
||||
|
||||
### Moonraker config changes
|
||||
If you have issues after update your Moonraker instance, you can check config changes [here](https://moonraker.readthedocs.io/en/latest/user_changes/){:target="_blank"}.
|
||||
|
||||
---
|
||||
[< previous step](klipper.md){: .btn } [next step >](mainsail.md){: .btn }
|
||||
@@ -6,45 +6,50 @@ nav_order: 3
|
||||
permalink: /update/moonraker
|
||||
---
|
||||
|
||||
## Moonraker
|
||||
## Updating Moonraker
|
||||
|
||||
To update Moonraker directly from its repository, run the following command in a terminal:
|
||||
|
||||
```bash
|
||||
cd ~/moonraker
|
||||
git pull
|
||||
```
|
||||
|
||||
Restart Moonraker (`sudo service moonraker restart`) and open the url `http://<printer-ip>:7125/printer/info` in your browser.
|
||||
Restart Moonraker using the command `sudo service moonraker restart` and open the URL `http://<printer-ip>:7125/printer/info` in your browser.
|
||||
|
||||
If you see a content like this
|
||||
Your printer is updated and ready if you see the following message:
|
||||
```
|
||||
{"result": {"hostname": "voron250", "error_detected": false, "version": "v0.8.0-643-g528f9f25", "is_ready": true, "message": "Printer is ready", "cpu": "4 core ARMv7 Processor rev 4 (v7l)"}}
|
||||
```
|
||||
|
||||
### Add Moonraker update manager
|
||||
To use the update manager in Mainsail you have to add this in your moonraker.conf:
|
||||
### Add Moonraker to the update manager
|
||||
|
||||
If you want to update Moonraker using the update manager, you need to add the following section to your printer's `moonraker.conf`:
|
||||
|
||||
```
|
||||
[update_manager]
|
||||
|
||||
[update_manager client mainsail]
|
||||
type: web
|
||||
repo: meteyou/mainsail
|
||||
repo: mainsail-crew/mainsail
|
||||
path: ~/mainsail
|
||||
```
|
||||
|
||||
### Change Moonraker to systemd service (December 6th 2020)
|
||||
Moonraker is now installed as a systemd service. If `moonraker.conf` is not located in the home directory, the command will looks something like the following:
|
||||
### Moonraker as a systemd service
|
||||
As of December 2020, Moonraker is added as a systemd service during installation. If `moonraker.conf` is not located in the home directory, run this command in your terminal:
|
||||
```bash
|
||||
~/moonraker/scripts/install-moonraker.sh -f -c /home/pi/klipper_config/moonraker.conf
|
||||
```
|
||||
This allows logging to stdout which can be viewed with the `journalctl -u moonraker command`.
|
||||
This allows logging to `stdout` which can be viewed with the command `journalctl -u moonraker` in your terminal.
|
||||
|
||||
### Update Moonraker dependence
|
||||
This is only nessasary, if you see missing modules in the moonraker log.
|
||||
### Update Moonraker's dependencies
|
||||
Updating Moonraker's dependecencies manually is only needed if you see missing modules in the Moonraker log. You can run the following command to update Moonraker's dependencies:
|
||||
```bash
|
||||
~/moonraker/scripts/install-moonraker.sh -r
|
||||
```
|
||||
|
||||
### Moonraker config changes
|
||||
If you have issues after update your Moonraker instance, you can check config changes [here](https://github.com/Arksine/moonraker/blob/master/docs/user_changes.md).
|
||||
### Moonraker configuration changes
|
||||
If you have issues after updating Moonraker, please review the list of changes requiring user intervention [here](https://github.com/Arksine/moonraker/blob/master/docs/user_changes.md).
|
||||
|
||||
---
|
||||
[< previous step](klipper.md){: .btn } [next step >](mainsail.md){: .btn }
|
||||
@@ -0,0 +1,55 @@
|
||||
---
|
||||
layout: default
|
||||
title: Update Manager
|
||||
parent: Update Guides
|
||||
nav_order: 1
|
||||
has_children: false
|
||||
permalink: /update/update-manager
|
||||
---
|
||||
|
||||
# Update Manager
|
||||
|
||||
You can find further information on this topic in the [Moonraker documentation](https://github.com/Arksine/moonraker/blob/master/docs/configuration.md#update_manager){:target="_blank"}.
|
||||
{: .info}
|
||||
|
||||
## Enabling Update Manager
|
||||
|
||||
To use the built in Update Manager it must first be enabled by editing the `moonraker.conf` file. From a terminal navigate to Klipper's configuration directory and edit the configuration file:
|
||||
|
||||
```bash
|
||||
cd ~/klipper_config
|
||||
sudo nano moonraker.conf
|
||||
```
|
||||
Add the following section to your printer's `moonraker.conf`:
|
||||
|
||||
```yaml
|
||||
[update_manager]
|
||||
|
||||
[update_manager client mainsail]
|
||||
type: web
|
||||
repo: mainsail-crew/mainsail
|
||||
path: ~/mainsail
|
||||
```
|
||||
|
||||
Restart Moonraker:
|
||||
```bash
|
||||
sudo systemctl restart moonraker
|
||||
```
|
||||
|
||||
## Using Mainsail to Update
|
||||
|
||||
With the update manager enabled, reload your web browser and select the 'Machine' tab from the sidebar. You should now see the Update Manager panel.
|
||||
|
||||
Holding shift while clicking the browser's refresh button (or pressing Control + F5) will force it to reload the page fully without the cache.
|
||||
{: .info}
|
||||
|
||||
The update order is top to bottom.
|
||||
|
||||

|
||||
|
||||
To update a component, click the 'UPDATE' button next to the component you wish to update:
|
||||
|
||||

|
||||
|
||||
A popover window will launch and the component will be updated. When the update is finished, you can close the window.
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "mainsail",
|
||||
"version": "2.0.0",
|
||||
"version": "2.1.0",
|
||||
"private": true,
|
||||
"decription": "a klipper web interface",
|
||||
"author": {
|
||||
@@ -15,23 +15,30 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@codemirror/basic-setup": "^0.19.0",
|
||||
"@codemirror/highlight": "^0.19.2",
|
||||
"@codemirror/lang-javascript": "^0.19.1",
|
||||
"@codemirror/language": "^0.19.7",
|
||||
"@codemirror/highlight": "^0.19.6",
|
||||
"@codemirror/lang-javascript": "^0.19.3",
|
||||
"@codemirror/lang-json": "^0.19.1",
|
||||
"@codemirror/legacy-modes": "^0.19.0",
|
||||
"@codemirror/state": "^0.19.1",
|
||||
"@codemirror/stream-parser": "^0.19.1",
|
||||
"@codemirror/view": "^0.19.1",
|
||||
"axios": "^0.21.1",
|
||||
"@codemirror/search": "^0.19.4",
|
||||
"@codemirror/state": "^0.19.6",
|
||||
"@codemirror/stream-parser": "^0.19.2",
|
||||
"@codemirror/view": "^0.19.28",
|
||||
"@sindarius/gcodeviewer": "^2.1.17",
|
||||
"@types/overlayscrollbars": "^1.12.1",
|
||||
"axios": "^0.21.2",
|
||||
"core-js": "^3.16.0",
|
||||
"echarts": "^5.1.2",
|
||||
"echarts": "^5.2.2",
|
||||
"echarts-for-vue": "^1.4.1",
|
||||
"echarts-gl": "^2.0.7",
|
||||
"echarts-gl": "^2.0.8",
|
||||
"joi": "^17.4.1",
|
||||
"js-sha256": "^0.9.0",
|
||||
"object-assign-deep": "^0.4.0",
|
||||
"overlayscrollbars": "^1.13.1",
|
||||
"overlayscrollbars-vue": "^0.2.2",
|
||||
"sass-loader": "^10.2.0",
|
||||
"semver": "^7.3.5",
|
||||
"uuid": "^8.3.2",
|
||||
"vue": "^2.6.14",
|
||||
"vue-class-component": "^7.2.6",
|
||||
"vue-context": "^6.0.0",
|
||||
@@ -44,16 +51,16 @@
|
||||
"vue-resource": "^1.5.3",
|
||||
"vue-simple-upload": "^0.1.6",
|
||||
"vue-toast-notification": "^0.6.1",
|
||||
"vue2-perfect-scrollbar": "^1.5.0",
|
||||
"vuedraggable": "^2.24.3",
|
||||
"vuetify": "^2.5.8",
|
||||
"vuetify": "^2.6.1",
|
||||
"vuex": "^3.6.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@mdi/font": "^5.9.55",
|
||||
"@mdi/font": "^6.2.95",
|
||||
"@types/semver": "^7.3.8",
|
||||
"@types/uuid": "^8.3.1",
|
||||
"@typescript-eslint/eslint-plugin": "^4.28.5",
|
||||
"@typescript-eslint/parser": "^4.28.5",
|
||||
"@typescript-eslint/parser": "^4.29.3",
|
||||
"@vue/cli-plugin-babel": "^4.5.13",
|
||||
"@vue/cli-plugin-eslint": "^4.5.13",
|
||||
"@vue/cli-plugin-pwa": "^4.5.13",
|
||||
@@ -65,8 +72,7 @@
|
||||
"eslint": "^6.8.0",
|
||||
"eslint-plugin-vue": "^6.2.2",
|
||||
"generate-file-webpack-plugin": "^1.0.1",
|
||||
"node-sass": "^6.0.1",
|
||||
"sass": "^1.37.0",
|
||||
"sass": "~1.32",
|
||||
"sw-precache-webpack-plugin": "^1.0.0",
|
||||
"typescript": "^4.3.5",
|
||||
"vue-cli-plugin-route": "0.0.7",
|
||||
@@ -78,21 +84,6 @@
|
||||
"vue-template-compiler": "^2.6.14",
|
||||
"vuetify-loader": "^1.7.2"
|
||||
},
|
||||
"eslintConfig": {
|
||||
"root": true,
|
||||
"env": {
|
||||
"node": true
|
||||
},
|
||||
"extends": [
|
||||
"plugin:vue/essential",
|
||||
"eslint:recommended",
|
||||
"@vue/typescript/recommended"
|
||||
],
|
||||
"rules": {},
|
||||
"parserOptions": {
|
||||
"parser": "@typescript-eslint/parser"
|
||||
}
|
||||
},
|
||||
"postcss": {
|
||||
"plugins": {
|
||||
"autoprefixer": {}
|
||||
|
||||
@@ -0,0 +1,113 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
width="100%"
|
||||
height="100%"
|
||||
viewBox="0 0 768 624"
|
||||
version="1.1"
|
||||
xml:space="preserve"
|
||||
style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:1.41421;"
|
||||
id="svg40"
|
||||
sodipodi:docname="klipper.svg"
|
||||
inkscape:version="0.92.4 (unknown)"
|
||||
inkscape:export-filename="/home/kevin/src/reprap/firmware/klipper/logs/logo-20190416/klipper6.svg.png"
|
||||
inkscape:export-xdpi="96"
|
||||
inkscape:export-ydpi="96"><metadata
|
||||
id="metadata46"><rdf:RDF><cc:Work
|
||||
rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title /></cc:Work></rdf:RDF></metadata><defs
|
||||
id="defs44">
|
||||
</defs><sodipodi:namedview
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1"
|
||||
objecttolerance="10"
|
||||
gridtolerance="10"
|
||||
guidetolerance="10"
|
||||
inkscape:pageopacity="0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:window-width="1920"
|
||||
inkscape:window-height="1030"
|
||||
id="namedview42"
|
||||
showgrid="false"
|
||||
inkscape:zoom="0.95"
|
||||
inkscape:cx="327.89418"
|
||||
inkscape:cy="289.76441"
|
||||
inkscape:window-x="0"
|
||||
inkscape:window-y="0"
|
||||
inkscape:window-maximized="1"
|
||||
inkscape:current-layer="svg40"
|
||||
showguides="false"
|
||||
showborder="false"><inkscape:grid
|
||||
type="xygrid"
|
||||
id="grid905" /></sodipodi:namedview>
|
||||
<path
|
||||
style="fill:#3c4b5a"
|
||||
d="m 30,34 v 140 l 260,255 115,-5 h 80 L 730,174 V 34 H 720 L 385,374 40,34 Z"
|
||||
id="path2"
|
||||
inkscape:connector-curvature="0"
|
||||
sodipodi:nodetypes="ccccccccccc" /><path
|
||||
style="fill:#3c4b5a;stroke-width:1.03280997"
|
||||
d="m 140,418 -58,57 1,25 v 19 l 57,57 h 27 v -1 L 91,496.5 167,419 v -1 z"
|
||||
id="path8"
|
||||
inkscape:connector-curvature="0"
|
||||
sodipodi:nodetypes="ccccccccccc" /><g
|
||||
transform="translate(-1.08348e-4,0.048)"
|
||||
id="g17">
|
||||
<path
|
||||
d="m 83.041215,464.92108 h 0.001 l -0.04211,27.03092 h 11 l 73.000005,-74 v 14.301 l -63,64.199 63,65.5 v 14 l -73.000002,-75 h -13 c -2,0 -4,-2 -4,-4 h -2 v -33 h 2 c 0,-1 1,-2 3.00004,-2 1.99996,0 2.99996,1 2.99996,2 z"
|
||||
style="fill:#b12f35"
|
||||
id="path15"
|
||||
inkscape:connector-curvature="0"
|
||||
sodipodi:nodetypes="cccccccccccccccccc" />
|
||||
</g><g
|
||||
id="path839"
|
||||
transform="matrix(1.03281,0,0,1.0326797,24.31099,-21.921569)">
|
||||
<rect
|
||||
x="21"
|
||||
y="426"
|
||||
width="30.015202"
|
||||
height="153"
|
||||
style="fill:#3c4b5a;fill-rule:nonzero"
|
||||
id="rect12" />
|
||||
</g><rect
|
||||
x="247"
|
||||
y="469"
|
||||
width="24"
|
||||
height="107"
|
||||
style="fill:#3c4b5a;stroke-width:1.19609642"
|
||||
id="rect23" /><path
|
||||
d="m 371.98888,521.45953 c 0,-10.8903 -2.45322,-19.36013 -7.36207,-25.4107 -4.90765,-6.05057 -12.80741,-9.07465 -23.69929,-9.07465 -2.28639,0 -4.6724,0.10081 -7.16044,0.30241 -2.48802,0.20161 -4.94125,0.63842 -7.36207,1.31044 v 60.29926 c 2.15197,1.47844 5.00967,2.85727 8.57188,4.13411 3.56342,1.27684 7.36208,1.91526 11.39597,1.91526 8.87554,0 15.36385,-3.02409 19.46496,-9.07465 4.10111,-6.05057 6.15106,-14.18439 6.15106,-24.40148 z M 397,521.05632 c 0,8.06663 -1.04178,15.46123 -3.12654,22.18261 -2.08476,6.72259 -5.07568,12.50434 -8.97515,17.34409 -3.89947,4.83973 -8.77472,8.60423 -14.62333,11.29351 -5.8498,2.68927 -12.47254,4.0333 -19.86702,4.0333 -4.97606,0 -9.54765,-0.60481 -13.71597,-1.81445 -4.16832,-1.21082 -7.59731,-2.55487 -10.28698,-4.03451 V 611 H 302 V 471.64736 c 4.97486,-1.34524 11.09352,-2.62207 18.35477,-3.83171 C 327.61602,466.60482 335.28055,466 343.34834,466 c 8.33664,0 15.79953,1.27684 22.38866,3.83171 6.58794,2.55487 12.20251,6.21857 16.84131,10.9911 4.6388,4.77253 8.20221,10.5543 10.69024,17.34408 2.48684,6.78859 3.73145,14.4184 3.73145,22.88943 z"
|
||||
style="fill:#3c4b5a;fill-rule:nonzero;stroke-width:1.20011997"
|
||||
id="path25"
|
||||
inkscape:connector-curvature="0" /><path
|
||||
d="m 492.9892,521.45953 c 0,-10.8903 -2.4544,-19.36013 -7.36198,-25.4107 -4.90759,-6.05057 -12.80725,-9.07465 -23.699,-9.07465 -2.28636,0 -4.67354,0.10081 -7.16034,0.30241 -2.488,0.20161 -4.94119,0.63842 -7.36197,1.31044 v 60.29926 c 2.15074,1.47844 5.00839,2.85727 8.57176,4.13411 3.56337,1.27684 7.36198,1.91526 11.39582,1.91526 8.87423,0 15.36246,-3.02409 19.46352,-9.07465 4.10106,-6.05057 6.15219,-14.18439 6.15219,-24.40148 z M 518,521.05632 c 0,8.06663 -1.04297,15.46123 -3.1265,22.18261 -2.08474,6.72259 -5.07681,12.50434 -8.97624,17.34409 -3.89942,4.83973 -8.77341,8.60423 -14.62314,11.29351 -5.84854,2.68927 -12.47119,4.0333 -19.86677,4.0333 -4.9748,0 -9.54633,-0.60481 -13.7146,-1.81445 -4.16827,-1.21082 -7.59722,-2.55487 -10.28684,-4.03451 V 611 H 423 V 471.64736 c 4.97599,-1.34524 11.09337,-2.62207 18.35454,-3.83171 C 448.61569,466.60482 456.28012,466 464.34782,466 c 8.33773,0 15.80052,1.27684 22.38838,3.83171 6.58905,2.55487 12.20235,6.21857 16.84229,10.9911 4.63875,4.77253 8.20211,10.5543 10.69012,17.34408 2.48679,6.78859 3.73139,14.4184 3.73139,22.88943 z"
|
||||
style="fill:#3c4b5a;fill-rule:nonzero;stroke-width:1.20011246"
|
||||
id="path27"
|
||||
inkscape:connector-curvature="0" /><path
|
||||
d="m 537,521.00591 c 0,-9.30123 1.37492,-17.45591 4.12595,-24.46521 2.74984,-7.00931 6.40632,-12.83838 10.96942,-17.48839 4.56191,-4.65121 9.79451,-8.15587 15.699,-10.51396 5.90328,-2.3593 11.94191,-3.53835 18.11469,-3.53835 14.49054,0 25.79531,4.51527 33.91308,13.5458 8.11897,9.03174 12.17786,22.51016 12.17786,40.43768 0,1.34749 -0.0335,2.8646 -0.1006,4.54896 -0.0671,1.68555 -0.16768,3.20147 -0.30182,4.55015 h -69.43942 c 0.67068,8.49155 3.65646,15.06171 8.95733,19.71294 5.29967,4.65001 12.98149,6.97562 23.04547,6.97562 5.9033,0 11.30477,-0.5402 16.20202,-1.61818 4.89726,-1.07799 8.75493,-2.22335 11.57304,-3.43729 l 3.22052,20.01612 c -1.34138,0.67495 -3.18699,1.38237 -5.53561,2.12349 -2.34742,0.74112 -5.03139,1.41485 -8.05071,2.02242 -3.01811,0.60637 -6.27217,1.11168 -9.76096,1.51592 -3.4888,0.40425 -7.04467,0.60637 -10.66761,0.60637 -9.25915,0 -17.30985,-1.38116 -24.15211,-4.14471 -6.84346,-2.76354 -12.47968,-6.60507 -16.90744,-11.52457 -4.42778,-4.91951 -7.71537,-10.7161 -9.86278,-17.38854 C 538.0731,536.27095 537,528.95845 537,521.00591 Z m 70.64548,-10.91821 c 0,-3.36991 -0.46948,-6.57138 -1.40846,-9.60442 -0.93897,-3.03303 -2.31508,-5.66063 -4.12595,-7.88517 -1.81207,-2.22335 -4.02535,-3.97627 -6.64226,-5.25638 -2.61689,-1.28131 -5.73561,-1.92137 -9.35855,-1.92137 -3.75708,0 -7.04466,0.70743 -9.86278,2.1235 -2.8181,1.41484 -5.19906,3.26883 -7.14527,5.55956 -1.94501,2.29192 -3.45526,4.92071 -4.52837,7.88516 -1.0731,2.96567 -1.81206,5.99871 -2.21447,9.09912 z"
|
||||
style="fill:#3c4b5a;fill-rule:nonzero;stroke-width:1.20038378"
|
||||
id="path29"
|
||||
inkscape:connector-curvature="0" /><path
|
||||
d="m 717.7869,492.26931 c -2.00567,-0.67394 -4.78138,-1.38159 -8.32593,-2.12292 -3.54453,-0.74135 -7.65736,-1.11202 -12.33845,-1.11202 -2.67542,0 -5.51799,0.26957 -8.52649,0.80874 -3.0097,0.53915 -5.11684,1.01091 -6.32025,1.41528 V 576 H 658 V 475.28104 c 4.68109,-1.75347 10.53216,-3.40464 17.55439,-4.95472 C 682.57663,468.77504 690.36771,468 698.92762,468 c 1.60574,0 3.47769,0.10109 5.61827,0.30328 2.13938,0.20218 4.27996,0.47176 6.42053,0.80873 2.13939,0.33697 4.2131,0.74255 6.21878,1.21431 2.00687,0.47176 3.6114,0.90983 4.8148,1.3142 z"
|
||||
style="fill:#3c4b5a;fill-rule:nonzero;stroke-width:1.19865453"
|
||||
id="path31"
|
||||
inkscape:connector-curvature="0" /><path
|
||||
sodipodi:nodetypes="cccccccccccccc"
|
||||
d="M 259,424 H 360 V 359 L 30,34 H 90 L 385,324 670,34 h 60 L 410,359 v 84.99783 C 410,449 405,454 400,454 H 259 c -12,0 -14,-10 -14,-15 0,-5 2,-15 14,-15 z"
|
||||
style="fill:#b12f35"
|
||||
id="path35"
|
||||
inkscape:connector-curvature="0" />
|
||||
<rect
|
||||
id="rect12-6"
|
||||
style="clip-rule:evenodd;fill:#3c4b5a;fill-rule:nonzero;stroke-width:1.03280997;stroke-linejoin:round;stroke-miterlimit:1.41420996"
|
||||
height="158"
|
||||
width="24"
|
||||
y="418"
|
||||
x="191" /></svg>
|
||||
|
After Width: | Height: | Size: 8.0 KiB |
@@ -6,6 +6,10 @@
|
||||
@import './assets/styles/utils.scss';
|
||||
@import './assets/styles/updateManager.scss';
|
||||
|
||||
:root {
|
||||
--app-height: 100%;
|
||||
}
|
||||
|
||||
#content {
|
||||
background-attachment: fixed;
|
||||
background-size: cover;
|
||||
@@ -15,6 +19,10 @@
|
||||
.v-btn:not(.v-btn--outlined).primary {
|
||||
color: var(--v-btn-text-primary)
|
||||
}
|
||||
|
||||
.main-content-scrollbar {
|
||||
height: calc(var(--app-height) - 48px);
|
||||
}
|
||||
</style>
|
||||
|
||||
<template>
|
||||
@@ -23,32 +31,37 @@
|
||||
<the-sidebar></the-sidebar>
|
||||
<the-topbar></the-topbar>
|
||||
|
||||
<v-main id="content" :style="{ background: mainBackground }">
|
||||
<v-container fluid id="page-container" class="container px-3 px-sm-6 py-sm-6 mx-auto">
|
||||
<router-view></router-view>
|
||||
</v-container>
|
||||
<v-main id="content" :style="mainStyle">
|
||||
<overlay-scrollbars class="main-content-scrollbar">
|
||||
<v-container fluid id="page-container" class="container px-3 px-sm-6 py-sm-6 mx-auto">
|
||||
<router-view></router-view>
|
||||
</v-container>
|
||||
</overlay-scrollbars>
|
||||
</v-main>
|
||||
<the-select-printer-dialog v-if="remoteMode"></the-select-printer-dialog>
|
||||
<the-connecting-dialog v-else></the-connecting-dialog>
|
||||
<the-update-dialog></the-update-dialog>
|
||||
<the-editor></the-editor>
|
||||
<the-timelapse-rendering-snackbar>-</the-timelapse-rendering-snackbar>
|
||||
</v-app>
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import Component from 'vue-class-component'
|
||||
import TheSidebar from "@/components/TheSidebar.vue";
|
||||
import BaseMixin from "@/components/mixins/base";
|
||||
import TheTopbar from "@/components/TheTopbar.vue";
|
||||
import {Mixins, Vue, Watch} from "vue-property-decorator";
|
||||
import TheUpdateDialog from "@/components/TheUpdateDialog.vue";
|
||||
import TheConnectingDialog from "@/components/TheConnectingDialog.vue";
|
||||
import TheSelectPrinterDialog from "@/components/TheSelectPrinterDialog.vue";
|
||||
import TheEditor from "@/components/TheEditor.vue";
|
||||
import MainsailLogo from "@/components/ui/MainsailLogo.vue";
|
||||
import TheSidebar from '@/components/TheSidebar.vue'
|
||||
import BaseMixin from '@/components/mixins/base'
|
||||
import TheTopbar from '@/components/TheTopbar.vue'
|
||||
import {Mixins, Watch} from 'vue-property-decorator'
|
||||
import TheUpdateDialog from '@/components/TheUpdateDialog.vue'
|
||||
import TheConnectingDialog from '@/components/TheConnectingDialog.vue'
|
||||
import TheSelectPrinterDialog from '@/components/TheSelectPrinterDialog.vue'
|
||||
import TheEditor from '@/components/TheEditor.vue'
|
||||
import {panelToolbarHeight, topbarHeight, navigationItemHeight} from '@/store/variables'
|
||||
import TheTimelapseRenderingSnackbar from '@/components/TheTimelapseRenderingSnackbar.vue'
|
||||
|
||||
@Component({
|
||||
components: {
|
||||
TheTimelapseRenderingSnackbar,
|
||||
TheEditor,
|
||||
TheSelectPrinterDialog,
|
||||
TheConnectingDialog,
|
||||
@@ -58,44 +71,61 @@ import MainsailLogo from "@/components/ui/MainsailLogo.vue";
|
||||
}
|
||||
})
|
||||
export default class App extends Mixins(BaseMixin) {
|
||||
panelToolbarHeight = panelToolbarHeight
|
||||
topbarHeight = topbarHeight
|
||||
navigationItemHeight = navigationItemHeight
|
||||
|
||||
get title(): string {
|
||||
return this.$store.getters["getTitle"]
|
||||
return this.$store.getters['getTitle']
|
||||
}
|
||||
|
||||
get remoteMode() {
|
||||
get remoteMode(): boolean {
|
||||
return this.$store.state.socket.remoteMode ?? false
|
||||
}
|
||||
|
||||
get mainBackground() {
|
||||
return this.$store.getters["files/getMainBackground"]
|
||||
get mainBackground(): string {
|
||||
return this.$store.getters['files/getMainBackground']
|
||||
}
|
||||
|
||||
get mainStyle() {
|
||||
let style = ''
|
||||
|
||||
if (this.mainBackground !== null) {
|
||||
style = 'background-image: url('+this.mainBackground+');'
|
||||
}
|
||||
|
||||
return style
|
||||
}
|
||||
|
||||
get customStylesheet () {
|
||||
return this.$store.getters["files/getCustomStylesheet"]
|
||||
return this.$store.getters['files/getCustomStylesheet']
|
||||
}
|
||||
|
||||
get customFavicons () {
|
||||
return this.$store.getters["files/getCustomFavicons"] ?? null
|
||||
get customFavicons(): string | null {
|
||||
return this.$store.getters['files/getCustomFavicons'] ?? null
|
||||
}
|
||||
|
||||
get language () {
|
||||
get language(): string {
|
||||
return this.$store.state.gui.general.language
|
||||
}
|
||||
|
||||
get current_file () {
|
||||
return this.$store.state.printer.print_stats?.filename ?? ""
|
||||
get current_file(): string {
|
||||
return this.$store.state.printer.print_stats?.filename ?? ''
|
||||
}
|
||||
|
||||
get logoColor () {
|
||||
return this.$store.state.gui.theme.logo
|
||||
get logoColor(): string {
|
||||
return this.$store.state.gui.uiSettings.logo
|
||||
}
|
||||
|
||||
get primaryColor () {
|
||||
return this.$store.state.gui.theme.primary
|
||||
get primaryColor(): string {
|
||||
return this.$store.state.gui.uiSettings.primary
|
||||
}
|
||||
|
||||
get primaryTextColor() {
|
||||
get warningColor(): string {
|
||||
return this.$vuetify?.theme?.currentTheme?.warning?.toString() ?? '#ff8300'
|
||||
}
|
||||
|
||||
get primaryTextColor(): string {
|
||||
let splits = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(this.primaryColor)
|
||||
if (splits) {
|
||||
const r = parseInt(splits[1], 16) * 0.2126
|
||||
@@ -109,29 +139,35 @@ export default class App extends Mixins(BaseMixin) {
|
||||
return '#ffffff'
|
||||
}
|
||||
|
||||
get cssVars() {
|
||||
get cssVars(): { [key: string]: string } {
|
||||
return {
|
||||
'--v-btn-text-primary': this.primaryTextColor
|
||||
'--v-btn-text-primary': this.primaryTextColor,
|
||||
'--color-primary': this.primaryColor,
|
||||
'--color-warning': this.warningColor,
|
||||
'--panel-toolbar-icon-btn-width': panelToolbarHeight + 'px',
|
||||
'--panel-toolbar-text-btn-height': panelToolbarHeight + 'px',
|
||||
'--topbar-icon-btn-width': topbarHeight + 'px',
|
||||
'--sidebar-menu-item-height': navigationItemHeight + 'px'
|
||||
}
|
||||
}
|
||||
|
||||
get print_percent () {
|
||||
return Math.round(this.$store.getters["printer/getPrintPercent"] * 100)
|
||||
get print_percent(): number {
|
||||
return Math.round(this.$store.getters['printer/getPrintPercent'] * 100)
|
||||
}
|
||||
|
||||
@Watch('language')
|
||||
languageChanged(newVal: string) {
|
||||
this.$i18n.locale = newVal;
|
||||
languageChanged(newVal: string): void {
|
||||
this.$i18n.locale = newVal
|
||||
}
|
||||
|
||||
@Watch('customStylesheet')
|
||||
customStylesheetChanged(newVal: string | null) {
|
||||
const style = document.getElementById("customStylesheet")
|
||||
customStylesheetChanged(newVal: string | null): void {
|
||||
const style = document.getElementById('customStylesheet')
|
||||
if (newVal !== null && style === null) {
|
||||
const newStyle = document.createElement('link')
|
||||
newStyle.id = "customStylesheet"
|
||||
newStyle.type = "text/css"
|
||||
newStyle.rel = "stylesheet"
|
||||
newStyle.id = 'customStylesheet'
|
||||
newStyle.type = 'text/css'
|
||||
newStyle.rel = 'stylesheet'
|
||||
newStyle.href = newVal
|
||||
document.head.appendChild(newStyle)
|
||||
} else if (newVal !== null && style) {
|
||||
@@ -140,24 +176,24 @@ export default class App extends Mixins(BaseMixin) {
|
||||
}
|
||||
|
||||
@Watch('current_file')
|
||||
current_fileChanged(newVal: string) {
|
||||
if (newVal !== "") this.$socket.emit("server.files.metadata", { filename: newVal }, { action: "files/getMetadataCurrentFile" });
|
||||
current_fileChanged(newVal: string): void {
|
||||
if (newVal !== '') this.$socket.emit('server.files.metadata', { filename: newVal }, { action: 'files/getMetadataCurrentFile' })
|
||||
}
|
||||
|
||||
@Watch('primaryColor')
|
||||
primaryColorChanged(newVal: string) {
|
||||
primaryColorChanged(newVal: string): void {
|
||||
this.$nextTick(() => {
|
||||
this.$vuetify.theme.currentTheme.primary = newVal
|
||||
})
|
||||
}
|
||||
|
||||
drawFavicon(val: number) {
|
||||
const favicon16: HTMLLinkElement | null = document.querySelector("link[rel*='icon'][sizes='16x16']")
|
||||
const favicon32: HTMLLinkElement | null = document.querySelector("link[rel*='icon'][sizes='32x32']")
|
||||
drawFavicon(val: number): void {
|
||||
const favicon16: HTMLLinkElement | null = document.querySelector('link[rel*=\'icon\'][sizes=\'16x16\']')
|
||||
const favicon32: HTMLLinkElement | null = document.querySelector('link[rel*=\'icon\'][sizes=\'32x32\']')
|
||||
|
||||
if (favicon16 && favicon32) {
|
||||
if (this.printerIsPrinting) {
|
||||
let faviconSize = 64;
|
||||
let faviconSize = 64
|
||||
|
||||
let canvas = document.createElement('canvas')
|
||||
canvas.width = faviconSize
|
||||
@@ -173,9 +209,9 @@ export default class App extends Mixins(BaseMixin) {
|
||||
context.moveTo(centerX, centerY)
|
||||
context.arc(centerX, centerY, radius, 0, 2 * Math.PI, false)
|
||||
context.closePath()
|
||||
context.fillStyle = "#ddd"
|
||||
context.fillStyle = '#ddd'
|
||||
context.fill()
|
||||
context.strokeStyle = "rgba(200, 208, 218, 0.66)"
|
||||
context.strokeStyle = 'rgba(200, 208, 218, 0.66)'
|
||||
context.stroke()
|
||||
|
||||
// draw the green circle based on percentage
|
||||
@@ -219,27 +255,37 @@ export default class App extends Mixins(BaseMixin) {
|
||||
}
|
||||
|
||||
@Watch('customFavicons')
|
||||
customFaviconsChanged() {
|
||||
customFaviconsChanged(): void {
|
||||
this.drawFavicon(this.print_percent)
|
||||
}
|
||||
|
||||
@Watch('logoColor')
|
||||
logoColorChanged() {
|
||||
logoColorChanged(): void {
|
||||
this.drawFavicon(this.print_percent)
|
||||
}
|
||||
|
||||
@Watch('print_percent')
|
||||
print_percentChanged(newVal: number) {
|
||||
print_percentChanged(newVal: number): void {
|
||||
this.drawFavicon(newVal)
|
||||
}
|
||||
|
||||
@Watch('printerIsPrinting')
|
||||
printerIsPrintingChanged() {
|
||||
printerIsPrintingChanged(): void {
|
||||
this.drawFavicon(this.print_percent)
|
||||
}
|
||||
|
||||
mounted() {
|
||||
appHeight() {
|
||||
this.$nextTick(() => {
|
||||
const doc = document.documentElement
|
||||
doc.style.setProperty('--app-height', window.innerHeight+'px')
|
||||
})
|
||||
}
|
||||
|
||||
mounted(): void {
|
||||
this.drawFavicon(this.print_percent)
|
||||
this.appHeight()
|
||||
window.addEventListener('resize', this.appHeight)
|
||||
window.addEventListener('orientationchange', this.appHeight)
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -45,4 +45,12 @@
|
||||
font-weight: 900;
|
||||
src: local('Roboto Black'), local('Roboto-Black'), url(/fonts/roboto-black.woff2) format('woff2');
|
||||
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
|
||||
}
|
||||
/* latin */
|
||||
@font-face {
|
||||
font-family: 'Roboto Mono';
|
||||
font-style: normal;
|
||||
font-weight: 400;
|
||||
src: local('Roboto Mono'), local('Roboto-Mono'), url(/fonts/robotoMono-regular.woff) format('woff');
|
||||
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
|
||||
}
|
||||
@@ -1,3 +1,7 @@
|
||||
html {
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
body {
|
||||
background: #121212;
|
||||
}
|
||||
|
||||
@@ -13,4 +13,22 @@ $t('App.ThrottledStates.DescriptionTemperatureLimitActive')
|
||||
$t('App.ThrottledStates.DescriptionPreviouslyUnderVolted')
|
||||
$t('App.ThrottledStates.DescriptionPreviouslyFrequencyCapped')
|
||||
$t('App.ThrottledStates.DescriptionPreviouslyThrottled')
|
||||
$t('App.ThrottledStates.DescriptionPreviouslyTemperatureLimited')
|
||||
$t('App.ThrottledStates.DescriptionPreviouslyTemperatureLimited')
|
||||
$t('App.TopCornerMenu.Start')
|
||||
$t('App.TopCornerMenu.Restart')
|
||||
$t('App.TopCornerMenu.Stop')
|
||||
$t('App.TopCornerMenu.ConfirmationDialog.Title.KlipperRestart')
|
||||
$t('App.TopCornerMenu.ConfirmationDialog.Title.KlipperFirmwareRestart')
|
||||
$t('App.TopCornerMenu.ConfirmationDialog.Title.ServiceStart')
|
||||
$t('App.TopCornerMenu.ConfirmationDialog.Title.ServiceRestart')
|
||||
$t('App.TopCornerMenu.ConfirmationDialog.Title.ServiceStop')
|
||||
$t('App.TopCornerMenu.ConfirmationDialog.Title.HostReboot')
|
||||
$t('App.TopCornerMenu.ConfirmationDialog.Title.HostShutdown')
|
||||
$t('App.TopCornerMenu.ConfirmationDialog.Description.KlipperStop')
|
||||
$t('App.TopCornerMenu.ConfirmationDialog.Description.KlipperRestart')
|
||||
$t('App.TopCornerMenu.ConfirmationDialog.Description.KlipperFirmwareRestart')
|
||||
$t('App.TopCornerMenu.ConfirmationDialog.Description.ServiceStart')
|
||||
$t('App.TopCornerMenu.ConfirmationDialog.Description.ServiceRestart')
|
||||
$t('App.TopCornerMenu.ConfirmationDialog.Description.ServiceStop')
|
||||
$t('App.TopCornerMenu.ConfirmationDialog.Description.HostReboot')
|
||||
$t('App.TopCornerMenu.ConfirmationDialog.Description.HostShutdown')
|
||||
@@ -7,24 +7,25 @@
|
||||
:fullscreen="isMobile"
|
||||
>
|
||||
<template #activator="{ on, attrs }">
|
||||
<v-btn
|
||||
class="gcode-command-btn px-2 minwidth-0"
|
||||
color="grey darken-3"
|
||||
:small="isMini"
|
||||
v-bind="attrs"
|
||||
v-on="on">
|
||||
<v-icon>mdi-help</v-icon>
|
||||
</v-btn>
|
||||
<template v-if="inToolbar">
|
||||
<v-btn icon tile v-bind="attrs" v-on="on"><v-icon small>mdi-help</v-icon></v-btn>
|
||||
</template>
|
||||
<template v-else>
|
||||
<v-btn
|
||||
class="gcode-command-btn px-2 minwidth-0"
|
||||
color="lightgray"
|
||||
:small="isMini"
|
||||
v-bind="attrs"
|
||||
v-on="on">
|
||||
<v-icon>mdi-help</v-icon>
|
||||
</v-btn>
|
||||
</template>
|
||||
</template>
|
||||
<template #default>
|
||||
<v-card>
|
||||
<v-toolbar flat dense>
|
||||
<v-toolbar-title>
|
||||
<span class="subheading"><v-icon left>mdi-help</v-icon>{{ $t('Console.CommandList') }}</span>
|
||||
</v-toolbar-title>
|
||||
<v-spacer></v-spacer>
|
||||
<v-btn small class="minwidth-0 px-2" color="grey darken-2" @click="isOpen = false"><v-icon small>mdi-close-thick</v-icon></v-btn>
|
||||
</v-toolbar>
|
||||
<panel :title="$t('Console.CommandList')" icon="mdi-help" card-class="command-help-dialog" :margin-bottom="false">
|
||||
<template v-slot:buttons>
|
||||
<v-btn icon tile @click="isOpen = false"><v-icon>mdi-close-thick</v-icon></v-btn>
|
||||
</template>
|
||||
<v-card-title>
|
||||
<v-row>
|
||||
<v-col>
|
||||
@@ -34,12 +35,13 @@
|
||||
outlined
|
||||
hide-details
|
||||
clearable
|
||||
dense
|
||||
></v-text-field>
|
||||
</v-col>
|
||||
</v-row>
|
||||
</v-card-title>
|
||||
<v-divider></v-divider>
|
||||
<perfect-scrollbar :class="'command-help-content '+(isMobile ? '' : 'height300')">
|
||||
<overlay-scrollbars :class="'command-help-content '+(isMobile ? '' : 'height300')">
|
||||
<v-card-text class="pt-0">
|
||||
<v-row>
|
||||
<v-col>
|
||||
@@ -58,21 +60,27 @@
|
||||
</v-col>
|
||||
</v-row>
|
||||
</v-card-text>
|
||||
</perfect-scrollbar>
|
||||
</v-card>
|
||||
</overlay-scrollbars>
|
||||
</panel>
|
||||
</template>
|
||||
</v-dialog>
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import BaseMixin from "./mixins/base";
|
||||
import {CommandHelp} from "@/store/printer/types";
|
||||
import {Mixins, Prop, Watch} from "vue-property-decorator";
|
||||
import Component from "vue-class-component";
|
||||
import BaseMixin from './mixins/base'
|
||||
import {CommandHelp} from '@/store/printer/types'
|
||||
import {Mixins, Prop, Watch} from 'vue-property-decorator'
|
||||
import Component from 'vue-class-component'
|
||||
import Panel from '@/components/ui/Panel.vue'
|
||||
|
||||
@Component({
|
||||
components: {Panel}
|
||||
})
|
||||
|
||||
@Component
|
||||
export default class CommandHelpModal extends Mixins(BaseMixin) {
|
||||
@Prop({ required: false, default: false }) isMini!: boolean;
|
||||
@Prop({ required: false, default: false }) inToolbar!: boolean;
|
||||
|
||||
cmdListSearch = '';
|
||||
isOpen = false;
|
||||
|
||||
@@ -82,14 +90,14 @@ export default class CommandHelpModal extends Mixins(BaseMixin) {
|
||||
|
||||
get helplistFiltered(): CommandHelp[] {
|
||||
return this.helplist
|
||||
.filter(cmd => typeof(cmd.description) === "string" && (!this.cmdListSearch || cmd.commandLow.includes(this.cmdListSearch.toLowerCase())))
|
||||
.sort((a, b) => a.commandLow.localeCompare(b.commandLow));
|
||||
.filter(cmd => typeof(cmd.description) === 'string' && (!this.cmdListSearch || cmd.commandLow.includes(this.cmdListSearch.toLowerCase())))
|
||||
.sort((a, b) => a.commandLow.localeCompare(b.commandLow))
|
||||
}
|
||||
|
||||
@Watch('isOpen')
|
||||
onIsOpen(val: boolean): void {
|
||||
if (!val) {
|
||||
this.cmdListSearch = '';
|
||||
this.cmdListSearch = ''
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<template>
|
||||
<v-dialog v-model="showDialog" persistent :width="400">
|
||||
<v-card dark>
|
||||
<v-toolbar flat dense color="primary">
|
||||
<v-toolbar flat dense>
|
||||
<v-toolbar-title>
|
||||
<span class="subheading">
|
||||
<v-icon class="mdi mdi-connection" left></v-icon>
|
||||
@@ -31,7 +31,7 @@
|
||||
<v-divider class="mt-4 mb-5"></v-divider>
|
||||
</template>
|
||||
<div class="text-center">
|
||||
<v-btn @click="reconnect" color="primary">{{ $t("ConnectionDialog.TryAgain") }}</v-btn>
|
||||
<v-btn @click="reconnect" class="primary--text">{{ $t("ConnectionDialog.TryAgain") }}</v-btn>
|
||||
</div>
|
||||
</v-card-text>
|
||||
</v-card>
|
||||
@@ -43,7 +43,7 @@
|
||||
import Component from 'vue-class-component'
|
||||
import { Mixins } from 'vue-property-decorator'
|
||||
import BaseMixin from '@/components/mixins/base'
|
||||
import ConnectionStatus from "@/components/ui/ConnectionStatus.vue";
|
||||
import ConnectionStatus from '@/components/ui/ConnectionStatus.vue'
|
||||
|
||||
@Component({
|
||||
components: {
|
||||
@@ -66,7 +66,7 @@ export default class TheUpdateDialog extends Mixins(BaseMixin) {
|
||||
}
|
||||
|
||||
get formatHostname() {
|
||||
return parseInt(this.port) !== 80 && this.port !== "" ? this.hostname+":"+this.port : this.hostname
|
||||
return parseInt(this.port) !== 80 && this.port !== '' ? this.hostname+':'+this.port : this.hostname
|
||||
}
|
||||
|
||||
get isConnected() {
|
||||
|
||||
@@ -1,50 +1,43 @@
|
||||
<style scoped>
|
||||
.editor-content-container {
|
||||
height: calc(100vh - 64px);
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
<template>
|
||||
<div>
|
||||
<v-dialog v-model="show"
|
||||
<v-dialog persistent v-model="show"
|
||||
fullscreen
|
||||
hide-overlay
|
||||
:transition="false"
|
||||
@close="close"
|
||||
@keydown.esc="close"
|
||||
@keydown.esc="escClose"
|
||||
>
|
||||
<v-card>
|
||||
<v-toolbar dark color="primary">
|
||||
<v-btn icon dark @click="close">
|
||||
<v-icon>mdi-close</v-icon>
|
||||
</v-btn>
|
||||
<v-toolbar-title>{{ filepath ? filepath.slice(1)+"/" : "" }}{{ filename }}</v-toolbar-title>
|
||||
<v-spacer></v-spacer>
|
||||
<v-toolbar-items>
|
||||
<v-btn dark text href="https://www.klipper3d.org/Config_Reference.html" v-if="restartServiceName === 'klipper'" target="_blank" class="d-none d-md-flex"><v-icon small class="mr-1">mdi-help</v-icon>{{ $t('Editor.ConfigReference') }}</v-btn>
|
||||
<template v-if="isWriteable">
|
||||
<v-divider white vertical class="d-none d-md-flex" v-if="restartServiceName === 'klipper'"></v-divider>
|
||||
<v-btn dark text @click="save(null)" ><v-icon small class="mr-1">mdi-content-save</v-icon><span class="d-none d-sm-inline">{{ $t('Editor.SaveClose') }}</span></v-btn>
|
||||
</template>
|
||||
<template v-if="restartServiceName != null">
|
||||
<v-divider white vertical class="d-none d-sm-flex"></v-divider>
|
||||
<v-btn dark text @click="save(restartServiceName)" class="d-none d-sm-flex"><v-icon small class="mr-1">mdi-restart</v-icon>{{ $t('Editor.SaveRestart') }}</v-btn>
|
||||
</template>
|
||||
</v-toolbar-items>
|
||||
</v-toolbar>
|
||||
<panel card-class="editor-dialog" :icon="(isWriteable ? ' mdi-file-document-edit-outline' : 'mdi-file-document-outline')" :title="(filepath ? filepath.slice(1)+'/': '')+filename+' '+(isWriteable ? changed : '('+$t('Editor.FileReadOnly')+')')">
|
||||
<template v-slot:buttons>
|
||||
<v-btn text tile href="https://www.klipper3d.org/Config_Reference.html" v-if="restartServiceName === 'klipper'" target="_blank" class="d-none d-md-flex"><v-icon small class="mr-1">mdi-help</v-icon>{{ $t('Editor.ConfigReference') }}</v-btn>
|
||||
<v-btn v-if="isWriteable" text tile :color="restartServiceName === null ? 'primary' : ''" @click="save(null)" ><v-icon small class="mr-1">mdi-content-save</v-icon><span class="d-none d-sm-inline">{{ $t('Editor.SaveClose') }}</span></v-btn>
|
||||
<v-btn v-if="restartServiceName !== null" color="primary" text tile @click="save(restartServiceName)" class="d-none d-sm-flex"><v-icon small class="mr-1">mdi-restart</v-icon>{{ $t('Editor.SaveRestart') }}</v-btn>
|
||||
<v-btn icon tile @click="close"><v-icon>mdi-close-thick</v-icon></v-btn>
|
||||
</template>
|
||||
<v-card-text class="pa-0">
|
||||
<codemirror ref="editor" v-model="sourcecode" :name="filename" v-bind:file-extension="fileExtension"></codemirror>
|
||||
<overlay-scrollbars style="height: calc(var(--app-height) - 48px)" :options="{ }">
|
||||
<codemirror ref="editor" v-model="sourcecode" :name="filename" v-bind:file-extension="fileExtension"></codemirror>
|
||||
</overlay-scrollbars>
|
||||
</v-card-text>
|
||||
</v-card>
|
||||
</panel>
|
||||
</v-dialog>
|
||||
<v-snackbar v-model="loaderBool" :timeout="-1" :value="true" fixed right bottom dark>
|
||||
<div>
|
||||
{{ snackbarHeadline }}<br />
|
||||
<strong>{{ filename }}</strong>
|
||||
</div>
|
||||
<span v-if="loaderProgress.total > 1" class="mr-1">({{ formatFilesize(loaderProgress.loaded) }}/{{ formatFilesize(loaderProgress.total) }})</span>
|
||||
{{ Math.round(100 * loaderProgress.loaded / loaderProgress.total) }} % @ {{ loaderProgress.speed }}/s<br />
|
||||
<v-progress-linear class="mt-2" :value="100 * loaderProgress.loaded / loaderProgress.total"></v-progress-linear>
|
||||
<template v-if="loaderProgress.total > 0">
|
||||
<span class="mr-1">({{ formatFilesize(loaderProgress.loaded) }}/{{ formatFilesize(loaderProgress.total) }})</span>
|
||||
{{ Math.round(100 * loaderProgress.loaded / loaderProgress.total) }} % @ {{ loaderProgress.speed }}/s<br />
|
||||
<v-progress-linear class="mt-2" :value="100 * loaderProgress.loaded / loaderProgress.total"></v-progress-linear>
|
||||
</template>
|
||||
<template v-else>
|
||||
<v-progress-linear class="mt-2" indeterminate></v-progress-linear>
|
||||
</template>
|
||||
<template v-slot:action="{ attrs }">
|
||||
<v-btn
|
||||
color="red"
|
||||
@@ -52,39 +45,78 @@
|
||||
v-bind="attrs"
|
||||
@click="cancelDownload"
|
||||
style="min-width: auto;"
|
||||
tile
|
||||
>
|
||||
<v-icon class="0">mdi-close</v-icon>
|
||||
</v-btn>
|
||||
</template>
|
||||
</v-snackbar>
|
||||
<v-dialog v-model="dialogConfirmChange" persistent :width="600">
|
||||
<panel card-class="editor-confirm-change-dialog" icon="mdi-help-circle" :title="$t('Editor.UnsavedChanges')" :margin-bottom="false">
|
||||
<template v-slot:buttons>
|
||||
<v-btn icon tile @click="dialogConfirmChange = false"><v-icon>mdi-close-thick</v-icon></v-btn>
|
||||
</template>
|
||||
<v-card-text class="pt-3">
|
||||
<v-row>
|
||||
<v-col>
|
||||
<p class="body-1 mb-2">{{ $t('Editor.UnsavedChangesMessage', {filename: filename}) }}</p>
|
||||
<p class="body-2">{{ $t('Editor.UnsavedChangesSubMessage') }}</p>
|
||||
</v-col>
|
||||
</v-row>
|
||||
</v-card-text>
|
||||
<v-card-actions>
|
||||
<v-spacer></v-spacer>
|
||||
<v-btn text @click="discardChanges">
|
||||
{{ $t('Editor.DontSave') }}
|
||||
</v-btn>
|
||||
<v-btn text color="primary" @click="save">
|
||||
{{ $t('Editor.SaveClose') }}
|
||||
</v-btn>
|
||||
<template v-if="restartServiceName != null">
|
||||
<v-btn text color="primary" @click="save(restartServiceName)">
|
||||
{{ $t('Editor.SaveRestart') }}
|
||||
</v-btn>
|
||||
</template>
|
||||
</v-card-actions>
|
||||
</panel>
|
||||
</v-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import {Component, Mixins} from "vue-property-decorator";
|
||||
import BaseMixin from "@/components/mixins/base"
|
||||
import {formatFilesize} from "@/plugins/helpers";
|
||||
import Codemirror from "@/components/inputs/Codemirror.vue";
|
||||
import {Component, Mixins} from 'vue-property-decorator'
|
||||
import BaseMixin from '@/components/mixins/base'
|
||||
import {formatFilesize} from '@/plugins/helpers'
|
||||
import Codemirror from '@/components/inputs/Codemirror.vue'
|
||||
import Panel from '@/components/ui/Panel.vue'
|
||||
|
||||
@Component({
|
||||
components: {Codemirror}
|
||||
components: {Panel, Codemirror}
|
||||
})
|
||||
|
||||
export default class TheEditor extends Mixins(BaseMixin) {
|
||||
private dialogConfirmChange = false
|
||||
|
||||
formatFilesize = formatFilesize
|
||||
|
||||
refs!: {
|
||||
editor: any
|
||||
}
|
||||
|
||||
get changed() {
|
||||
return this.$store.state.editor.changed ? '*' : ''
|
||||
}
|
||||
|
||||
get show() {
|
||||
return this.$store.state.editor.bool ?? false
|
||||
}
|
||||
|
||||
get filepath(): string {
|
||||
return this.$store.state.editor.filepath ?? ""
|
||||
return this.$store.state.editor.filepath ?? ''
|
||||
}
|
||||
|
||||
get filename(): string {
|
||||
return this.$store.state.editor.filename ?? ""
|
||||
return this.$store.state.editor.filename ?? ''
|
||||
}
|
||||
|
||||
get fileExtension() {
|
||||
@@ -94,15 +126,19 @@ export default class TheEditor extends Mixins(BaseMixin) {
|
||||
}
|
||||
|
||||
get fileroot() {
|
||||
return this.$store.state.editor.fileroot ?? "gcodes"
|
||||
return this.$store.state.editor.fileroot ?? 'gcodes'
|
||||
}
|
||||
|
||||
get permissions(): string {
|
||||
return this.$store.state.editor.permissions ?? 'r'
|
||||
}
|
||||
|
||||
get isWriteable() {
|
||||
return ['config', 'gcodes'].includes(this.fileroot)
|
||||
return this.permissions.includes('w')
|
||||
}
|
||||
|
||||
get sourcecode() {
|
||||
return this.$store.state.editor.sourcecode ?? ""
|
||||
return this.$store.state.editor.sourcecode ?? ''
|
||||
}
|
||||
|
||||
set sourcecode(newVal) {
|
||||
@@ -118,7 +154,7 @@ export default class TheEditor extends Mixins(BaseMixin) {
|
||||
}
|
||||
|
||||
get snackbarHeadline() {
|
||||
let directionUppercase = this.$t("Files.Downloading")
|
||||
let directionUppercase = this.$t('Files.Downloading')
|
||||
if (this.loaderProgress.direction) {
|
||||
directionUppercase = this.loaderProgress.direction?.charAt(0).toUpperCase() + this.loaderProgress.direction?.slice(1)
|
||||
}
|
||||
@@ -130,27 +166,51 @@ export default class TheEditor extends Mixins(BaseMixin) {
|
||||
if (!this.isWriteable) return null
|
||||
if (['printing', 'paused'].includes(this.printer_state)) return null
|
||||
|
||||
if (this.filename === "moonraker.conf")
|
||||
return "moonraker"
|
||||
else if (this.filename.startsWith("webcam") && this.filename.endsWith(".txt"))
|
||||
return "webcamd"
|
||||
else if (this.filename.startsWith("mooncord") && this.filename.endsWith(".json"))
|
||||
return "mooncord"
|
||||
else if (this.filename.endsWith(".cfg"))
|
||||
return "klipper"
|
||||
if (this.filename === 'moonraker.conf')
|
||||
return 'moonraker'
|
||||
else if (this.filename === 'webcam.conf')
|
||||
return 'webcamd'
|
||||
else if (this.filename.startsWith('webcam') && this.filename.endsWith('.txt'))
|
||||
return 'webcamd'
|
||||
else if (this.filename.startsWith('mooncord') && this.filename.endsWith('.json'))
|
||||
return 'mooncord'
|
||||
else if (this.filename.endsWith('.cfg'))
|
||||
return 'klipper'
|
||||
|
||||
return null
|
||||
}
|
||||
|
||||
cancelDownload() {
|
||||
this.$store.dispatch("editor/cancelLoad")
|
||||
this.$store.dispatch('editor/cancelLoad')
|
||||
}
|
||||
|
||||
escClose() {
|
||||
if (this.$store.state.gui.editor.escToClose)
|
||||
this.close()
|
||||
}
|
||||
|
||||
close() {
|
||||
this.$store.dispatch("editor/close")
|
||||
if (this.$store.state.gui.editor.confirmUnsavedChanges)
|
||||
this.promptUnsavedChanges()
|
||||
else
|
||||
this.$store.dispatch('editor/close')
|
||||
}
|
||||
|
||||
discardChanges() {
|
||||
this.dialogConfirmChange = false
|
||||
this.$store.dispatch('editor/close')
|
||||
}
|
||||
|
||||
promptUnsavedChanges() {
|
||||
if (!this.$store.state.editor.changed || !this.isWriteable)
|
||||
this.$store.dispatch('editor/close')
|
||||
else
|
||||
this.dialogConfirmChange = true
|
||||
}
|
||||
|
||||
save(restartServiceName: string | null = null) {
|
||||
this.dialogConfirmChange = false
|
||||
|
||||
this.$store.dispatch('editor/saveFile', {
|
||||
content: this.sourcecode,
|
||||
restartServiceName: restartServiceName
|
||||
|
||||
@@ -4,37 +4,30 @@
|
||||
|
||||
<template>
|
||||
<v-dialog v-model="showDialog" persistent :width="400">
|
||||
<v-card dark>
|
||||
<v-toolbar flat dense color="primary">
|
||||
<v-toolbar-title>
|
||||
<span class="subheading">
|
||||
<v-icon class="mdi mdi-connection" left></v-icon>
|
||||
<template v-if="dialogAddPrinter.bool">{{ $t("SelectPrinterDialog.AddPrinter") }}</template>
|
||||
<template v-else-if="dialogEditPrinter.bool">{{ $t("SelectPrinterDialog.EditPrinter") }}</template>
|
||||
<template v-else-if="isConnecting">{{ $t("SelectPrinterDialog.Connecting", {'host': formatHostname}) }}</template>
|
||||
<template v-else-if="connectingFailed">{{ $t("SelectPrinterDialog.ConnectionFailed", {'host': formatHostname}) }}</template>
|
||||
<template v-else>{{ $t("SelectPrinterDialog.SelectPrinter") }}</template>
|
||||
</span>
|
||||
</v-toolbar-title>
|
||||
<v-spacer></v-spacer>
|
||||
<panel card-class="select-printer-dialog" icon="mdi-connection" :title="panelTitle" :margin-bottom="false" toolbar-color="toolbar">
|
||||
<template v-slot:buttons>
|
||||
<template v-if="!isConnecting && !connectingFailed">
|
||||
<template v-if="dialogEditPrinter.bool"><v-btn small class="minwidth-0" @click="dialogEditPrinter.bool = false"><v-icon small>mdi-close-thick</v-icon></v-btn></template>
|
||||
<template v-else-if="dialogAddPrinter.bool"><v-btn small class="minwidth-0" v-if="dialogAddPrinter.bool" @click="dialogAddPrinter.bool = false"><v-icon small>mdi-close-thick</v-icon></v-btn></template>
|
||||
<template v-else-if="Object.keys(this.printers).length > 0"><v-btn small class="minwidth-0" @click="checkPrinters"><v-icon small>mdi-sync</v-icon></v-btn></template>
|
||||
<template v-if="dialogEditPrinter.bool"><v-btn icon tile class="minwidth-0" @click="dialogEditPrinter.bool = false"><v-icon>mdi-close-thick</v-icon></v-btn></template>
|
||||
<template v-else-if="dialogAddPrinter.bool"><v-btn icon tile class="minwidth-0" v-if="dialogAddPrinter.bool" @click="dialogAddPrinter.bool = false"><v-icon>mdi-close-thick</v-icon></v-btn></template>
|
||||
<template v-else-if="printers.length > 0"><v-btn icon tile class="minwidth-0" @click="checkPrinters" color="primary"><v-icon>mdi-sync</v-icon></v-btn></template>
|
||||
</template>
|
||||
</v-toolbar>
|
||||
<v-card-text class="pt-5" v-if="isConnecting">
|
||||
<v-progress-linear color="white" indeterminate></v-progress-linear>
|
||||
</v-card-text>
|
||||
<v-card-text class="pt-5" v-if="!isConnecting && connectingFailed">
|
||||
<p>{{ $t("SelectPrinterDialog.CannotConnectTo", {'host': parseInt(port) !== 80 ? hostname+":"+port : hostname}) }}</p>
|
||||
<div class="text-center">
|
||||
<v-btn @click="switchToChangePrinter" color="white" outlined class="mr-3">{{ $t("SelectPrinterDialog.ChangePrinter") }}</v-btn>
|
||||
<v-btn @click="reconnect" color="primary">{{ $t("SelectPrinterDialog.TryAgain") }}</v-btn>
|
||||
</div>
|
||||
</v-card-text>
|
||||
<v-card-text class="pt-3" v-if="!isConnecting && dialogAddPrinter.bool">
|
||||
<v-container class="px-0 py-0">
|
||||
</template>
|
||||
<template v-if="isConnecting">
|
||||
<v-card-text>
|
||||
<v-progress-linear color="primary" indeterminate></v-progress-linear>
|
||||
</v-card-text>
|
||||
</template>
|
||||
<template v-else-if="!isConnecting && connectingFailed">
|
||||
<v-card-text>
|
||||
<p>{{ $t("SelectPrinterDialog.CannotConnectTo", {'host': parseInt(port) !== 80 ? hostname+":"+port : hostname}) }}</p>
|
||||
<div class="text-center">
|
||||
<v-btn text @click="switchToChangePrinter" color="white" class="mr-3">{{ $t("SelectPrinterDialog.ChangePrinter") }}</v-btn>
|
||||
<v-btn text @click="reconnect" color="primary">{{ $t("SelectPrinterDialog.TryAgain") }}</v-btn>
|
||||
</div>
|
||||
</v-card-text>
|
||||
</template>
|
||||
<template v-else-if="!isConnecting && dialogAddPrinter.bool">
|
||||
<v-card-text>
|
||||
<v-row>
|
||||
<v-col class="col-8">
|
||||
<v-text-field
|
||||
@@ -46,6 +39,9 @@
|
||||
]"
|
||||
label="Hostname/IP"
|
||||
required
|
||||
outlined
|
||||
hide-details="auto"
|
||||
dense
|
||||
></v-text-field>
|
||||
</v-col>
|
||||
<v-col class="col-4">
|
||||
@@ -53,26 +49,28 @@
|
||||
v-model="dialogAddPrinter.port"
|
||||
:rules="[v => !!v || $t('SelectPrinterDialog.PortRequired')]"
|
||||
label="Port"
|
||||
hide-details="auto"
|
||||
required
|
||||
outlined
|
||||
dense
|
||||
></v-text-field>
|
||||
</v-col>
|
||||
</v-row>
|
||||
<v-row>
|
||||
<v-col class="text-right">
|
||||
<v-btn
|
||||
color="white"
|
||||
outlined
|
||||
class="middle"
|
||||
@click="addPrinter"
|
||||
>
|
||||
{{ $t("SelectPrinterDialog.AddPrinter") }}
|
||||
</v-btn>
|
||||
</v-col>
|
||||
</v-row>
|
||||
</v-container>
|
||||
</v-card-text>
|
||||
<v-card-text class="pt-3" v-if="!isConnecting && dialogEditPrinter.bool">
|
||||
<v-container class="px-0 py-0">
|
||||
</v-card-text>
|
||||
<v-card-actions>
|
||||
<v-spacer></v-spacer>
|
||||
<v-btn
|
||||
color="primary"
|
||||
text
|
||||
class="middle"
|
||||
@click="addPrinter"
|
||||
>
|
||||
{{ $t("SelectPrinterDialog.AddPrinter") }}
|
||||
</v-btn>
|
||||
</v-card-actions>
|
||||
</template>
|
||||
<template v-else-if="!isConnecting && dialogEditPrinter.bool">
|
||||
<v-card-text>
|
||||
<v-row>
|
||||
<v-col class="col-8">
|
||||
<v-text-field
|
||||
@@ -84,6 +82,9 @@
|
||||
]"
|
||||
label="Hostname/IP"
|
||||
required
|
||||
outlined
|
||||
dense
|
||||
hide-details="auto"
|
||||
></v-text-field>
|
||||
</v-col>
|
||||
<v-col class="col-4">
|
||||
@@ -92,96 +93,106 @@
|
||||
:rules="[v => !!v || $t('SelectPrinterDialog.PortRequired')]"
|
||||
label="Port"
|
||||
required
|
||||
outlined
|
||||
dense
|
||||
hide-details="auto"
|
||||
></v-text-field>
|
||||
</v-col>
|
||||
</v-row>
|
||||
<v-row>
|
||||
<v-col class="">
|
||||
<v-btn
|
||||
color="red"
|
||||
outlined
|
||||
class="middle minwidth-0"
|
||||
@click="delPrinter"
|
||||
>
|
||||
<v-icon small>mdi-delete</v-icon>
|
||||
</v-btn>
|
||||
</v-col>
|
||||
<v-col class="text-right">
|
||||
<v-btn
|
||||
color="white"
|
||||
outlined
|
||||
class="middle"
|
||||
@click="updatePrinter"
|
||||
>
|
||||
{{ $t("SelectPrinterDialog.UpdatePrinter") }}
|
||||
</v-btn>
|
||||
</v-col>
|
||||
</v-row>
|
||||
</v-container>
|
||||
</v-card-text>
|
||||
<v-card-text class="pt-3" v-if="!isConnecting && !connectingFailed && !dialogAddPrinter.bool && !dialogEditPrinter.bool">
|
||||
<v-container class="px-0 pb-0">
|
||||
<v-row v-for="(printer, index) in printers" v-bind:key="index">
|
||||
<v-col class="rounded transition-swing secondary py-2 px-2 mb-2" style="cursor: pointer;" @click="connect(printer)">
|
||||
<v-row align="center">
|
||||
<v-col class="col-auto pr-0">
|
||||
<v-progress-circular
|
||||
indeterminate
|
||||
color="primary"
|
||||
v-if="printer.socket.isConnecting"
|
||||
></v-progress-circular>
|
||||
<v-icon
|
||||
:color="printer.socket.isConnected ? 'green' : 'red'"
|
||||
v-if="!printer.socket.isConnecting"
|
||||
>mdi-{{ printer.socket.isConnected ? 'checkbox-marked-circle' : 'cancel' }}</v-icon>
|
||||
</v-card-text>
|
||||
<v-card-actions>
|
||||
<v-btn
|
||||
color="red"
|
||||
icon
|
||||
tile
|
||||
class="minwidth-0 rounded"
|
||||
@click="delPrinter"
|
||||
>
|
||||
<v-icon small>mdi-delete</v-icon>
|
||||
</v-btn>
|
||||
<v-spacer></v-spacer>
|
||||
<v-btn
|
||||
color="primary"
|
||||
text
|
||||
@click="updatePrinter"
|
||||
>
|
||||
{{ $t("SelectPrinterDialog.UpdatePrinter") }}
|
||||
</v-btn>
|
||||
</v-card-actions>
|
||||
</template>
|
||||
<template v-else>
|
||||
<v-card-text class="mt-3">
|
||||
<v-row v-if="printers.length">
|
||||
<v-col class="px-6">
|
||||
<v-row v-for="(printer, index) in printers" v-bind:key="index">
|
||||
<v-col class="rounded transition-swing toolbar py-2 px-2 mb-2 overflow-hidden" style="cursor: pointer;" @click="connect(printer)">
|
||||
<v-row align="center">
|
||||
<v-col class="col-auto pr-0">
|
||||
<v-progress-circular
|
||||
indeterminate
|
||||
color="primary"
|
||||
v-if="printer.socket.isConnecting"
|
||||
size="24"
|
||||
width="2.5"
|
||||
></v-progress-circular>
|
||||
<v-icon
|
||||
:color="printer.socket.isConnected ? 'green' : 'red'"
|
||||
v-if="!printer.socket.isConnecting"
|
||||
>mdi-{{ printer.socket.isConnected ? 'checkbox-marked-circle' : 'cancel' }}</v-icon>
|
||||
</v-col>
|
||||
<v-col>{{ getPrinterName(printer.id) }}</v-col>
|
||||
<v-col class="col-auto pa-0"><v-btn tile text icon large class="mr-1" v-on:click.stop.prevent="editPrinter(printer)"><v-icon small>mdi-pencil</v-icon></v-btn></v-col>
|
||||
</v-row>
|
||||
</v-col>
|
||||
<v-col>{{ getPrinterName(printer._namespace) }}</v-col>
|
||||
<v-col class="col-auto"><v-btn small class="minwidth-0" v-on:click.stop.prevent="editPrinter(index)"><v-icon small>mdi-pencil</v-icon></v-btn></v-col>
|
||||
</v-row>
|
||||
</v-col>
|
||||
</v-row>
|
||||
<v-row v-if="showCorsInfo">
|
||||
<v-col>
|
||||
<p class="text-center" v-if="Object.keys(this.printers).length === 0">{{ $t("SelectPrinterDialog.Hello") }}</p>
|
||||
<p class="text-center" v-if="this.printers.length === 0">{{ $t("SelectPrinterDialog.Hello") }}</p>
|
||||
<p class="text-center">{{ $t("SelectPrinterDialog.RememberToAdd", {cors: currentUrl}) }}</p>
|
||||
<p class="text-center mb-0">{{ $t("SelectPrinterDialog.YouCanFindMore") }} <a href="https://docs.mainsail.xyz/remotemode" target="_blank">https://docs.mainsail.xyz/remotemode</a>.</p>
|
||||
</v-col>
|
||||
</v-row>
|
||||
<v-row>
|
||||
<v-col class="text-center mt-0">
|
||||
<v-btn @click="dialogAddPrinter.bool = true">{{ $t("SelectPrinterDialog.AddPrinter") }}</v-btn>
|
||||
<v-btn text color="primary" @click="dialogAddPrinter.bool = true">{{ $t("SelectPrinterDialog.AddPrinter") }}</v-btn>
|
||||
</v-col>
|
||||
</v-row>
|
||||
</v-container>
|
||||
</v-card-text>
|
||||
</v-card>
|
||||
</v-card-text>
|
||||
</template>
|
||||
</panel>
|
||||
</v-dialog>
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
|
||||
import {Component, Mixins} from 'vue-property-decorator'
|
||||
import BaseMixin from './mixins/base'
|
||||
import {FarmPrinterState} from '@/store/farm/printer/types'
|
||||
import Panel from '@/components/ui/Panel.vue'
|
||||
import { GuiRemoteprintersStatePrinter } from '@/store/gui/remoteprinters/types'
|
||||
|
||||
import {Component, Mixins} from "vue-property-decorator";
|
||||
import BaseMixin from "./mixins/base";
|
||||
import {FarmPrinterState} from "@/store/farm/printer/types";
|
||||
@Component({
|
||||
components: {Panel}
|
||||
})
|
||||
|
||||
@Component
|
||||
export default class TheSelectPrinterDialog extends Mixins(BaseMixin) {
|
||||
|
||||
|
||||
private dialogAddPrinter = {
|
||||
bool: false,
|
||||
hostname: "",
|
||||
hostname: '',
|
||||
port: 7125
|
||||
}
|
||||
private dialogEditPrinter = {
|
||||
bool: false,
|
||||
index: 0,
|
||||
hostname: "",
|
||||
id: '',
|
||||
hostname: '',
|
||||
port: 0
|
||||
}
|
||||
|
||||
get printers() {
|
||||
return this.$store.getters["farm/getPrinters"] ?? []
|
||||
return this.$store.getters['gui/remoteprinters/getRemoteprinters'] ?? []
|
||||
}
|
||||
|
||||
get protocol() {
|
||||
@@ -197,7 +208,7 @@ export default class TheSelectPrinterDialog extends Mixins(BaseMixin) {
|
||||
}
|
||||
|
||||
get formatHostname() {
|
||||
return parseInt(this.port) !== 80 && this.port !== "" ? this.hostname+":"+this.port : this.hostname
|
||||
return parseInt(this.port) !== 80 && this.port !== '' ? this.hostname+':'+this.port : this.hostname
|
||||
}
|
||||
|
||||
get isConnected() {
|
||||
@@ -217,17 +228,16 @@ export default class TheSelectPrinterDialog extends Mixins(BaseMixin) {
|
||||
}
|
||||
|
||||
get currentUrl() {
|
||||
let output = "http://"+window.location.hostname
|
||||
let output = 'http://'+window.location.hostname
|
||||
if (parseInt(window.location.port) !== 80 && window.location.port !== '') output += ':'+window.location.port
|
||||
|
||||
return output
|
||||
}
|
||||
|
||||
get showCorsInfo() {
|
||||
if (Object.keys(this.printers).length) {
|
||||
Object.keys(this.printers).forEach((key) => {
|
||||
const printer = this.printers[key]
|
||||
if (!printer.socket.isConnected) return true
|
||||
if (this.printers.length) {
|
||||
this.printers.forEach((printer: GuiRemoteprintersStatePrinter) => {
|
||||
if (printer && !printer.socket?.isConnected) return true
|
||||
})
|
||||
|
||||
return false
|
||||
@@ -236,39 +246,51 @@ export default class TheSelectPrinterDialog extends Mixins(BaseMixin) {
|
||||
return true
|
||||
}
|
||||
|
||||
get panelTitle() {
|
||||
if (this.dialogAddPrinter.bool) return this.$t('SelectPrinterDialog.AddPrinter')
|
||||
else if (this.dialogEditPrinter.bool) return this.$t('SelectPrinterDialog.EditPrinter')
|
||||
else if (this.isConnecting) return this.$t('SelectPrinterDialog.Connecting', { host: this.formatHostname})
|
||||
else if (this.connectingFailed) return this.$t('SelectPrinterDialog.ConnectionFailed', { host: this.formatHostname})
|
||||
else return this.$t('SelectPrinterDialog.SelectPrinter')
|
||||
}
|
||||
|
||||
getPrinterName(namespace: string) {
|
||||
return this.$store.getters["farm/getPrinterName"](namespace)
|
||||
return this.$store.getters['farm/getPrinterName'](namespace)
|
||||
}
|
||||
|
||||
addPrinter() {
|
||||
this.$store.dispatch('farm/addPrinter',{
|
||||
const values = {
|
||||
hostname: this.dialogAddPrinter.hostname,
|
||||
port: this.dialogAddPrinter.port,
|
||||
protocol: this.protocol
|
||||
})
|
||||
}
|
||||
this.$store.dispatch('gui/remoteprinters/store', { values })
|
||||
|
||||
this.dialogAddPrinter.hostname = ""
|
||||
this.dialogAddPrinter.hostname = ''
|
||||
this.dialogAddPrinter.bool = false
|
||||
}
|
||||
|
||||
editPrinter(index: number) {
|
||||
this.dialogEditPrinter.hostname = this.printers[index].socket.hostname
|
||||
this.dialogEditPrinter.port = this.printers[index].socket.port
|
||||
this.dialogEditPrinter.index = index
|
||||
editPrinter(printer: GuiRemoteprintersStatePrinter) {
|
||||
this.dialogEditPrinter.hostname = printer.hostname
|
||||
this.dialogEditPrinter.port = printer.port
|
||||
this.dialogEditPrinter.id = printer.id ?? ''
|
||||
this.dialogEditPrinter.bool = true
|
||||
}
|
||||
|
||||
updatePrinter() {
|
||||
this.$store.dispatch("farm/updatePrinter", {
|
||||
namespace: this.dialogEditPrinter.index,
|
||||
const values = {
|
||||
hostname: this.dialogEditPrinter.hostname,
|
||||
port: this.dialogEditPrinter.port,
|
||||
}
|
||||
this.$store.dispatch('gui/remoteprinters/update', {
|
||||
id: this.dialogEditPrinter.id,
|
||||
values
|
||||
})
|
||||
|
||||
this.dialogEditPrinter.bool = false
|
||||
}
|
||||
|
||||
delPrinter() {
|
||||
this.$store.dispatch("farm/removePrinter", { name: this.dialogEditPrinter.index })
|
||||
this.$store.dispatch('gui/remoteprinters/delete', this.dialogEditPrinter.id)
|
||||
this.dialogEditPrinter.bool = false
|
||||
}
|
||||
|
||||
@@ -277,7 +299,7 @@ export default class TheSelectPrinterDialog extends Mixins(BaseMixin) {
|
||||
hostname: printer.socket.hostname,
|
||||
port: printer.socket.port
|
||||
})
|
||||
this.$socket.setUrl(this.protocol+"://"+printer.socket.hostname+":"+printer.socket.port+"/websocket")
|
||||
this.$socket.setUrl(this.protocol+'://'+printer.socket.hostname+':'+printer.socket.port+'/websocket')
|
||||
this.$socket.connect()
|
||||
}
|
||||
|
||||
@@ -291,16 +313,15 @@ export default class TheSelectPrinterDialog extends Mixins(BaseMixin) {
|
||||
}
|
||||
|
||||
checkPrinters() {
|
||||
Object.keys(this.printers).forEach((key) => {
|
||||
const printer = this.printers[key]
|
||||
if (!printer.socket.isConnected && !printer.socket.isConnecting) {
|
||||
this.$store.dispatch('farm/'+key+'/connect')
|
||||
this.printers.forEach((printer: GuiRemoteprintersStatePrinter) => {
|
||||
if (printer && !printer.socket?.isConnected && !printer.socket?.isConnecting) {
|
||||
this.$store.dispatch('farm/'+printer.id+'/connect')
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
mounted() {
|
||||
this.$store.dispatch("farm/readStoredPrinters")
|
||||
this.$store.dispatch('gui/remoteprinters/initFromLocalstorage')
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -1,49 +1,47 @@
|
||||
<template>
|
||||
<div>
|
||||
<v-btn color="grey darken-3" class="ml-5 minwidth-0 px-2" @click="showSettings = true">
|
||||
<v-btn icon tile @click="showSettings = true">
|
||||
<v-icon>mdi-cogs</v-icon>
|
||||
</v-btn>
|
||||
<v-dialog v-model="showSettings" width="900" persistent :fullscreen="isMobile">
|
||||
<v-card style="overflow: hidden;" :height="isMobile ? 0 : 548">
|
||||
<v-toolbar flat dense>
|
||||
<v-toolbar-title>
|
||||
<span class="subheading"><v-icon left>mdi-cogs</v-icon>{{ $t('Settings.InterfaceSettings') }}</span>
|
||||
</v-toolbar-title>
|
||||
<v-spacer></v-spacer>
|
||||
<v-btn small class="minwidth-0 px-2" color="grey darken-2" @click="showSettings = false"><v-icon small>mdi-close-thick</v-icon></v-btn>
|
||||
<template v-if="isMobile" v-slot:extension>
|
||||
<v-tabs v-model="activeTab" :center-active="true" :show-arrows="true">
|
||||
<v-tab
|
||||
v-for="(tab, index) of tabTitles" v-bind:key="index"
|
||||
:href="'#'+tab.name"
|
||||
class="justify-start">
|
||||
<v-icon left v-html="tab.icon"></v-icon>
|
||||
{{ tab.title }}
|
||||
</v-tab>
|
||||
</v-tabs>
|
||||
</template>
|
||||
</v-toolbar>
|
||||
<v-row>
|
||||
<v-dialog v-model="showSettings" width="900" persistent :fullscreen="isMobile" @keydown.esc="showSettings = false" scrollable>
|
||||
<panel :title="$t('Settings.InterfaceSettings')" icon="mdi-cogs" card-class="settings-menu-dialog" :margin-bottom="false" style="overflow: hidden;" :height="isMobile ? 0 : 548">
|
||||
<template v-slot:buttons>
|
||||
<v-btn icon tile @click="showSettings = false"><v-icon>mdi-close-thick</v-icon></v-btn>
|
||||
</template>
|
||||
<template v-if="isMobile">
|
||||
<v-tabs v-model="activeTab" :center-active="true" :show-arrows="true">
|
||||
<v-tab
|
||||
v-for="(tab, index) of tabTitles" v-bind:key="index"
|
||||
:href="'#'+tab.name"
|
||||
class="justify-start">
|
||||
<v-icon left v-html="tab.icon"></v-icon>
|
||||
{{ tab.title }}
|
||||
</v-tab>
|
||||
</v-tabs>
|
||||
</template>
|
||||
<v-row class="flex-row flex-nowrap">
|
||||
<v-col class="col-auto pr-0" v-if="!isMobile">
|
||||
<v-tabs v-model="activeTab" :vertical="true">
|
||||
<v-tab
|
||||
v-for="(tab, index) of tabTitles" v-bind:key="index"
|
||||
:href="'#'+tab.name"
|
||||
class="justify-start"
|
||||
style="width: 200px;"
|
||||
>
|
||||
<v-icon left v-html="tab.icon"></v-icon>
|
||||
<span class="text-truncate">{{ tab.title }}</span>
|
||||
</v-tab>
|
||||
</v-tabs>
|
||||
<overlay-scrollbars class="settings-tabs-bar height500" ref="settingsTabsScroll">
|
||||
<v-tabs v-model="activeTab" :vertical="true">
|
||||
<v-tab
|
||||
v-for="(tab, index) of tabTitles" v-bind:key="index"
|
||||
:href="'#'+tab.name"
|
||||
class="justify-start"
|
||||
style="width: 200px;"
|
||||
>
|
||||
<v-icon left v-html="tab.icon"></v-icon>
|
||||
<span class="text-truncate">{{ tab.title }}</span>
|
||||
</v-tab>
|
||||
</v-tabs>
|
||||
</overlay-scrollbars>
|
||||
</v-col>
|
||||
<v-col :class="isMobile ? '' : 'pl-0'">
|
||||
<perfect-scrollbar :class="'settings-tabs '+(isMobile ? '' : 'height500')" ref="settingsScroll">
|
||||
<component :is="'settings-'+activeTab+'-tab'"></component>
|
||||
</perfect-scrollbar>
|
||||
<v-col :class="isMobile ? '' : 'pl-0'" :style="isMobile ? '' : 'min-width: 500px;'">
|
||||
<overlay-scrollbars :class="'settings-tabs '+(isMobile ? '' : 'height500')" ref="settingsScroll" :options="{ overflowBehavior: { x: 'hidden' } }">
|
||||
<component :is="'settings-'+activeTab+'-tab'" @scrollToTop="scrollToTop"></component>
|
||||
</overlay-scrollbars>
|
||||
</v-col>
|
||||
</v-row>
|
||||
</v-card>
|
||||
</panel>
|
||||
</v-dialog>
|
||||
</div>
|
||||
</template>
|
||||
@@ -53,26 +51,35 @@
|
||||
import Component from 'vue-class-component'
|
||||
import {Mixins, Watch} from 'vue-property-decorator'
|
||||
import BaseMixin from '@/components/mixins/base'
|
||||
import SettingsGeneralTab from "@/components/settings/SettingsGeneralTab.vue";
|
||||
import SettingsWebcamTab from "@/components/settings/SettingsWebcamTab.vue";
|
||||
import SettingsMacrosTab from "@/components/settings/SettingsMacrosTab.vue";
|
||||
import SettingsControlTab from "@/components/settings/SettingsControlTab.vue";
|
||||
import SettingsConsoleTab from "@/components/settings/SettingsConsoleTab.vue";
|
||||
import SettingsPresetsTab from "@/components/settings/SettingsPresetsTab.vue";
|
||||
import SettingsRemotePrintersTab from "@/components/settings/SettingsRemotePrintersTab.vue";
|
||||
import SettingsThemeTab from "@/components/settings/SettingsThemeTab.vue";
|
||||
import SettingsDashboardTab from "@/components/settings/SettingsDashboardTab.vue";
|
||||
import SettingsGeneralTab from '@/components/settings/SettingsGeneralTab.vue'
|
||||
import SettingsWebcamsTab from '@/components/settings/SettingsWebcamsTab.vue'
|
||||
import SettingsMacrosTab from '@/components/settings/SettingsMacrosTab.vue'
|
||||
import SettingsControlTab from '@/components/settings/SettingsControlTab.vue'
|
||||
import SettingsConsoleTab from '@/components/settings/SettingsConsoleTab.vue'
|
||||
import SettingsPresetsTab from '@/components/settings/SettingsPresetsTab.vue'
|
||||
import SettingsRemotePrintersTab from '@/components/settings/SettingsRemotePrintersTab.vue'
|
||||
import SettingsUiSettingsTab from '@/components/settings/SettingsUiSettingsTab.vue'
|
||||
import SettingsDashboardTab from '@/components/settings/SettingsDashboardTab.vue'
|
||||
import SettingsGCodeViewerTab from '@/components/settings/SettingsGCodeViewerTab.vue'
|
||||
import SettingsEditorTab from '@/components/settings/SettingsEditorTab.vue'
|
||||
import SettingsTimelapseTab from '@/components/settings/SettingsTimelapseTab.vue'
|
||||
|
||||
import Panel from '@/components/ui/Panel.vue'
|
||||
@Component({
|
||||
components: {
|
||||
SettingsThemeTab,
|
||||
Panel,
|
||||
SettingsUiSettingsTab,
|
||||
SettingsRemotePrintersTab,
|
||||
SettingsPresetsTab,
|
||||
SettingsConsoleTab,
|
||||
SettingsControlTab,
|
||||
SettingsMacrosTab,
|
||||
SettingsWebcamTab,
|
||||
SettingsWebcamsTab,
|
||||
SettingsGeneralTab,
|
||||
SettingsDashboardTab
|
||||
SettingsDashboardTab,
|
||||
SettingsGCodeViewerTab,
|
||||
SettingsEditorTab,
|
||||
SettingsTimelapseTab
|
||||
}
|
||||
})
|
||||
export default class TheSettingsMenu extends Mixins(BaseMixin) {
|
||||
@@ -84,7 +91,7 @@ export default class TheSettingsMenu extends Mixins(BaseMixin) {
|
||||
}
|
||||
|
||||
get tabTitles() {
|
||||
return [
|
||||
const tabs = [
|
||||
{
|
||||
icon: 'mdi-cog',
|
||||
name: 'general',
|
||||
@@ -92,8 +99,8 @@ export default class TheSettingsMenu extends Mixins(BaseMixin) {
|
||||
},
|
||||
{
|
||||
icon: 'mdi-palette',
|
||||
name: 'theme',
|
||||
title: this.$t('Settings.ThemeTab.Theme')
|
||||
name: 'ui-settings',
|
||||
title: this.$t('Settings.UiSettingsTab.UiSettings')
|
||||
},
|
||||
{
|
||||
icon: 'mdi-monitor-dashboard',
|
||||
@@ -102,8 +109,8 @@ export default class TheSettingsMenu extends Mixins(BaseMixin) {
|
||||
},
|
||||
{
|
||||
icon: 'mdi-webcam',
|
||||
name: 'webcam',
|
||||
title: this.$t('Settings.WebcamTab.Webcams')
|
||||
name: 'webcams',
|
||||
title: this.$t('Settings.WebcamsTab.Webcams')
|
||||
},
|
||||
{
|
||||
icon: 'mdi-code-tags',
|
||||
@@ -130,23 +137,74 @@ export default class TheSettingsMenu extends Mixins(BaseMixin) {
|
||||
name: 'remote-printers',
|
||||
title: this.$t('Settings.RemotePrintersTab.RemotePrinters')
|
||||
},
|
||||
{
|
||||
icon: 'mdi-video-3d',
|
||||
name: 'g-code-viewer',
|
||||
title: this.$t('Settings.GCodeViewerTab.GCodeViewer')
|
||||
},
|
||||
{
|
||||
icon: 'mdi-file-document-edit-outline',
|
||||
name: 'editor',
|
||||
title: this.$t('Settings.EditorTab.Editor')
|
||||
}
|
||||
]
|
||||
|
||||
if (this.moonrakerComponents.includes('timelapse')) {
|
||||
tabs.push({
|
||||
icon: 'mdi-timelapse',
|
||||
name: 'timelapse',
|
||||
title: this.$t('Settings.TimelapseTab.Timelapse')
|
||||
})
|
||||
}
|
||||
|
||||
return tabs.sort((a, b) => {
|
||||
if (a.name === 'general') return -1
|
||||
if (b.name === 'general') return 1
|
||||
|
||||
const stringA = a.title.toString().toLowerCase()
|
||||
const stringB = b.title.toString().toLowerCase()
|
||||
|
||||
if (stringA < stringB) return -1
|
||||
if (stringA > stringB) return 1
|
||||
|
||||
return 0
|
||||
})
|
||||
}
|
||||
|
||||
@Watch('activeTab')
|
||||
activeTabWatch() {
|
||||
if (this.$refs.settingsScroll) this.$refs.settingsScroll.$el.scrollTop = 0
|
||||
this.scrollToTop()
|
||||
}
|
||||
|
||||
scrollToTop() {
|
||||
if (this.$refs.settingsScroll) {
|
||||
const overlayscroll = this.$refs.settingsScroll.osInstance()
|
||||
overlayscroll?.scroll({ y: '0%' })
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.settings-tabs {
|
||||
height: auto;
|
||||
max-height: calc(100vh - 96px);
|
||||
min-height: 100%;
|
||||
height: calc(var(--app-height) - 96px);
|
||||
}
|
||||
|
||||
.settings-tabs-bar {
|
||||
border-right: 1px solid rgba(255, 255, 255, 0.12);
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.settings-tabs.height500 {
|
||||
max-height: 500px;
|
||||
height: 500px;
|
||||
max-height: calc(var(--app-height) - 111px);
|
||||
}
|
||||
</style>
|
||||
|
||||
<style>
|
||||
.settings-tabs .v-select__selections input {
|
||||
width: 100px;
|
||||
}
|
||||
|
||||
</style>
|
||||
@@ -1,125 +1,166 @@
|
||||
<style>
|
||||
.sidebar-wrapper .v-navigation-drawer__content {
|
||||
padding-bottom: 3em;
|
||||
.nav-logo {
|
||||
height: 32px;
|
||||
}
|
||||
|
||||
#sidebarVersions {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
bottom: 0;
|
||||
.small-list-item {
|
||||
height: var(--sidebar-menu-item-height);
|
||||
}
|
||||
|
||||
@media screen and (max-width: 1024px) {
|
||||
.sidebar-wrapper .v-navigation-drawer__content {
|
||||
padding-bottom: 0;
|
||||
}
|
||||
.no-text-decoration {
|
||||
text-decoration: none;
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
#sidebarVersions {
|
||||
display: none;
|
||||
}
|
||||
.no-background:before {
|
||||
background-color: rgba(255, 255, 255, 0) !important;
|
||||
}
|
||||
|
||||
.no-border {
|
||||
border: 0 !important;
|
||||
}
|
||||
</style>
|
||||
<style scoped>
|
||||
.active-nav-item {
|
||||
border-right: 4px solid var(--v-primary-base);
|
||||
}
|
||||
|
||||
.menu-item-icon {
|
||||
opacity: .85;
|
||||
}
|
||||
|
||||
.menu-item-title {
|
||||
line-height: 30px;
|
||||
font-size: 14px;
|
||||
font-weight: 600;
|
||||
text-transform: uppercase;
|
||||
opacity: .85;
|
||||
}
|
||||
|
||||
.nav-scrollbar {
|
||||
height: 100%;
|
||||
}
|
||||
</style>
|
||||
<template>
|
||||
<v-navigation-drawer class="sidebar-wrapper" persistent v-model="naviDrawer" mobile-breakpoint="1280" enable-resize-watcher fixed app :src="sidebarBackground">
|
||||
<div id="nav-header">
|
||||
<template v-if="sidebarLogo">
|
||||
<img :src="sidebarLogo" style="height: 40px;" class="mr-3" alt="Logo" />
|
||||
</template>
|
||||
<template v-else>
|
||||
<mainsail-logo :color="logoColor" style="height: 40px;" class="mr-3"></mainsail-logo>
|
||||
</template>
|
||||
<v-toolbar-title>{{ printerName }}</v-toolbar-title>
|
||||
</div>
|
||||
<ul class="navi" :expand="$vuetify.breakpoint.mdAndUp">
|
||||
<the-sidebar-printer-menu></the-sidebar-printer-menu>
|
||||
<li v-for="(category, index) in naviPoints" :key="index" :prepend-icon="category.icon"
|
||||
:class="[category.path !== '/' && currentPage.includes(category.path) ? 'active' : '', 'nav-item']"
|
||||
:value="true"
|
||||
>
|
||||
<router-link
|
||||
style="position: relative;"
|
||||
slot="activator" class="nav-link" exact :to="category.path" @click.prevent
|
||||
v-if="showInNavi(category)">
|
||||
<v-icon>mdi-{{ category.icon }}</v-icon>
|
||||
<span class="nav-title">{{ $t(`Router.${category.title}`) }}</span>
|
||||
<v-icon class="nav-arrow" v-if="category.children && category.children.length > 0">mdi-chevron-down</v-icon>
|
||||
</router-link>
|
||||
<v-navigation-drawer v-model="naviDrawer" :src="sidebarBackground" :mini-variant="(navigationStyle === 'iconsOnly')" :key="navigationStyle" :width="navigationWidth" :temporary="boolNaviTemp" clipped app :style="sidebarCssVars">
|
||||
<overlay-scrollbars class="nav-scrollbar">
|
||||
<v-list class="pr-0 pt-0 ml-0">
|
||||
<v-list-item-group active-class="active-nav-item">
|
||||
<v-list-item
|
||||
router to="/"
|
||||
:class="'sidebar-logo no-text-decoration no-background no-border ' + ((navigationStyle === 'iconsOnly') ? 'pa-0 justify-center' : '')"
|
||||
:style="'height: ' + topbarHeight + 'px'"
|
||||
:ripple="false"
|
||||
v-if="isMobile"
|
||||
>
|
||||
<template v-if="sidebarLogo">
|
||||
<img :src="sidebarLogo" :style="logoCssVars" class="nav-logo" alt="Logo" />
|
||||
</template>
|
||||
<template v-else>
|
||||
<mainsail-logo :color="logoColor" :style="logoCssVars" class="nav-logo" :ripple="false"></mainsail-logo>
|
||||
</template>
|
||||
<template v-if="navigationStyle !== 'iconsOnly'">
|
||||
<span class="text-h6 font-weight-regular text-truncate"> {{ printerName }} </span>
|
||||
</template>
|
||||
</v-list-item>
|
||||
<template v-if="countPrinters">
|
||||
<v-tooltip right :open-delay="500" :disabled="navigationStyle !== 'iconsOnly'">
|
||||
<template v-slot:activator="{ on, attrs }">
|
||||
<v-list-item
|
||||
router to="/allPrinters"
|
||||
class="small-list-item mt-1"
|
||||
v-bind="attrs"
|
||||
v-on="on"
|
||||
>
|
||||
<v-list-item-icon class="my-3 mr-3 menu-item-icon">
|
||||
<v-icon>mdi-view-dashboard-outline</v-icon>
|
||||
</v-list-item-icon>
|
||||
<v-list-item-content>
|
||||
<v-list-item-title tile class="menu-item-title">{{ $t("App.Printers") }}</v-list-item-title>
|
||||
</v-list-item-content>
|
||||
|
||||
<ul class="child">
|
||||
<li v-for="(page, pageIndex) in category.children" class="nav-item" v-bind:key="`${index}-${pageIndex}`">
|
||||
<router-link :to="page.path" class="nav-link" @click.prevent v-if="klippy_state !== 'error' || page.alwaysShow">
|
||||
<v-icon>mdi-{{ page.icon }}</v-icon>
|
||||
<span class="nav-title">{{ $t(`Router.${page.title}`) }}</span>
|
||||
</router-link>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
<p id="sidebarVersions" class="mb-0 text-body-2 pl-3 pb-2">
|
||||
v{{ mainsailVersion }}
|
||||
<span class="" v-if="klipperVersion"><br />{{ klipperVersion }}</span>
|
||||
</p>
|
||||
</v-navigation-drawer>
|
||||
</v-list-item>
|
||||
</template>
|
||||
<span>{{ $t("App.Printers") }}</span>
|
||||
</v-tooltip>
|
||||
<v-divider class="my-1"></v-divider>
|
||||
</template>
|
||||
<div v-for="(category, index) in naviPoints" :key="index">
|
||||
<v-tooltip right :open-delay="500" :disabled="navigationStyle !== 'iconsOnly'">
|
||||
<template v-slot:activator="{ on, attrs }">
|
||||
<v-list-item
|
||||
router :to="category.path"
|
||||
class="small-list-item"
|
||||
v-bind="attrs"
|
||||
v-on="on"
|
||||
>
|
||||
<v-list-item-icon class="my-3 mr-3 menu-item-icon">
|
||||
<v-icon>mdi-{{ category.icon }}</v-icon>
|
||||
</v-list-item-icon>
|
||||
<v-list-item-content>
|
||||
<v-list-item-title tile class="menu-item-title">{{ $t(`Router.${category.title}`) }}</v-list-item-title>
|
||||
</v-list-item-content>
|
||||
</v-list-item>
|
||||
</template>
|
||||
<span>{{ $t(`Router.${category.title}`) }}</span>
|
||||
</v-tooltip>
|
||||
</div>
|
||||
</v-list-item-group>
|
||||
</v-list>
|
||||
</overlay-scrollbars>
|
||||
<template v-slot:append>
|
||||
<v-list-item class="small-list-item mb-2">
|
||||
<v-list-item-icon class="menu-item-icon">
|
||||
<about-modal></about-modal>
|
||||
</v-list-item-icon>
|
||||
</v-list-item>
|
||||
</template>
|
||||
</v-navigation-drawer>
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import Component from "vue-class-component"
|
||||
import Component from 'vue-class-component'
|
||||
import routes, {AppRoute} from '@/routes'
|
||||
import {Mixins, Watch} from "vue-property-decorator";
|
||||
import BaseMixin from "@/components/mixins/base";
|
||||
import {PrinterStateKlipperConfig} from "@/store/printer/types";
|
||||
import TheSelectPrinterDialog from "@/components/TheSelectPrinterDialog.vue";
|
||||
import TheSidebarPrinterMenu from "@/components/TheSidebarPrinterMenu.vue";
|
||||
import MainsailLogo from "@/components/ui/MainsailLogo.vue";
|
||||
import {Mixins} from 'vue-property-decorator'
|
||||
import BaseMixin from '@/components/mixins/base'
|
||||
import {PrinterStateKlipperConfig} from '@/store/printer/types'
|
||||
import TheSelectPrinterDialog from '@/components/TheSelectPrinterDialog.vue'
|
||||
import AboutModal from '@/components/modals/AboutModal.vue'
|
||||
import {navigationWidth, topbarHeight} from '@/store/variables'
|
||||
import MainsailLogo from '@/components/ui/MainsailLogo.vue'
|
||||
|
||||
@Component({
|
||||
components: {
|
||||
MainsailLogo,
|
||||
TheSidebarPrinterMenu,
|
||||
TheSelectPrinterDialog
|
||||
|
||||
TheSelectPrinterDialog,
|
||||
AboutModal,
|
||||
MainsailLogo
|
||||
}
|
||||
})
|
||||
|
||||
export default class TheSidebar extends Mixins(BaseMixin) {
|
||||
navigationWidth = navigationWidth
|
||||
topbarHeight = topbarHeight
|
||||
|
||||
get naviDrawer(): boolean {
|
||||
return this.$store.state.naviDrawer
|
||||
}
|
||||
|
||||
set naviDrawer(newVal: boolean) {
|
||||
this.$store.dispatch("setNaviDrawer", newVal)
|
||||
this.$store.dispatch('setNaviDrawer', newVal)
|
||||
}
|
||||
|
||||
get logoColor(): string {
|
||||
return this.$store.state.gui.theme.logo
|
||||
}
|
||||
|
||||
get sidebarLogo(): string {
|
||||
return this.$store.getters["files/getSidebarLogo"]
|
||||
get navigationStyle() {
|
||||
return this.$store.state.gui.uiSettings.navigationStyle
|
||||
}
|
||||
|
||||
get sidebarBackground(): string {
|
||||
return this.$store.getters["files/getSidebarBackground"]
|
||||
}
|
||||
|
||||
get mainsailVersion(): string {
|
||||
return this.$store.state.packageVersion
|
||||
}
|
||||
|
||||
get klipperVersion():string {
|
||||
return this.$store.state.printer?.software_version ?? ""
|
||||
return this.$store.getters['files/getSidebarBackground']
|
||||
}
|
||||
|
||||
get naviPoints(): AppRoute[] {
|
||||
return routes.filter((element) => element.showInNavi)
|
||||
}
|
||||
|
||||
get printerName():string {
|
||||
if (this.$store.state.gui.general.printername.length)
|
||||
return this.$store.state.gui.general.printername
|
||||
|
||||
return this.$store.state.printer.hostname
|
||||
return routes.filter((element) => {
|
||||
return element.showInNavi && this.showInNavi(element)
|
||||
})
|
||||
}
|
||||
|
||||
get klippy_state(): string {
|
||||
@@ -127,7 +168,7 @@ export default class TheSidebar extends Mixins(BaseMixin) {
|
||||
}
|
||||
|
||||
get boolNaviWebcam(): boolean {
|
||||
return this.$store.state.gui.webcam.boolNavi
|
||||
return this.$store.state.gui.uiSettings.boolWebcamNavi
|
||||
}
|
||||
|
||||
get moonrakerComponents(): string[] {
|
||||
@@ -146,18 +187,58 @@ export default class TheSidebar extends Mixins(BaseMixin) {
|
||||
return this.$route.fullPath
|
||||
}
|
||||
|
||||
get isUpdateAvailable(): boolean {
|
||||
return this.$store.getters["server/updateManager/isUpdateAvailable"]
|
||||
get countPrinters() {
|
||||
return this.$store.getters['farm/countPrinters']
|
||||
}
|
||||
|
||||
get boolNaviTemp(): boolean {
|
||||
if(!this.isMobile && this.$vuetify.breakpoint.mdAndDown) {
|
||||
return true
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
get sidebarCssVars(): any {
|
||||
if(this.boolNaviTemp){
|
||||
return {
|
||||
'top': `${topbarHeight}px !important`,
|
||||
'padding-bottom': `${topbarHeight}px`
|
||||
}
|
||||
}
|
||||
return {}
|
||||
}
|
||||
|
||||
get sidebarLogo(): string {
|
||||
return this.$store.getters['files/getSidebarLogo']
|
||||
}
|
||||
|
||||
get logoColor(): string {
|
||||
return this.$store.state.gui.uiSettings.logo
|
||||
}
|
||||
|
||||
get printerName():string {
|
||||
if (this.$store.state.gui.general.printername.length)
|
||||
return this.$store.state.gui.general.printername
|
||||
|
||||
return this.$store.state.printer.hostname
|
||||
}
|
||||
|
||||
get logoCssVars() {
|
||||
if(this.navigationStyle !== 'iconsOnly'){
|
||||
return {
|
||||
'margin-right': '16px'
|
||||
}
|
||||
}
|
||||
return {}
|
||||
}
|
||||
|
||||
showInNavi(route: AppRoute): boolean {
|
||||
if (['shutdown', 'error', 'disconnected'].includes(this.klippy_state) && !route.alwaysShow) return false
|
||||
|
||||
if (route.title === 'Webcam') return this.boolNaviWebcam
|
||||
|
||||
if (route.moonrakerComponent) return this.moonrakerComponents.includes(route.moonrakerComponent)
|
||||
if (route.registeredDirectory) return this.registeredDirectories.includes(route.registeredDirectory)
|
||||
if (route.klipperComponent) return (route.klipperComponent in this.klipperConfigfileSettings)
|
||||
else if (route.title === 'Webcam' && !this.boolNaviWebcam) return false
|
||||
else if (route.moonrakerComponent && !this.moonrakerComponents.includes(route.moonrakerComponent)) return false
|
||||
else if (route.registeredDirectory && !this.registeredDirectories.includes(route.registeredDirectory)) return false
|
||||
else if (route.klipperComponent && !(route.klipperComponent in this.klipperConfigfileSettings)) return false
|
||||
else if (route.klipperIsConnected && !this.klippyIsConnected) return false
|
||||
|
||||
return true
|
||||
}
|
||||
|
||||
@@ -1,84 +0,0 @@
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
|
||||
<template>
|
||||
<div v-if="displayMenuPoint">
|
||||
<li :class="currentPage === '/allPrinters' ? 'nav-item active' : 'nav-item '">
|
||||
<div
|
||||
class="nav-link "
|
||||
@click.prevent
|
||||
@click="switchToPrinters"
|
||||
role="button"
|
||||
>
|
||||
<v-icon>mdi-view-dashboard-outline</v-icon>
|
||||
<span class="nav-title">{{ $t("App.Printers")}}</span>
|
||||
|
||||
<v-menu bottom :offset-x="true">
|
||||
<template v-slot:activator="{ on, attrs }">
|
||||
<v-icon class="nav-arrow right" v-bind="attrs" v-on="on" >mdi-chevron-down</v-icon>
|
||||
</template>
|
||||
|
||||
<v-list dense>
|
||||
<v-list-item two-line v-for="printer in printers" v-bind:key="printer._namespace" @click="changePrinter(printer)" :disabled="!printer.socket.isConnected" link>
|
||||
<v-list-item-content>
|
||||
<v-list-item-title>{{ getPrinterName(printer._namespace) }}</v-list-item-title>
|
||||
<v-list-item-subtitle>{{ getPrinterDescription(printer)}}</v-list-item-subtitle>
|
||||
</v-list-item-content>
|
||||
</v-list-item>
|
||||
</v-list>
|
||||
</v-menu>
|
||||
</div>
|
||||
<v-item-group class="v-btn-toggle mx-4 d-block row" name="printers" v-if="false">
|
||||
<v-btn class="col" color="primary" @click="switchToPrinters">{{ $t("App.Printers")}}</v-btn>
|
||||
</v-item-group>
|
||||
</li>
|
||||
<v-divider class="my-4"></v-divider>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
|
||||
import {Component, Mixins} from "vue-property-decorator";
|
||||
import BaseMixin from "./mixins/base";
|
||||
import router from "@/plugins/router";
|
||||
import {FarmPrinterState} from "@/store/farm/printer/types";
|
||||
|
||||
@Component
|
||||
export default class TheSidebarPrinterMenu extends Mixins(BaseMixin) {
|
||||
|
||||
get displayMenuPoint() {
|
||||
return (this.remoteMode && this.countPrinters > 1) || (!this.remoteMode && this.countPrinters)
|
||||
}
|
||||
|
||||
get printers() {
|
||||
return this.$store.getters["farm/getPrinters"]
|
||||
}
|
||||
|
||||
get countPrinters() {
|
||||
return this.$store.getters["farm/countPrinters"]
|
||||
}
|
||||
|
||||
get currentPage() {
|
||||
return this.$route.fullPath;
|
||||
}
|
||||
|
||||
switchToPrinters() {
|
||||
router.push("/allPrinters");
|
||||
}
|
||||
|
||||
getPrinterName(namespace: string) {
|
||||
return this.$store.getters["farm/"+namespace+"/getPrinterName"]
|
||||
}
|
||||
|
||||
getPrinterDescription(printer: FarmPrinterState) {
|
||||
return this.$store.getters["farm/"+printer._namespace+"/getStatus"]
|
||||
}
|
||||
|
||||
changePrinter(printer: FarmPrinterState) {
|
||||
if (printer.socket.isConnected) {
|
||||
this.$store.dispatch('changePrinter', { printer: printer._namespace })
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||