-
Notifications
You must be signed in to change notification settings - Fork 34
[PB-5819]: feature/add original location column for trash #1951
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 3 commits
823d2a9
c381f41
2f126f4
9452791
872797b
6106fea
2807ca3
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -10,6 +10,7 @@ import { useDriveItemActions, useDriveItemDrag, useDriveItemDrop, useDriveItemSt | |
| import './DriveExplorerListItem.scss'; | ||
| import { useTranslationContext } from 'app/i18n/provider/TranslationProvider'; | ||
| import { WarningCircle } from '@phosphor-icons/react'; | ||
| import { FileStatus } from '@internxt/sdk/dist/drive/storage/types'; | ||
|
|
||
| const getItemClassNames = (isSelected: boolean, isDraggingOver: boolean, isDragging: boolean): string => { | ||
| const selectedClass = isSelected ? 'selected' : ''; | ||
|
|
@@ -86,6 +87,7 @@ const DriveExplorerListItem = ({ item, isTrash }: DriveExplorerItemProps): JSX.E | |
| const isItemShared = (item.sharings?.length ?? 0) > 0; | ||
| const isInteractive = isItemInteractive(item); | ||
| const itemClassNames = getItemClassNames(isItemSelected(item), isDraggingOverThisItem, isDraggingThisItem); | ||
| const parentFolderName = item.parent?.status === FileStatus.EXISTS ? (item.parent?.plainName ?? 'Drive') : '-'; | ||
|
|
||
| const template = ( | ||
| <div | ||
|
|
@@ -162,10 +164,18 @@ const DriveExplorerListItem = ({ item, isTrash }: DriveExplorerItemProps): JSX.E | |
| </div> | ||
| )} | ||
|
|
||
| {isTrash && ( | ||
| <div className="block shrink-0 w-date items-center whitespace-nowrap"> | ||
| <p>{parentFolderName}</p> | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I've tested it and I can only see the “parent” field as
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The backend is not merged yet.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The backend has been merged (it will be deployed in ~5 min) |
||
| </div> | ||
| )} | ||
|
|
||
| {/* DATE */} | ||
| <div className="block shrink-0 w-date items-center whitespace-nowrap"> | ||
| {dateService.formatDefaultDate(item.updatedAt, translate)} | ||
| </div> | ||
| {!isTrash && ( | ||
| <div className="block shrink-0 w-date items-center whitespace-nowrap"> | ||
| {dateService.formatDefaultDate(item.updatedAt, translate)} | ||
| </div> | ||
| )} | ||
|
|
||
| {/* SIZE */} | ||
| <div className="w-size shrink-0 items-center whitespace-nowrap"> | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we should add the field to the sdk types also?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not needed as this type is only for trashed items (an EP only used for web -
GET /trash/paginated).