mirror of
https://github.com/Unleash/unleash.git
synced 2025-01-06 00:07:44 +01:00
2a4a76aaf5
a username cookie is updated and will be available in all subsequent requests. THIS IS NOT AUTHENTICATION! it is not safe and is only implemented as a first edition. It does how ever solve the issue where we are not able to see who canged what.
24 lines
496 B
JavaScript
24 lines
496 B
JavaScript
var React = require('react');
|
|
var UserStore = require('../stores/UserStore');
|
|
|
|
var User = React.createClass({
|
|
|
|
onSave: function() {
|
|
var value = this.refs.username.getDOMNode().value.trim();
|
|
UserStore.set(value);
|
|
},
|
|
|
|
render: function() {
|
|
return (
|
|
<div className="r-pam">
|
|
<input type="text" placeholder="username"
|
|
ref="username"
|
|
defaultValue={UserStore.get()}
|
|
onBlur={this.onSave} />
|
|
</div>
|
|
);
|
|
}
|
|
});
|
|
|
|
module.exports = User;
|