fix(ui): add RecentItem type + ad protection while building items

This commit is contained in:
Edouard Vanbelle
2026-05-18 23:06:50 +02:00
parent 79a12018b1
commit 82561a2b90
3 changed files with 41 additions and 10 deletions
+19 -1
View File
@@ -14,7 +14,7 @@
//FIXME: rename into FolderItem
/**
* @typedef {Object} FolderItem
* @property {string} category
* @property {string} category (folder)
* @property {number} created_at - timestamp
* @property {string} icon_class
* @property {string} icon_special_class
@@ -105,6 +105,24 @@
* @property {String} size_formatted
*/
/**
* @typedef {Object} RecentItem
* @property {string} id
* @property {string} user_id
* @property {string} item_id /// ID of the favorited item (file or folder)
* @property {ItemTypeEnum} item_type
* @property {number} accessed_at
* @property {string|null} item_name: null if folder
* @property {number|null} item_size null if folder
* @property {string|null} item_mime_type if file
* @property {string|null} parent_id
* @property {String} item_path Full human-readable path (e.g. "Documents/Work" for a folder, "Documents/Work/report.pdf" for a file)
* @property {String} icon_class
* @property {String} icon_special_class
* @property {String} category
* @property {String} size_formatted
*/
/**
* @typedef {Object} TrashItem
* @property {string} id