fix(ui): Initialize latestVersion in Upgrade component mount

The upgrade modal was displaying "0.0.0" as the target version because
$latestVersion was not initialized during component mount. The Blade
template rendered before Alpine's x-init could populate the value.

Fixed by calling get_latest_version_of_coolify() in mount() to ensure
the version is available at initial render time.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
This commit is contained in:
Andras Bacsai 2025-12-26 12:02:24 +01:00
parent 9a1020d5be
commit 50b589aeff

View file

@ -24,6 +24,7 @@ class Upgrade extends Component
public function mount()
{
$this->currentVersion = config('constants.coolify.version');
$this->latestVersion = get_latest_version_of_coolify();
$this->devMode = isDev();
}