Merge branch 'wallet/task/420' into wallet/task/416
This commit is contained in:
commit
9a9ddbc413
16 changed files with 910 additions and 17 deletions
|
|
@ -17,7 +17,27 @@ angular.module('copayApp.services').factory('clipboardService', function ($http,
|
|||
// No 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(text => {
|
||||
cb(text);
|
||||
})
|
||||
.catch(err => {
|
||||
$log.debug("Clipboard reading is not supported in browser..");
|
||||
});
|
||||
|
||||
return;
|
||||
}
|
||||
};
|
||||
|
||||
return root;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue