feat(boxstore): add one-time download retention mode

Introduce a `one-time` retention option and persist it on the manifest as `one_time_download`. One-time download boxes bypass retention expiry scheduling, force zip downloads, and reject download attempts until all files are complete to prevent partial retrievals.feat(boxstore): add one-time download retention mode

Introduce a `one-time` retention option and persist it on the manifest as `one_time_download`. One-time download boxes bypass retention expiry scheduling, force zip downloads, and reject download attempts until all files are complete to prevent partial retrievals.
This commit is contained in:
2026-04-28 19:41:23 +03:00
parent f1600faa8d
commit 9dececcc7d
7 changed files with 116 additions and 22 deletions

View File

@@ -1,5 +1,6 @@
const boxPanel = document.querySelector(".box-panel[data-box-id]");
const boxStatus = document.querySelector(".box-statusbar span:first-child");
const zipOnly = boxPanel && boxPanel.dataset.zipOnly === "true";
document.querySelectorAll('.box-file[aria-disabled="true"]').forEach((item) => {
item.addEventListener("click", (event) => {
@@ -27,7 +28,7 @@ function updateBoxFile(file) {
item.dataset.status = file.status;
item.title = file.title;
if (isComplete) {
if (isComplete && !zipOnly) {
item.href = file.download_path;
item.setAttribute("download", "");
item.removeAttribute("aria-disabled");