diff --git a/src/components/panels/Status/PauseAtLayerDialog.vue b/src/components/panels/Status/PauseAtLayerDialog.vue
new file mode 100644
index 00000000..c21a4c88
--- /dev/null
+++ b/src/components/panels/Status/PauseAtLayerDialog.vue
@@ -0,0 +1,225 @@
+
+
+
+
+
+
+
+
+ {{ mdiCloseThick }}
+
+
+
+
+
+
+ {{
+ $t('Panels.StatusPanel.PauseAtLayer.DescriptionPauseAtLayerActive', {
+ layer: macroSettingsPauseAtLayerLayer,
+ call: macroSettingsPauseAtLayerCall,
+ })
+ }}
+
+
+
+
+
+
+ {{
+ $t('Panels.StatusPanel.PauseAtLayer.DescriptionPauseNextLayerActive', {
+ call: macroSettingsPauseAtLayerCall,
+ })
+ }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ $t('Panels.StatusPanel.PauseAtLayer.Abort') }}
+
+ {{ $t('Panels.StatusPanel.PauseAtLayer.Accept') }}
+
+
+
+
+
+
+
+
diff --git a/src/components/panels/StatusPanel.vue b/src/components/panels/StatusPanel.vue
index f80c524f..40b393b2 100644
--- a/src/components/panels/StatusPanel.vue
+++ b/src/components/panels/StatusPanel.vue
@@ -34,11 +34,29 @@
{{ button.text }}
+
+
+
+ {{ mdiDotsVertical }}
+
+
+
+
+
+ {{ entry.icon }}
+ {{ entry.text }}
+
+
+
+
+
@@ -89,6 +107,7 @@ import StatusPanelGcodefiles from '@/components/panels/Status/Gcodefiles.vue'
import StatusPanelJobqueue from '@/components/panels/Status/Jobqueue.vue'
import StatusPanelExcludeObject from '@/components/panels/Status/ExcludeObject.vue'
import StatusPanelPrintstatusThumbnail from '@/components/panels/Status/PrintstatusThumbnail.vue'
+import StatusPanelPauseAtLayerDialog from '@/components/panels/Status/PauseAtLayerDialog.vue'
import Panel from '@/components/ui/Panel.vue'
import {
mdiBroom,
@@ -100,6 +119,8 @@ import {
mdiStop,
mdiMessageProcessingOutline,
mdiCloseCircle,
+ mdiLayersPlus,
+ mdiDotsVertical,
} from '@mdi/js'
@Component({
@@ -112,14 +133,17 @@ import {
StatusPanelJobqueue,
StatusPanelPrintstatus,
StatusPanelPrintstatusThumbnail,
+ StatusPanelPauseAtLayerDialog,
},
})
export default class StatusPanel extends Mixins(BaseMixin) {
mdiInformation = mdiInformation
mdiMessageProcessingOutline = mdiMessageProcessingOutline
mdiCloseCircle = mdiCloseCircle
+ mdiDotsVertical = mdiDotsVertical
private boolShowObjects = false
+ private boolShowPauseAtLayer = false
declare $refs: {
bigThumbnail: any
@@ -173,7 +197,7 @@ export default class StatusPanel extends Mixins(BaseMixin) {
color: 'warning',
icon: mdiPause,
loadingName: 'statusPrintPause',
- status: ['printing'],
+ status: () => ['printing'].includes(this.printer_state),
click: this.btnPauseJob,
},
{
@@ -181,7 +205,7 @@ export default class StatusPanel extends Mixins(BaseMixin) {
color: 'success',
icon: mdiPlay,
loadingName: 'statusPrintResume',
- status: ['paused'],
+ status: () => ['paused'].includes(this.printer_state),
click: this.btnResumeJob,
},
{
@@ -189,15 +213,36 @@ export default class StatusPanel extends Mixins(BaseMixin) {
color: 'error',
icon: mdiStop,
loadingName: 'statusPrintCancel',
- status: this.$store.state.gui.uiSettings.displayCancelPrint ? ['paused', 'printing'] : ['paused'],
+ status: () => {
+ if (this.$store.state.gui.uiSettings.displayCancelPrint)
+ return ['paused', 'printing'].includes(this.printer_state)
+
+ return ['paused'].includes(this.printer_state)
+ },
click: this.btnCancelJob,
},
{
text: this.$t('Panels.StatusPanel.ExcludeObject.ExcludeObject'),
color: 'warning',
icon: mdiSelectionRemove,
- loadingName: '',
- status: this.printing_objects.length ? ['paused', 'printing'] : [],
+ loadingName: 'excludeObjectButton',
+ status: () => {
+ if (this.multiFunctionButton || this.printing_objects.length < 2) return false
+
+ return ['paused', 'printing'].includes(this.printer_state)
+ },
+ click: this.btnExcludeObject,
+ },
+ {
+ text: this.$t('Panels.StatusPanel.PauseAtLayer.PauseAtLayer'),
+ color: 'warning',
+ icon: mdiLayersPlus,
+ loadingName: 'pauseAtLayer',
+ status: () => {
+ if (this.multiFunctionButton || this.layer_count === null) return false
+
+ return ['paused', 'printing'].includes(this.printer_state)
+ },
click: this.btnExcludeObject,
},
{
@@ -205,7 +250,7 @@ export default class StatusPanel extends Mixins(BaseMixin) {
color: 'primary',
icon: mdiBroom,
loadingName: 'statusPrintClear',
- status: ['error', 'complete', 'cancelled'],
+ status: () => ['error', 'complete', 'cancelled'].includes(this.printer_state),
click: this.btnClearJob,
},
{
@@ -213,16 +258,14 @@ export default class StatusPanel extends Mixins(BaseMixin) {
color: 'primary',
icon: mdiPrinter,
loadingName: 'statusPrintReprint',
- status: ['error', 'complete', 'cancelled'],
+ status: () => ['error', 'complete', 'cancelled'].includes(this.printer_state),
click: this.btnReprintJob,
},
]
}
get filteredToolbarButtons() {
- return this.toolbarButtons.filter((button) => {
- return button.status.includes(this.printer_state)
- })
+ return this.toolbarButtons.filter((button) => button.status())
}
get printing_objects() {
@@ -237,6 +280,41 @@ export default class StatusPanel extends Mixins(BaseMixin) {
return this.$store.state.printer.print_stats?.message ?? ''
}
+ get layer_count() {
+ return this.$store.state.printer.print_stats?.info?.total_layer ?? null
+ }
+
+ get multiFunctionMenuButtons() {
+ return [
+ {
+ text: this.$t('Panels.StatusPanel.ExcludeObject.ExcludeObject'),
+ loadingName: 'excludeObjectButton',
+ icon: mdiSelectionRemove,
+ status: () => this.printing_objects.length > 1,
+ disabled: () => ['paused', 'printing'].includes(this.printer_state),
+ click: this.btnExcludeObject,
+ },
+ {
+ text: this.$t('Panels.StatusPanel.PauseAtLayer.PauseAtLayer'),
+ loadingName: 'pauseAtLayer',
+ icon: mdiLayersPlus,
+ status: () => this.layer_count !== null,
+ disabled: () => ['paused', 'printing'].includes(this.printer_state),
+ click: this.btnPauseAtLayer,
+ },
+ ]
+ }
+
+ get multiFunctionMenuButtonsFiltered() {
+ return this.multiFunctionMenuButtons.filter((button) => button.status)
+ }
+
+ get multiFunctionButton() {
+ if (!['paused', 'printing'].includes(this.printer_state)) return false
+
+ return this.multiFunctionMenuButtonsFiltered.length > 1
+ }
+
mounted() {
if (this.current_filename !== '') this.activeTab = 'status'
}
@@ -269,6 +347,10 @@ export default class StatusPanel extends Mixins(BaseMixin) {
this.boolShowObjects = true
}
+ btnPauseAtLayer() {
+ this.boolShowPauseAtLayer = true
+ }
+
btnCancelJob() {
this.$socket.emit('printer.print.cancel', {}, { loading: 'statusPrintCancel' })
}
diff --git a/src/locales/de.json b/src/locales/de.json
index 49af68fd..ebd3bca6 100644
--- a/src/locales/de.json
+++ b/src/locales/de.json
@@ -587,6 +587,18 @@
"Layer": "Schicht",
"Max": "max",
"ObjectHeight": "Objekthöhe",
+ "PauseAtLayer": {
+ "Abort": "abbrechen",
+ "Accept": "akzeptieren",
+ "AtLayer": "bei Schicht",
+ "Call": "Ausführen",
+ "DescriptionPauseAtLayerActive": "Diese Funktion ist bereits aktiv und wird \"{call}\" bei Schicht {layer} ausführen. Wenn der Befehl nochmal ausgeführt wird, werden die Einstellungen überschreiben.",
+ "DescriptionPauseNextLayerActive": "Diese Funktion ist bereits aktiv und bei der nächsten Schicht wird \"{call}\" ausgeführt.",
+ "Layer": "Schicht",
+ "NextLayer": "nächste Schicht",
+ "PauseAtLayer": "Pause bei Schicht",
+ "Type": "Art"
+ },
"PausePrint": "Druck pausieren",
"Print": "Druck",
"PrintTime": "Druckzeit",
diff --git a/src/locales/en.json b/src/locales/en.json
index 23923fbc..110f8507 100644
--- a/src/locales/en.json
+++ b/src/locales/en.json
@@ -604,6 +604,18 @@
"Layer": "Layer",
"Max": "max",
"ObjectHeight": "Object Height",
+ "PauseAtLayer": {
+ "Abort": "abort",
+ "Accept": "accept",
+ "AtLayer": "at Layer",
+ "Call": "Call",
+ "DescriptionPauseAtLayerActive": "This function is already active and will call \"{call}\" at layer {layer}. If you call the command again, these settings will be overwritten.",
+ "DescriptionPauseNextLayerActive": "This function is already active and will call \"{call}\" at the next layer.",
+ "Layer": "Layer",
+ "NextLayer": "next Layer",
+ "PauseAtLayer": "Pause at Layer",
+ "Type": "Type"
+ },
"PausePrint": "Pause print",
"Print": "Print",
"PrintTime": "Print Time",