update: if no backup site, show error message
This commit is contained in:
@@ -78,7 +78,7 @@ async function onUpdate() {
|
||||
const [error, result] = await appsModel.update(props.app.id, appData, skipBackup.value);
|
||||
if (error) {
|
||||
busyUpdate.value = false;
|
||||
if (error.status === 400) updateError.value = error.body ? error.body.message : 'Internal error';
|
||||
if (error.status !== 202) updateError.value = error.body ? error.body.message : 'Internal error';
|
||||
return console.error(error);
|
||||
}
|
||||
|
||||
@@ -89,6 +89,8 @@ async function onUpdate() {
|
||||
|
||||
function onAskUpdate() {
|
||||
busyUpdate.value = false;
|
||||
updateError.value = '';
|
||||
|
||||
dialog.value.open();
|
||||
}
|
||||
|
||||
@@ -121,6 +123,7 @@ onMounted(async () => {
|
||||
<div>{{ $t('app.updateDialog.changelogHeader', { version: app.updateInfo.manifest.version }) }}</div>
|
||||
<div class="changelog" v-html="marked.parse(app.updateInfo.manifest.changelog)"></div>
|
||||
<Checkbox class="skip-backup" v-model="skipBackup" :label="$t('app.updateDialog.skipBackupCheckbox')" />
|
||||
<div class="error-label" style="margin-top: 12px" v-if="updateError">{{ updateError }}</div>
|
||||
</div>
|
||||
</Dialog>
|
||||
|
||||
@@ -151,7 +154,6 @@ onMounted(async () => {
|
||||
<div class="changelog" v-html="marked.parse(app.updateInfo.manifest.changelog)"></div>
|
||||
|
||||
<div class="error-label" style="margin-top: 12px" v-if="!features.appUpdates">{{ $t('app.updateDialog.subscriptionExpired') }}</div>
|
||||
<div class="error-label" style="margin-top: 12px" v-if="updateError">{{ updateError }}</div>
|
||||
<div class="error-label" style="margin-top: 12px" v-if="app.updateInfo.unstable">{{ $t('app.updateDialog.unstableWarning') }}</div>
|
||||
</div>
|
||||
<br/>
|
||||
|
||||
Reference in New Issue
Block a user