fix: settings toggle to hide upload & print button doesnt work after store rework

Signed-off-by: Stefan Dej <meteyou@gmail.com>
This commit is contained in:
Stefan Dej 2021-12-20 22:54:25 +01:00
parent f8bbc5e97c
commit 9a8c208930
No known key found for this signature in database
GPG Key ID: 5D3A5823133D2246
4 changed files with 2 additions and 14 deletions

View File

@ -206,7 +206,7 @@ export default class TheTopbar extends Mixins(BaseMixin) {
} }
get boolHideUploadAndPrintButton() { get boolHideUploadAndPrintButton() {
return this.$store.state.gui.dashboard.boolHideUploadAndPrintButton ?? false return this.$store.state.gui.uiSettings.boolHideUploadAndPrintButton ?? false
} }
get sidebarLogo(): string { get sidebarLogo(): string {

View File

@ -224,7 +224,7 @@ export default class SettingsUiSettingsTab extends Mixins(BaseMixin) {
} }
set boolHideUploadAndPrintButton(newVal) { set boolHideUploadAndPrintButton(newVal) {
this.$store.dispatch('gui/toggleHideUploadAndPrintBtn', newVal) this.$store.dispatch('gui/saveSetting', {name: 'uiSettings.boolHideUploadAndPrintButton', value: newVal })
} }
clearColorObject(color: any): string { clearColorObject(color: any): string {

View File

@ -349,12 +349,4 @@ export const actions: ActionTree<GuiState, RootState> = {
value: newVal value: newVal
}) })
}, },
toggleHideUploadAndPrintBtn({commit, dispatch, state}, payload) {
commit('toggleHideUploadAndPrintBtn', payload)
dispatch('updateSettings', {
keyName: 'uiSettings.boolHideUploadAndPrintButton',
newVal: state.uiSettings.boolHideUploadAndPrintButton
})
}
} }

View File

@ -122,8 +122,4 @@ export const mutations: MutationTree<GuiState> = {
Vue.set(state.dashboard, 'lockedSliders', lockedSliders) Vue.set(state.dashboard, 'lockedSliders', lockedSliders)
} }
}, },
toggleHideUploadAndPrintBtn(state, payload) {
Vue.set(state.dashboard, 'boolHideUploadAndPrintButton', payload)
},
} }