diff options
| author | Henry Jameson <me@hjkos.com> | 2023-03-22 18:57:23 +0200 |
|---|---|---|
| committer | Henry Jameson <me@hjkos.com> | 2023-03-22 18:57:23 +0200 |
| commit | ece69f01b790b4bc02387d31ca911a0588e0664c (patch) | |
| tree | 5913d4d2054667f05f18c88fff7aa4286fc21b3b /src/components/settings_modal/settings_modal.js | |
| parent | 91534172027a587c7cab2cd3bedc51c1e24905ef (diff) | |
added mass-draft-push and mass-draft-reset, small stylistic fixes
Diffstat (limited to 'src/components/settings_modal/settings_modal.js')
| -rw-r--r-- | src/components/settings_modal/settings_modal.js | 14 |
1 files changed, 13 insertions, 1 deletions
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 + ) } } } |
