|
@@ -1,5 +1,6 @@
|
|
var DomainStore = require('../stores').Domains;
|
|
var DomainStore = require('../stores').Domains;
|
|
var React = require('react');
|
|
var React = require('react');
|
|
|
|
+var dateToString = require('../util').dateToString;
|
|
|
|
|
|
var DevModeToggle = React.createClass({
|
|
var DevModeToggle = React.createClass({
|
|
getInitialState: function() {
|
|
getInitialState: function() {
|
|
@@ -18,11 +19,10 @@ var DevModeToggle = React.createClass({
|
|
}
|
|
}
|
|
else if(this.props.devMode > 0) {
|
|
else if(this.props.devMode > 0) {
|
|
var date = new Date(this.props.devMode*1000);
|
|
var date = new Date(this.props.devMode*1000);
|
|
- var dateString = date.getFullYear()+'/'+(1+date.getMonth())+'/'+date.getDate()+' '+date.getHours()+':'+date.getMinutes();
|
|
|
|
return (
|
|
return (
|
|
<div>
|
|
<div>
|
|
<button className='btn btn-success' onClick={this.toggleDevMode}>On</button>
|
|
<button className='btn btn-success' onClick={this.toggleDevMode}>On</button>
|
|
- <span> Active until {dateString}</span>
|
|
|
|
|
|
+ <span> Active until {dateToString(date)}</span>
|
|
</div>
|
|
</div>
|
|
);
|
|
);
|
|
}
|
|
}
|