diff -r 56850f5c73f6 -r cfcbf4bc66f1 client/src/components/Navbar.js --- a/client/src/components/Navbar.js Wed Jul 18 17:32:09 2018 +0200 +++ b/client/src/components/Navbar.js Tue Aug 14 20:34:50 2018 +0200 @@ -1,16 +1,16 @@ +import './Navbar.css'; import PropTypes from 'prop-types'; import React, { Component } from 'react'; import { connect } from 'react-redux'; import { withRouter } from 'react-router'; import { bindActionCreators } from 'redux'; // import logo from './logo.svg'; -import { Navbar, Nav, NavItem, NavDropdown, MenuItem, Modal, Button } from 'react-bootstrap'; +import { NavDropdown, MenuItem, Modal} from 'react-bootstrap'; import * as authActions from '../actions/authActions'; import { forceSync } from '../actions/networkActions'; import { groupSetCurrent } from '../actions/groupActions'; import { isAuthenticated, getCurrentUser, getOnline, getCurrentGroup, getGroups } from '../selectors/authSelectors'; import { isSynchronizing, isSynchronized } from '../selectors/syncSelectors'; -import './Navbar.css'; const LoginNav = ({isAuthenticated, currentUser, history, authActions, onLogout}) => { @@ -26,26 +26,34 @@ if (isAuthenticated) { return ( - - Settings - Logout - + +
  • + Paramètres +
  • +
  • + Se déconnecter +
  • +
    ); } return ( - Login +
  • + Se connecter +
  • ); } const Online = ({ online }) => { return ( - - signal_wifi_4_bar - +
  • + + signal_wifi_4_bar + +
  • ) } -const SyncButton = ({ onSyncClick, isSynchronizing, isSynchronized, id }) => { +const SyncButton = ({ isAuthenticated, onSyncClick, isSynchronizing, isSynchronized, id }) => { const classnames = "material-icons" + ((!isSynchronized)?" sync-button-not-synchronized":"") + ((isSynchronizing)?" sync-button-synchronizing":""); @@ -58,23 +66,34 @@ title += ": not synchronized"; } + if (isAuthenticated) { + return ( +
  • + + +
  • + ); + } return ( - - - - ) +
  • + + + +
  • + ); } + const GroupStatus = ({currentGroup, groups, onSelect}) => { if(currentGroup) { const currentGroupName = currentGroup.get('name'); return ( - + { groups && groups.map((group, key) => { const groupName = group.get('name'); const className = (groupName === currentGroupName)?'active':null; - return { groupName } + return { groupName } } )} Créer un groupe... @@ -149,38 +168,46 @@ render() { return ( - - - - IRI Notes - - - - - - - - - -

    - Some data is not synchronized with server. -
    - If you continue, it will be lost. -

    -
    - - - - -
    -
    + + ); } }