Skip to content

Commit 9928c8b

Browse files
Merge pull request #13 from ekonstantinidis/footer
Footer
2 parents acdba5e + 0b84697 commit 9928c8b

File tree

14 files changed

+95
-30
lines changed

14 files changed

+95
-30
lines changed

README.md

Lines changed: 21 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
1-
Github Notifier [![Build Status](https://magnum.travis-ci.com/ekonstantinidis/github-notifier.svg?token=9QR4ewbqbkEmHps6q5sq&branch=master)](https://magnum.travis-ci.com/ekonstantinidis/github-notifier)
1+
Gitify [![Build Status](https://magnum.travis-ci.com/ekonstantinidis/gitify.svg?token=9QR4ewbqbkEmHps6q5sq&branch=master)](https://magnum.travis-ci.com/ekonstantinidis/gitify)
22
==========
3-
Github Notifications on your menu bar.
3+
GitHub Notifications on your menu bar.
4+
5+
![Gitify](images/press.png)
46

57
### Prerequisites
68

7-
- Electron
8-
- ReactJS
9-
- Grunt
10-
- NPM
9+
- Electron [+](http://electron.atom.io/)
10+
- React [+](https://facebook.github.io/react/)
11+
- Grunt [+](http://gruntjs.com/)
12+
- NPM [+](https://www.npmjs.com/)
1113

1214

1315
### Installation
@@ -16,14 +18,22 @@ If you encounter any issues with `npm install`, then run `ulimit -n 512`.
1618
npm install
1719

1820

19-
### Development
20-
To watch for changes in the `src` directory:
21+
### Development
22+
To watch for changes in the `src` directory:
23+
24+
npm run watch
25+
26+
To run the actual **electron app**:
27+
28+
npm start
29+
2130

22-
npm run watch
31+
### Distribution
32+
To prepare the app for distribution run:
2333

24-
To run the actual **electron app**:
34+
npm run dist
2535

26-
npm start
36+
Currently supports only OS X.
2737

2838

2939
### Tests (JsxHint)

images/app-icon.icns

106 KB
Binary file not shown.

images/logo-hor-white.png

18.7 KB
Loading

images/press.png

75.5 KB
Loading
Loading
Loading

main.js

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@ var Menu = require('menu');
88
var Tray = require('tray');
99
var BrowserWindow = require('browser-window');
1010

11-
var iconPlain = path.join(__dirname, 'images', 'github-tray-plain.png');
12-
var iconGreen = path.join(__dirname, 'images', 'github-tray-green.png');
11+
var iconIdle = path.join(__dirname, 'images', 'tray-idle.png');
12+
var iconActive = path.join(__dirname, 'images', 'tray-active.png');
1313

1414
app.on('ready', function(){
15-
appIcon = new Tray(iconPlain);
15+
appIcon = new Tray(iconIdle);
1616
initWindow();
1717

1818
appIcon.on('clicked', function clicked (e, bounds) {
@@ -60,13 +60,17 @@ app.on('ready', function(){
6060

6161
ipc.on('update-icon', function(event, arg) {
6262
var icon;
63-
if (arg == "IconGreen") {
64-
appIcon.setImage(iconGreen);
63+
if (arg == "TrayActive") {
64+
appIcon.setImage(iconActive);
6565
} else {
66-
appIcon.setImage(iconPlain);
66+
appIcon.setImage(iconIdle);
6767
}
6868
});
6969

70+
ipc.on('app-quit', function(event) {
71+
app.quit();
72+
});
73+
7074
app.dock.hide();
7175
appIcon.setToolTip('Github Notifications on your menu bar.');
7276
});

package.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"name": "github-notifier",
2+
"name": "gitify",
33
"version": "0.0.1",
44
"description": "Github Notifications on your menu bar.",
55
"main": "main.js",
@@ -9,12 +9,12 @@
99
"watch-js": "watchify -t reactify src/js/app.js -o build/js/app.js -v",
1010
"watch": "grunt build && npm build && npm run watch-js | grunt watch",
1111
"start": "electron .",
12-
"dist": "rm -rf Gitify.app/ && electron-packager . Gitify --platform=darwin --arch=x64 --version=0.26.1 --prune --ignore=src",
12+
"dist": "rm -rf Gitify.app/ && electron-packager . Gitify --platform=darwin --arch=x64 --version=0.26.1 --icon=images/app-icon.icns --prune --ignore=src",
1313
"test": "jsxhint --reporter node_modules/jshint-stylish/stylish.js 'src/**/*.js', 'index.js' --exclude 'Gruntfile.js'"
1414
},
1515
"repository": {
1616
"type": "git",
17-
"url": "https://github.com/ekonstantinidis/github-notifier.git"
17+
"url": "https://github.com/ekonstantinidis/gitify.git"
1818
},
1919
"keywords": [
2020
"github",
@@ -26,9 +26,9 @@
2626
"author": "Emmanouil Konstantinidis",
2727
"license": "MIT",
2828
"bugs": {
29-
"url": "https://github.com/ekonstantinidis/github-notifier/issues"
29+
"url": "https://github.com/ekonstantinidis/gitify/issues"
3030
},
31-
"homepage": "https://github.com/ekonstantinidis/github-notifier",
31+
"homepage": "https://github.com/ekonstantinidis/gitify",
3232
"dependencies": {
3333
"bootstrap": "=3.3.4",
3434
"browserify": "=10.2.1",

src/js/app.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ var Router = require('react-router');
33

44
var AuthStore = require('./stores/auth');
55
var Navigation = require('./components/navigation');
6+
var Footer = require('./components/footer');
67
var LoginPage = require('./components/login');
78
var NotificationsPage = require('./components/notifications');
89

@@ -26,6 +27,7 @@ var App = React.createClass({
2627
<div>
2728
<Navigation />
2829
<RouteHandler />
30+
<Footer />
2931
</div>
3032
);
3133
}

src/js/components/footer.js

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
var React = require('react');
2+
var remote = window.require('remote');
3+
var shell = remote.require('shell');
4+
5+
var Footer = React.createClass({
6+
7+
openRepoBrowser: function () {
8+
shell.openExternal('http://www.github.com/ekonstantinidis/gitify');
9+
},
10+
11+
render: function () {
12+
return (
13+
<div className='container-fluid footer'>
14+
<div className='row'>
15+
<div className='col-xs-12 right' onClick={this.openRepoBrowser}>Fork me on <span className="octicon octicon-mark-github"/></div>
16+
</div>
17+
</div>
18+
);
19+
}
20+
});
21+
22+
module.exports = Footer;

0 commit comments

Comments
 (0)