diff --git a/src/components/TopCornerMenu.vue b/src/components/TopCornerMenu.vue
index f4bdb978..c1557b38 100644
--- a/src/components/TopCornerMenu.vue
+++ b/src/components/TopCornerMenu.vue
@@ -28,6 +28,9 @@
mdi-restartMoonraker
+
+ mdi-restartWebcam
+
Power Devices
@@ -70,6 +73,11 @@ export default {
return this.$store.getters["server/power/count"]
}
},
+ boolWebcam: {
+ get() {
+ return this.$store.state.gui.dashboard.boolWebcam || this.$store.state.gui.webcam.bool
+ }
+ }
},
methods: {
changeSwitch(device, value) {
@@ -97,6 +105,10 @@ export default {
this.showMenu = false
this.$socket.sendObj('machine.services.restart', { service: "moonraker" })
},
+ doServiceRestartWebcam: function() {
+ this.showMenu = false
+ this.$socket.sendObj('machine.services.restart', { service: "webcamd" })
+ },
doHostReboot: function() {
this.showMenu = false
this.$socket.sendObj('machine.reboot', { })
diff --git a/src/components/panels/Settings/GeneralPanel.vue b/src/components/panels/Settings/GeneralPanel.vue
index 7e2368cf..532d3f0d 100644
--- a/src/components/panels/Settings/GeneralPanel.vue
+++ b/src/components/panels/Settings/GeneralPanel.vue
@@ -31,6 +31,21 @@
+
+
+
+
+ Display Z-Offset-Panel
+
+
+ mdi mdi-information
+
+ Shows the Z-Offset panel permanently.
+
+
+
+
+
factory reset
@@ -102,6 +117,14 @@
return this.$store.dispatch('gui/setSettings', { general: { displayCancelPrint: displayCancelPrint } });
}
},
+ displayZOffsetStandby: {
+ get() {
+ return this.$store.state.gui.general.displayZOffsetStandby;
+ },
+ set(displayZOffsetStandby) {
+ return this.$store.dispatch('gui/setSettings', { general: { displayZOffsetStandby: displayZOffsetStandby } });
+ }
+ },
},
methods: {
resetMainsail() {
diff --git a/src/components/panels/ZOffsetPanel.vue b/src/components/panels/ZOffsetPanel.vue
index 665dad42..76aadfe6 100644
--- a/src/components/panels/ZOffsetPanel.vue
+++ b/src/components/panels/ZOffsetPanel.vue
@@ -3,7 +3,7 @@
-
+
Z Baby Stepping
@@ -53,6 +53,7 @@
homing_origin: state => state.printer.gcode_move.homing_origin,
printer_state: state => state.printer.print_stats.state,
homed_axis: state => state.printer.toolhead.homed_axes,
+ displayZOffsetStandby: state => state.gui.general.displayZOffsetStandby,
}),
},
methods: {
diff --git a/src/pages/Files.vue b/src/pages/Files.vue
index c6bc31d0..d88130ce 100644
--- a/src/pages/Files.vue
+++ b/src/pages/Files.vue
@@ -149,14 +149,14 @@
>
mdi-folder
- mdi-file
-
+ mdi-file
+
-
+
-
+
-
+
|
{{ item.filename }} |
{{ item.isDirectory ? '--' : formatFilesize(item.size) }} |
@@ -212,8 +212,8 @@
Start Job
Do you want to start {{ dialogPrintFile.item.filename }}?
@@ -421,6 +421,11 @@
get: function() {
return this.$store.getters["files/getDiskUsage"](this.currentPath)
}
+ },
+ basicUrl: {
+ get: function() {
+ return this.$store.getters["socket/getUrl"]
+ }
}
},
created() {
@@ -790,43 +795,36 @@
this.$store.dispatch("gui/setGcodefilesMetadata", {name: name, value: value});
}
},
- existsSmallThumbnail(item) {
- return (
+ getSmallThumbnail(item) {
+ if (
'thumbnails' in item &&
item.thumbnails !== undefined &&
- item.thumbnails.findIndex(thumb => thumb.width >= 32 && thumb.width <= 64 && thumb.height >= 32 && thumb.height <= 64) !== -1
- )
- },
- getSmallThumbnail(item) {
- if (this.existsSmallThumbnail(item)) {
+ item.thumbnails.length
+ ) {
const thumbnail = item.thumbnails.find(thumb =>
thumb.width >= 32 && thumb.width <= 64 &&
thumb.height >= 32 && thumb.height <= 64
)
- if (thumbnail) return thumbnail.data
+ if (thumbnail && 'relative_path' in thumbnail) return this.basicUrl+"/server/files/"+this.currentPath+"/"+thumbnail.relative_path
}
return ""
},
- existsBigThumbnail(item) {
- return (
+ getBigThumbnail(item) {
+ if (
'thumbnails' in item &&
item.thumbnails !== undefined &&
- item.thumbnails.findIndex(thumb => thumb.width >= 300 && thumb.width <= 400) !== -1
- )
- },
- getBigThumbnail(item) {
- if (this.existsBigThumbnail(item)) {
+ item.thumbnails.length) {
const thumbnail = item.thumbnails.find(thumb => thumb.width >= 300 && thumb.width <= 400)
- if (thumbnail) return thumbnail.data
+ if (thumbnail && 'relative_path' in thumbnail) return this.basicUrl+"/server/files/"+this.currentPath+"/"+thumbnail.relative_path
}
return ""
},
getThumbnailWidth(item) {
- if (this.existsBigThumbnail(item)) {
+ if (this.getBigThumbnail(item)) {
const thumbnail = item.thumbnails.find(thumb => thumb.width >= 300 && thumb.width <= 400)
if (thumbnail) return thumbnail.width
diff --git a/src/store/gui/actions.js b/src/store/gui/actions.js
index 2d5be061..512eee58 100644
--- a/src/store/gui/actions.js
+++ b/src/store/gui/actions.js
@@ -31,7 +31,12 @@ export default {
updateSettings({ commit }, payload) {
const keyName = payload.keyName
let newState = payload.newVal
- if ('value' in payload && keyName in payload.value && typeof payload.value[keyName] !== "string") {
+ if (
+ 'value' in payload &&
+ keyName in payload.value &&
+ typeof payload.value[keyName] !== "string" &&
+ !Array.isArray(payload.value[keyName])
+ ) {
newState = objectAssignDeep(payload.value[keyName], newState)
}
diff --git a/src/store/gui/index.js b/src/store/gui/index.js
index 950cab74..a9add32b 100644
--- a/src/store/gui/index.js
+++ b/src/store/gui/index.js
@@ -6,7 +6,8 @@ export function getDefaultState() {
return {
general: {
printername: "",
- displayCancelPrint: false
+ displayCancelPrint: false,
+ displayZOffsetStandby: false,
},
dashboard: {
boolWebcam: false,