[PB-5671]: Add folder size and file count to item details dialog#1811
[PB-5671]: Add folder size and file count to item details dialog#1811terrerox merged 5 commits intofeature/automatic-trash-disposalfrom
Conversation
Deploying drive-web with
|
| Latest commit: |
2de2431
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://e14cad8f.drive-web.pages.dev |
| Branch Preview URL: | https://feature-folder-details.drive-web.pages.dev |
| ); | ||
| }; | ||
|
|
||
| async function getFolderStatsOrUndefined( |
There was a problem hiding this comment.
🙃 not add the return types at the function name, for that we have types :)
There was a problem hiding this comment.
I changed the approach, but I still need to return undefined if the item is not a folder. That way, Promise.all won’t trigger a request for it.
There was a problem hiding this comment.
he means that this function name should be just getFolderStats instead of getFolderStatsOrUndefined @terrerox
There was a problem hiding this comment.
You're right, my bad 😅. I fixed it
| return newStorageService.getFolderStats(itemUuid).catch(() => undefined); | ||
| } | ||
|
|
||
| function calculateItemSize(item: DriveItemDetails, folderStats: FolderStatsResponse | undefined): string | undefined { |
There was a problem hiding this comment.
nit: remember to use arrow functions
| "fileCount_one": "{{count}} файл", | ||
| "fileCount_few": "{{count}} файла", | ||
| "fileCount_many": "{{count}} файлов", | ||
| "fileCount_other": "{{count}} файлов", | ||
| "fileCountMoreThan1000": "Более 1000 файлов" |
There was a problem hiding this comment.
remove unused translations
There was a problem hiding this comment.
They are actually used, Russian uses 4 plural forms:
- _one: for numbers ending in 1 (except 11): 1 файл, 21 файл, 101 файл
- _few: for numbers ending in 2-4 (except 12-14): 2 файла, 3 файла, 22 файла
- _many: for numbers ending in 0, 5-9, and 11-14: 5 файлов, 11 файлов, 100 файлов
- _other: fallback for any other cases
i18next will dynamically choose it according the count value
… ItemDetailsDialog
|
|
This pull request has been inactive for 30 days. Is it still in progress? If so, please leave a comment or make an update to keep it open. Otherwise, it will be closed automatically in 15 days. |
e798fff
into
feature/automatic-trash-disposal



Description
Related Issues
Related Pull Requests
Checklist
Testing Process
Additional Notes