5555 :disabled =" !klippyReady || printerPrinting"
5656 small
5757 class =" me-1 my-1"
58- :color =" forceMove ? 'error' : undefined"
58+ :color =" forceMoveEnabled ? 'error' : undefined"
5959 @click =" toggleForceMove"
6060 >
6161 FORCE_MOVE
131131 </template >
132132
133133 <toolhead />
134-
135- <manual-probe-dialog
136- v-if =" manualProbeDialogOpen"
137- v-model =" manualProbeDialogOpen"
138- />
139-
140- <bed-screws-adjust-dialog
141- v-if =" bedScrewsAdjustDialogOpen"
142- v-model =" bedScrewsAdjustDialogOpen"
143- />
144-
145- <screws-tilt-adjust-dialog
146- v-if =" screwsTiltAdjustDialogOpen"
147- v-model =" screwsTiltAdjustDialogOpen"
148- />
149134 </collapsable-card >
150135</template >
151136
152137<script lang="ts">
153- import { Component , Mixins , Prop , Watch } from ' vue-property-decorator'
138+ import { Component , Mixins , Prop } from ' vue-property-decorator'
154139import StateMixin from ' @/mixins/state'
155140import ToolheadMixin from ' @/mixins/toolhead'
156141import Toolhead from ' ./Toolhead.vue'
@@ -170,10 +155,6 @@ type Tool = {
170155 }
171156})
172157export default class ToolheadCard extends Mixins (StateMixin , ToolheadMixin ) {
173- manualProbeDialogOpen = false
174- bedScrewsAdjustDialogOpen = false
175- screwsTiltAdjustDialogOpen = false
176-
177158 @Prop ({ type: Boolean })
178159 readonly menuCollapsed? : boolean
179160
@@ -383,59 +364,9 @@ export default class ToolheadCard extends Mixins(StateMixin, ToolheadMixin) {
383364 return this .$store .getters [' printer/getHasRoundBed' ] as boolean
384365 }
385366
386- get showManualProbeDialogAutomatically (): boolean {
387- return this .$store .state .config .uiSettings .general .showManualProbeDialogAutomatically
388- }
389-
390- get showBedScrewsAdjustDialogAutomatically (): boolean {
391- return this .$store .state .config .uiSettings .general .showBedScrewsAdjustDialogAutomatically
392- }
393-
394- get showScrewsTiltAdjustDialogAutomatically (): boolean {
395- return this .$store .state .config .uiSettings .general .showScrewsTiltAdjustDialogAutomatically
396- }
397-
398- get forceMove (): boolean {
399- return this .$store .state .config .uiSettings .toolhead .forceMove
400- }
401-
402- @Watch (' isManualProbeActive' )
403- onIsManualProbeActive (value : boolean ) {
404- if (
405- value &&
406- this .showManualProbeDialogAutomatically &&
407- this .klippyReady &&
408- ! this .printerPrinting
409- ) {
410- this .manualProbeDialogOpen = true
411- }
412- }
413-
414- @Watch (' isBedScrewsAdjustActive' )
415- onIsBedScrewsAdjustActive (value : boolean ) {
416- if (
417- value &&
418- this .showBedScrewsAdjustDialogAutomatically &&
419- this .klippyReady &&
420- ! this .printerPrinting
421- ) {
422- this .bedScrewsAdjustDialogOpen = true
423- }
424- }
425-
426- @Watch (' hasScrewsTiltAdjustResults' )
427- onHasScrewsTiltAdjustResults (value : boolean ) {
428- this .screwsTiltAdjustDialogOpen = (
429- value &&
430- this .showScrewsTiltAdjustDialogAutomatically &&
431- this .klippyReady &&
432- ! this .printerPrinting
433- )
434- }
435-
436367 async toggleForceMove () {
437368 const result = (
438- this .forceMove ||
369+ this .forceMoveEnabled ||
439370 ! this .$store .state .config .uiSettings .general .forceMoveToggleWarning ||
440371 await this .$confirm (
441372 this .$tc (' app.general.simple_form.msg.confirm_forcemove_toggle' ),
@@ -444,11 +375,7 @@ export default class ToolheadCard extends Mixins(StateMixin, ToolheadMixin) {
444375 )
445376
446377 if (result ) {
447- this .$store .dispatch (' config/saveByPath' , {
448- path: ' uiSettings.toolhead.forceMove' ,
449- value: ! this .forceMove ,
450- server: false
451- })
378+ this .$store .dispatch (' printer/forceMoveEnabled' , ! this .forceMoveEnabled )
452379 }
453380 }
454381}
0 commit comments