Skip to content
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

Release/1.23.0 #2003

Merged
merged 2 commits into from
Apr 24, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/drive/web/modules/drive/Toolbar.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ class Toolbar extends Component {
<ScanWrapper insideMoreMenu disabled={isDisabled} />
</Item>
)}
<hr />
{hasWriteAccess && <hr />}
<NotRootFolder>
<Item>
<ShareItem />
Expand Down
13 changes: 12 additions & 1 deletion src/drive/web/modules/trash/Toolbar.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ import React from 'react'
import { connect } from 'react-redux'
import { translate } from 'cozy-ui/transpiled/react/I18n'
import { Button, withBreakpoints } from 'cozy-ui/transpiled/react'
import BarContextProvider from 'cozy-ui/transpiled/react/BarContextProvider'
import { useClient } from 'cozy-client'
import { showModal } from 'react-cozy-helpers'

import { MoreButton } from 'components/Button'
Expand All @@ -23,6 +25,7 @@ const Toolbar = ({
emptyTrash,
breakpoints: { isMobile }
}) => {
const client = useClient()
const { BarRight } = cozy.bar
const MoreMenu = (
<Menu
Expand Down Expand Up @@ -60,7 +63,15 @@ const Toolbar = ({
label={t('toolbar.empty_trash')}
/>

{isMobile ? <BarRight>{MoreMenu}</BarRight> : MoreMenu}
{isMobile ? (
<BarRight>
<BarContextProvider client={client} t={t} store={client.store}>
{MoreMenu}
</BarContextProvider>
</BarRight>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tiens je viens de me dire que BarRight / BarLeft et BarCenter pourrait certainement jouer le rôle de Provider eux même sans qu'on ait à le faire explicitement.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

) : (
MoreMenu
)}
</div>
)
}
Expand Down