fix(ui): show empty folders as move and download destinations (#999)

This commit is contained in:
Will Miao
2026-08-23 21:09:16 +08:00
parent 030a32f8fa
commit c2360a35ad
12 changed files with 630 additions and 19 deletions
+6 -2
View File
@@ -1206,9 +1206,13 @@ export class BaseModelApiClient {
}
}
async fetchUnifiedFolderTree() {
async fetchUnifiedFolderTree(options = {}) {
try {
const response = await fetch(this.apiConfig.endpoints.unifiedFolderTree);
const { includeEmpty = false } = options;
const url = includeEmpty
? `${this.apiConfig.endpoints.unifiedFolderTree}?include_empty=1`
: this.apiConfig.endpoints.unifiedFolderTree;
const response = await fetch(url);
if (!response.ok) {
throw new Error(`Failed to fetch unified folder tree`);
}