@@ -39,7 +40,7 @@ class="absolute inset-0 w-full h-full bg-black/20 backdrop-blur-xs">
x-transition:leave="ease-in duration-100"
x-transition:leave-start="opacity-100 translate-y-0 sm:scale-100"
x-transition:leave-end="opacity-0 -translate-y-2 sm:scale-95"
- class="relative w-full py-6 border rounded-sm min-w-full lg:min-w-[36rem] max-w-fit bg-neutral-100 border-neutral-400 dark:bg-base px-7 dark:border-coolgray-300">
+ class="relative w-[48rem] max-w-[calc(100vw-2rem)] py-6 border rounded-sm bg-neutral-100 border-neutral-400 dark:bg-base px-7 dark:border-coolgray-300">
{{-- Header --}}
@@ -163,6 +164,12 @@ class="font-bold text-warning"> seconds...
class="w-24 dark:bg-coolgray-200 dark:hover:bg-coolgray-300">Cancel
+
+
+ Simulate
+
+
Upgrade Now
@@ -193,6 +200,39 @@ class="w-24 dark:bg-coolgray-200 dark:hover:bg-coolgray-300">Cancel
currentVersion: config.currentVersion || '',
latestVersion: config.latestVersion || '',
serviceDown: false,
+ devMode: config.devMode || false,
+ simulationInterval: null,
+
+ simulateUpgrade() {
+ if (!this.devMode) return;
+
+ this.showProgress = true;
+ this.currentStep = 1;
+ this.currentStatus = '[DEV] Starting simulated upgrade...';
+ this.startTimer();
+ this.upgradeComplete = false;
+ this.upgradeError = false;
+
+ const steps = [
+ { step: 1, status: '[DEV] Preparing upgrade environment...' },
+ { step: 2, status: '[DEV] Pulling helper image...' },
+ { step: 3, status: '[DEV] Pulling Coolify image...' },
+ { step: 4, status: '[DEV] Restarting services...' },
+ ];
+
+ let stepIndex = 0;
+ this.simulationInterval = setInterval(() => {
+ if (stepIndex < steps.length) {
+ this.currentStep = steps[stepIndex].step;
+ this.currentStatus = steps[stepIndex].status;
+ stepIndex++;
+ } else {
+ clearInterval(this.simulationInterval);
+ this.simulationInterval = null;
+ this.showSuccess();
+ }
+ }, 2000);
+ },
confirmed() {
this.showProgress = true;