fix: only set s3DownloadedFile when download actually completes

The s3DownloadedFile was being set immediately when download started,
causing the "Restore" button to appear while still downloading and
the download message to not hide properly.

- Remove immediate setting of s3DownloadedFile in downloadFromS3()
- Set s3DownloadedFile only in handleS3DownloadFinished() event handler
- Add broadcastWith() to S3DownloadFinished to send downloadPath
- Store downloadPath as public property for broadcasting
- Now download message hides and restore button shows only when complete

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

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Andras Bacsai
2025-11-02 18:27:44 +01:00
parent 8e273dd799
commit 91d752f906
3 changed files with 22 additions and 6 deletions

View File

@@ -151,7 +151,8 @@
<div class="text-sm text-warning">Downloading from S3... This may take a few minutes for large
backups.</div>
@if ($s3DownloadInProgress)
<livewire:activity-monitor wire:key="s3-download-{{ $resource->uuid }}" header="S3 Download Progress" :showWaiting="false" />
<livewire:activity-monitor wire:key="s3-download-{{ $resource->uuid }}" header="S3 Download Progress"
:showWaiting="false" />
@endif
</div>
@@ -176,7 +177,8 @@
</div>
@if ($importRunning)
<div class="container w-full mx-auto">
<livewire:activity-monitor wire:key="database-restore-{{ $resource->uuid }}" header="Database Restore Output" :showWaiting="false" />
<livewire:activity-monitor wire:key="database-restore-{{ $resource->uuid }}" header="Database Restore Output"
:showWaiting="false" />
</div>
@endif
@else