Home Reference Source

application/components/changelog.js

  1. import React, {Component} from 'react';
  2. import {connect} from 'react-redux';
  3. import Dialog from 'material-ui/Dialog';
  4. import FlatButton from 'material-ui/FlatButton';
  5. import RaisedButton from 'material-ui/RaisedButton';
  6. import {RadioButton, RadioButtonGroup} from 'material-ui/RadioButton';
  7. import Markdown from 'react-remarkable';
  8.  
  9. import Config from '../config';
  10.  
  11. class ChangeLog extends Component {
  12. constructor(props) {
  13. super(props);
  14. }
  15.  
  16. render() {
  17. const actions = [
  18. <FlatButton
  19. label="Close"
  20. primary={true}
  21. keyboardFocused={true}
  22. onClick={this.props.onRequestClose}
  23. />
  24. ];
  25. return (
  26. <Dialog
  27. title="There have been a few updates..."
  28. actions={actions}
  29. modal={false}
  30. open={this.props.application.doNotifyChanges}
  31. autoScrollBodyContent={true}
  32. >
  33. <p>We have updated a few things since you last logged in:</p>
  34. <Markdown source={atob(Config.get('changelog'))} />
  35. </Dialog>
  36. );
  37. }
  38. }
  39.  
  40. const mapStateToProps = (state) => ({
  41. application: state.application
  42. });
  43.  
  44. export default connect(mapStateToProps)(ChangeLog);