added todo for idle notification and add a text to explain notification config

This commit is contained in:
Carmine D'Amico 2016-06-07 22:17:44 +02:00
parent 84d3c377b4
commit 73a11ea398
2 changed files with 13 additions and 12 deletions

View file

@ -151,10 +151,11 @@ var SettingsPage = React.createClass({
label: 'Never', label: 'Never',
state: 0 state: 0
}, },
/* ToDo: Idle isn't implemented yet
{ {
label: 'Only when idle (after 10 seconds)', label: 'Only when idle (after 10 seconds)',
state: 1 state: 1
}, },*/
{ {
label: 'Always', label: 'Always',
state: 2 state: 2
@ -165,16 +166,15 @@ var SettingsPage = React.createClass({
var notificationElements = notificationSettings.map(function(item) { var notificationElements = notificationSettings.map(function(item) {
var boundClick = that.handleFlashWindowSetting.bind(that, item); var boundClick = that.handleFlashWindowSetting.bind(that, item);
return ( return (
<Input key={ "flashWindow" + item.state } name="handleFlashWindow" ref={ "flashWindow" + item.state } type="radio" <Input key={ "flashWindow" + item.state } name="handleFlashWindow" ref={ "flashWindow" + item.state } type="radio" label={ item.label } value={ item.state } onChange={ boundClick }
label={ item.label } value={ item.state } onChange={ boundClick } checked={ that.state.notifications.flashWindow == item.state ? "checked" : "" } />
checked={ that.state.notifications.flashWindow == item.state ? "checked" : "" }/>
); );
}); });
var notifications = ( var notifications = (
<Row> <Row>
<Col md={ 12 }> <Col md={ 12 }>
<h2>Notifications</h2> <h2>Notifications</h2> Configure, that the taskicon in the taskbar blinks when you were mentioned.
{ notificationElements } { notificationElements }
</Col> </Col>
</Row> </Row>

View file

@ -190,6 +190,7 @@ app.on('ready', function() {
content: arg.options.body content: arg.options.body
}); });
/* Todo: add idle here */
if (config.notifications.flashWindow == 2) { if (config.notifications.flashWindow == 2) {
mainWindow.flashFrame(true); mainWindow.flashFrame(true);
} }
@ -213,8 +214,8 @@ app.on('ready', function() {
} }
else { else {
trayIcon.setImage(trayImages.normal); trayIcon.setImage(trayImages.normal);
mainWindow.flashFrame(false);
trayIcon.setToolTip(app.getName()); trayIcon.setToolTip(app.getName());
mainWindow.flashFrame(false);
} }
}); });
} }