added handling of importing a backup
This commit is contained in:
parent
4dbad23eac
commit
11c1157f9e
3 changed files with 24 additions and 4 deletions
|
|
@ -19,6 +19,17 @@ angular.module('copay.import').controller('ImportController',
|
|||
});
|
||||
};
|
||||
|
||||
$scope.openFileDialog = function() {
|
||||
if (window.cshell) {
|
||||
return cshell.send('backup:import');
|
||||
}
|
||||
$scope.choosefile = !$scope.choosefile;
|
||||
};
|
||||
|
||||
$scope.openPasteArea = function() {
|
||||
$scope.pastetext = !$scope.pastetext;
|
||||
};
|
||||
|
||||
$scope.getFile = function() {
|
||||
// If we use onloadend, we need to check the readyState.
|
||||
reader.onloadend = function(evt) {
|
||||
|
|
@ -48,7 +59,7 @@ angular.module('copay.import').controller('ImportController',
|
|||
}
|
||||
|
||||
$scope.loading = true;
|
||||
|
||||
|
||||
if (backupFile) {
|
||||
reader.readAsBinaryString(backupFile);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue