Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: wrong default path in moonraker db #843

Merged
merged 2 commits into from
May 25, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 24 additions & 4 deletions src/store/gui/actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,26 @@ export const actions: ActionTree<GuiState, RootState> = {
delete payload.value.remoteprinters
}

// delete currentPath if exists
if (
'view' in payload.value &&
'gcodefiles' in payload.value.view &&
'currentPath' in payload.value.view.gcodefiles
) {
window.console.debug('remove currentPath from gui namespace')
await fetch(mainsailUrl + '&key=view.gcodefiles.currentPath', { method: 'DELETE' })
}

// delete currentPath if exists
if (
'view' in payload.value &&
'configfiles' in payload.value.view &&
'currentPath' in payload.value.view.configfiles
) {
window.console.debug('remove currentPath from gui namespace')
await fetch(mainsailUrl + '&key=view.configfiles.currentPath', { method: 'DELETE' })
}

//update cooldownGcode from V2.0.1 to V2.1.0
if ('cooldownGcode' in payload.value) {
window.console.debug('update cooldownGcode to new namespace')
Expand Down Expand Up @@ -187,16 +207,16 @@ export const actions: ActionTree<GuiState, RootState> = {
setGcodefilesMetadata({ commit, dispatch, state }, data) {
commit('setGcodefilesMetadata', data)
dispatch('updateSettings', {
keyName: 'view.gcodefiles',
newVal: state.view.gcodefiles,
keyName: 'view.gcodefiles.hideMetadataColumns',
newVal: state.view.gcodefiles.hideMetadataColumns,
})
},

setGcodefilesShowHiddenFiles({ commit, dispatch, state }, data) {
commit('setGcodefilesShowHiddenFiles', data)
dispatch('updateSettings', {
keyName: 'view.gcodefiles',
newVal: state.view.gcodefiles,
keyName: 'view.gcodefiles.showHiddenFiles',
newVal: state.view.gcodefiles.showHiddenFiles,
})
},

Expand Down