Fix a few lowhaning TODOs
This commit is contained in:
@@ -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'),
|
||||
|
||||
@@ -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'),
|
||||
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user