From ece69f01b790b4bc02387d31ca911a0588e0664c Mon Sep 17 00:00:00 2001 From: Henry Jameson Date: Wed, 22 Mar 2023 18:57:23 +0200 Subject: added mass-draft-push and mass-draft-reset, small stylistic fixes --- src/components/settings_modal/settings_modal.js | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'src/components/settings_modal/settings_modal.js') diff --git a/src/components/settings_modal/settings_modal.js b/src/components/settings_modal/settings_modal.js index e033d999..ff58f2c3 100644 --- a/src/components/settings_modal/settings_modal.js +++ b/src/components/settings_modal/settings_modal.js @@ -5,7 +5,7 @@ import getResettableAsyncComponent from 'src/services/resettable_async_component import Popover from '../popover/popover.vue' import Checkbox from 'src/components/checkbox/checkbox.vue' import { library } from '@fortawesome/fontawesome-svg-core' -import { cloneDeep } from 'lodash' +import { cloneDeep, isEqual } from 'lodash' import { newImporter, newExporter @@ -155,6 +155,12 @@ const SettingsModal = { PLEROMAFE_SETTINGS_MINOR_VERSION ] return clone + }, + resetAdminDraft () { + this.$store.commit('resetAdminDraft') + }, + pushAdminDraft () { + this.$store.dispatch('pushAdminDraft') } }, computed: { @@ -183,6 +189,12 @@ const SettingsModal = { set (value) { this.$store.dispatch('setOption', { name: 'expertLevel', value: value ? 1 : 0 }) } + }, + adminDraftAny () { + return !isEqual( + this.$store.state.adminSettings.config, + this.$store.state.adminSettings.draft + ) } } } -- cgit v1.2.3-70-g09d2