added handling of importing a backup

This commit is contained in:
Gordon Hall 2014-06-03 15:48:27 -04:00
commit 11c1157f9e
3 changed files with 24 additions and 4 deletions

View file

@ -78,6 +78,15 @@
ctrl.email();
});
ipc.on('backup:import', function(data) {
location.href = '#/import';
var ctrl = controller('ImportController');
if (!ctrl) return;
ctrl.backupText = data;
ctrl.openPasteArea();
ctrl.$apply();
});
// let the shell know when an error occurs
window.onerror = function(err) {
ipc.send('error', err);