vue translation does not support JS logic in templates

This is anyways probably for the best
This commit is contained in:
Johannes Zellner
2025-02-06 21:02:07 +01:00
parent e608257c1a
commit 96f60caa77
5 changed files with 9 additions and 5 deletions

View File

@@ -202,6 +202,7 @@ async function onRestoreSubmit() {
if (error.type === 'externally_exists') {
restoreNeedsOverwrite.value = true;
} else {
restoreError.value.generic = error.body ? error.body.message : 'Internal error';
console.error(error);
}
restoreBusy.value = false;
@@ -242,13 +243,14 @@ onMounted(async () => {
:title="$t('backups.restoreArchiveDialog.title')"
reject-style="secondary"
:reject-label="restoreBusy ? '' : $t('main.dialog.cancel')"
:confirm-label="$t('backups.restoreArchiveDialog.restoreAction', { dnsOverwrite: restoreNeedsOverwrite })"
:confirm-label="$t(restoreNeedsOverwrite ? 'backups.restoreArchiveDialog.restoreActionOverwrite' : 'backups.restoreArchiveDialog.restoreAction')"
:confirm-busy="restoreBusy"
:confirm-active="!restoreBusy"
@confirm="onRestoreSubmit()"
>
<p v-html="$t('backups.restoreArchiveDialog.description', { appId: restoreManifest.id, fqdn: restoreFqdn, creationTime: prettyLongDate(restoreArchive.creationTime) })"></p>
<div class="text-danger" v-show="restoreError.generic">{{ restoreError.generic }}</div>
<!-- <div ng-show="archiveRestore.error.location.fqdn === archiveRestore.subdomain + '.' + archiveRestore.domain.domain"><small>{{ archiveRestore.error.location.message }}</small></div> -->
<form @submit.prevent="onRestoreSubmit()" autocomplete="off">

View File

@@ -44,7 +44,7 @@ function create() {
};
}));
for (const domain in allDomains) {
for (const domain of allDomains) {
const [error, result] = await domainsModel.checkRecords(domain.domain, domain.subdomain);
if (error) return [error];

View File

@@ -107,6 +107,7 @@ function create() {
}
if (error || result.status !== 200) return [error || result];
return [null, result.body];
},
};
}