mirror of
https://github.com/bitwarden/browser.git
synced 2024-11-08 09:43:42 +01:00
no folder items on main vault page when no colls
This commit is contained in:
parent
f77e3b09ea
commit
e6b0032933
@ -30,6 +30,10 @@ angular
|
|||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$scope.favoriteCiphers = $filter('filter')($rootScope.vaultCiphers, { favorite: true });
|
$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) {
|
if (!$rootScope.vaultFolders) {
|
||||||
@ -37,6 +41,7 @@ angular
|
|||||||
delayLoad = false;
|
delayLoad = false;
|
||||||
$scope.loaded = false;
|
$scope.loaded = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!$rootScope.vaultCollections) {
|
if (!$rootScope.vaultCollections) {
|
||||||
$rootScope.vaultCollections = [];
|
$rootScope.vaultCollections = [];
|
||||||
delayLoad = false;
|
delayLoad = false;
|
||||||
@ -75,6 +80,14 @@ angular
|
|||||||
$rootScope.vaultCiphers = decCiphers;
|
$rootScope.vaultCiphers = decCiphers;
|
||||||
$scope.favoriteCiphers = $filter('filter')($rootScope.vaultCiphers, { favorite: true });
|
$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) {
|
if ($scope.showGroupingCounts) {
|
||||||
var folderCounts = { 'none': 0 };
|
var folderCounts = { 'none': 0 };
|
||||||
var collectionCounts = {};
|
var collectionCounts = {};
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="content content-tabs">
|
<div class="content content-tabs">
|
||||||
<!-- Grouping List -->
|
<!-- Grouping List -->
|
||||||
<div ng-if="vaultCiphers.length && vaultFolders.length && (!searchText || searchText.length < 2)">
|
<div ng-if="vaultCiphers.length && (!searchText || searchText.length < 2)">
|
||||||
<div class="list">
|
<div class="list">
|
||||||
<div class="list-section" ng-if="favoriteCiphers.length">
|
<div class="list-section" ng-if="favoriteCiphers.length">
|
||||||
<div class="list-section-header">
|
<div class="list-section-header">
|
||||||
@ -32,7 +32,7 @@
|
|||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="list-section">
|
<div class="list-section" ng-if="vaultFolders.length">
|
||||||
<div class="list-section-header">
|
<div class="list-section-header">
|
||||||
{{::i18n.folders}}
|
{{::i18n.folders}}
|
||||||
<span>{{vaultFolders.length}}</span>
|
<span>{{vaultFolders.length}}</span>
|
||||||
@ -75,6 +75,26 @@
|
|||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="list-section" ng-if="noFolderCiphers && noFolderCiphers.length">
|
||||||
|
<div class="list-section-header">
|
||||||
|
{{::i18n.noneFolder}}
|
||||||
|
<span>{{noFolderCiphers.length}}</span>
|
||||||
|
</div>
|
||||||
|
<div class="list-section-items">
|
||||||
|
<a href="#" stop-click ng-click="viewCipher(cipher)" class="list-section-item condensed"
|
||||||
|
title="{{::i18n.view}}"
|
||||||
|
ng-repeat="cipher in noFolderCiphers | orderBy: ['name', 'subTitle'] track by $index">
|
||||||
|
<action-buttons cipher="cipher"></action-buttons>
|
||||||
|
<icon cipher="cipher"></icon>
|
||||||
|
<span class="text">
|
||||||
|
{{cipher.name}}
|
||||||
|
<i class="fa fa-share-alt text-muted" ng-if="cipher.organizationId" title="{{::i18n.shared}}"></i>
|
||||||
|
<i class="fa fa-paperclip text-muted" ng-if="cipher.attachments" title="{{::i18n.attachments}}"></i>
|
||||||
|
</span>
|
||||||
|
<span class="detail">{{cipher.subTitle}}</span>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!-- Search Results List -->
|
<!-- Search Results List -->
|
||||||
|
Loading…
Reference in New Issue
Block a user