From be87d705ba8495426e552e9ebe4d83e0b5483455 Mon Sep 17 00:00:00 2001 From: Quentin Valmori Date: Mon, 30 Mar 2020 14:21:36 +0200 Subject: [PATCH 1/2] fix: Context issue for barright on mobile --- src/drive/web/modules/trash/Toolbar.jsx | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/drive/web/modules/trash/Toolbar.jsx b/src/drive/web/modules/trash/Toolbar.jsx index 4ab8221af4..8da2fb6607 100644 --- a/src/drive/web/modules/trash/Toolbar.jsx +++ b/src/drive/web/modules/trash/Toolbar.jsx @@ -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' @@ -23,6 +25,7 @@ const Toolbar = ({ emptyTrash, breakpoints: { isMobile } }) => { + const client = useClient() const { BarRight } = cozy.bar const MoreMenu = ( - {isMobile ? {MoreMenu} : MoreMenu} + {isMobile ? ( + + + {MoreMenu} + + + ) : ( + MoreMenu + )} ) } From 31f2894b27372b4f877faf0d8e6cfc368e262401 Mon Sep 17 00:00:00 2001 From: Quentin Valmori Date: Mon, 30 Mar 2020 14:29:45 +0200 Subject: [PATCH 2/2] fix: Display hr if only writeAccess --- src/drive/web/modules/drive/Toolbar.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/drive/web/modules/drive/Toolbar.jsx b/src/drive/web/modules/drive/Toolbar.jsx index e525d6e170..8b34f88812 100644 --- a/src/drive/web/modules/drive/Toolbar.jsx +++ b/src/drive/web/modules/drive/Toolbar.jsx @@ -90,7 +90,7 @@ class Toolbar extends Component { )} -
+ {hasWriteAccess &&
}