1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-17 00:33:44 +00:00

no folder items on main vault page when no colls

This commit is contained in:
Kyle Spearrin
2017-12-20 16:24:45 -05:00
parent f77e3b09ea
commit e6b0032933
2 changed files with 35 additions and 2 deletions

View File

@@ -30,6 +30,10 @@ angular
}
else {
$scope.favoriteCiphers = $filter('filter')($rootScope.vaultCiphers, { favorite: true });
if (!$rootScope.vaultCollections || !$rootScope.vaultCollections.length) {
$scope.noFolderCiphers = $filter('filter')($rootScope.vaultCiphers, { folderId: null });
}
}
if (!$rootScope.vaultFolders) {
@@ -37,6 +41,7 @@ angular
delayLoad = false;
$scope.loaded = false;
}
if (!$rootScope.vaultCollections) {
$rootScope.vaultCollections = [];
delayLoad = false;
@@ -75,6 +80,14 @@ angular
$rootScope.vaultCiphers = decCiphers;
$scope.favoriteCiphers = $filter('filter')($rootScope.vaultCiphers, { favorite: true });
if (!$rootScope.vaultCollections || !$rootScope.vaultCollections.length) {
$scope.noFolderCiphers = $filter('filter')($rootScope.vaultCiphers, { folderId: null });
if ($rootScope.vaultFolders && $rootScope.vaultFolders.length && !$rootScope.vaultFolders[0].id) {
$rootScope.vaultFolders = $rootScope.vaultFolders.slice(1);
}
}
if ($scope.showGroupingCounts) {
var folderCounts = { 'none': 0 };
var collectionCounts = {};