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

View file

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