From f820ba863a4465d2b11b4d949d90202e1c33a285 Mon Sep 17 00:00:00 2001 From: Jannis Mattheis Date: Thu, 15 Mar 2018 20:33:32 +0100 Subject: [PATCH] Add SettingsDialog Component --- ui/src/component/SettingsDialog.js | 53 ++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 ui/src/component/SettingsDialog.js diff --git a/ui/src/component/SettingsDialog.js b/ui/src/component/SettingsDialog.js new file mode 100644 index 0000000..583a60a --- /dev/null +++ b/ui/src/component/SettingsDialog.js @@ -0,0 +1,53 @@ +import React, {Component} from 'react'; +import Button from 'material-ui/Button'; +import TextField from 'material-ui/TextField'; +import Tooltip from 'material-ui/Tooltip'; +import Dialog, {DialogActions, DialogContent, DialogTitle} from 'material-ui/Dialog'; +import PropTypes from 'prop-types'; +import * as UserAction from '../actions/UserAction'; + +export default class SettingsDialog extends Component { + static propTypes = { + fClose: PropTypes.func.isRequired, + }; + + constructor() { + super(); + this.state = {pass: ''}; + } + + handleChange(propertyName, event) { + const state = this.state; + state[propertyName] = event.target.value; + this.setState(state); + } + + render() { + const {pass} = this.state; + const {fClose} = this.props; + const submitAndClose = () => { + UserAction.changeCurrentUser(pass); + fClose(); + }; + return ( + + Change Password + + + + + + +
+ +
+
+
+
+ ); + } +}