mirror of
https://github.com/bitwarden/browser
synced 2025-12-12 06:13:38 +00:00
load vault data on view/modal events
This commit is contained in:
@@ -6,6 +6,14 @@
|
|||||||
$scope.sites = [];
|
$scope.sites = [];
|
||||||
$scope.folders = [];
|
$scope.folders = [];
|
||||||
|
|
||||||
|
$scope.$on("$ionicView.enter", function (event, data) {
|
||||||
|
loadVault();
|
||||||
|
});
|
||||||
|
|
||||||
|
function loadVault() {
|
||||||
|
$scope.sites = [];
|
||||||
|
$scope.folders = [];
|
||||||
|
|
||||||
var decSites = [];
|
var decSites = [];
|
||||||
var decFolders = [{
|
var decFolders = [{
|
||||||
id: null,
|
id: null,
|
||||||
@@ -54,6 +62,7 @@
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
}
|
||||||
|
|
||||||
function decrypt(cipherString, index) {
|
function decrypt(cipherString, index) {
|
||||||
return $q(function (resolve, reject) {
|
return $q(function (resolve, reject) {
|
||||||
@@ -88,21 +97,8 @@
|
|||||||
$scope.addSiteModal.hide();
|
$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 () {
|
$scope.$on('modal.hidden', function () {
|
||||||
console.log('modal hidden');
|
console.log('modal hidden');
|
||||||
// Execute action
|
loadVault();
|
||||||
});
|
|
||||||
|
|
||||||
// Execute action on remove modal
|
|
||||||
$scope.$on('modal.removed', function () {
|
|
||||||
console.log('modal removed');
|
|
||||||
// Execute action
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user