+
+
+
+
+ {menuIsVisible && (
+
+ {onOpenInCozy &&
+ isMobile && (
+ }
+ >
+ {t('toolbar.menu_open_cozy')}
+
+ )}
+ {onCreateCozy &&
+ isMobile && (
+ }
+ >
+ {t('Share.create-cozy')}
+
+ )}
+ }
+ >
+ {isFile
+ ? t('toolbar.menu_download_file')
+ : t('toolbar.menu_download_folder')}
+
+ {hasWriteAccess && }
+ {hasWriteAccess && }
+ {hasWriteAccess && (
+
+ )}
+ {hasWriteAccess && }
+
+
+ )}
+
+ )
+ }
)
MoreMenu.propTypes = {
t: PropTypes.func.isRequired,
@@ -87,11 +130,16 @@ MoreMenu.propTypes = {
const toolbarProptypes = {
onDownload: PropTypes.func.isRequired,
discoveryLink: PropTypes.string,
- isFile: PropTypes.bool.isRequired
+ isFile: PropTypes.bool.isRequired,
+ hasWriteAccess: PropTypes.bool,
+ refreshFolderContent: PropTypes.func.isRequired
}
const openExternalLink = url => (window.location = url)
-const MobileToolbar = ({ onDownload, discoveryLink, isFile }, { store }) => {
+const MobileToolbar = (
+ { onDownload, discoveryLink, isFile, hasWriteAccess, refreshFolderContent },
+ { store }
+) => {
const client = useClient()
const { t } = useI18n()
return (
@@ -99,7 +147,9 @@ const MobileToolbar = ({ onDownload, discoveryLink, isFile }, { store }) => {