👔 Adds link to cloud backup and raw editor from edit menu

This commit is contained in:
Alicia Sykes 2021-11-07 21:03:46 +00:00
parent 807112c0de
commit da65ed36e8
1 changed files with 42 additions and 14 deletions

View File

@ -15,20 +15,6 @@
<p class="section-sub-title">
{{ $t('interactive-editor.menu.config-save-methods-subheading') }}
</p>
<Button
:click="openExportConfigMenu"
v-tooltip="tooltip($t('interactive-editor.menu.export-config-tooltip'))"
>
{{ $t('interactive-editor.menu.export-config-btn') }}
<ExportIcon />
</Button>
<Button
:click="reset"
v-tooltip="tooltip($t('interactive-editor.menu.cancel-changes-tooltip'))"
>
{{ $t('interactive-editor.menu.cancel-changes-btn') }}
<CancelIcon />
</Button>
<Button
:click="saveLocally"
v-tooltip="tooltip($t('interactive-editor.menu.save-locally-tooltip'))"
@ -43,6 +29,34 @@
{{ $t('interactive-editor.menu.save-disk-btn') }}
<SaveToDiskIcon />
</Button>
<Button
:click="openExportConfigMenu"
v-tooltip="tooltip($t('interactive-editor.menu.export-config-tooltip'))"
>
{{ $t('interactive-editor.menu.export-config-btn') }}
<ExportIcon />
</Button>
<Button
:click="openCloudBackupMenu"
v-tooltip="tooltip($t('interactive-editor.menu.cloud-backup-tooltip'))"
>
{{ $t('interactive-editor.menu.cloud-backup-btn') }}
<CloudBackupIcon />
</Button>
<Button
:click="openRawConfigEditor"
v-tooltip="tooltip($t('interactive-editor.menu.edit-raw-config-tooltip'))"
>
{{ $t('interactive-editor.menu.edit-raw-config-btn') }}
<EditRawIcon />
</Button>
<Button
:click="reset"
v-tooltip="tooltip($t('interactive-editor.menu.cancel-changes-tooltip'))"
>
{{ $t('interactive-editor.menu.cancel-changes-btn') }}
<CancelIcon />
</Button>
</div>
<!-- Open Modal Buttons -->
<div class="edit-banner-section edit-site-config-buttons">
@ -88,6 +102,8 @@ import ExportIcon from '@/assets/interface-icons/interactive-editor-export-chang
import CancelIcon from '@/assets/interface-icons/interactive-editor-cancel-changes.svg';
import AppConfigIcon from '@/assets/interface-icons/interactive-editor-app-config.svg';
import PageInfoIcon from '@/assets/interface-icons/interactive-editor-page-info.svg';
import CloudBackupIcon from '@/assets/interface-icons/cloud-backup-restore.svg';
import EditRawIcon from '@/assets/interface-icons/config-edit-json.svg';
export default {
name: 'EditModeSaveMenu',
@ -101,6 +117,8 @@ export default {
AppConfigIcon,
PageInfoIcon,
EditAppConfig,
CloudBackupIcon,
EditRawIcon,
},
computed: {
config() {
@ -131,6 +149,16 @@ export default {
this.$modal.show(modalNames.EDIT_APP_CONFIG);
this.$store.commit(StoreKeys.SET_MODAL_OPEN, true);
},
openCloudBackupMenu() {
this.$store.commit(StoreKeys.CONF_MENU_INDEX, 2);
this.$store.commit(StoreKeys.SET_MODAL_OPEN, true);
this.$modal.show(modalNames.CONF_EDITOR);
},
openRawConfigEditor() {
this.$store.commit(StoreKeys.CONF_MENU_INDEX, 1);
this.$store.commit(StoreKeys.SET_MODAL_OPEN, true);
this.$modal.show(modalNames.CONF_EDITOR);
},
tooltip(content) {
return { content, trigger: 'hover focus', delay: 250 };
},