diff --git a/src/popup/app/vault/vaultController.js b/src/popup/app/vault/vaultController.js index e5be32bb36..2df6b038a1 100644 --- a/src/popup/app/vault/vaultController.js +++ b/src/popup/app/vault/vaultController.js @@ -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 = {}; diff --git a/src/popup/app/vault/views/vault.html b/src/popup/app/vault/views/vault.html index 72100efcfb..cbbb7d9412 100644 --- a/src/popup/app/vault/views/vault.html +++ b/src/popup/app/vault/views/vault.html @@ -10,7 +10,7 @@
-
+
@@ -32,7 +32,7 @@
-
+
{{::i18n.folders}} {{vaultFolders.length}} @@ -75,6 +75,26 @@
+
+
+ {{::i18n.noneFolder}} + {{noFolderCiphers.length}} +
+ +