backups: fix formatting of preserved and label

This commit is contained in:
Girish Ramakrishnan
2026-01-14 10:38:48 +01:00
parent 790de8cfa6
commit 51c6c37ea6
2 changed files with 10 additions and 10 deletions
@@ -257,7 +257,7 @@ defineExpose({ refresh });
<TextInput id="backupLabelInput" v-model="editBackupLabel" />
</FormGroup>
<Checkbox v-model="editBackupPersist" :label="$t('backups.backupEdit.preserved.description')" />
<Checkbox v-model="editBackupPersist" :label="$t('backups.backupEdit.preserved.description')" help-url="https://docs.cloudron.io/backups#backup-labels"/>
<!-- <sup><a popover-placement="top-right" popover-trigger="outsideClick" uib-popover="{{ 'backups.backupEdit.preserved.tooltip' | tr: { appsLength: editBackup.backup.contents.length} }}"><i class="fa fa-question-circle"></i></a></sup> -->
</fieldset>
</form>
@@ -270,9 +270,9 @@ defineExpose({ refresh });
<TableView :columns="columns" :model="backups" :busy="busy" :placeholder="$t('backups.listing.noBackups')">
<template #creationTime="backup">
<div>
{{ prettyLongDate(backup.creationTime) }}
<span v-if="backup.preserveSecs === -1" class="text-muted"> Preserved</span>
<div v-if="backup.label"><b>{{ backup.label }}</b></div>
<span>{{ prettyLongDate(backup.creationTime) }}</span>
<span v-if="backup.label">&nbsp;<b>{{ backup.label }}</b></span>
<span>&nbsp;<i class="fa-solid fa-thumbtack text-muted" v-show="backup.preserveSecs === -1" v-tooltip="$t('backups.listing.tooltipPreservedBackup')"></i></span>
</div>
</template>
+6 -6
View File
@@ -5,7 +5,7 @@ const i18n = useI18n();
const t = i18n.t;
import { ref, onMounted, useTemplateRef } from 'vue';
import { Icon, Button, Switch, Checkbox, FormGroup, TextInput, TableView, Menu, Dialog, ProgressBar } from '@cloudron/pankow';
import { Button, Switch, Checkbox, FormGroup, TextInput, TableView, Menu, Dialog, ProgressBar } from '@cloudron/pankow';
import { prettyLongDate, prettyFileSize } from '@cloudron/pankow/utils';
import { API_ORIGIN, RSTATES } from '../../constants.js';
import { download } from '../../utils.js';
@@ -314,14 +314,14 @@ onMounted(async () => {
<div>
<form @submit.prevent="onEditSubmit()" autocomplete="off">
<fieldset :disabled="editBusy">
<p class="has-error" v-show="editError">{{ editError }}</p>
<div class="has-error" v-show="editError">{{ editError }}</div>
<FormGroup>
<label for="labelInput">{{ $t('backups.backupEdit.label') }}</label>
<TextInput v-model="editLabel" id="labelInput" />
</FormGroup>
<Checkbox v-model="editPersist" :label="$t('backups.backupEdit.preserved.description')"/>
<Checkbox v-model="editPersist" :label="$t('backups.backupEdit.preserved.description')" help-url="https://docs.cloudron.io/backups#backup-labels"/>
</fieldset>
</form>
</div>
@@ -392,9 +392,9 @@ onMounted(async () => {
<TableView :model="backups" :columns="columns" :busy="busy" :placeholder="$t('backups.listing.noBackups')" style="max-height: 400px;" >
<template #creationTime="backup">
<div>
{{ prettyLongDate(backup.creationTime) }}
<span v-if="backup.preserveSecs === -1" class="text-muted"> Preserved</span>
<div v-if="backup.label"><b>{{ backup.label }}</b></div>
<span>{{ prettyLongDate(backup.creationTime) }}</span>
<span v-if="backup.label">&nbsp;<b>{{ backup.label }}</b></span>
<span>&nbsp;<i class="fa-solid fa-thumbtack text-muted" v-show="backup.preserveSecs === -1" v-tooltip="$t('backups.listing.tooltipPreservedBackup')"></i></span>
</div>
</template>
<template #site="backup">