web: better status reports when taking backups in background

This commit is contained in:
Abdullah Atta
2024-07-26 15:21:13 +05:00
committed by Abdullah Atta
parent b938c58b67
commit 68fdbcb7fc

View File

@@ -134,7 +134,9 @@ export async function createBackup(
if (output.type === "file") {
const file = output;
report({
text: `Saving file ${file.path}`
text: background
? `Creating backup (${file.path})`
: `Saving file ${file.path}`
});
controller.enqueue({
path: file.path,
@@ -142,7 +144,9 @@ export async function createBackup(
});
} else if (output.type === "attachment") {
report({
text: `Saving attachment ${output.hash}`,
text: background
? `Creating backup (${output.hash})`
: `Saving attachment ${output.hash}`,
total: output.total,
current: output.current
});