'use strict';
const Grid = ReactBootstrap.Grid;
const Row = ReactBootstrap.Row;
const Col = ReactBootstrap.Col;
const Tabs = ReactBootstrap.Tabs;
const Tab = ReactBootstrap.Tab;
const electron = require('electron');
const remote = electron.remote;
const settings = require('../common/settings');
var MainPage = React.createClass({
getInitialState: function() {
return {
key: 0
};
},
handleSelect: function(key) {
this.setState({
key
});
},
visibleStyle: function(visible) {
var visibility = visible ? 'initial' : 'hidden';
return {
position: 'absolute',
top: 42,
right: 0,
bottom: 0,
left: 0,
visibility: visibility
};
},
render: function() {
var tabs = this.props.teams.map(function(team, index) {
return ();
});
var thisObj = this;
var views = this.props.teams.map(function(team, index) {
return ()
});
return (
{ tabs }
{ views }
);
}
});
var MattermostView = React.createClass({
render: function() {
// 'disablewebsecurity' is necessary to display external images.
// However, it allows also CSS/JavaScript.
// So webview should use 'allowDisplayingInsecureContent' as same as BrowserWindow.
return (
);
}
});
var configFile = remote.getGlobal('config-file');
var config = settings.readFileSync(configFile);
ReactDOM.render(
,
document.getElementById('content')
);