2016-10-04 23:02:11 +08:00
|
|
|
import {React} from 'nylas-exports';
|
2016-10-07 01:53:22 +08:00
|
|
|
import {Notification} from 'nylas-component-kit';
|
2016-10-04 23:02:11 +08:00
|
|
|
|
|
|
|
export default class DevModeNotification extends React.Component {
|
|
|
|
static displayName = 'DevModeNotification';
|
|
|
|
|
|
|
|
constructor() {
|
|
|
|
super();
|
|
|
|
// Don't need listeners to update this, since toggling dev mode reloads
|
|
|
|
// the entire window anyway
|
|
|
|
this.state = {
|
|
|
|
inDevMode: NylasEnv.inDevMode(),
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
render() {
|
|
|
|
if (!this.state.inDevMode) {
|
|
|
|
return <span />
|
|
|
|
}
|
|
|
|
return (
|
|
|
|
<Notification
|
|
|
|
priority="0"
|
2017-01-12 09:41:07 +08:00
|
|
|
title="Nylas Mail is running in dev mode!"
|
2016-10-04 23:02:11 +08:00
|
|
|
/>
|
|
|
|
)
|
|
|
|
}
|
|
|
|
}
|