feat: add options to disable klipper helper dialogs (#1319)
This commit is contained in:
1 parent
40e8f9cd63
commit
74816c5c21
7 files changed
+84
No files matched your search
@@ -83,11 +83,17 @@ export default class TheBedScrewsDialog extends Mixins(BaseMixin, ControlMixin)
|
||||
mdiCloseThick = mdiCloseThick
|
||||
|
||||
get showDialog() {
|
||||
if (!this.boolBedScrewsDialog) return false
|
||||
|
||||
const is_active = this.$store.state.printer.bed_screws?.is_active ?? false
|
||||
|
||||
return is_active && this.homedAxes.includes('xyz')
|
||||
}
|
||||
|
||||
get boolBedScrewsDialog() {
|
||||
return this.$store.state.gui.uiSettings.boolBedScrewsDialog ?? true
|
||||
}
|
||||
|
||||
get config() {
|
||||
return this.$store.state.printer.configfile?.settings?.bed_screws ?? {}
|
||||
}
|
||||
|
||||
@@ -120,9 +120,15 @@ export default class TheManualProbeDialog extends Mixins(BaseMixin) {
|
||||
mdiCloseThick = mdiCloseThick
|
||||
|
||||
get showDialog() {
|
||||
if (!this.boolManualProbeDialog) return false
|
||||
|
||||
return this.$store.state.printer.manual_probe?.is_active ?? false
|
||||
}
|
||||
|
||||
get boolManualProbeDialog() {
|
||||
return this.$store.state.gui.uiSettings.boolManualProbeDialog ?? true
|
||||
}
|
||||
|
||||
get offsetsZ() {
|
||||
const offsets = [1, 0.1, 0.05, 0.01, 0.005]
|
||||
|
||||
|
||||
@@ -53,15 +53,29 @@ import TheScrewsTiltAdjustDialogEntry from '@/components/dialogs/TheScrewsTiltAd
|
||||
export default class TheScrewsTiltAdjustDialog extends Mixins(BaseMixin, ControlMixin) {
|
||||
mdiArrowCollapseDown = mdiArrowCollapseDown
|
||||
mdiCloseThick = mdiCloseThick
|
||||
|
||||
get state() {
|
||||
return this.$store.state.printer.screws_tilt_adjust ?? {}
|
||||
}
|
||||
|
||||
get error() {
|
||||
return this.$store.state.printer.screws_tilt_adjust?.error ?? false
|
||||
}
|
||||
|
||||
get results() {
|
||||
return this.$store.state.printer.screws_tilt_adjust?.results ?? {}
|
||||
}
|
||||
|
||||
get showDialog() {
|
||||
if (!this.boolScrewsTiltAdjustDialog) return false
|
||||
|
||||
return this.error || Object.keys(this.results).length
|
||||
}
|
||||
|
||||
get boolScrewsTiltAdjustDialog() {
|
||||
return this.$store.state.gui.uiSettings.boolScrewsTiltAdjustDialog ?? true
|
||||
}
|
||||
|
||||
clearScrewsTiltAdjust() {
|
||||
this.$store.dispatch('printer/clearScrewsTiltAdjust')
|
||||
}
|
||||
|
||||
@@ -162,6 +162,27 @@
|
||||
:dynamic-slot-width="true">
|
||||
<v-switch v-model="disableFanAnimation" hide-details class="mt-0" />
|
||||
</settings-row>
|
||||
<v-divider class="my-2"></v-divider>
|
||||
<settings-row
|
||||
:title="$t('Settings.UiSettingsTab.ManualProbeDialog').toString()"
|
||||
:sub-title="$t('Settings.UiSettingsTab.ManualProbeDialogDescription').toString()"
|
||||
:dynamic-slot-width="true">
|
||||
<v-switch v-model="boolManualProbeDialog" hide-details class="mt-0" />
|
||||
</settings-row>
|
||||
<v-divider class="my-2"></v-divider>
|
||||
<settings-row
|
||||
:title="$t('Settings.UiSettingsTab.BedScrewsDialog').toString()"
|
||||
:sub-title="$t('Settings.UiSettingsTab.BedScrewsDialogDescription').toString()"
|
||||
:dynamic-slot-width="true">
|
||||
<v-switch v-model="boolBedScrewsDialog" hide-details class="mt-0" />
|
||||
</settings-row>
|
||||
<v-divider class="my-2"></v-divider>
|
||||
<settings-row
|
||||
:title="$t('Settings.UiSettingsTab.ScrewsTiltAdjustDialog').toString()"
|
||||
:sub-title="$t('Settings.UiSettingsTab.ScrewsTiltAdjustDialogDescription').toString()"
|
||||
:dynamic-slot-width="true">
|
||||
<v-switch v-model="boolScrewsTiltAdjustDialog" hide-details class="mt-0" />
|
||||
</settings-row>
|
||||
</v-card-text>
|
||||
</v-card>
|
||||
</div>
|
||||
@@ -336,6 +357,30 @@ export default class SettingsUiSettingsTab extends Mixins(BaseMixin) {
|
||||
this.$store.dispatch('gui/saveSetting', { name: 'uiSettings.disableFanAnimation', value: newVal })
|
||||
}
|
||||
|
||||
get boolManualProbeDialog() {
|
||||
return this.$store.state.gui.uiSettings.boolManualProbeDialog ?? true
|
||||
}
|
||||
|
||||
set boolManualProbeDialog(newVal) {
|
||||
this.$store.dispatch('gui/saveSetting', { name: 'uiSettings.boolManualProbeDialog', value: newVal })
|
||||
}
|
||||
|
||||
get boolBedScrewsDialog() {
|
||||
return this.$store.state.gui.uiSettings.boolBedScrewsDialog ?? true
|
||||
}
|
||||
|
||||
set boolBedScrewsDialog(newVal) {
|
||||
this.$store.dispatch('gui/saveSetting', { name: 'uiSettings.boolBedScrewsDialog', value: newVal })
|
||||
}
|
||||
|
||||
get boolScrewsTiltAdjustDialog() {
|
||||
return this.$store.state.gui.uiSettings.boolScrewsTiltAdjustDialog ?? true
|
||||
}
|
||||
|
||||
set boolScrewsTiltAdjustDialog(newVal) {
|
||||
this.$store.dispatch('gui/saveSetting', { name: 'uiSettings.boolScrewsTiltAdjustDialog', value: newVal })
|
||||
}
|
||||
|
||||
clearColorObject(color: any): string {
|
||||
if (typeof color === 'object' && 'hex' in color) color = color.hex
|
||||
if (color.length > 7) color = color.substr(0, 7)
|
||||
|
||||
@@ -1014,6 +1014,8 @@
|
||||
"VariableFpsMinDescription": ""
|
||||
},
|
||||
"UiSettingsTab": {
|
||||
"BedScrewsDialog": "Bed Screws Dialog",
|
||||
"BedScrewsDialogDescription": "Display helper dialog for BED_SCREWS_ADJUST.",
|
||||
"BoolBigThumbnail": "Large thumbnail",
|
||||
"BoolBigThumbnailDescription": "Display a large thumbnail in the status panel during a print.",
|
||||
"BoolHideUploadAndPrintButton": "Hide Upload and Print Button",
|
||||
@@ -1036,6 +1038,8 @@
|
||||
"LockSlidersDelayDescription": "Sliders will lock after a given delay. If set to 0 or left blank, sliders will only lock on page change/reload.",
|
||||
"LockSlidersDescription": "Sliders on touchscreens need to be unlocked before changes are allowed.",
|
||||
"Logo": "Logo",
|
||||
"ManualProbeDialog": "Manual Probe Helper Dialog",
|
||||
"ManualProbeDialogDescription": "Display helper dialog for PROBE_CALIBRATE or Z_ENDSTOP_CALIBRATE.",
|
||||
"NavigationStyle": "Navigation style",
|
||||
"NavigationStyleDescription": "Change navigation appearance",
|
||||
"NavigationStyleIconsAndText": "Icons + Text",
|
||||
@@ -1043,6 +1047,9 @@
|
||||
"PowerDeviceName": "Printer power device",
|
||||
"PowerDeviceNameDescription": "Select which Moonraker power device should be used to power on the printer.",
|
||||
"Primary": "Primary",
|
||||
"ScrewsTiltAdjustDialog": "Screws Tilt Adjust Dialog",
|
||||
"ScrewsTiltAdjustDialogDescription": "Display helper dialog for SCREWS_TILT_CALCULATE.",
|
||||
"ShowWebcamInNavigation": "Show Webcam in navigation",
|
||||
"UiSettings": "UI-Settings"
|
||||
},
|
||||
"Update": "update",
|
||||
|
||||
@@ -160,6 +160,9 @@ export const getDefaultState = (): GuiState => {
|
||||
powerDeviceName: null,
|
||||
hideSaveConfigForBedMash: false,
|
||||
disableFanAnimation: false,
|
||||
boolManualProbeDialog: true,
|
||||
boolBedScrewsDialog: true,
|
||||
boolScrewsTiltAdjustDialog: true,
|
||||
},
|
||||
view: {
|
||||
blockFileUpload: false,
|
||||
|
||||
@@ -110,6 +110,9 @@ export interface GuiState {
|
||||
powerDeviceName: string | null
|
||||
hideSaveConfigForBedMash: boolean
|
||||
disableFanAnimation: boolean
|
||||
boolManualProbeDialog: boolean
|
||||
boolBedScrewsDialog: boolean
|
||||
boolScrewsTiltAdjustDialog: boolean
|
||||
}
|
||||
view: {
|
||||
blockFileUpload: boolean
|
||||
|
||||
Reference in new issue
Block a user