-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2773 from cmgustavo/feat/copay-desktop
Feat/copay desktop
- Loading branch information
Showing
14 changed files
with
123 additions
and
81 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
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 was deleted.
Oops, something went wrong.
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
Binary file not shown.
Binary file not shown.
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
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 |
---|---|---|
@@ -1,8 +1,8 @@ | ||
'use strict'; | ||
angular.module('copayApp.services') | ||
.factory('logHeader', function($log, isChromeApp, isCordova) { | ||
.factory('logHeader', function($log, isChromeApp, isCordova, nodeWebkit) { | ||
$log.info('Starting Copay v' + window.version + ' #' + window.commitHash); | ||
$log.info('Client: isCordova:', isCordova, 'isChromeApp:', isChromeApp); | ||
$log.info('Client: isCordova:', isCordova, 'isChromeApp:', isChromeApp, 'isNodeWebkit:', nodeWebkit.isDefined()); | ||
$log.info('Navigator:', navigator.userAgent); | ||
return {}; | ||
}); |
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,42 @@ | ||
'use strict'; | ||
|
||
angular.module('copayApp.services').factory('nodeWebkit', function nodeWebkitFactory() { | ||
var root = {}; | ||
|
||
var isNodeWebkit = function() { | ||
var isNode = (typeof process !== "undefined" && typeof require !== "undefined"); | ||
if(isNode) { | ||
try { | ||
return (typeof require('nw.gui') !== "undefined"); | ||
} catch(e) { | ||
return false; | ||
} | ||
} | ||
}; | ||
|
||
root.isDefined = function() { | ||
return isNodeWebkit(); | ||
}; | ||
|
||
root.readFromClipboard = function() { | ||
if (!isNodeWebkit()) return; | ||
var gui = require('nw.gui'); | ||
var clipboard = gui.Clipboard.get(); | ||
return clipboard.get(); | ||
}; | ||
|
||
root.writeToClipboard = function(text) { | ||
if (!isNodeWebkit()) return; | ||
var gui = require('nw.gui'); | ||
var clipboard = gui.Clipboard.get(); | ||
return clipboard.set(text); | ||
}; | ||
|
||
root.openExternalLink = function(url) { | ||
if (!isNodeWebkit()) return; | ||
var gui = require('nw.gui'); | ||
return gui.Shell.openExternal(url); | ||
}; | ||
|
||
return root; | ||
}); |
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,14 @@ | ||
# Copay NW.js | ||
|
||
NW.js (also know as node-webkit) is an app runtime based on `Chromium` and `node.js`. To build desktop native application, Copay uses NW.js. | ||
|
||
## Building Copay for OSX, Linux and Windows versions | ||
|
||
**Requirements** | ||
|
||
- Install NW.js in your system from [nw.js](http://nwjs.io/) | ||
|
||
**Builder** | ||
|
||
- Try `grunt desktop` (*) | ||
|