diff --git a/src/App.vue b/src/App.vue index 2c931ef7..3a7177b8 100644 --- a/src/App.vue +++ b/src/App.vue @@ -80,6 +80,7 @@ mdi-syncFW Restart + mdi-powerReboot Host @@ -100,7 +101,7 @@ - + Connecting... @@ -129,6 +130,7 @@ export default { }, data: () => ({ + overlayDisconnect: true, drawer: null, activeClass: 'active', routes: routes, @@ -139,7 +141,6 @@ export default { }), created () { this.$vuetify.theme.dark = true; - //this.is_ready = (this.klippy_state === "ready") ? true : false; this.boolNaviHeightmap = (typeof(this.config.bed_mesh) !== "undefined"); }, computed: { @@ -147,17 +148,16 @@ export default { return this.$route.fullPath; }, ...mapState({ - toolhead: state => state.printer.toolhead, - hostname: state => state.printer.hostname, - printername: state => state.gui.general.printername, - version: state => state.printer.software_version, isConnected: state => state.socket.isConnected, - isConnecting: state => !state.socket.isConnected, + hostname: state => state.printer.hostname, + version: state => state.printer.software_version, + klippy_state: state => state.server.klippy_state, + + toolhead: state => state.printer.toolhead, + printername: state => state.gui.general.printername, virtual_sdcard: state => state.printer.virtual_sdcard, current_file: state => state.printer.print_stats.filename, boolNaviWebcam: state => state.gui.webcam.bool, - klippy_state: state => state.printer.webhooks.state, - loadings: state => state.loadings, config: state => state.printer.configfile.config, save_config_pending: state => state.printer.configfile.save_config_pending, }), @@ -168,22 +168,22 @@ export default { }, methods: { clickEmergencyStop: function() { - this.$store.commit('setLoading', { name: 'btnEmergencyStop' }); + // TODO loading emergency stop + //this.$store.commit('setLoading', { name: 'btnEmergencyStop' }); this.$socket.sendObj('printer.emergency_stop', {}); }, clickSaveConfig: function() { - this.$store.commit('addGcodeResponse', "SAVE_CONFIG"); - this.$store.commit('setLoading', { name: 'btnSaveConfig' }); + this.$store.commit('server/addEvent', "SAVE_CONFIG"); + // TODO loading save_config button + //this.$store.commit('setLoading', { name: 'btnSaveConfig' }); this.$socket.sendObj('printer.gcode.script', { script: "SAVE_CONFIG" }); }, doRestart: function() { - this.$store.commit('setPrinterData', { webhooks: { state: "restart", state_message: "Printer is restarting..."}}); - this.$store.commit('addGcodeResponse', "RESTART"); + this.$store.commit('server/addEvent', "RESTART"); this.$socket.sendObj('printer.gcode.script', { script: "RESTART" }); }, doFirmwareRestart: function() { - this.$store.commit('setPrinterData', { webhooks: { state: "restart", state_message: "Printer is restarting..."}}); - this.$store.commit('addGcodeResponse', "FIRMWARE_RESTART"); + this.$store.commit('server/addEvent', "FIRMWARE_RESTART"); this.$socket.sendObj('printer.gcode.script', { script: "FIRMWARE_RESTART" }); }, doHostReboot: function() { @@ -258,9 +258,8 @@ export default { config() { this.boolNaviHeightmap = (typeof(this.config.bed_mesh) !== "undefined"); }, - loadings: function(loadings) { - this.loadingEmergencyStop = loadings.includes('btnEmergencyStop'); - this.loadingConfigChanged = loadings.includes('btnSaveConfig'); + isConnected(newVal) { + this.overlayDisconnect = !newVal; } }, } diff --git a/src/charts/LineChart.js b/src/charts/LineChart.js index 0cee9a85..69b1cd11 100644 --- a/src/charts/LineChart.js +++ b/src/charts/LineChart.js @@ -53,7 +53,7 @@ export default { meta_target.hidden = meta.hidden; } - store.dispatch('setHeaterChartVisibility', { name: legendItem.text, hidden: meta.hidden }); + store.dispatch('gui/setHeaterChartVisibility', { name: legendItem.text, hidden: meta.hidden }); ci.update(); } @@ -129,10 +129,12 @@ export default { } }, created () { - this.timer = setInterval(this.update, 500); + /*this.timer = setInterval(function() { + this.update; + }, 2000);*/ }, mounted () { - this.renderChart(this.chartData, this.options); + //this.renderChart(this.chartData, this.options) }, methods: { update() { @@ -143,11 +145,6 @@ export default { } }, watch: { - chartData: function(newData, oldData) { - window.console.log("watch chartData"); - window.console.log(newData); - window.console.log(oldData); - this.$data._chart.reset(); - } + } } \ No newline at end of file diff --git a/src/components/panels/ControlPanel.vue b/src/components/panels/ControlPanel.vue index 5696e5a7..efd14894 100644 --- a/src/components/panels/ControlPanel.vue +++ b/src/components/panels/ControlPanel.vue @@ -91,33 +91,33 @@ }, methods: { doHome() { - this.$store.commit('addGcodeResponse', "G28"); - this.$store.commit('setLoading', { name: 'controlHomeAll' }); + this.$store.commit('server/addEvent', "G28"); + //this.$store.commit('setLoading', { name: 'controlHomeAll' }); this.$socket.sendObj('printer.gcode.script', { script: "G28" }, "responseHome"); }, doHomeX() { - this.$store.commit('addGcodeResponse', "G28 X"); - this.$store.commit('setLoading', { name: 'controlHomeX' }); + this.$store.commit('server/addEvent', "G28 X"); + //this.$store.commit('setLoading', { name: 'controlHomeX' }); this.$socket.sendObj('printer.gcode.script', { script: "G28 X" }, "responseHomeX"); }, doHomeY() { - this.$store.commit('addGcodeResponse', "G28 Y"); - this.$store.commit('setLoading', { name: 'controlHomeY' }); + this.$store.commit('server/addEvent', "G28 Y"); + //this.$store.commit('setLoading', { name: 'controlHomeY' }); this.$socket.sendObj('printer.gcode.script', { script: "G28 Y" }, "responseHomeY"); }, doHomeZ() { - this.$store.commit('addGcodeResponse', "G28 Z"); - this.$store.commit('setLoading', { name: 'controlHomeZ' }); + this.$store.commit('server/addEvent', "G28 Z"); + //this.$store.commit('setLoading', { name: 'controlHomeZ' }); this.$socket.sendObj('printer.gcode.script', { script: "G28 Z" }, "responseHomeZ"); }, doQGL() { - this.$store.commit('addGcodeResponse', "QUAD_GANTRY_LEVEL"); - this.$store.commit('setLoading', { name: 'controlQGL' }); + this.$store.commit('server/addEvent', "QUAD_GANTRY_LEVEL"); + //this.$store.commit('setLoading', { name: 'controlQGL' }); this.$socket.sendObj('printer.gcode.script', { script: "QUAD_GANTRY_LEVEL" }, "responseQGL"); }, doZtilt() { - this.$store.commit('addGcodeResponse', "Z_TILT_ADJUST"); - this.$store.commit('setLoading', { name: 'controlZTilt' }); + this.$store.commit('server/addEvent', "Z_TILT_ADJUST"); + //this.$store.commit('setLoading', { name: 'controlZTilt' }); this.$socket.sendObj('printer.gcode.script', { script: "Z_TILT_ADJUST" }, "responseZTilt"); }, doSendMove(gcode) { @@ -128,8 +128,8 @@ this.doSend(gcode); }, doSend(gcode) { - this.$store.commit('addGcodeResponse', gcode); - Vue.prototype.$socket.sendObj('printer.gcode.script', { script: gcode }, "sendGcode"); + this.$store.commit('server/addEvent', gcode); + Vue.prototype.$socket.sendObj('printer.gcode.script', { script: gcode }, "server/getGcodeRespond"); }, }, watch: { diff --git a/src/components/panels/ExtruderPanel.vue b/src/components/panels/ExtruderPanel.vue index 5eae63a1..40d916bb 100644 --- a/src/components/panels/ExtruderPanel.vue +++ b/src/components/panels/ExtruderPanel.vue @@ -8,20 +8,20 @@ Feed amount in mm: - {{ amount }} + {{ amount }} Feedrate in mm/s: - {{ rate }} + {{ rate }} - mdi-arrow-up-bold Retract - mdi-arrow-down-bold Extrude + mdi-arrow-up-bold Retract + mdi-arrow-down-bold Extrude @@ -53,8 +53,7 @@ config: state => state.printer.configfile.config }), ...mapGetters([ - 'getMacros', - 'getCurrentExtruder', + 'printer/getExtrudePossible', ]), }, methods: { @@ -66,15 +65,13 @@ }, sendRetract() { let gcode = "M83\nG1 E-"+this.feedAmount+" F"+(this.feedrate * 60); - this.$store.commit('setLoading', { name: 'extruderRetract' }); - this.$store.commit('addGcodeResponse', gcode); - Vue.prototype.$socket.sendObj('printer.gcode.script', { script: gcode }, "respondeExtruderRetract"); + this.$store.commit('server/addEvent', gcode); + Vue.prototype.$socket.sendObj('printer.gcode.script', { script: gcode }); }, sendDetract() { let gcode = "M83\nG1 E"+this.feedAmount+" F"+(this.feedrate * 60); - this.$store.commit('setLoading', { name: 'extruderDetract' }); - this.$store.commit('addGcodeResponse', gcode); - Vue.prototype.$socket.sendObj('printer.gcode.script', { script: gcode }, "respondeExtruderDetract"); + this.$store.commit('server/addEvent', gcode); + Vue.prototype.$socket.sendObj('printer.gcode.script', { script: gcode }); }, }, watch: { diff --git a/src/components/panels/KlippyStatePanel.vue b/src/components/panels/KlippyStatePanel.vue index d4280167..2883d6e5 100644 --- a/src/components/panels/KlippyStatePanel.vue +++ b/src/components/panels/KlippyStatePanel.vue @@ -6,13 +6,13 @@ Klippy-Status - {{ state }} + {{ klippy_state }} -
{{ state_message }}
+
{{ klippy_message }}

Moonraker can't connect to Klippy!
Please check if the Klipper service is running and an UDS (Unix Domain Socket) is configured.

@@ -20,66 +20,35 @@
- mdi-cachedRestart - mdi-cachedFIRMWARE_Restart + mdi-cachedRestart + mdi-cachedFIRMWARE_Restart - - \ No newline at end of file + \ No newline at end of file diff --git a/src/components/panels/MiniconsolePanel.vue b/src/components/panels/MiniconsolePanel.vue index 811a5890..4fc5784e 100644 --- a/src/components/panels/MiniconsolePanel.vue +++ b/src/components/panels/MiniconsolePanel.vue @@ -9,6 +9,10 @@ white-space: nowrap; } + .miniConsole.v-data-table > .v-data-table__wrapper > table > tbody > tr > td { + height: auto; + } + .miniConsole .content-cell { width: 100%; } @@ -24,33 +28,33 @@ - - + + - - + + @@ -85,7 +89,7 @@ }, computed: { ...mapState({ - events: state => state.events, + events: state => state.server.events, }) }, methods: { diff --git a/src/components/panels/PeripheriePanel.vue b/src/components/panels/PeripheriePanel.vue index 500aa012..d98c2853 100644 --- a/src/components/panels/PeripheriePanel.vue +++ b/src/components/panels/PeripheriePanel.vue @@ -17,47 +17,38 @@ diff --git a/src/components/panels/Settings/ConfigFilesPanel.vue b/src/components/panels/Settings/ConfigFilesPanel.vue index d5fbc48e..3e3af1e8 100644 --- a/src/components/panels/Settings/ConfigFilesPanel.vue +++ b/src/components/panels/Settings/ConfigFilesPanel.vue @@ -231,9 +231,7 @@ }, computed: { ...mapState({ - config_examples: state => state.filetree.config_examples, - config: state => state.filetree.config, - filetree: state => state.filetree, + filetree: state => state.files.filetree, countPerPage: state => state.gui.settings.configfiles.countPerPage, hostname: state => state.socket.hostname, port: state => state.socket.port, @@ -244,17 +242,17 @@ }, methods: { highlighter(code) { - //return highlight(code, languages.editorconfig); //returns html return highlight(code, languages.ini); //returns html }, refreshFileList: function() { window.console.log(this.currentPath.substring(1)); - this.$store.commit('setLoading', { name: 'loadingConfigRefresh' }); + // TODO loading refresh + //this.$store.commit('setLoading', { name: 'loadingConfigRefresh' }); if (this.currentPath === "") { - this.$socket.sendObj('server.files.get_directory', { path: 'config' }, 'getDirectory'); - this.$socket.sendObj('server.files.get_directory', { path: 'config_examples' }, 'getDirectory'); - } else this.$socket.sendObj('server.files.get_directory', { path: this.currentPath.substring(1) }, 'getDirectory'); + this.$socket.sendObj('server.files.get_directory', { path: 'config' }, 'files/getDirectory'); + this.$socket.sendObj('server.files.get_directory', { path: 'config_examples' }, 'files/getDirectory'); + } else this.$socket.sendObj('server.files.get_directory', { path: this.currentPath.substring(1) }, 'files/getDirectory'); }, formatDate(date) { let tmp2 = new Date(date); @@ -385,7 +383,7 @@ this.$socket.sendObj('server.files.post_directory', { path: this.currentPath.substring(1)+"/"+this.dialogCreateFolder.name - }, 'getPostDirectory'); + }, 'files/getCreateDir'); }, createFile() { this.dialogCreateFile.name = ""; @@ -420,7 +418,7 @@ this.$socket.sendObj('server.files.move', { source: this.currentPath+"/"+this.dialogRenameFile.item.filename, dest: this.currentPath+"/"+this.dialogRenameFile.newName - }, 'getPostFileMove'); + }, 'files/getMove'); }, removeFile() { let filename = (this.currentPath+"/"+this.contextMenu.item.filename); @@ -433,7 +431,7 @@ }); }, deleteDirectoryAction: function() { - this.$socket.sendObj('server.files.delete_directory', { path: this.currentPath+"/"+this.contextMenu.item.filename }, 'getDeleteDirectory'); + this.$socket.sendObj('server.files.delete_directory', { path: this.currentPath+"/"+this.contextMenu.item.filename }, 'files/getDeleteDir'); }, }, watch: { diff --git a/src/components/panels/Settings/DashboardPanel.vue b/src/components/panels/Settings/DashboardPanel.vue index 7a2649eb..100fbe96 100644 --- a/src/components/panels/Settings/DashboardPanel.vue +++ b/src/components/panels/Settings/DashboardPanel.vue @@ -49,7 +49,7 @@ return this.$store.state.gui.dashboard.boolWebcam; }, set(status) { - return this.$store.dispatch('setSettings', { gui: { dashboard: { boolWebcam: status } } }); + return this.$store.dispatch('gui/setSettings', { dashboard: { boolWebcam: status } }); } }, boolShowTempchartOnDashboard: { @@ -57,7 +57,7 @@ return this.$store.state.gui.dashboard.boolTempchart; }, set(status) { - return this.$store.dispatch('setSettings', { gui: { dashboard: { boolTempchart: status } } }); + return this.$store.dispatch('gui/setSettings', { dashboard: { boolTempchart: status } }); } }, boolShowConsoleOnDashboard: { @@ -65,7 +65,7 @@ return this.$store.state.gui.dashboard.boolConsole; }, set(status) { - return this.$store.dispatch('setSettings', { gui: { dashboard: { boolConsole: status } } }); + return this.$store.dispatch('gui/setSettings', { dashboard: { boolConsole: status } }); } }, }, diff --git a/src/components/panels/Settings/EndstopPanel.vue b/src/components/panels/Settings/EndstopPanel.vue index 3a981fa9..4c6dcc3e 100644 --- a/src/components/panels/Settings/EndstopPanel.vue +++ b/src/components/panels/Settings/EndstopPanel.vue @@ -41,12 +41,13 @@ }, data: function() { return { - sortEndstops: {} + sortEndstops: {}, + loading: false } }, computed: { ...mapState({ - loading: state => state.socket.loadingEndstopStatus, + //loading: state => state.socket.loadingEndstopStatus, endstops: state => state.printer.endstops, }) }, @@ -55,8 +56,9 @@ }, methods: { syncEndstops() { - this.$store.commit('setLoadingEndstopStatus', true); - this.$socket.sendObj('printer.query_endstops.status', { }, "responseEndstopStatus"); + // TODO loading + //this.$store.commit('setLoadingEndstopStatus', true); + this.$socket.sendObj('printer.query_endstops.status', { }, "printer/getEndstopStatus"); }, getEndstops() { this.sortEndstops = {}; diff --git a/src/components/panels/Settings/LimitsPanel.vue b/src/components/panels/Settings/LimitsPanel.vue index 1a4c36b4..48c60dba 100644 --- a/src/components/panels/Settings/LimitsPanel.vue +++ b/src/components/panels/Settings/LimitsPanel.vue @@ -6,34 +6,31 @@ Machine Limits - - - - - - - - - - - + + + + + + + + diff --git a/src/components/panels/ToolsPanel.vue b/src/components/panels/ToolsPanel.vue index 98799436..cb1d4206 100644 --- a/src/components/panels/ToolsPanel.vue +++ b/src/components/panels/ToolsPanel.vue @@ -99,7 +99,7 @@ }, computed: { ...mapState({ - datasets: state => state.temperaturChart, + datasets: state => state.printer.tempHistory.datasets, boolTempchart: state => state.gui.dashboard.boolTempchart, }), ...mapGetters([ diff --git a/src/inputs/FanSlider.vue b/src/inputs/FanSlider.vue new file mode 100644 index 00000000..dcba783b --- /dev/null +++ b/src/inputs/FanSlider.vue @@ -0,0 +1,109 @@ + + + + + + diff --git a/src/inputs/SettingsMacroSwitch.vue b/src/inputs/SettingsMacroSwitch.vue index 42b6750d..ed999de5 100644 --- a/src/inputs/SettingsMacroSwitch.vue +++ b/src/inputs/SettingsMacroSwitch.vue @@ -30,17 +30,19 @@ setValue() { if (this.value) { let index = this.hiddenMacros.indexOf(this.name.toUpperCase()); - if (index > -1) this.hiddenMacros.splice(index, 1); - } else this.hiddenMacros.push(this.name.toUpperCase()); + if (index > -1) this.hiddenMacros.splice(index, 1) + } else this.hiddenMacros.push(this.name.toUpperCase()) + + this.$store.dispatch("gui/upload") } }, watch: { hiddenMacros: function() { - this.value = !this.hiddenMacros.includes(this.name.toUpperCase()); + this.value = !this.hiddenMacros.includes(this.name.toUpperCase()) } }, created() { - this.value = !this.hiddenMacros.includes(this.name.toUpperCase()); + this.value = !this.hiddenMacros.includes(this.name.toUpperCase()) } } \ No newline at end of file diff --git a/src/inputs/ToolInput.vue b/src/inputs/ToolInput.vue index 408a373c..8bd7fd91 100644 --- a/src/inputs/ToolInput.vue +++ b/src/inputs/ToolInput.vue @@ -7,6 +7,15 @@ .tool-input .v-input__slot { margin-bottom: 0; } .tool-input .v-text-field__details { display: none; } + + .tool-input input { + -moz-appearance: textfield; + } + .tool-input input::-webkit-outer-spin-button, + .tool-input input::-webkit-inner-spin-button { + -webkit-appearance: none; + margin: 0; + }