Mark the file the folder download is on

During "Download all to a folder" the recipient saw only the file name
under the progress bar. The file's row in the list now shows the loading
indicator while it is on its way, and the list scrolls that row into
view, so a run through hundreds of files can be followed in the list.
The row is scrolled rather than the indicator, which is still hidden
when the run moves on to the file.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Andreas Reinhold / reini
2026-10-08 23:28:23 +02:00
co-authored by Claude Opus 5.5
parent 6578335568
commit 30a485f5d9
3 changed files with 52 additions and 2 deletions
@@ -105,7 +105,16 @@
<x-slot:description><span class="md-tabular">{{ Number::fileSize($file->file_size) }}</span></x-slot:description>
<x-slot:end>
<x-row gap="space100">
<span x-show="isDone({{ $file->id }})" x-cloak data-test="file-downloaded">
{{-- The file the folder download is on; its row, always shown, is brought into view in the list as it starts. --}}
<span
x-show="currentId === {{ $file->id }}"
x-effect="if (currentId === {{ $file->id }}) $el.closest('[data-md-list-item]').scrollIntoView({ block: 'nearest' })"
x-cloak
data-test="file-downloading"
>
<x-loading size="24" :label="__('Downloading')" />
</span>
<span x-show="isDone({{ $file->id }}) && currentId !== {{ $file->id }}" x-cloak data-test="file-downloaded">
<x-icon name="download_done" class="md-ink-success" :label="__('Downloaded')" />
</span>
<x-button icon="download" :link="route('share.download.file', [$share, $file])" no-wire-navigate :aria-label="__('Download :name', ['name' => $file->original_name])" x-on:click="downloaded = true; markDone({{ $file->id }})" />