From a632634218e5d1cd9bebdbf697c75064bb8416be Mon Sep 17 00:00:00 2001 From: Alicia Sykes Date: Sat, 29 May 2021 23:00:06 +0100 Subject: [PATCH] Launch backup sync menu from config menu --- src/components/Settings/ConfigLauncher.vue | 11 ++++------- src/utils/defaults.js | 4 ++++ 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/src/components/Settings/ConfigLauncher.vue b/src/components/Settings/ConfigLauncher.vue index 3a458dfe..d3f311b8 100644 --- a/src/components/Settings/ConfigLauncher.vue +++ b/src/components/Settings/ConfigLauncher.vue @@ -27,16 +27,13 @@ import IconSpanner from '@/assets/interface-icons/config-editor.svg'; import IconCloud from '@/assets/interface-icons/cloud-backup-restore.svg'; import ConfigContainer from '@/components/Configuration/ConfigContainer'; import CloudBackupRestore from '@/components/Configuration/CloudBackupRestore'; -import { topLevelConfKeys, localStorageKeys } from '@/utils/defaults'; +import { topLevelConfKeys, localStorageKeys, modalNames } from '@/utils/defaults'; export default { name: 'ConfigLauncher', data() { return { - modalNames: { - CONF_EDITOR: 'CONF_EDITOR', - CLOUD_BACKUP: 'CLOUD_BACKUP', - }, + modalNames, }; }, components: { @@ -52,11 +49,11 @@ export default { }, methods: { showEditor: function show() { - this.$modal.show(this.modalNames.CONF_EDITOR); + this.$modal.show(modalNames.CONF_EDITOR); this.$emit('modalChanged', true); }, showCloudModal: function show() { - this.$modal.show(this.modalNames.CLOUD_BACKUP); + this.$modal.show(modalNames.CLOUD_BACKUP); this.$emit('modalChanged', true); }, combineConfig() { diff --git a/src/utils/defaults.js b/src/utils/defaults.js index 0c3bac44..fc627c4b 100644 --- a/src/utils/defaults.js +++ b/src/utils/defaults.js @@ -50,6 +50,10 @@ module.exports = { BACKUP_ID: 'backupId', BACKUP_HASH: 'backupHash', }, + modalNames: { + CONF_EDITOR: 'CONF_EDITOR', + CLOUD_BACKUP: 'CLOUD_BACKUP', + }, topLevelConfKeys: { PAGE_INFO: 'pageInfo', APP_CONFIG: 'appConfig',