feat(asset): Recently Deleted previews, retention countdown, and version stack delete/restore (#418)

* feat(asset): improve Recently Deleted previews and retention indicators

- Include soft-deleted children when building folder previews for the
  Recently Deleted view, and resolve deleted version stacks to their
  latest version so a trashed folder shows what was inside it.
- Add a "days left" badge (clock + Nd) to file and folder cards in the
  Recently Deleted view, placed to the left of the comments badge.
- Fix an issue where deleting or restoring a version stack from the file
  list did nothing because the WebUI dropped version_stack items before
  calling the API.
- Share the 30-day trash retention window through TRASH_RETENTION_DAYS.

* test(asset): use typed MediaInfo in recently-deleted preview tests

Replace the explicit any cast with a fully typed MediaInfo object so the new tests comply with the no-explicit-any policy.
This commit is contained in:
Yiling-J
2026-09-19 11:36:14 +08:00
committed by GitHub
parent b52b2ce7d8
commit 09b65a1eb6
16 changed files with 695 additions and 25 deletions
+3
View File
@@ -1022,6 +1022,9 @@
"n_tasks_plural": "{count} tasks",
"n_days_ago_singular": "{count} day ago",
"n_days_ago_plural": "{count} days ago",
"days_left_short": "{count}d",
"n_days_left_singular": "{count} day left before permanent deletion",
"n_days_left_plural": "{count} days left before permanent deletion",
"today_with_time": "Today {time}",
"yesterday_with_time": "Yesterday {time}",
"n_items_singular": "{count} Item",
+3
View File
@@ -1022,6 +1022,9 @@
"n_tasks_plural": "{count} 个任务",
"n_days_ago_singular": "{count} 天前",
"n_days_ago_plural": "{count} 天前",
"days_left_short": "{count}天",
"n_days_left_singular": "永久删除前还剩 {count} 天",
"n_days_left_plural": "永久删除前还剩 {count} 天",
"today_with_time": "今天 {time}",
"yesterday_with_time": "昨天 {time}",
"n_items_singular": "{count} 个项目",