This commit is contained in:
Timothy Jaeryang Baek committed 2026-05-20 01:32:25 +04:00
1 parent 73bdf86766
commit 9835b3f1dd
1 file changed
+8 -2
@@ -678,7 +678,11 @@
); );
let uploadedCount = 0; let uploadedCount = 0;
for (const entry of filesToUpload) { const BATCH_SIZE = 3;
for (let i = 0; i < filesToUpload.length; i += BATCH_SIZE) {
const batch = filesToUpload.slice(i, i + BATCH_SIZE);
await Promise.all(
batch.map(async (entry) => {
uploadedCount++; uploadedCount++;
const displayPath = entry.path ? `${entry.path}/${entry.filename}` : entry.filename; const displayPath = entry.path ? `${entry.path}/${entry.filename}` : entry.filename;
syncing = $i18n.t('Uploading {{current}}/{{total}}: {{file}}', { syncing = $i18n.t('Uploading {{current}}/{{total}}: {{file}}', {
@@ -699,6 +703,8 @@
null, null,
false false
).catch(() => null); ).catch(() => null);
})
);
} }
// ── 6. Cleanup — remove deleted files + rmdir orphaned directories ── // ── 6. Cleanup — remove deleted files + rmdir orphaned directories ──
@@ -1374,7 +1380,7 @@
</div> </div>
{#if syncing} {#if syncing}
<div class="mx-2.5 mt-2"> <div class="mx-2.5 mt-2.5 -mb-0.5">
<div class="flex items-center gap-2.5 rounded-xl py-2 px-3 bg-gray-50 dark:bg-gray-850"> <div class="flex items-center gap-2.5 rounded-xl py-2 px-3 bg-gray-50 dark:bg-gray-850">
<Spinner className="size-3.5 shrink-0" /> <Spinner className="size-3.5 shrink-0" />
<div class="text-xs text-gray-500 dark:text-gray-400 truncate"> <div class="text-xs text-gray-500 dark:text-gray-400 truncate">