diff --git a/src/App.js b/src/App.js index c70e30ef3..c8ba23dcb 100644 --- a/src/App.js +++ b/src/App.js @@ -18,7 +18,8 @@ export class App extends Component { PropTypes.func, PropTypes.element ]).isRequired, - routeInfo: PropTypes.object.isRequired + routeInfo: PropTypes.object.isRequired, + navbarIsOpen: PropTypes.bool.isRequired } componentWillMount () { @@ -26,24 +27,24 @@ export class App extends Component { } render () { - const { route: Page, ipfsReady, routeInfo: { url }, navbarWidth } = this.props + const { route: Page, ipfsReady, routeInfo: { url }, navbarIsOpen } = this.props return (
-
-
+
+
-
-
-
+
+
+
-
+
-
+
{ (ipfsReady || url === '/welcome') ? : @@ -59,7 +60,7 @@ export class App extends Component { export default connect( 'selectRoute', - 'selectNavbarWidth', + 'selectNavbarIsOpen', 'selectRouteInfo', 'doUpdateUrl', 'doInitIpfs', diff --git a/src/bundles/navbar.js b/src/bundles/navbar.js index 851c0c155..ccc4cdf4f 100644 --- a/src/bundles/navbar.js +++ b/src/bundles/navbar.js @@ -17,5 +17,5 @@ export default { selectNavbarIsOpen: state => state.navbar.isOpen, - selectNavbarWidth: state => state.navbar.isOpen ? 250 : 100 + selectNavbarWidth: state => state.navbar.isOpen ? 256 : 128 } diff --git a/src/files/FilesPage.js b/src/files/FilesPage.js index 9daa8792a..fc0550de2 100644 --- a/src/files/FilesPage.js +++ b/src/files/FilesPage.js @@ -47,7 +47,6 @@ class FilesPage extends React.Component { filesSorting: PropTypes.object.isRequired, writeFilesProgress: PropTypes.number, gatewayUrl: PropTypes.string.isRequired, - navbarWidth: PropTypes.number.isRequired, doUpdateHash: PropTypes.func.isRequired, doFilesDelete: PropTypes.func.isRequired, doFilesMove: PropTypes.func.isRequired, @@ -184,7 +183,6 @@ class FilesPage extends React.Component { ipfsProvider, files, writeFilesProgress, - navbarWidth, doFilesMove, doFilesNavigateTo, doFilesUpdateSorting, @@ -231,7 +229,6 @@ class FilesPage extends React.Component { { files.type === 'directory' ? ( ({ canDrop: monitor.canDrop() }) -export default DropTarget(NativeTypes.FILE, dropTarget, dropCollect)(translate('files')(FileList)) +export default connect( + 'selectNavbarWidth', + DropTarget(NativeTypes.FILE, dropTarget, dropCollect)(translate('files')(FileList)) +) diff --git a/src/navigation/NavBar.js b/src/navigation/NavBar.js index a2bbc5e34..6fea65afb 100644 --- a/src/navigation/NavBar.js +++ b/src/navigation/NavBar.js @@ -30,7 +30,7 @@ const NavLink = ({ const anchorClass = classnames({ 'bg-white-10': active, 'o-50 no-pointer-events': disabled - }, ['dt dt--fixed pv3 mb2 white no-underline focus-outline f5 hover-bg-white-10']) + }, ['dib db-l pv3 white no-underline focus-outline f5 hover-bg-white-10 tc']) const svgClass = classnames({ 'o-100': active, 'o-50': !active @@ -38,11 +38,13 @@ const NavLink = ({ return ( - - - - - {open ? children : null} + + + + + + {children} + ) @@ -53,15 +55,14 @@ export const NavBar = ({ t, isSettingsEnabled, width, open, onToggle }) => { const bugsUrl = `${codeUrl}/issues` const gitRevision = process.env.REACT_APP_GIT_REV const revisionUrl = `${codeUrl}/commit/${gitRevision}` - return ( -
+
-
+
IPFS IPFS
-
{ open && -