Merge branch 'wallet/sprint/20' into wallet/task/426
This commit is contained in:
commit
6463d5df34
43 changed files with 789 additions and 999 deletions
|
|
@ -22,7 +22,27 @@ angular.module('copayApp.services').factory('clipboardService', function ($http,
|
|||
// Not supported
|
||||
return;
|
||||
}
|
||||
};
|
||||
|
||||
root.readFromClipboard = function (cb) {
|
||||
$log.debug("Read from clipboard");
|
||||
if (platformInfo.isCordova) {
|
||||
cordova.plugins.clipboard.paste(function(text) {
|
||||
cb(text);
|
||||
})
|
||||
} else if (platformInfo.isNW) {
|
||||
cb(nodeWebkitService.readFromClipboard());
|
||||
} else {
|
||||
navigator.clipboard.readText()
|
||||
.then(function (text) {
|
||||
cb(text);
|
||||
})
|
||||
.catch(function (err) {
|
||||
$log.debug("Clipboard reading is not supported in browser..");
|
||||
});
|
||||
|
||||
return;
|
||||
}
|
||||
};
|
||||
|
||||
return root;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue