diff --git a/src/components/panels/Settings/UpdatePanel.vue b/src/components/panels/Settings/UpdatePanel.vue index 7084f057..c8f01572 100644 --- a/src/components/panels/Settings/UpdatePanel.vue +++ b/src/components/panels/Settings/UpdatePanel.vue @@ -105,7 +105,7 @@ :disabled="!(version_info.system.package_count) || printer_state === 'printing'" @click="updateSystem" class="minwidth-0 px-2 text-uppercase" - >mdi-{{ version_info.system.package_count ? 'progress-upload' : 'check' }}{{ version_info.system.package_count ? 'upgrade' : 'up-to-date' }} + >mdi-{{ version_info.system.package_count ? 'progress-upload' : 'check' }}{{ version_info.system.package_count ? $t('Settings.UpdatePanel.Upgrade') : $t('Settings.UpdatePanel.UpToDate') }} diff --git a/src/components/panels/StatusPanel.vue b/src/components/panels/StatusPanel.vue index b89766d5..e9a770c6 100644 --- a/src/components/panels/StatusPanel.vue +++ b/src/components/panels/StatusPanel.vue @@ -17,259 +17,267 @@ - mdi-information{{ printerStateOutput }} + + + + mdi-information + + {{ printerStateOutput }} - - - - {{ $t("Panels.StatusPanel.PausePrint") }} - - - - - - {{ $t("Panels.StatusPanel.ResumePrint") }} - - - - - - {{ $t("Panels.StatusPanel.CancelPrint") }} - - - - - - {{ $t("Panels.StatusPanel.ClearPrintStats") }} - - - - - - {{ $t("Panels.StatusPanel.ReprintJob") }} - - + - - - - - - - - -

{{ Math.round(printPercent * 100)+"%" }}{{ printer_state !== "error" ? (display_message ? " - "+display_message : "") : print_stats_message }}

- mdi-file-outline{{ current_filename }} -
-
-
- - - - - + + + + + + {{ $t("Panels.StatusPanel.Position") }}
+ {{ absolute_coordinates ? $t("Panels.StatusPanel.Absolute") : $t("Panels.StatusPanel.Relative") }}
- - - - mdi-axis-arrow - - - {{ $t("Panels.StatusPanel.X") }} - {{ position.length ? position[0].toFixed(2) : "--" }} - - - {{ $t("Panels.StatusPanel.Y") }} - {{ position.length ? position[1].toFixed(2) : "--" }} - - - {{ $t("Panels.StatusPanel.Z") }} - - - - - - G-Code: {{ gcode_position[2].toFixed(2) }}mm - - - - - - - - - - - - - mdi-poll - - - {{ $t("Panels.StatusPanel.Filament") }} - - - - - {{ (filament_used / 1000).toFixed(2) }} / {{ (current_file.filament_total / 1000).toFixed(2) }}m = {{ ( 100 / current_file.filament_total * filament_used).toFixed(0) }}% - - - - - - {{ $t("Panels.StatusPanel.Print") }} - {{ formatTime(print_time) }} - - - {{ $t("Panels.StatusPanel.Total") }} - {{ formatTime(print_time_total) }} - - - - - - - - - - mdi-printer-3d - - - {{ $t("Panels.StatusPanel.Speed") }} - {{ (requested_speed / 60 * speed_factor).toFixed(0) }} mm/s - - - {{ $t("Panels.StatusPanel.Layer") }} - - - - - {{ $t("Panels.StatusPanel.ObjectHeight") }}: {{ current_file.object_height }}mm - - - - - - {{ $t("Panels.StatusPanel.ETA") }} - {{ eta ? formatDateTime(eta) : '--' }} - - - - - - - - - - mdi-clock-outline - - - {{ $t("Panels.StatusPanel.File") }} - {{ estimated_time_file ? formatTime(estimated_time_file) : '--' }} - - - - {{ $t("Panels.StatusPanel.Filament") }} - {{ estimated_time_filament ? formatTime(estimated_time_filament) : '--' }} - - - {{ $t("Panels.StatusPanel.Slicer") }} - {{ estimated_time_slicer ? formatTime(estimated_time_slicer) : '--' }} - - + + {{ $t("Panels.StatusPanel.X") }}
+ {{ position.length ? position[0].toFixed(2) : "--" }} +
+ + {{ $t("Panels.StatusPanel.Y") }}
+ {{ position.length ? position[1].toFixed(2) : "--" }} +
+ + + + G-Code: {{ gcode_position[2].toFixed(2) }}mm +
+ +
diff --git a/src/locales/en.json b/src/locales/en.json index d225c6ce..817fa504 100644 --- a/src/locales/en.json +++ b/src/locales/en.json @@ -230,24 +230,31 @@ "Off": "Off" }, "StatusPanel": { - "Unknown": "Unknown", - "PausePrint": "Pause print", - "ResumePrint": "Resume print", - "CancelPrint": "Cancel print", - "ClearPrintStats": "Clear print stats", - "ReprintJob": "Reprint job", - "X": "X", - "Y": "Y", - "Z": "Z", - "Filament": "Filament", - "Print": "Print", - "Total": "Total", - "Speed": "Speed", - "Layer": "Layer", - "ObjectHeight": "Object Height", - "ETA": "ETA", - "File": "File", - "Slicer": "Slicer" + "Position": "Position", + "Absolute": "absolute", + "Relative": "relative", + "X": "X", + "Y": "Y", + "Z": "Z", + "PausePrint": "Pause print", + "ResumePrint": "Resume print", + "CancelPrint": "Cancel print", + "ClearPrintStats": "Clear print stats", + "ReprintJob": "Reprint job", + "Speed": "Speed", + "Flow": "Flow", + "Max": "max", + "Filament": "Filament", + "Layer": "Layer", + "ObjectHeight": "Object Height", + "Estimate": "Estimate", + "File": "File", + "Print": "Print", + "Difference": "Difference", + "Total": "Total", + "Slicer": "Slicer", + "ETA": "ETA", + "Unknown": "Unknown" }, "ToolsPanel": { "Temperatures": "Temperatures", @@ -406,6 +413,7 @@ "UpToDate": "up-to-date", "Detached": "detached", "Update": "update", + "Upgrade": "upgrade", "Dirty": "dirty", "Invalid": "invalid", "Unknown": "unknown", diff --git a/src/store/printer/getters.js b/src/store/printer/getters.js index efb1afc1..02b35bab 100644 --- a/src/store/printer/getters.js +++ b/src/store/printer/getters.js @@ -578,6 +578,25 @@ export default { return 0 }, + getEstimatedTimeAvg: (state, getters) => { + let time = 0 + let timeCount = 0 + + if (getters.getEstimatedTimeFile > 0) { + time += parseInt(getters.getEstimatedTimeFile) + timeCount++ + } + + if (getters.getEstimatedTimeFilament > 0) { + time += parseInt(getters.getEstimatedTimeFilament) + timeCount++ + } + + if (time && timeCount) return (time / timeCount) + + return 0 + }, + getEstimatedTimeETA: (state, getters) => { let time = 0 let timeCount = 0 diff --git a/src/store/printer/index.js b/src/store/printer/index.js index bd013763..6d0abbab 100644 --- a/src/store/printer/index.js +++ b/src/store/printer/index.js @@ -51,6 +51,7 @@ export function getDefaultState() { }, gcode_move: { + position: [], extrude_factor: 1, speed_factor: 1, homing_origin: [0,0,0,0],