mirror of
https://github.com/bitwarden/browser
synced 2025-12-11 22:03:36 +00:00
load vault data on view/modal events
This commit is contained in:
@@ -6,6 +6,14 @@
|
||||
$scope.sites = [];
|
||||
$scope.folders = [];
|
||||
|
||||
$scope.$on("$ionicView.enter", function (event, data) {
|
||||
loadVault();
|
||||
});
|
||||
|
||||
function loadVault() {
|
||||
$scope.sites = [];
|
||||
$scope.folders = [];
|
||||
|
||||
var decSites = [];
|
||||
var decFolders = [{
|
||||
id: null,
|
||||
@@ -54,6 +62,7 @@
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
function decrypt(cipherString, index) {
|
||||
return $q(function (resolve, reject) {
|
||||
@@ -88,21 +97,8 @@
|
||||
$scope.addSiteModal.hide();
|
||||
};
|
||||
|
||||
// Cleanup the modal when we're done with it!
|
||||
$scope.$on('$destroy', function () {
|
||||
console.log('modal destroyed');
|
||||
$scope.addSiteModal.remove();
|
||||
});
|
||||
|
||||
// Execute action on hide modal
|
||||
$scope.$on('modal.hidden', function () {
|
||||
console.log('modal hidden');
|
||||
// Execute action
|
||||
});
|
||||
|
||||
// Execute action on remove modal
|
||||
$scope.$on('modal.removed', function () {
|
||||
console.log('modal removed');
|
||||
// Execute action
|
||||
loadVault();
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user