twister-react/jsx/other/Accounts.js

49 lines
1.5 KiB
JavaScript
Raw Normal View History

2016-01-21 07:57:00 +00:00
var React = require('react');
var SetIntervalMixin = require("../common/SetIntervalMixin.js");
var SafeStateChangeMixin = require('../common/SafeStateChangeMixin.js');
var EventListenerMixin = require('../common/EventListenerMixin.js');
var AppSettingsMixin = require('../common/AppSettingsMixin.js');
var ImportAccountModalButton = require('../other/ImportAccountModalButton.js');
var ReactBootstrap = require('react-bootstrap')
, NavItem = ReactBootstrap.NavItem
, Nav = ReactBootstrap.Nav
, ListGroup = ReactBootstrap.ListGroup
, ListGroupItem = ReactBootstrap.ListGroupItem
, Panel = ReactBootstrap.Panel
, Glyphicon = ReactBootstrap.Glyphicon
, Button = ReactBootstrap.Button
, Input = ReactBootstrap.Input
module.exports = Accounts = React.createClass({
mixins: [
SetIntervalMixin,
SafeStateChangeMixin,
AppSettingsMixin
],
render: function() {
2016-01-22 20:01:50 +00:00
var thisComponent = this;
2016-01-21 07:57:00 +00:00
return (
<ListGroup>
2016-01-22 20:01:50 +00:00
<ListGroupItem>Accounts</ListGroupItem>
2016-01-21 07:57:00 +00:00
<ListGroupItem>
<ImportAccountModalButton/>
2016-01-22 20:01:50 +00:00
<hr/>
{this.props.accounts.map(function(acc,index) {
//console.log(acc,index)
return (
2016-01-23 13:34:16 +00:00
<div key={"miniprofile:"+acc.name}>
<MiniProfile username={acc.name} pollIntervalProfile={thisComponent.props.pollIntervalProfile}/>
2016-01-22 20:01:50 +00:00
<p>{acc.status}</p>
</div>
);
})}
2016-01-21 07:57:00 +00:00
</ListGroupItem>
</ListGroup>
);
}
});