File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed
Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change 11var React = require ( 'react' ) ;
22var Reflux = require ( 'reflux' ) ;
3- var _ = require ( 'underscore' ) ;
43var Loading = require ( 'reloading' ) ;
4+ var _ = require ( 'underscore' ) ;
5+ var remote = window . require ( 'remote' ) ;
6+ var shell = remote . require ( 'shell' ) ;
57
68var Actions = require ( '../actions/actions' ) ;
79var NotificationsStore = require ( '../stores/notifications' ) ;
@@ -29,15 +31,21 @@ var Notifications = React.createClass({
2931 this . setState ( { loading : false } ) ;
3032 } ,
3133
34+ openRepoBrowser : function ( e ) {
35+ var url = this . state . notifications [ e ] [ 0 ] . repository . html_url ;
36+ shell . openExternal ( url ) ;
37+ } ,
38+
3239 render : function ( ) {
3340 var notifications ;
41+ var self = this ;
3442
3543 if ( ! _ . isEmpty ( this . state . notifications ) ) {
3644 notifications = (
3745 _ . map ( this . state . notifications , function ( repo , i ) {
3846 return (
3947 < div key = { i } >
40- < h4 > { i } </ h4 >
48+ < h4 onClick = { self . openRepoBrowser . bind ( self , i ) } > { i } </ h4 >
4149 { repo . map ( function ( as , df ) {
4250 return (
4351 < SingleNotification notification = { as } key = { as . id } />
You can’t perform that action at this time.
0 commit comments