# HG changeset patch # User salimr # Date 1534271690 -7200 # Node ID cfcbf4bc66f17d622552b9c1e4a2ff04264b72e3 # Parent 56850f5c73f65aa32b97d9f52ebfe330bbd3b0a7 Remove react-bootstrap from components except Modal, Collapse and Dropdown diff -r 56850f5c73f6 -r cfcbf4bc66f1 client/src/App.js --- a/client/src/App.js Wed Jul 18 17:32:09 2018 +0200 +++ b/client/src/App.js Tue Aug 14 20:34:50 2018 +0200 @@ -1,7 +1,5 @@ import React, { Component } from 'react'; - // import logo from './logo.svg'; -import { Grid, Row, Col, Alert } from 'react-bootstrap'; import './App.css'; import Navbar from './components/Navbar'; @@ -10,13 +8,13 @@ return (
- - - - Welcome to IRI Notes - - - +
+
+
+ +
+
+
); } diff -r 56850f5c73f6 -r cfcbf4bc66f1 client/src/components/CategoriesTooltip.js --- a/client/src/components/CategoriesTooltip.js Wed Jul 18 17:32:09 2018 +0200 +++ b/client/src/components/CategoriesTooltip.js Tue Aug 14 20:34:50 2018 +0200 @@ -1,5 +1,4 @@ import React, { Component } from 'react'; -import { FormGroup, FormControl, Button } from 'react-bootstrap'; class CategoriesTooltip extends Component { @@ -47,20 +46,22 @@ return (
- +
{this.props.categories.map((category) => - + onClick={ this.onButtonClick.bind(this, category) }>{ category.name } )} - +
{this.state.showCommentControl && - - { this.commentControl = ref; }} /> - } +
+ { this.commentControl = ref; }} + ref={(commentControl) => { this.commentControl = commentControl; }}/> +
}
); diff -r 56850f5c73f6 -r cfcbf4bc66f1 client/src/components/Clock.js --- a/client/src/components/Clock.js Wed Jul 18 17:32:09 2018 +0200 +++ b/client/src/components/Clock.js Tue Aug 14 20:34:50 2018 +0200 @@ -1,5 +1,4 @@ import React, { Component } from 'react'; -import { Label } from 'react-bootstrap'; import moment from 'moment'; class Clock extends Component { @@ -24,7 +23,7 @@ render() { return ( - + { this.state.time } ); } } diff -r 56850f5c73f6 -r cfcbf4bc66f1 client/src/components/CreateGroup.js --- a/client/src/components/CreateGroup.js Wed Jul 18 17:32:09 2018 +0200 +++ b/client/src/components/CreateGroup.js Tue Aug 14 20:34:50 2018 +0200 @@ -1,7 +1,6 @@ import React, { Component } from 'react'; import { connect } from 'react-redux'; import { bindActionCreators } from 'redux'; -import { Grid, Row, Col, Panel, FormGroup, ControlLabel, FormControl, Button, Alert, HelpBlock } from 'react-bootstrap'; import '../App.css'; import Navbar from './Navbar'; import * as authActions from '../actions/authActions'; @@ -42,7 +41,7 @@ renderErrorMessage(errorMessages, fieldname) { if (errorMessages && fieldname in errorMessages) { return errorMessages[fieldname].map((message, key) => - { message } +

{ message }

); } } @@ -51,11 +50,11 @@ if (errorMessages && 'non_field_errors' in errorMessages) { const errors = errorMessages['non_field_errors']; return ( - + ) } } @@ -68,41 +67,40 @@ render() { - const panelHeader = ( -

New Group

- ) - const errorMessages = this.props.createGroup.getIn(['errorMessages', 'data']); const okDisabled = (!this.state.name || this.state.name.trim() === ""); return (
- - - - -
- - Nom - - { this.renderErrorMessage(errorMessages, 'name') } - - - Password - - { this.renderErrorMessage(errorMessages, 'description') } - - { this.renderNonFieldErrors(errorMessages) } - - - - -
-
- -
-
+
+
+
+
+
+

New Group

+
+
+ + + { this.renderErrorMessage(errorMessages, 'name') } +
+
+ + + { this.renderErrorMessage(errorMessages, 'description') } +
+ { this.renderNonFieldErrors(errorMessages) } +
+
+
+
+
+
+
+
+
+
); } diff -r 56850f5c73f6 -r cfcbf4bc66f1 client/src/components/Login.js --- a/client/src/components/Login.js Wed Jul 18 17:32:09 2018 +0200 +++ b/client/src/components/Login.js Tue Aug 14 20:34:50 2018 +0200 @@ -1,8 +1,8 @@ import React, { Component } from 'react'; import { connect } from 'react-redux'; import { bindActionCreators } from 'redux'; -import { Grid, Row, Col, Panel, FormGroup, ControlLabel, FormControl, Button, Alert, HelpBlock } from 'react-bootstrap'; import '../App.css'; +import './Login.css'; import Navbar from './Navbar'; import * as authActions from '../actions/authActions'; @@ -44,7 +44,7 @@ renderErrorMessage(errorMessages, fieldname) { if (errorMessages && errorMessages.has(fieldname)) { return errorMessages.get(fieldname).map((message, key) => - { message } +

{ message }

); } } @@ -53,51 +53,50 @@ if (errorMessages && errorMessages.has('non_field_errors')) { const errors = errorMessages.get('non_field_errors'); return ( - + ) } } render() { - const panelHeader = ( -

Login

- ) - const errorMessages = this.props.login.get('errorMessages'); return (
- - - - -
- - Username - - { this.renderErrorMessage(errorMessages, 'username') } - - - Password - - { this.renderErrorMessage(errorMessages, 'password') } - - { this.renderNonFieldErrors(errorMessages) } - -
-
+
+
+
+
+
+

IRI Notes

+
+
+ + + { this.renderErrorMessage(errorMessages, 'username') } +
+
+ + + { this.renderErrorMessage(errorMessages, 'password') } +
+ { this.renderNonFieldErrors(errorMessages) } + +
+
+

- Not registered yet? Create an account. + Pas encore inscrit ? Créer un compte.

- - - +
+
+
); } 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. -

    -
    - - - - -
    -
    + + ); } } diff -r 56850f5c73f6 -r cfcbf4bc66f1 client/src/components/Note.js --- a/client/src/components/Note.js Wed Jul 18 17:32:09 2018 +0200 +++ b/client/src/components/Note.js Tue Aug 14 20:34:50 2018 +0200 @@ -1,6 +1,5 @@ import React, { Component } from 'react'; import PropTypes from 'prop-types'; -import { FormControl } from 'react-bootstrap'; import { formatTimestamp } from '../utils'; import SlateEditor from './SlateEditor'; @@ -60,12 +59,13 @@ if (this.props.isEditing) { return (
    - { this.marginComment = ref; } } /> + // inputRef={ ref => { this.marginComment = ref; } } /> + ref={(marginComment) => { this.marginComment = marginComment; }} />
    ) } diff -r 56850f5c73f6 -r cfcbf4bc66f1 client/src/components/NoteInput.js --- a/client/src/components/NoteInput.js Wed Jul 18 17:32:09 2018 +0200 +++ b/client/src/components/NoteInput.js Tue Aug 14 20:34:50 2018 +0200 @@ -1,6 +1,4 @@ import React, { Component } from 'react'; -import { Form, FormControl } from 'react-bootstrap'; - import PropTypes from 'prop-types'; import SlateEditor from './SlateEditor'; import { now } from '../utils'; @@ -55,7 +53,7 @@ render() { return ( -
    +
    - { this.marginComment = ref; } } + // inputRef={ ref => { this.marginComment = ref; } } + ref={(marginComment) => { this.marginComment = marginComment; }} />
    -
    + ); } } diff -r 56850f5c73f6 -r cfcbf4bc66f1 client/src/components/NotesList.js --- a/client/src/components/NotesList.js Wed Jul 18 17:32:09 2018 +0200 +++ b/client/src/components/NotesList.js Tue Aug 14 20:34:50 2018 +0200 @@ -1,7 +1,7 @@ import React, { Component } from 'react'; import PropTypes from 'prop-types'; import Immutable from 'immutable'; -import { Alert, Modal, Button } from 'react-bootstrap'; +import { Modal } from 'react-bootstrap'; import Note from './Note'; class NotesList extends Component { @@ -47,7 +47,7 @@ render() { if (this.props.notes.size === 0) { return ( - No notes yet. Add notes with the textarea below. +
    Commencez votre première note en écrivant dans le champ texte ci-dessous
    ); } @@ -68,11 +68,11 @@ - Are you sure? + Êtes vous sûr(e) ? - - + + diff -r 56850f5c73f6 -r cfcbf4bc66f1 client/src/components/Register.js --- a/client/src/components/Register.js Wed Jul 18 17:32:09 2018 +0200 +++ b/client/src/components/Register.js Tue Aug 14 20:34:50 2018 +0200 @@ -1,8 +1,8 @@ import React, { Component } from 'react'; import { connect } from 'react-redux'; import { bindActionCreators } from 'redux'; -import { Grid, Row, Col, Panel, FormGroup, ControlLabel, FormControl, Button, HelpBlock } from 'react-bootstrap'; import '../App.css'; +import './Register.css'; import Navbar from './Navbar'; import * as authActions from '../actions/authActions'; @@ -31,56 +31,55 @@ renderErrorMessage(errorMessages, fieldname) { if (errorMessages && errorMessages.has(fieldname)) { return errorMessages.get(fieldname).map((message, key) => - { message } +

    { message }

    ); } } render() { - const panelHeader = ( -

    Register

    - ) - const errorMessages = this.props.register.get('errorMessages'); return (
    - - - - -
    - - Username - { this.username = ref; }} /> - { this.renderErrorMessage(errorMessages, 'username') } - - - Email - { this.email = ref; }} /> - { this.renderErrorMessage(errorMessages, 'email') } - - - Password - { this.password1 = ref; }} /> - { this.renderErrorMessage(errorMessages, 'password1') } - - - Confirm password - { this.password2 = ref; }} /> - { this.renderErrorMessage(errorMessages, 'password2') } - - -
    -
    +
    +
    +
    +
    +
    +

    IRI Notes

    +
    +
    + + { this.username = ref; }} /> + { this.renderErrorMessage(errorMessages, 'username') } +
    +
    + + { this.email = ref; }} /> + { this.renderErrorMessage(errorMessages, 'email') } +
    +
    + + { this.password1 = ref; }} /> + { this.renderErrorMessage(errorMessages, 'password1') } +
    +
    + + { this.password2 = ref; }} /> + { this.renderErrorMessage(errorMessages, 'password2') } +
    + +
    +
    +

    - Already registered? Sign in. + Déjà inscrit ? Se connecter.

    - - - +
    +
    +
    ); } diff -r 56850f5c73f6 -r cfcbf4bc66f1 client/src/components/Session.js --- a/client/src/components/Session.js Wed Jul 18 17:32:09 2018 +0200 +++ b/client/src/components/Session.js Tue Aug 14 20:34:50 2018 +0200 @@ -1,7 +1,6 @@ import React, { Component } from 'react'; import { connect } from 'react-redux'; import { bindActionCreators } from 'redux'; -import { Grid, Row, Col } from 'react-bootstrap'; import '../App.css'; import Navbar from './Navbar'; import NoteInput from './NoteInput'; @@ -37,18 +36,18 @@
    - - - +
    +
    +
    - - - +
    +
    +
    diff -r 56850f5c73f6 -r cfcbf4bc66f1 client/src/components/SessionForm.js --- a/client/src/components/SessionForm.js Wed Jul 18 17:32:09 2018 +0200 +++ b/client/src/components/SessionForm.js Tue Aug 14 20:34:50 2018 +0200 @@ -1,7 +1,7 @@ import React, { Component } from 'react'; import { connect } from 'react-redux'; import { bindActionCreators } from 'redux'; -import { Panel, FormGroup, ControlLabel, FormControl, Collapse } from 'react-bootstrap'; +import { Collapse } from 'react-bootstrap'; import '../App.css'; import * as sessionsActions from '../actions/sessionsActions'; import * as authActions from '../actions/authActions'; @@ -55,40 +55,42 @@ } return ( - -
    { e.preventDefault() } }> - - Title - - - - Description - - - - Group -

    {this.props.currentSession.group}

    -
    - - Protocol {this.state.protocolOpen?:} - -
    {JSON.stringify(this.props.currentSession.protocol, null, 2)}
    -
    -
    -
    -
    +
    +
    +
    { e.preventDefault() } }> +
    + + +
    +
    + + +
    +
    + +

    {this.props.currentSession.group}

    +
    +
    + + +
    {JSON.stringify(this.props.currentSession.protocol, null, 2)}
    +
    +
    +
    +
    +
    ); } } diff -r 56850f5c73f6 -r cfcbf4bc66f1 client/src/components/SessionList.js --- a/client/src/components/SessionList.js Wed Jul 18 17:32:09 2018 +0200 +++ b/client/src/components/SessionList.js Tue Aug 14 20:34:50 2018 +0200 @@ -1,9 +1,10 @@ import React, { Component } from 'react'; import { connect } from 'react-redux'; import { bindActionCreators } from 'redux'; -import { Grid, Row, Col, ListGroup, ListGroupItem, Button, Modal } from 'react-bootstrap'; +import { Modal } from 'react-bootstrap'; import moment from 'moment'; import '../App.css'; +import './SessionList.css'; import Navbar from './Navbar'; import * as sessionsActions from '../actions/sessionsActions'; import uuidV1 from 'uuid/v1'; @@ -68,34 +69,33 @@ return (
    - - - - +
    +
    +
    +
      {this.props.sessions.map((session) => - +
    • this.props.history.push('/sessions/' + session.get('_id'))}>{session.title || 'No title'} {session.get('_id')} {moment(session.get('date')).format('DD/MM/YYYY')} - + delete - +
    • )} - - - - - +
    + +
    +
    +
    - Are you sure? + Êtes-vous sûr(e) ? - - + + -
    ); } diff -r 56850f5c73f6 -r cfcbf4bc66f1 client/src/components/SessionSummary.js --- a/client/src/components/SessionSummary.js Wed Jul 18 17:32:09 2018 +0200 +++ b/client/src/components/SessionSummary.js Tue Aug 14 20:34:50 2018 +0200 @@ -1,20 +1,19 @@ import React from 'react'; -import { ListGroup, ListGroupItem } from 'react-bootstrap'; import _ from 'lodash'; import '../App.css'; import {formatTimestamp} from '../utils'; const SessionSummary = ({notes}) => ( - + ) export default SessionSummary; diff -r 56850f5c73f6 -r cfcbf4bc66f1 client/src/components/Settings.js --- a/client/src/components/Settings.js Wed Jul 18 17:32:09 2018 +0200 +++ b/client/src/components/Settings.js Tue Aug 14 20:34:50 2018 +0200 @@ -1,7 +1,6 @@ import React, { Component } from 'react'; import { connect } from 'react-redux'; import { bindActionCreators } from 'redux'; -import { Grid, Row, Col, Button, FormGroup, ControlLabel, FormControl } from 'react-bootstrap'; import '../App.css'; import Navbar from './Navbar'; import * as userActions from '../actions/userActions'; @@ -24,33 +23,33 @@ return (
    - - - +
    +
    +
    - - First name - + + { this.firstname = ref; } } + placeholder="Entrez un prénom" + ref={(firstname) => { this.firstname = firstname; }} /> - - - Last name - +
    + + { this.lastname = ref; } } + placeholder="Entrez un nom" + ref={(lastname) => { this.lastname = lastname; }} /> - +
    - - - - + +
    +
    +
    ); } diff -r 56850f5c73f6 -r cfcbf4bc66f1 client/src/components/SlateEditor.js --- a/client/src/components/SlateEditor.js Wed Jul 18 17:32:09 2018 +0200 +++ b/client/src/components/SlateEditor.js Tue Aug 14 20:34:50 2018 +0200 @@ -1,7 +1,6 @@ import { Editor, Plain, Raw } from 'slate' import React from 'react' import Portal from 'react-portal' -import { Button } from 'react-bootstrap' import Immutable from 'immutable' import HtmlSerializer from '../HtmlSerializer' import AnnotationPlugin from '../AnnotationPlugin' @@ -439,7 +438,7 @@ return (
    ) @@ -449,9 +448,9 @@ return (
    { !this.props.note && this.renderToolbarCheckbox() } - +
    ); }