Skip to content

Commit

Permalink
Add hidden version
Browse files Browse the repository at this point in the history
  • Loading branch information
cameronmcefee committed Oct 26, 2017
1 parent f726fc2 commit 07b2780
Show file tree
Hide file tree
Showing 7 changed files with 30 additions and 5 deletions.
1 change: 1 addition & 0 deletions app/index.html
Expand Up @@ -88,5 +88,6 @@
<div class="status"></div>
</div>
</div>
<div class="version"></div>
</body>
</html>
2 changes: 2 additions & 0 deletions app/main.js
Expand Up @@ -34,6 +34,8 @@ app.on('ready', function() {
// Open the devtools.
// mainWindow.openDevTools();

global.version = app.getVersion();

// Emitted when the window is closed.
mainWindow.on('closed', function() {
// Dereference the window object, usually you would store windows
Expand Down
6 changes: 3 additions & 3 deletions app/package.json
@@ -1,5 +1,5 @@
{
"name" : "your-app",
"version" : "0.1.0",
"name" : "ZXPInstaller",
"version": "1.6.2",
"main" : "main.js"
}
}
8 changes: 8 additions & 0 deletions app/src/main.js
Expand Up @@ -25,6 +25,12 @@ global.View = function() {
.html(message);
};

var updateVersion = function(message) {
$(body)
.find('.version')
.html(message);
};

var toggleSpinner = function(state) {
resetClasses();
$(body).toggleClass('is-showing-spinner', state);
Expand Down Expand Up @@ -68,6 +74,8 @@ global.View = function() {
// PUBLIC

this.init = function() {
updateVersion(remote.getGlobal('version'));

document.ondragover = function() {
resetClasses();
$(body).addClass('is-dragging');
Expand Down
14 changes: 14 additions & 0 deletions app/style.css
Expand Up @@ -156,3 +156,17 @@ body {
animation-delay: .6s;
-webkit-animation-delay: .6s;
}

.version {
color: #5c1820;
padding: 5px 10px;
position: absolute;
bottom: 0;
right: 0;
cursor: default;
font-size: 12px;
}

.version:hover {
color: #fff;
}
2 changes: 1 addition & 1 deletion docs/publish-a-release.md
Expand Up @@ -4,7 +4,7 @@

1. Be sure you’ve merged your changes into `master`.

1. If you haven’t already, the version number in `[package.json](../package.json)` and commit your change.
1. If you haven’t already, the version number in `[app/package.json](../app/package.json)` and commit your change.

1. Tag the release in `master`.

Expand Down
2 changes: 1 addition & 1 deletion package.json
@@ -1,6 +1,6 @@
{
"name": "zxpinstaller",
"version": "1.6.1",
"version": "1.6.2",
"description": "An open source Adobe extension installer",
"main": "index.js",
"priave": true,
Expand Down

0 comments on commit 07b2780

Please sign in to comment.