fix: skipping empty email addresses

This commit is contained in:
2026-06-17 18:15:43 +08:00
parent 1166ee2e9e
commit 397bc4cd95
2 changed files with 8 additions and 6 deletions
+2 -2
View File
@@ -449,10 +449,10 @@ while (await new Promise(o => setTimeout(o, 1000, true))) {
$('#timezoneLabel').innerText = Temporal.Now.zonedDateTimeISO(locale.timezone).toLocaleString(locale.name);
let { done, skip, email, subject, recipient } = await Rpc2.invoke('progress').catch(() => new Object());
let index = done + skip;
let limit = minor || major - 1;
let chunk = $('#chunksize').valueAsNumber;
let total = $('#slice').checked ? Math.min(chunk, limit - chunk * $('#offset').valueAsNumber) : limit;
let index = $('#slice').checked ? done : done + skip;
$('#progressLabel').innerText = `${parseFloat(index / total * 100).toFixed(2)}% (${index}/${total})`;
$('#subjectLabel').innerText = subject ?? '';
@@ -463,7 +463,7 @@ while (await new Promise(o => setTimeout(o, 1000, true))) {
let rate = index / uptime;
let remaining = index ? Math.floor((total - index) / rate) : 0;
$('#remainingLabel').innerText = remaining ? `${Temporal.Duration.from({ seconds: remaining }).round({ largestUnit: 'hours' }).toLocaleString('en')} (${rate.toFixed(2)}/min)` : '';
$('#remainingLabel').innerText = remaining >= 0 ? `${Temporal.Duration.from({ seconds: remaining }).round({ largestUnit: 'hours' }).toLocaleString('en')} (${rate.toFixed(2)}/min)` : '';
break;
case 'STANDBY':
$('#send > span.text').innerText = 'Resume';