Fix a few lowhaning TODOs

This commit is contained in:
Johannes Zellner
2025-03-28 16:09:58 +01:00
parent 79093bf61c
commit 3df0e6fda1
7 changed files with 107 additions and 43 deletions

View File

@@ -94,7 +94,7 @@ function onReset() {
async function onRevokeToken(token) {
const yes = await inputDialog.value.confirm({
message: 'Really remove this token?', // TODO translate
message: t('profile.removeApiToken.title'),
modal: true,
confirmStyle: 'danger',
confirmLabel: t('main.dialog.yes'),

View File

@@ -101,7 +101,7 @@ function onCopyToClipboard(password) {
async function onRemove(id) {
const yes = await inputDialog.value.confirm({
message: 'Really remove this password?', // TODO translate
message: t('profile.removeAppPassword.title'),
modal: true,
confirmStyle: 'danger',
confirmLabel: t('main.dialog.yes'),

View File

@@ -122,15 +122,13 @@ async function refreshBackups() {
backups.value = result;
}
const startBackupError = ref('');
async function onStartBackup() {
const [error] = await backupsModel.create();
if (error) {
if (error.status === 409 && error.message.indexOf('full_backup') !== -1) {
// TODO
// $scope.createBackup.errorMessage = 'Backup already in progress. Please retry later.';
} else if (error.statusCode === 409) {
// TODO
// $scope.createBackup.errorMessage = 'App task is currently in progress. Please retry later.';
if (error.status === 409) {
if (error.body.message.indexOf('full_backup') !== -1) startBackupError.value = 'Backup already in progress. Please retry later.';
else startBackupError.value = 'App task is currently in progress. Please retry later.';
}
return console.error(error);
@@ -305,10 +303,10 @@ onMounted(async () => {
<div>{{ lastTask.message }}</div>
</div>
<!-- TODO show last task error message if any -->
<div class="button-bar">
<Button danger @click="onStopBackup()" v-if="lastTask.active">{{ $t('backups.listing.stopTask') }}</Button>
<Button @click="onStartBackup()" v-else>{{ $t('backups.listing.backupNow') }}</Button>
</div>
<div class="text-danger" v-if="startBackupError">{{ startBackupError }}</div>
</Section>
</template>