mirror of
https://github.com/tiennm99/coolify.git
synced 2026-10-14 14:17:18 +00:00
Improve upgrade process UX with better progress visibility
- Add step-by-step progress indicator (Preparing → Helper → Image → Restart) - Display elapsed time during upgrade (MM:SS format) - Show version transition in header (v4.0.0-beta.454 → v4.0.0-beta.456) - Add expandable changelog preview before upgrading - Reduce reload delay from 5s to 3s with countdown timer - Add "Reload Now" button to skip countdown - Improve status messages with step-specific descriptions - Add success state with clear indication when upgrade completes - Create new upgrade-progress component for visual step tracking 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
dafd10d8fa
commit
92326c09ea
3 files changed
+398
-48
No files matched your search
@@ -4,6 +4,7 @@ namespace App\Livewire;
|
||||
|
||||
use App\Actions\Server\UpdateCoolify;
|
||||
use App\Models\InstanceSettings;
|
||||
use App\Services\ChangelogService;
|
||||
use Livewire\Component;
|
||||
|
||||
class Upgrade extends Component
|
||||
@@ -14,21 +15,57 @@ class Upgrade extends Component
|
||||
|
||||
public string $latestVersion = '';
|
||||
|
||||
public string $currentVersion = '';
|
||||
|
||||
public array $changelogEntries = [];
|
||||
|
||||
protected $listeners = ['updateAvailable' => 'checkUpdate'];
|
||||
|
||||
public function mount()
|
||||
{
|
||||
$this->currentVersion = config('constants.coolify.version');
|
||||
}
|
||||
|
||||
public function checkUpdate()
|
||||
{
|
||||
try {
|
||||
$this->latestVersion = get_latest_version_of_coolify();
|
||||
$this->currentVersion = config('constants.coolify.version');
|
||||
$this->isUpgradeAvailable = data_get(InstanceSettings::get(), 'new_version_available', false);
|
||||
if (isDev()) {
|
||||
$this->isUpgradeAvailable = true;
|
||||
}
|
||||
$this->loadChangelog();
|
||||
} catch (\Throwable $e) {
|
||||
return handleError($e, $this);
|
||||
}
|
||||
}
|
||||
|
||||
public function loadChangelog()
|
||||
{
|
||||
try {
|
||||
$service = app(ChangelogService::class);
|
||||
$currentVersion = str_replace('v', '', $this->currentVersion);
|
||||
|
||||
$this->changelogEntries = $service->getEntries(1)
|
||||
->filter(function ($entry) use ($currentVersion) {
|
||||
$entryVersion = str_replace('v', '', $entry->tag_name);
|
||||
|
||||
return version_compare($entryVersion, $currentVersion, '>');
|
||||
})
|
||||
->take(3)
|
||||
->map(fn ($entry) => [
|
||||
'tag_name' => $entry->tag_name,
|
||||
'title' => $entry->title,
|
||||
'content_html' => $entry->content_html,
|
||||
])
|
||||
->values()
|
||||
->toArray();
|
||||
} catch (\Throwable $e) {
|
||||
$this->changelogEntries = [];
|
||||
}
|
||||
}
|
||||
|
||||
public function upgrade()
|
||||
{
|
||||
try {
|
||||
|
||||
Reference in new issue
Block a user