-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update checking now works, added dev keys
- Loading branch information
Milan Kragujević
committed
Oct 27, 2015
1 parent
8d03ae5
commit ec88e99
Showing
7 changed files
with
112 additions
and
83 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
$(document).on('keydown', function(e) { | ||
var gui = require('nw.gui'); | ||
var win = gui.Window.get(); | ||
if(e.keyCode == 123) { | ||
win.showDevTools(); | ||
} else if(e.keyCode == 116) { | ||
win.reloadDev(); | ||
} | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,4 @@ | ||
<script src="http://code.jquery.com/jquery-2.1.4.min.js"></script> | ||
<script src="tray.js"></script> | ||
<script src="developer.js"></script> | ||
<script src="index.js"></script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
var openURL = function(url) { | ||
return require('nw.gui').Shell.openExternal(url); | ||
}; | ||
var hideWindow = function() { | ||
require('nw.gui').Window.get().hide(); | ||
}; | ||
var fs = require('fs'); | ||
var path = require('path'); | ||
var config = JSON.parse(fs.readFileSync(path.resolve('config.json'))); | ||
var version = config.version; | ||
$.get('http://showstream.xyz/update', function(data) { | ||
$('.spinner').fadeOut(300); | ||
if(data.version == version) { | ||
$('.no-updates').fadeIn(300); | ||
} else { | ||
$('.update-available').fadeIn(300); | ||
} | ||
}).fail(function() { | ||
$('.spinner').fadeOut(300); | ||
$('.server-error').fadeIn(300); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
.container { | ||
background: #2195F1; | ||
width: 100%; | ||
height: 100%; | ||
position: absolute; | ||
top: 0px; | ||
left: 0px; | ||
} | ||
|
||
.spinner { | ||
position: absolute; | ||
top: 50%; | ||
left: 50%; | ||
margin-top: -30px; | ||
margin-left: -30px; | ||
} | ||
|
||
.no-updates, .server-error { | ||
display: none; | ||
position: absolute; | ||
top: 50%; | ||
left: 0px; | ||
width: 100%; | ||
margin-top: -25px; | ||
-webkit-user-select: none; | ||
cursor: default; | ||
} | ||
|
||
.no-updates span, .server-error span { | ||
display: block; | ||
text-align: center; | ||
color: #FFF; | ||
font-family: 'Asap'; | ||
font-weight: 700; | ||
font-size: 25px; | ||
} | ||
|
||
.update-available { | ||
display: none; | ||
position: absolute; | ||
top: 50%; | ||
left: 0px; | ||
width: 100%; | ||
margin-top: -45px; | ||
-webkit-user-select: none; | ||
cursor: default; | ||
} | ||
|
||
.update-available span { | ||
display: block; | ||
text-align: center; | ||
color: #FFF; | ||
font-family: 'Asap'; | ||
font-weight: 700; | ||
font-size: 25px; | ||
} | ||
|
||
.update-available i { | ||
display: block; | ||
text-align: center; | ||
color: #FFF; | ||
font-family: 'Asap'; | ||
font-size: 15px; | ||
margin-top: 10px; | ||
} | ||
|
||
.update-available i a { | ||
color: #fff; | ||
text-decoration: none; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters