Wait for rest calls on app uninstall and archive
This commit is contained in:
@@ -26,11 +26,14 @@ async function onUninstall() {
|
||||
confirmLabel: t('app.uninstallDialog.uninstallAction'),
|
||||
rejectLabel: t('main.dialog.cancel'),
|
||||
rejectStyle: 'secondary',
|
||||
autoCloseOnConfirm: false,
|
||||
});
|
||||
|
||||
if (!yes) return;
|
||||
|
||||
const [error] = await appsModel.uninstall(props.app.id);
|
||||
inputDialog.value.close();
|
||||
|
||||
if (error) return console.error(error);
|
||||
|
||||
window.location.href = '/#/apps';
|
||||
@@ -44,12 +47,15 @@ async function onArchive() {
|
||||
message: t('app.archiveDialog.description', { app: (props.app.label || props.app.fqdn), date: prettyLongDate(latestBackup.value.creationTime) }),
|
||||
confirmStyle: 'danger',
|
||||
confirmLabel: t('app.archive.action'),
|
||||
rejectLabel: t('main.dialog.cancel')
|
||||
rejectLabel: t('main.dialog.cancel'),
|
||||
autoCloseOnConfirm: false,
|
||||
});
|
||||
|
||||
if (!yes) return;
|
||||
|
||||
const [error] = await appsModel.archive(props.app.id, latestBackup.value.id);
|
||||
inputDialog.value.close();
|
||||
|
||||
if (error) return console.error(error);
|
||||
|
||||
window.location.href = '/#/apps';
|
||||
|
||||
Reference in New Issue
Block a user