Skip to content

Commit

Permalink
feat: Returns processing
Browse files Browse the repository at this point in the history
  • Loading branch information
Merkur39 committed Nov 22, 2024
1 parent f5dd54f commit 80f0497
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { connect } from 'react-redux'

import { useVaultUnlockContext } from 'cozy-keys-lib'
import ActionsMenuItem from 'cozy-ui/transpiled/react/ActionsMenu/ActionsMenuItem'
import ListItemIcon from 'cozy-ui/transpiled/react/ListItemIcon'
import ListItemText from 'cozy-ui/transpiled/react/ListItemText'
import { useI18n } from 'cozy-ui/transpiled/react/providers/I18n'

Expand All @@ -23,7 +24,9 @@ const AddEncryptedFolderItem = ({ addEncryptedFolder, onClick }) => {
data-testid="add-encrypted-folder-link"
onClick={handleClick}
>
<EncryptedFolderIcon width={16} height={16} />
<ListItemIcon>
<EncryptedFolderIcon width={16} height={16} />
</ListItemIcon>
<ListItemText primary={t('toolbar.menu_new_encrypted_folder')} />
</ActionsMenuItem>
)
Expand Down
6 changes: 4 additions & 2 deletions src/modules/views/Public/PublicFolderView.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ const PublicFolderView = () => {
const { isSelectionBarVisible } = useSelectionContext()
const { hasWritePermissions } = usePublicWritePermissions()
const { pushModal, popModal } = useModalContext()
const { refresh } = useSharingContext()
const { refresh, isOwner, byDocId } = useSharingContext()
const dispatch = useDispatch()
const sharingInfos = useSharingInfos()
const { showAlert } = useAlert()
Expand Down Expand Up @@ -120,7 +120,9 @@ const PublicFolderView = () => {
pathname,
hasWriteAccess: hasWritePermissions,
canMove: false,
isPublic: true
isPublic: true,
isOwner,
byDocId
}
const actions = makeActions(
[download, rename, versions, divider, trash],
Expand Down
6 changes: 4 additions & 2 deletions src/modules/views/Recent/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ export const RecentView = () => {
const { isMobile } = useBreakpoints()
const client = useClient()
const { pushModal, popModal } = useModalContext()
const { allLoaded, refresh } = useSharingContext()
const { allLoaded, refresh, isOwner, byDocId } = useSharingContext()
const dispatch = useDispatch()
useHead()
const { showAlert } = useAlert()
Expand Down Expand Up @@ -95,7 +95,9 @@ export const RecentView = () => {
hr,
versions,
hr,
trash
trash,
isOwner,
byDocId
],
actionsOptions
)
Expand Down
7 changes: 5 additions & 2 deletions src/modules/views/Sharings/SharingsFolderView.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,8 @@ const SharingsFolderView = ({ sharedDocumentIds }) => {
const { t } = useI18n()
const { showAlert } = useAlert()
const client = useClient()
const { allLoaded, hasWriteAccess, refresh } = useSharingContext()
const { allLoaded, hasWriteAccess, refresh, isOwner, byDocId } =
useSharingContext()
const { pushModal, popModal } = useModalContext()
const dispatch = useDispatch()
const { displayedFolder, isNotFound } = useDisplayedFolder()
Expand Down Expand Up @@ -96,7 +97,9 @@ const SharingsFolderView = ({ sharedDocumentIds }) => {
pathname,
hasWriteAccess: hasWrite,
canMove: true,
allLoaded
allLoaded,
isOwner,
byDocId
}
const actions = makeActions(
[share, download, trash, rename, moveTo, qualify, versions],
Expand Down

0 comments on commit 80f0497

Please sign in to comment.