diff --git a/apps/ui/src/routes/settings/coolify.svelte b/apps/ui/src/routes/settings/coolify.svelte
index 857a4aa63..26382641b 100644
--- a/apps/ui/src/routes/settings/coolify.svelte
+++ b/apps/ui/src/routes/settings/coolify.svelte
@@ -46,7 +46,8 @@
save: false,
remove: false,
proxyMigration: false,
- restart: false
+ restart: false,
+ rollback: false
};
let rollbackVersion = localStorage.getItem('lastVersion');
@@ -55,14 +56,20 @@
const sure = confirm(`Are you sure you want rollback Coolify to ${rollbackVersion}?`);
if (sure) {
try {
+ loading.rollback = true;
+ console.log('loading.rollback', loading.rollback);
if (dev) {
console.log('rolling back to', rollbackVersion);
await asyncSleep(4000);
return window.location.reload();
} else {
+ addToast({
+ message: 'Rollback started...',
+ type: 'success'
+ });
await post(`/update`, { type: 'update', latestVersion: rollbackVersion });
addToast({
- message: 'Update completed.
Waiting for the new version to start...',
+ message: 'Rollback completed.
Waiting for the new version to start...',
type: 'success'
});
@@ -89,7 +96,7 @@
} catch (error) {
return errorNotification(error);
} finally {
- loading.remove = false;
+ loading.rollback = false;
}
}
}
@@ -374,8 +381,11 @@
name="rollbackVersion"
id="rollbackVersion"
/>
- Rollback