Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f94402b94b | ||
|
|
91f2e9b6d8 | ||
|
|
0f955fbeb4 | ||
|
|
6282356ddd | ||
|
|
9057bea653 | ||
|
|
d19bf2ee05 | ||
|
|
f35cf70301 | ||
|
|
27308e44ab | ||
|
|
0a5b664ded | ||
|
|
ece599595b | ||
|
|
c8f847ccc8 | ||
|
|
ca1fd5d04e | ||
|
|
470a7633c5 |
No files matched your search
@@ -270,7 +270,7 @@ Now we can install Mainsail (static httpdocs).
|
||||
Now you can download the current mainsail static data
|
||||
```
|
||||
cd ~/mainsail
|
||||
wget -q -O mainsail.zip https://github.com/meteyou/mainsail/releases/download/v0.2.2/mainsail-beta-0.2.2.zip && unzip mainsail.zip && rm mainsail.zip
|
||||
wget -q -O mainsail.zip https://github.com/meteyou/mainsail/releases/download/v0.2.6/mainsail-beta-0.2.6.zip && unzip mainsail.zip && rm mainsail.zip
|
||||
```
|
||||
Now it should be possible to open the interface: `http://<printer-ip>/`.
|
||||
|
||||
@@ -291,4 +291,4 @@ and you can config your hostname:
|
||||
sudo raspi-config
|
||||
```
|
||||
in 2 Network Options > N1 Hostname you can edit your hostname of your raspberry pi.
|
||||
After a reboot you can use `http://<hostname>.local/` to open the webinterface.
|
||||
After a reboot you can use `http://<hostname>.local/` to open the webinterface.
|
||||
+2
-2
@@ -36,10 +36,10 @@ If you see a content like this
|
||||
```
|
||||
cd ~/mainsail
|
||||
rm -R ./*
|
||||
wget -q -O mainsail.zip https://github.com/meteyou/mainsail/releases/download/v0.2.3/mainsail-beta-0.2.3.zip && unzip mainsail.zip && rm mainsail.zip
|
||||
wget -q -O mainsail.zip https://github.com/meteyou/mainsail/releases/download/v0.2.6/mainsail-beta-0.2.6.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.
|
||||
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`.
|
||||
```
|
||||
mv ~/sdcard/gui.json ~/klipper_config/
|
||||
```
|
||||
|
||||
Generated
+5
-93
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "kwc",
|
||||
"version": "0.1.0",
|
||||
"name": "mainsail",
|
||||
"version": "0.2.3",
|
||||
"lockfileVersion": 1,
|
||||
"requires": true,
|
||||
"dependencies": {
|
||||
@@ -3225,13 +3225,12 @@
|
||||
}
|
||||
},
|
||||
"ansi-styles": {
|
||||
"version": "4.2.1",
|
||||
"resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.2.1.tgz",
|
||||
"integrity": "sha512-9VGjrMsG1vePxcSweQsN20KY/c4zN0h9fLjqAbwbPfahM3t+NL+M9HC8xeXG2I8pX5NoamTGNuomEUFI7fcUjA==",
|
||||
"version": "4.3.0",
|
||||
"resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
|
||||
"integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
"requires": {
|
||||
"@types/color-name": "^1.1.1",
|
||||
"color-convert": "^2.0.1"
|
||||
}
|
||||
},
|
||||
@@ -14122,11 +14121,6 @@
|
||||
"unicode-match-property-value-ecmascript": "^1.2.0"
|
||||
}
|
||||
},
|
||||
"register-service-worker": {
|
||||
"version": "1.7.1",
|
||||
"resolved": "https://registry.npmjs.org/register-service-worker/-/register-service-worker-1.7.1.tgz",
|
||||
"integrity": "sha512-IdTfUZ4u8iJL8o1w8es8l6UMGPmkwHolUdT+UmM1UypC80IB4KbpuIlvwWVj8UDS7eJwkEYRcKRgfRX+oTmJsw=="
|
||||
},
|
||||
"regjsgen": {
|
||||
"version": "0.5.1",
|
||||
"resolved": "https://registry.npmjs.org/regjsgen/-/regjsgen-0.5.1.tgz",
|
||||
@@ -17068,88 +17062,6 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"vue-loader-v16": {
|
||||
"version": "npm:vue-loader@16.0.0-beta.8",
|
||||
"resolved": "https://registry.npmjs.org/vue-loader/-/vue-loader-16.0.0-beta.8.tgz",
|
||||
"integrity": "sha512-oouKUQWWHbSihqSD7mhymGPX1OQ4hedzAHyvm8RdyHh6m3oIvoRF+NM45i/bhNOlo8jCnuJhaSUf/6oDjv978g==",
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
"requires": {
|
||||
"chalk": "^4.1.0",
|
||||
"hash-sum": "^2.0.0",
|
||||
"loader-utils": "^2.0.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"ansi-styles": {
|
||||
"version": "4.2.1",
|
||||
"resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.2.1.tgz",
|
||||
"integrity": "sha512-9VGjrMsG1vePxcSweQsN20KY/c4zN0h9fLjqAbwbPfahM3t+NL+M9HC8xeXG2I8pX5NoamTGNuomEUFI7fcUjA==",
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
"requires": {
|
||||
"@types/color-name": "^1.1.1",
|
||||
"color-convert": "^2.0.1"
|
||||
}
|
||||
},
|
||||
"chalk": {
|
||||
"version": "4.1.0",
|
||||
"resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz",
|
||||
"integrity": "sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==",
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
"requires": {
|
||||
"ansi-styles": "^4.1.0",
|
||||
"supports-color": "^7.1.0"
|
||||
}
|
||||
},
|
||||
"color-convert": {
|
||||
"version": "2.0.1",
|
||||
"resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
|
||||
"integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
"requires": {
|
||||
"color-name": "~1.1.4"
|
||||
}
|
||||
},
|
||||
"color-name": {
|
||||
"version": "1.1.4",
|
||||
"resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
|
||||
"integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
|
||||
"dev": true,
|
||||
"optional": true
|
||||
},
|
||||
"has-flag": {
|
||||
"version": "4.0.0",
|
||||
"resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
|
||||
"integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
|
||||
"dev": true,
|
||||
"optional": true
|
||||
},
|
||||
"loader-utils": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.0.tgz",
|
||||
"integrity": "sha512-rP4F0h2RaWSvPEkD7BLDFQnvSf+nK+wr3ESUjNTyAGobqrijmW92zc+SO6d4p4B1wh7+B/Jg1mkQe5NYUEHtHQ==",
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
"requires": {
|
||||
"big.js": "^5.2.2",
|
||||
"emojis-list": "^3.0.0",
|
||||
"json5": "^2.1.2"
|
||||
}
|
||||
},
|
||||
"supports-color": {
|
||||
"version": "7.2.0",
|
||||
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
|
||||
"integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
"requires": {
|
||||
"has-flag": "^4.0.0"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"vue-plotly": {
|
||||
"version": "1.1.0",
|
||||
"resolved": "https://registry.npmjs.org/vue-plotly/-/vue-plotly-1.1.0.tgz",
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "mainsail",
|
||||
"version": "0.2.3",
|
||||
"version": "0.2.6",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"serve": "vue-cli-service serve",
|
||||
|
||||
+50
-1
@@ -1,5 +1,9 @@
|
||||
<style>
|
||||
@import './assets/styles/fonts.css';
|
||||
|
||||
.button-min-width-auto {
|
||||
min-width: auto !important;
|
||||
}
|
||||
</style>
|
||||
|
||||
<template>
|
||||
@@ -52,7 +56,38 @@
|
||||
<v-app-bar-nav-icon @click.stop="drawer = !drawer"></v-app-bar-nav-icon>
|
||||
<v-spacer></v-spacer>
|
||||
<v-btn color="primary" class="mr-5" v-if="isConnected && save_config_pending" :loading="loadingConfigChanged" @click="clickSaveConfig">SAVE CONFIG</v-btn>
|
||||
<v-btn color="error" v-if="isConnected" :loading="loadingEmergencyStop" @click="clickEmergencyStop">Emergency Stop</v-btn>
|
||||
<v-btn color="error" class="button-min-width-auto px-3" v-if="isConnected" :loading="loadingEmergencyStop" @click="clickEmergencyStop"><v-icon class="mr-sm-2">mdi-alert-circle-outline</v-icon><span class="d-none d-sm-flex">Emergency Stop</span></v-btn>
|
||||
<v-menu
|
||||
bottom
|
||||
left
|
||||
:offset-y="true"
|
||||
>
|
||||
<template v-slot:activator="{ on, attrs }">
|
||||
<v-btn
|
||||
dark
|
||||
icon
|
||||
v-bind="attrs"
|
||||
v-on="on"
|
||||
>
|
||||
<v-icon>mdi-dots-vertical</v-icon>
|
||||
</v-btn>
|
||||
</template>
|
||||
|
||||
<v-list dense>
|
||||
<v-list-item link @click="doRestart()">
|
||||
<v-list-item-title><v-icon class="mr-3">mdi-sync</v-icon>Restart</v-list-item-title>
|
||||
</v-list-item>
|
||||
<v-list-item link @click="doFirmwareRestart()">
|
||||
<v-list-item-title><v-icon class="mr-3">mdi-sync</v-icon>FW Restart</v-list-item-title>
|
||||
</v-list-item>
|
||||
<v-list-item link @click="doHostReboot()">
|
||||
<v-list-item-title><v-icon class="mr-3">mdi-power</v-icon>Reboot Host</v-list-item-title>
|
||||
</v-list-item>
|
||||
<v-list-item link @click="doHostShutdown()">
|
||||
<v-list-item-title><v-icon class="mr-3">mdi-power</v-icon>Shutdown Host</v-list-item-title>
|
||||
</v-list-item>
|
||||
</v-list>
|
||||
</v-menu>
|
||||
</v-app-bar>
|
||||
|
||||
<v-main id="content">
|
||||
@@ -141,6 +176,20 @@ export default {
|
||||
this.$store.commit('setLoading', { name: 'btnSaveConfig' });
|
||||
this.$socket.sendObj('printer.gcode.script', { script: "SAVE_CONFIG" });
|
||||
},
|
||||
doRestart: function() {
|
||||
this.$store.commit('addGcodeResponse', "RESTART");
|
||||
this.$socket.sendObj('printer.gcode.script', { script: "RESTART" });
|
||||
},
|
||||
doFirmwareRestart: function() {
|
||||
this.$store.commit('addGcodeResponse', "FIRMWARE_RESTART");
|
||||
this.$socket.sendObj('printer.gcode.script', { script: "FIRMWARE_RESTART" });
|
||||
},
|
||||
doHostReboot: function() {
|
||||
this.$socket.sendObj('machine.reboot', { });
|
||||
},
|
||||
doHostShutdown: function() {
|
||||
this.$socket.sendObj('machine.shutdown', { });
|
||||
},
|
||||
drawFavicon(val) {
|
||||
let favicon16 = document.querySelector("link[rel*='icon'][sizes='16x16']");
|
||||
let favicon32 = document.querySelector("link[rel*='icon'][sizes='32x32']");
|
||||
|
||||
@@ -34,10 +34,10 @@
|
||||
|
||||
<template #item="{ item }">
|
||||
<tr>
|
||||
<td class="log-cell title-cell">
|
||||
{{ item.date.toLocaleString() }}
|
||||
<td class="log-cell title-cell pr-1 py-2">
|
||||
<small>{{ formatTime(item.date)}}</small>
|
||||
</td>
|
||||
<td class="log-cell content-cell" colspan="2">
|
||||
<td class="log-cell content-cell pl-1 py-2" colspan="2">
|
||||
<span v-if="item.message" class="message" v-html="formatMessage(item.message)"></span>
|
||||
</td>
|
||||
</tr>
|
||||
@@ -82,6 +82,17 @@
|
||||
},
|
||||
methods: {
|
||||
|
||||
formatTime(date) {
|
||||
let hours = date.getHours();
|
||||
if (hours < 10) hours = "0"+hours.toString();
|
||||
let minutes = date.getMinutes();
|
||||
if (minutes < 10) minutes = "0"+minutes.toString();
|
||||
let seconds = date.getSeconds();
|
||||
if (seconds < 10) seconds = "0"+seconds.toString();
|
||||
|
||||
|
||||
return hours+":"+minutes+":"+seconds;
|
||||
},
|
||||
formatMessage(message) {
|
||||
message = message.replace(/(?:\r\n|\r|\n)/g, '<br>');
|
||||
|
||||
@@ -104,4 +115,4 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</script>
|
||||
@@ -24,30 +24,29 @@
|
||||
</v-toolbar-title>
|
||||
</v-toolbar>
|
||||
|
||||
<v-card-text class="pb-0">
|
||||
<v-card-text class="py-2">
|
||||
<tool-slider :target="fan.speed" :multi="100" command="M106" attribute-name="S" :attribute-scale="2.55" ></tool-slider>
|
||||
</v-card-text>
|
||||
</v-card>
|
||||
<v-card class="mt-6" v-if="['printing', 'paused'].includes(printer_state)">
|
||||
<v-toolbar flat dense >
|
||||
<v-toolbar-title>
|
||||
<span class="subheading"><v-icon class="mdi mdi-timer" left></v-icon>Speed Factor</span>
|
||||
<span class="subheading"><v-icon class="mdi mdi-printer-3d" left></v-icon>Print Settings</span>
|
||||
</v-toolbar-title>
|
||||
</v-toolbar>
|
||||
|
||||
<v-card-text class="pb-0">
|
||||
<tool-slider :target="speed_factor" :max="200" :multi="100" command="M220" attribute-name="S" ></tool-slider>
|
||||
</v-card-text>
|
||||
</v-card>
|
||||
<v-card class="mt-6" v-if="['printing', 'paused'].includes(printer_state)">
|
||||
<v-toolbar flat dense >
|
||||
<v-toolbar-title>
|
||||
<span class="subheading"><v-icon class="mdi mdi-texture" left></v-icon>Extrusion Factor</span>
|
||||
</v-toolbar-title>
|
||||
</v-toolbar>
|
||||
<v-card-text class="py-2">
|
||||
<v-row>
|
||||
<v-col class="py-0">
|
||||
<tool-slider prependIcon="mdi-timer" :target="speed_factor" :max="200" :multi="100" command="M220" attribute-name="S" ></tool-slider>
|
||||
</v-col>
|
||||
</v-row>
|
||||
<v-row>
|
||||
<v-col class="py-0">
|
||||
<tool-slider prependIcon="mdi-texture" :target="extrude_factor" :max="200" :multi="100" command="M221" attribute-name="S" ></tool-slider>
|
||||
</v-col>
|
||||
</v-row>
|
||||
|
||||
<v-card-text class="pb-0">
|
||||
<tool-slider :target="extrude_factor" :max="200" :multi="100" command="M221" attribute-name="S" ></tool-slider>
|
||||
</v-card-text>
|
||||
</v-card>
|
||||
</div>
|
||||
@@ -87,4 +86,4 @@
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</script>
|
||||
@@ -10,10 +10,10 @@
|
||||
<v-card-text class="px-0 pt-0 pb-2 content">
|
||||
<v-row class="px-6" >
|
||||
<v-col sm-12>
|
||||
<toolSlider label="VELOCITY" v-bind:target="max_velocity" :max="200" :extender="true" :extender-steps="100" command="SET_VELOCITY_LIMIT" attribute-name="VELOCITY=" class="mt-5" ></toolSlider>
|
||||
<toolSlider label="ACCEL" v-bind:target="max_accel" :max="5000" :extender="true" :extender-steps="500" command="SET_VELOCITY_LIMIT" attribute-name="ACCEL=" class="mt-5" ></toolSlider>
|
||||
<toolSlider label="DECEL" v-bind:target="max_accel_to_decel" :max="5000" :extender="true" :extender-steps="500" command="SET_VELOCITY_LIMIT" attribute-name="ACCEL_TO_DECEL=" class="mt-5" ></toolSlider>
|
||||
<toolSlider label="SCV" v-bind:target="square_corner_velocity" :max="10" :extender="true" :extender-steps="5" command="SET_VELOCITY_LIMIT" attribute-name="SQUARE_CORNER_VELOCITY=" class="mt-5" ></toolSlider>
|
||||
<toolSlider label="VELOCITY" v-bind:target="current_velocity" v-bind:max="max_velocity" command="SET_VELOCITY_LIMIT" attribute-name="VELOCITY=" ></toolSlider>
|
||||
<toolSlider label="ACCEL" v-bind:target="current_accel" v-bind:max="max_accel" command="SET_VELOCITY_LIMIT" attribute-name="ACCEL=" ></toolSlider>
|
||||
<toolSlider label="DECEL" v-bind:target="current_accel_to_decel" v-bind:max="max_accel_to_decel" command="SET_VELOCITY_LIMIT" attribute-name="ACCEL_TO_DECEL=" ></toolSlider>
|
||||
<toolSlider label="SCV" v-bind:target="current_square_corner_velocity" v-bind:max="max_square_corner_velocity" command="SET_VELOCITY_LIMIT" attribute-name="SQUARE_CORNER_VELOCITY=" ></toolSlider>
|
||||
</v-col>
|
||||
</v-row>
|
||||
</v-card-text>
|
||||
@@ -30,19 +30,33 @@
|
||||
},
|
||||
data: function() {
|
||||
return {
|
||||
|
||||
max_velocity: 200,
|
||||
max_accel: 5000,
|
||||
max_accel_to_decel: 2500,
|
||||
max_square_corner_velocity: 10,
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapState({
|
||||
max_velocity: state => state.printer.toolhead.max_velocity,
|
||||
max_accel: state => state.printer.toolhead.max_accel,
|
||||
max_accel_to_decel: state => state.printer.toolhead.max_accel_to_decel,
|
||||
square_corner_velocity: state => state.printer.toolhead.square_corner_velocity,
|
||||
current_velocity: state => state.printer.toolhead.max_velocity,
|
||||
current_accel: state => state.printer.toolhead.max_accel,
|
||||
current_accel_to_decel: state => state.printer.toolhead.max_accel_to_decel,
|
||||
current_square_corner_velocity: state => state.printer.toolhead.square_corner_velocity,
|
||||
config: state => state.printer.configfile.config,
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
|
||||
},
|
||||
watch: {
|
||||
config: function(value) {
|
||||
if (value.printer) {
|
||||
this.max_velocity = parseInt(value.printer.max_velocity);
|
||||
this.max_accel = parseInt(value.printer.max_accel);
|
||||
this.max_accel_to_decel = parseInt(value.printer.max_accel_to_decel) || this.max_accel / 2;
|
||||
this.max_square_corner_velocity = parseInt(value.printer.square_corner_velocity);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</script>
|
||||
@@ -11,22 +11,38 @@
|
||||
<template>
|
||||
<v-card>
|
||||
<v-list-item>
|
||||
<v-list-item-avatar color="grey"><v-icon dark>mdi-information-variant</v-icon></v-list-item-avatar>
|
||||
<v-progress-circular
|
||||
:rotate="-90"
|
||||
:size="50"
|
||||
:width="7"
|
||||
:value="printProgress * 100"
|
||||
color="red"
|
||||
class="mr-5 mt-2"
|
||||
v-if="['printing', 'paused', 'error'].includes(printer_state)"
|
||||
>
|
||||
</v-progress-circular>
|
||||
<v-list-item-avatar color="grey" v-if="!['printing', 'paused', 'error'].includes(printer_state)"><v-icon dark>mdi-information-variant</v-icon></v-list-item-avatar>
|
||||
<v-list-item-content>
|
||||
<v-list-item-title class="headline">Status</v-list-item-title>
|
||||
<v-list-item-subtitle class="mr-3">{{ printer_state !== "" ? printer_state.charAt(0).toUpperCase() + printer_state.slice(1) : "Unknown" }}{{ ['printing', 'paused', 'complete', 'error'].includes(printer_state) ? " - "+current_file : "" }}</v-list-item-subtitle>
|
||||
<v-list-item-title class="headline">{{ ['printing', 'paused', 'error'].includes(printer_state) ? Math.round(printProgress * 100)+"% - " : "" }}{{ display_message ? display_message : (printer_state !== "" ? printer_state.charAt(0).toUpperCase() + printer_state.slice(1) : "Unknown") }}</v-list-item-title>
|
||||
<v-list-item-subtitle class="mr-3" v-if="['printing', 'paused', 'complete', 'error'].includes(printer_state)">{{ "File: "+current_file }}</v-list-item-subtitle>
|
||||
</v-list-item-content>
|
||||
<v-btn class="orange" v-if="printer_state === 'printing'" @click="btnPauseJob" :loading="loadingStatusPause">pause job</v-btn>
|
||||
<v-btn class="red" v-if="(printer_state === 'paused')" :loading="loadingStatusCancel" @click="btnCancelJob">cancel job</v-btn>
|
||||
<v-btn class="orange ml-2" v-if="(printer_state === 'paused')" :loading="loadingStatusResume" @click="btnResumeJob">resume job</v-btn>
|
||||
<v-btn class="orange ml-2" v-if="(printer_state === 'error')" :loading="loadingStatusClear" @click="btnClearJob">clear job</v-btn>
|
||||
<v-btn class="primary ml-2" v-if="(printer_state === 'complete')" :loading="loadingStatusReprint" @click="btnReprintJob">reprint job</v-btn>
|
||||
<v-btn-toggle
|
||||
color="primary"
|
||||
dense
|
||||
multiple
|
||||
>
|
||||
<v-btn class="button-min-width-auto orange px-2" v-if="printer_state === 'printing'" @click="btnPauseJob" :loading="loadingStatusPause" title="Pause print"><v-icon>mdi-pause</v-icon></v-btn>
|
||||
<v-btn class="button-min-width-auto red" v-if="(printer_state === 'paused')" :loading="loadingStatusCancel" @click="btnCancelJob" title="Cancel print"><v-icon>mdi-stop</v-icon></v-btn>
|
||||
<v-btn class="button-min-width-auto orange" v-if="(printer_state === 'paused')" :loading="loadingStatusResume" @click="btnResumeJob" title="Resume job"><v-icon>mdi-play</v-icon></v-btn>
|
||||
<v-btn class="button-min-width-auto orange" v-if="(printer_state === 'error')" :loading="loadingStatusClear" @click="btnClearJob" title="Clear job"><v-icon>mdi-close</v-icon></v-btn>
|
||||
<v-btn class="button-min-width-auto primary" v-if="(printer_state === 'complete')" :loading="loadingStatusReprint" @click="btnReprintJob" title="Reprint job"><v-icon>mdi-autorenew</v-icon></v-btn>
|
||||
</v-btn-toggle>
|
||||
</v-list-item>
|
||||
<v-divider class="my-2" ></v-divider>
|
||||
<v-card-text class="px-0 pt-0 pb-2 content">
|
||||
<v-row>
|
||||
<v-col
|
||||
class="col-12 pv-0 col-sm-4 pr-sm-0"
|
||||
class="col-12 col-sm-4 pl-sm-5 pr-sm-2"
|
||||
v-if="
|
||||
['printing', 'paused', 'complete'].includes(printer_state) &&
|
||||
current_file_metadata &&
|
||||
@@ -45,18 +61,11 @@
|
||||
current_file_metadata &&
|
||||
current_file_metadata.thumbnails &&
|
||||
current_file_metadata.thumbnails.length &&
|
||||
current_file_metadata.thumbnails.find(element => element.width === 400)) ? 'col-12 pv-0 col-sm-8 pl-sm-0' : 'col-12 pv-0'
|
||||
current_file_metadata.thumbnails.find(element => element.width === 400)) ? 'col-12 py-0 col-sm-8 pl-sm-0' : 'col-12 py-0'
|
||||
">
|
||||
<v-layout wrap class=" text-center" v-if="display_message">
|
||||
<v-flex col tag="strong" class="category-header">Message</v-flex>
|
||||
<v-flex grow class="equal-width text-left vertical_align_center">
|
||||
<v-flex tag="span">{{ display_message }}</v-flex>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
<v-divider class="my-2" v-if="display_message" ></v-divider>
|
||||
<v-layout wrap class=" text-center">
|
||||
<v-flex col tag="strong" class="category-header">
|
||||
Position
|
||||
<v-flex col tag="strong" class="category-header col-auto">
|
||||
<v-icon>mdi-axis-arrow</v-icon>
|
||||
</v-flex>
|
||||
<v-flex grow class="equal-width">
|
||||
<v-layout column>
|
||||
@@ -79,8 +88,8 @@
|
||||
</v-layout>
|
||||
<v-divider class="my-2" v-if="['printing', 'paused', 'complete', 'error'].includes(printer_state)"></v-divider>
|
||||
<v-layout wrap class=" text-center" v-if="['printing', 'paused', 'complete', 'error'].includes(printer_state)">
|
||||
<v-flex col tag="strong" class="category-header">
|
||||
Print Status
|
||||
<v-flex col tag="strong" class="category-header col-auto">
|
||||
<v-icon>mdi-poll</v-icon>
|
||||
</v-flex>
|
||||
<v-flex grow class="equal-width">
|
||||
<v-layout column>
|
||||
@@ -103,8 +112,8 @@
|
||||
</v-layout>
|
||||
<v-divider class="my-2" v-if="['printing', 'paused', 'error'].includes(printer_state)"></v-divider>
|
||||
<v-layout wrap class=" text-center" v-if="['printing', 'paused', 'error'].includes(printer_state)">
|
||||
<v-flex col tag="strong" class="category-header py-0">
|
||||
Estimations<br />based on
|
||||
<v-flex col tag="strong" class="category-header col-auto">
|
||||
<v-icon>mdi-clock-outline</v-icon>
|
||||
</v-flex>
|
||||
<v-flex grow class="equal-width">
|
||||
<v-layout column>
|
||||
@@ -125,18 +134,6 @@
|
||||
</v-layout>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
<v-layout wrap class=" text-center" v-if="['printing', 'paused', 'error'].includes(printer_state)">
|
||||
<v-layout column class="mt-2" >
|
||||
<v-progress-linear
|
||||
:value="printProgress * 100"
|
||||
height="25"
|
||||
>
|
||||
<template>
|
||||
<strong>{{ Math.ceil(printProgress * 100) }}%</strong>
|
||||
</template>
|
||||
</v-progress-linear>
|
||||
</v-layout>
|
||||
</v-layout>
|
||||
</v-col>
|
||||
</v-row>
|
||||
</v-card-text>
|
||||
|
||||
+29
-37
@@ -4,9 +4,29 @@
|
||||
|
||||
<template>
|
||||
<v-row>
|
||||
<v-col class="col-auto"><v-icon @click="decrement">mdi-minus</v-icon></v-col>
|
||||
<v-col class="col"><v-slider v-model="value" thumb-label="always" :label="label" :min="min" :max="variableMax" @change="sendCmd" hide-details></v-slider></v-col>
|
||||
<v-col class="col-auto"><v-icon @click="increment">mdi-plus</v-icon></v-col>
|
||||
<v-col class="py-1">
|
||||
<v-slider
|
||||
v-model="value"
|
||||
:label="label"
|
||||
:min="min"
|
||||
:max="max"
|
||||
@change="sendCmd"
|
||||
:prepend-icon="prependIcon"
|
||||
hide-details>
|
||||
|
||||
<template v-slot:append>
|
||||
<v-text-field
|
||||
v-model="value"
|
||||
class="mt-0 pt-0"
|
||||
hide-details
|
||||
single-line
|
||||
type="number"
|
||||
style="width: 80px"
|
||||
@change="sendCmd"
|
||||
></v-text-field>
|
||||
</template>
|
||||
</v-slider>
|
||||
</v-col>
|
||||
</v-row>
|
||||
</template>
|
||||
|
||||
@@ -16,7 +36,6 @@
|
||||
data: function() {
|
||||
return {
|
||||
value: this.target * this.multi,
|
||||
variableMax: this.max,
|
||||
}
|
||||
},
|
||||
props: {
|
||||
@@ -38,6 +57,11 @@
|
||||
required: false,
|
||||
default: ''
|
||||
},
|
||||
prependIcon: {
|
||||
type: String,
|
||||
required: false,
|
||||
default: ''
|
||||
},
|
||||
attributeScale: {
|
||||
type: Number,
|
||||
required: false,
|
||||
@@ -76,45 +100,13 @@
|
||||
sendCmd() {
|
||||
this.$socket.sendObj('printer.gcode.script', { script: this.command+' '+this.attributeName+(this.value*this.attributeScale).toFixed(0) });
|
||||
},
|
||||
decrement() {
|
||||
this.value--;
|
||||
this.sendCmd();
|
||||
},
|
||||
increment() {
|
||||
this.value++;
|
||||
this.sendCmd();
|
||||
},
|
||||
checkExpand() {
|
||||
if (this.value > 0) {
|
||||
if (this.value > this.variableMax) {
|
||||
let tmpMulti = Math.ceil((this.value - this.variableMax) / this.extenderSteps);
|
||||
this.variableMax += tmpMulti * this.extenderSteps;
|
||||
} else if (this.value > (this.variableMax - this.extenderSteps)) {
|
||||
this.variableMax += this.extenderSteps;
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
target: function() {
|
||||
this.value = this.target * this.multi;
|
||||
},
|
||||
value: function() {
|
||||
if (this.extender) {
|
||||
|
||||
setTimeout(() => {
|
||||
this.checkExpand();
|
||||
}, 1000);
|
||||
}
|
||||
}
|
||||
},
|
||||
created: function() {
|
||||
if (this.extender && this.value > this.variableMax) {
|
||||
let tmpMulti = Math.ceil((this.value - this.variableMax) / this.extenderSteps);
|
||||
this.variableMax += tmpMulti * this.extenderSteps;
|
||||
|
||||
if (this.variableMax === this.value) this.variableMax += this.extenderSteps;
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</script>
|
||||
+6
-3
@@ -319,7 +319,10 @@
|
||||
methods: {
|
||||
uploadFile: function() {
|
||||
if (this.$refs.fileUpload.files.length) {
|
||||
this.doUploadFile(this.$refs.fileUpload.files[0]);
|
||||
this.doUploadFile(this.$refs.fileUpload.files[0]).finally(() => {
|
||||
this.$refs.fileUpload.value = '';
|
||||
});
|
||||
|
||||
}
|
||||
},
|
||||
doUploadFile: function(file) {
|
||||
@@ -330,7 +333,7 @@
|
||||
formData.append('file', file, (this.currentPath+"/"+filename).substring(7));
|
||||
this.$store.commit('setLoading', { name: 'loadingGcodeUpload' });
|
||||
|
||||
axios.post('//' + this.hostname + ':' + this.port + '/server/files/upload',
|
||||
return axios.post('//' + this.hostname + ':' + this.port + '/server/files/upload',
|
||||
formData, {
|
||||
headers: { 'Content-Type': 'multipart/form-data' }
|
||||
}
|
||||
@@ -624,4 +627,4 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</script>
|
||||
@@ -20,6 +20,13 @@ Vue.use(Vuetify,{
|
||||
});
|
||||
|
||||
export default new Vuetify({
|
||||
theme: {
|
||||
themes: {
|
||||
dark: {
|
||||
red: '#f7240a'
|
||||
}
|
||||
}
|
||||
},
|
||||
icons: {
|
||||
iconfont: 'mdi',
|
||||
},
|
||||
|
||||
@@ -130,7 +130,7 @@ export default {
|
||||
Vue.prototype.$socket.sendObj('server.files.get_directory', { path: 'config_examples' }, 'getDirectory');
|
||||
|
||||
//load plug data
|
||||
if (data.plugins.includes("gpio_power") !== false) Vue.prototype.$socket.sendObj('machine.gpio_power.devices', {}, 'getPowerDevices');
|
||||
if (data.plugins.includes("power") !== false) Vue.prototype.$socket.sendObj('machine.gpio_power.devices', {}, 'getPowerDevices');
|
||||
|
||||
dispatch('initPrinter');
|
||||
} else {
|
||||
@@ -245,7 +245,7 @@ export default {
|
||||
}
|
||||
} else {
|
||||
commit('setPowerDevices', data.devices);
|
||||
|
||||
|
||||
Vue.prototype.$socket.sendObj('machine.gpio_power.status', {}, 'getPowerDevicesStatus');
|
||||
}
|
||||
},
|
||||
@@ -382,4 +382,4 @@ export default {
|
||||
setSettings({ commit }, data) {
|
||||
commit('setSettings', data);
|
||||
},
|
||||
}
|
||||
}
|
||||
@@ -22,7 +22,7 @@ export default {
|
||||
let name = key;
|
||||
let nameSplit = key.split(" ");
|
||||
|
||||
if (nameSplit.length > 1 && nameSplit[1] === "heater_generic") name = nameSplit[1];
|
||||
if (nameSplit.length > 1 && nameSplit[0] === "heater_generic") name = nameSplit[1];
|
||||
|
||||
heaters.push({
|
||||
name: name,
|
||||
|
||||
+10
-17
@@ -83,6 +83,7 @@ export default {
|
||||
|
||||
if (keySplit[0] === "temperature_fan") key = keySplit[1];
|
||||
else if (keySplit[0] === "temperature_sensor") key = keySplit[1];
|
||||
else if (keySplit[0] === "heater_generic") key = keySplit[1];
|
||||
else if (keySplit[0] === "temperature_probe") key = "probe";
|
||||
|
||||
this.commit('addTemperatureChartValue', { name: key, value: value, time: now });
|
||||
@@ -248,7 +249,7 @@ export default {
|
||||
|
||||
if (parent) {
|
||||
if (parent.findIndex(element => (!element.isDirectory && element.filename === filename)) < 0) {
|
||||
let modified = new Date(data.item.modified);
|
||||
let modified = new Date(data.item.modified * 1000);
|
||||
|
||||
parent.push({
|
||||
isDirectory: false,
|
||||
@@ -341,7 +342,7 @@ export default {
|
||||
parent.push({
|
||||
isDirectory: true,
|
||||
filename: dir.dirname,
|
||||
modified: Date.parse(dir.modified),
|
||||
modified: new Date(dir.modified * 1000),
|
||||
childrens: [],
|
||||
});
|
||||
|
||||
@@ -358,7 +359,7 @@ export default {
|
||||
parent.push({
|
||||
isDirectory: false,
|
||||
filename: file.filename,
|
||||
modified: Date.parse(file.modified),
|
||||
modified: new Date(file.modified * 1000),
|
||||
size: parseInt(file.size),
|
||||
metadataPulled: false,
|
||||
});
|
||||
@@ -393,7 +394,7 @@ export default {
|
||||
slicer_version: safeDefault(data.slicer_version),
|
||||
thumbnails: safeDefault(data.thumbnails),
|
||||
metadataPulled: true,
|
||||
modified: Date.parse(data.modified),
|
||||
modified: new Date(data.modified * 1000),
|
||||
size: parseInt(data.size),
|
||||
};
|
||||
|
||||
@@ -449,20 +450,12 @@ export default {
|
||||
},
|
||||
|
||||
setGcodeStore(state, data) {
|
||||
let splits = data.gcode_store.split('\n');
|
||||
let length = splits.length;
|
||||
let number = 0;
|
||||
|
||||
if (splits.length) {
|
||||
splits.forEach(split => {
|
||||
state.events.push({
|
||||
date: new Date(Date.now() - (length - number) * 1000),
|
||||
message: split
|
||||
});
|
||||
|
||||
number++;
|
||||
data.gcode_store.forEach(message => {
|
||||
state.events.push({
|
||||
date: new Date(message.time * 1000),
|
||||
message: message.message
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
addGcodeResponse(state, data) {
|
||||
|
||||
Reference in new issue
Block a user