refactor(file|folder): separate etag and blob_hash
This commit is contained in:
@@ -25,6 +25,7 @@
|
||||
* @property {string} owner_id
|
||||
* @property {string|null} parent_id the folder parent (null if is_root)
|
||||
* @property {string} path the full path
|
||||
* @property {string} etag opaque HTTP ETag, for If-Match / If-None-Match
|
||||
*/
|
||||
|
||||
//FIXME: rename into FileItem
|
||||
@@ -44,6 +45,8 @@
|
||||
* @property {number} size
|
||||
* @property {string} size_formatted
|
||||
* @property {number} sort_date
|
||||
* @property {string} etag opaque HTTP ETag, for If-Match / If-None-Match
|
||||
* @property {string} content_hash raw BLAKE3 content hash, for dedup checks
|
||||
*/
|
||||
|
||||
/**
|
||||
|
||||
@@ -377,7 +377,8 @@ const favoritesView = {
|
||||
sort_date: toSecs(item.favorited_at),
|
||||
icon_class: f.icon_class,
|
||||
icon_special_class: f.icon_special_class ?? '',
|
||||
category: 'Folder'
|
||||
category: 'Folder',
|
||||
etag: ''
|
||||
})
|
||||
);
|
||||
} else if (item.resource_type === 'file') {
|
||||
@@ -397,7 +398,9 @@ const favoritesView = {
|
||||
sort_date: toSecs(item.favorited_at),
|
||||
icon_class: f.icon_class,
|
||||
icon_special_class: f.icon_special_class ?? '',
|
||||
category: f.category
|
||||
category: f.category,
|
||||
etag: '',
|
||||
content_hash: ''
|
||||
})
|
||||
);
|
||||
}
|
||||
|
||||
@@ -384,7 +384,8 @@ const recentView = {
|
||||
sort_date: toSecs(item.accessed_at),
|
||||
icon_class: f.icon_class,
|
||||
icon_special_class: f.icon_special_class ?? '',
|
||||
category: 'Folder'
|
||||
category: 'Folder',
|
||||
etag: ''
|
||||
})
|
||||
);
|
||||
} else if (item.resource_type === 'file') {
|
||||
@@ -404,7 +405,9 @@ const recentView = {
|
||||
sort_date: toSecs(item.accessed_at),
|
||||
icon_class: f.icon_class,
|
||||
icon_special_class: f.icon_special_class ?? '',
|
||||
category: f.category
|
||||
category: f.category,
|
||||
etag: '',
|
||||
content_hash: ''
|
||||
})
|
||||
);
|
||||
}
|
||||
|
||||
@@ -386,7 +386,8 @@ const sharedWithMeView = {
|
||||
sort_date: grantedAtSecs(item.granted_at),
|
||||
icon_class: f.icon_class,
|
||||
icon_special_class: f.icon_special_class ?? '',
|
||||
category: 'folder'
|
||||
category: 'folder',
|
||||
etag: ''
|
||||
})
|
||||
);
|
||||
} else if (item.resource_type === 'file') {
|
||||
@@ -406,7 +407,9 @@ const sharedWithMeView = {
|
||||
sort_date: grantedAtSecs(item.granted_at),
|
||||
icon_class: f.icon_class,
|
||||
icon_special_class: f.icon_special_class ?? '',
|
||||
category: f.category
|
||||
category: f.category,
|
||||
etag: '',
|
||||
content_hash: ''
|
||||
})
|
||||
);
|
||||
}
|
||||
|
||||
@@ -393,7 +393,8 @@ const trashView = {
|
||||
deletion_date: item.deletion_date,
|
||||
icon_class: f.icon_class,
|
||||
icon_special_class: f.icon_special_class ?? '',
|
||||
category: 'Folder'
|
||||
category: 'Folder',
|
||||
etag: ''
|
||||
})
|
||||
);
|
||||
} else if (item.resource_type === 'file') {
|
||||
@@ -417,7 +418,9 @@ const trashView = {
|
||||
deletion_date: item.deletion_date,
|
||||
icon_class: f.icon_class,
|
||||
icon_special_class: f.icon_special_class ?? '',
|
||||
category: f.category
|
||||
category: f.category,
|
||||
etag: '',
|
||||
content_hash: ''
|
||||
})
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user