Split backup site config and contents
This commit is contained in:
@@ -11,7 +11,8 @@ import Section from '../components/Section.vue';
|
||||
import StateLED from '../components/StateLED.vue';
|
||||
import BackupScheduleDialog from '../components/BackupScheduleDialog.vue';
|
||||
import BackupSiteAddDialog from '../components/BackupSiteAddDialog.vue';
|
||||
import BackupSiteEditDialog from '../components/BackupSiteEditDialog.vue';
|
||||
import BackupSiteContentDialog from '../components/BackupSiteContentDialog.vue';
|
||||
import BackupSiteConfigDialog from '../components/BackupSiteConfigDialog.vue';
|
||||
import SystemBackupList from '../components/SystemBackupList.vue';
|
||||
import { TASK_TYPES } from '../constants.js';
|
||||
import BackupSitesModel from '../models/BackupSitesModel.js';
|
||||
@@ -35,9 +36,9 @@ function onAdd() {
|
||||
backupSiteAddDialog.value.open();
|
||||
}
|
||||
|
||||
const backupSiteEditDialog = useTemplateRef('backupSiteEditDialog');
|
||||
function onEdit(site) {
|
||||
backupSiteEditDialog.value.open(site);
|
||||
const backupSiteContentDialog = useTemplateRef('backupSiteContentDialog');
|
||||
function onEditContent(site) {
|
||||
backupSiteContentDialog.value.open(site);
|
||||
}
|
||||
|
||||
const backupScheduleDialog = useTemplateRef('backupScheduleDialog');
|
||||
@@ -45,6 +46,11 @@ function onEditSchedule(site) {
|
||||
backupScheduleDialog.value.open(site);
|
||||
}
|
||||
|
||||
const backupSiteConfigDialog = useTemplateRef('backupSiteConfigDialog');
|
||||
function onEditConfig(site) {
|
||||
backupSiteConfigDialog.value.open(site);
|
||||
}
|
||||
|
||||
function prettyBackupSchedule(pattern) {
|
||||
if (!pattern) return '';
|
||||
|
||||
@@ -148,13 +154,18 @@ const actionMenuModel = ref([]);
|
||||
const actionMenuElement = useTemplateRef('actionMenuElement');
|
||||
function onActionMenu(site, event) {
|
||||
actionMenuModel.value = [{
|
||||
icon: 'fa-solid fa-pencil-alt',
|
||||
label: t('main.dialog.edit'),
|
||||
action: onEdit.bind(null, site),
|
||||
icon: 'fa-solid fa-box-open',
|
||||
// TODO translate
|
||||
label: 'Content',
|
||||
action: onEditContent.bind(null, site),
|
||||
}, {
|
||||
icon: 'fa-solid fa-clock',
|
||||
label: t('backups.schedule.title'),
|
||||
action: onEditSchedule.bind(null, site),
|
||||
}, {
|
||||
icon: 'fa-solid fa-pencil-alt',
|
||||
label: 'Config',
|
||||
action: onEditConfig.bind(null, site),
|
||||
}, {
|
||||
separator: true
|
||||
}, {
|
||||
@@ -256,7 +267,8 @@ onMounted(async () => {
|
||||
<Menu ref="actionMenuElement" :model="actionMenuModel" />
|
||||
<InputDialog ref="inputDialog" />
|
||||
<BackupSiteAddDialog ref="backupSiteAddDialog" @success="refresh()"/>
|
||||
<BackupSiteEditDialog ref="backupSiteEditDialog" @success="refresh()"/>
|
||||
<BackupSiteContentDialog ref="backupSiteContentDialog" @success="refresh()"/>
|
||||
<BackupSiteConfigDialog ref="backupSiteConfigDialog" @success="refresh()"/>
|
||||
<BackupScheduleDialog ref="backupScheduleDialog" @success="refresh()"/>
|
||||
|
||||
<Section :title="$t('backup.sites.title')">
|
||||
|
||||
Reference in New Issue
Block a user