backupsites: show warning if no site is selected for automatic backups
This commit is contained in:
@@ -4,7 +4,7 @@ import { useI18n } from 'vue-i18n';
|
||||
const i18n = useI18n();
|
||||
const t = i18n.t;
|
||||
|
||||
import { ref, onMounted, useTemplateRef, reactive, inject } from 'vue';
|
||||
import { ref, onMounted, useTemplateRef, reactive, inject, computed } from 'vue';
|
||||
import { Button, ProgressBar, InputDialog } from '@cloudron/pankow';
|
||||
import { prettyLongDate } from '@cloudron/pankow/utils';
|
||||
import ActionBar from '../components/ActionBar.vue';
|
||||
@@ -34,6 +34,7 @@ const systemBackupList = useTemplateRef('systemBackupList');
|
||||
|
||||
const sites = ref([]);
|
||||
const busy = ref(true);
|
||||
const hasUpdateBackupSite = computed(() => sites.value.some(site => site.enableForUpdates));
|
||||
|
||||
const backupSiteAddDialog = useTemplateRef('backupSiteAddDialog');
|
||||
function onAdd() {
|
||||
@@ -296,10 +297,10 @@ onMounted(async () => {
|
||||
|
||||
<br/>
|
||||
|
||||
<div>
|
||||
<ProgressBar mode="indeterminate" v-if="busy" slim :show-label="false" />
|
||||
<div v-if="!busy && sites.length === 0" class="empty-placeholder">{{ $t('backup.sites.emptyPlaceholder') }}</div>
|
||||
<div class="backup-site" v-for="site in sites" :key="site.id">
|
||||
<ProgressBar mode="indeterminate" v-if="busy" slim :show-label="false" />
|
||||
<div class="warning-label" style="margin-bottom: 10px;" v-if="!busy && sites.length > 0 && !hasUpdateBackupSite">{{ $t('backup.sites.noAutomaticUpdateBackupWarning') }}</div>
|
||||
<div v-if="!busy && sites.length === 0" class="empty-placeholder">{{ $t('backup.sites.emptyPlaceholder') }}</div>
|
||||
<div class="backup-site" v-for="site in sites" :key="site.id">
|
||||
<div style="display: flex; align-items: start; margin-top: 6px;">
|
||||
<StateLED :busy="site.status.busy" :state="site.status.state"/>
|
||||
</div>
|
||||
@@ -359,7 +360,6 @@ onMounted(async () => {
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</Section>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user