mirror of
https://github.com/bitwarden/browser.git
synced 2024-11-27 12:36:14 +01:00
force vault refresh upon importing
This commit is contained in:
parent
e010995b19
commit
d61b6c2faa
@ -77,7 +77,10 @@ angular
|
||||
url: '^/vault',
|
||||
templateUrl: 'app/vault/views/vault.html',
|
||||
controller: 'vaultController',
|
||||
data: { pageTitle: 'My Vault' }
|
||||
data: { pageTitle: 'My Vault' },
|
||||
params: {
|
||||
refreshFromServer: false
|
||||
}
|
||||
})
|
||||
.state('backend.user.subvaults', {
|
||||
url: '^/subvaults',
|
||||
|
@ -239,7 +239,7 @@
|
||||
folderRelationships: folderRelationships
|
||||
}, function () {
|
||||
$uibModalInstance.dismiss('cancel');
|
||||
$state.go('backend.user.vault').then(function () {
|
||||
$state.go('backend.user.vault', { refreshFromServer: true }).then(function () {
|
||||
$analytics.eventTrack('Imported Data', { label: $scope.model.source });
|
||||
toastr.success('Data has been successfully imported into your vault.', 'Import Success');
|
||||
});
|
||||
|
@ -2,11 +2,15 @@
|
||||
.module('bit.vault')
|
||||
|
||||
.controller('vaultController', function ($scope, $uibModal, apiService, $filter, cryptoService, authService, toastr,
|
||||
cipherService, $q, $localStorage, $timeout, $rootScope) {
|
||||
cipherService, $q, $localStorage, $timeout, $rootScope, $state) {
|
||||
$scope.loading = true;
|
||||
$scope.logins = [];
|
||||
$scope.favoriteCollapsed = $localStorage.collapsedFolders && 'favorite' in $localStorage.collapsedFolders;
|
||||
|
||||
if ($state.params.refreshFromServer) {
|
||||
$rootScope.vaultFolders = $rootScope.vaultLogins = null;
|
||||
}
|
||||
|
||||
$scope.$on('$viewContentLoaded', function () {
|
||||
if ($rootScope.vaultFolders && $rootScope.vaultLogins) {
|
||||
$scope.loading = false;
|
||||
|
Loading…
Reference in New Issue
Block a user