feat(server): track upload status via manifest and /status API

- Persist per-box file metadata in a .warpbox.json manifest, including IDs and status fields (pending/uploading/complete/failed)
- Add GET /box/:id/status to return current file states for clients polling upload progress
- Update upload handling to mark failures and completion in the manifest and decorate responses
- Add CSS states for loading/failed files and disable interactions for unavailable itemsfeat(server): track upload status via manifest and /status API

- Persist per-box file metadata in a .warpbox.json manifest, including IDs and status fields (pending/uploading/complete/failed)
- Add GET /box/:id/status to return current file states for clients polling upload progress
- Update upload handling to mark failures and completion in the manifest and decorate responses
- Add CSS states for loading/failed files and disable interactions for unavailable items
This commit is contained in:
2026-04-27 17:33:52 +03:00
parent b69ec8b99f
commit 698166d23d
6 changed files with 547 additions and 28 deletions

View File

@@ -74,6 +74,28 @@
text-decoration: none;
}
.box-file.is-loading,
.box-file.is-failed {
color: #666666;
filter: grayscale(1);
}
.box-file.is-loading {
animation: box-loading-pulse 900ms steps(2, end) infinite;
}
.box-file.is-failed {
opacity: 0.58;
}
.box-file.is-failed .box-file-name::after {
content: " (failed)";
}
.box-file[aria-disabled="true"] {
cursor: default;
}
.box-file:hover,
.box-file:focus-visible {
color: #ffffff;
@@ -99,6 +121,16 @@
white-space: nowrap;
}
@keyframes box-loading-pulse {
0% {
opacity: 0.48;
}
100% {
opacity: 0.82;
}
}
.box-file-name {
font-size: 13px;
line-height: 13px;

View File

@@ -204,6 +204,11 @@
background: #f7f7f7;
}
.upload-file-row.is-uploading,
.upload-file-row.is-processing {
animation: upload-row-loading 900ms steps(2, end) infinite;
}
.upload-file-icon {
grid-row: 1 / 3;
width: 16px;
@@ -269,6 +274,16 @@
background: #800000;
}
@keyframes upload-row-loading {
0% {
background-color: #ffffff;
}
100% {
background-color: #e6e6e6;
}
}
.upload-actions {
display: flex;
justify-content: flex-end;