diff --git a/src/app/config.js b/src/app/config.js index bb733694cb..0b665f3fb3 100644 --- a/src/app/config.js +++ b/src/app/config.js @@ -190,7 +190,10 @@ angular url: '/organization/:orgId/vault?viewEvents&search', templateUrl: 'app/organization/views/organizationVault.html', controller: 'organizationVaultController', - data: { pageTitle: 'Organization Vault' } + data: { + pageTitle: 'Organization Vault', + controlSidebar: true + } }) .state('backend.org.groups', { url: '/organization/:orgId/groups?search', @@ -349,7 +352,7 @@ angular // user is guaranteed to be authenticated becuase of previous check if (toState.name.indexOf('backend.org.') > -1 && toParams.orgId) { // clear vault rootScope when visiting org admin section - $rootScope.vaultCiphers = $rootScope.vaultGroupings = null; + $rootScope.vaultCiphers = $rootScope.vaultFolders = $rootScope.vaultCollections = null; authService.getUserProfile().then(function (profile) { var orgs = profile.organizations; diff --git a/src/app/global/mainController.js b/src/app/global/mainController.js index 09d35cfb57..a6878c434a 100644 --- a/src/app/global/mainController.js +++ b/src/app/global/mainController.js @@ -49,10 +49,6 @@ angular vm.openControlSidebar = vm.usingControlSidebar && $document.width() > 768; }); - $scope.$on('setSearchVaultText', function (event, val) { - vm.searchVaultText = val; - }); - $scope.addCipher = function () { $scope.$broadcast('vaultAddCipher'); }; diff --git a/src/app/global/sideNavController.js b/src/app/global/sideNavController.js index 8a60c211bc..287e60d626 100644 --- a/src/app/global/sideNavController.js +++ b/src/app/global/sideNavController.js @@ -51,14 +51,6 @@ angular $state.go('backend.org.dashboard', { orgId: org.id }); }; - $scope.searchVault = function () { - $state.go('backend.user.vault'); - }; - - $scope.searchOrganizationVault = function () { - $state.go('backend.org.vault', { orgId: $state.params.orgId }); - }; - $scope.isOrgOwner = function (org) { return org && org.type === constants.orgUserType.owner; }; diff --git a/src/app/organization/organizationVaultAddCipherController.js b/src/app/organization/organizationVaultAddCipherController.js index 7fa3a377b7..d7c659a9f3 100644 --- a/src/app/organization/organizationVaultAddCipherController.js +++ b/src/app/organization/organizationVaultAddCipherController.js @@ -2,12 +2,12 @@ .module('bit.organization') .controller('organizationVaultAddCipherController', function ($scope, apiService, $uibModalInstance, cryptoService, - cipherService, passwordService, $analytics, authService, orgId, $uibModal, constants) { + cipherService, passwordService, $analytics, authService, orgId, $uibModal, constants, selectedType) { $analytics.eventTrack('organizationVaultAddCipherController', { category: 'Modal' }); $scope.constants = constants; - $scope.selectedType = constants.cipherType.login.toString(); + $scope.selectedType = selectedType ? selectedType.toString() : constants.cipherType.login.toString(); $scope.cipher = { - type: constants.cipherType.login, + type: selectedType || constants.cipherType.login, login: { uris: [{ uri: null, diff --git a/src/app/organization/organizationVaultController.js b/src/app/organization/organizationVaultController.js index 77f0225904..d910e8e573 100644 --- a/src/app/organization/organizationVaultController.js +++ b/src/app/organization/organizationVaultController.js @@ -2,11 +2,18 @@ .module('bit.organization') .controller('organizationVaultController', function ($scope, apiService, cipherService, $analytics, $q, $state, - $localStorage, $uibModal, $filter, authService, $uibModalStack) { + $localStorage, $uibModal, $filter, authService, $uibModalStack, constants, $timeout) { $scope.ciphers = []; $scope.collections = []; $scope.loading = true; $scope.useEvents = false; + $scope.constants = constants; + $scope.filter = undefined; + $scope.selectedType = undefined; + $scope.selectedCollection = undefined; + $scope.selectedAll = true; + $scope.selectedTitle = 'All'; + $scope.selectedIcon = 'fa-th'; $scope.$on('$viewContentLoaded', function () { authService.getUserProfile().then(function (profile) { @@ -19,14 +26,11 @@ var collectionPromise = apiService.collections.listOrganization({ orgId: $state.params.orgId }, function (collections) { var decCollections = [{ id: null, - name: 'Unassigned', - collapsed: $localStorage.collapsedOrgCollections && 'unassigned' in $localStorage.collapsedOrgCollections + name: 'Unassigned' }]; for (var i = 0; i < collections.Data.length; i++) { var decCollection = cipherService.decryptCollection(collections.Data[i], null, true); - decCollection.collapsed = $localStorage.collapsedOrgCollections && - decCollection.id in $localStorage.collapsedOrgCollections; decCollections.push(decCollection); } @@ -51,7 +55,7 @@ if ($state.params.search) { $uibModalStack.dismissAll(); - $scope.$emit('setSearchVaultText', $state.params.search); + $scope.searchVaultText = $state.params.search; } if ($state.params.viewEvents) { @@ -64,16 +68,6 @@ }); }); - $scope.filterByCollection = function (collection) { - return function (cipher) { - if (!cipher.collectionIds || !cipher.collectionIds.length) { - return collection.id === null; - } - - return cipher.collectionIds.indexOf(collection.id) > -1; - }; - }; - $scope.collectionSort = function (item) { if (!item.id) { return ''; @@ -82,21 +76,6 @@ return item.name.toLowerCase(); }; - $scope.collapseExpand = function (collection) { - if (!$localStorage.collapsedOrgCollections) { - $localStorage.collapsedOrgCollections = {}; - } - - var id = collection.id || 'unassigned'; - - if (id in $localStorage.collapsedOrgCollections) { - delete $localStorage.collapsedOrgCollections[id]; - } - else { - $localStorage.collapsedOrgCollections[id] = true; - } - }; - $scope.editCipher = function (cipher) { var editModel = $uibModal.open({ animation: true, @@ -136,7 +115,8 @@ templateUrl: 'app/vault/views/vaultAddCipher.html', controller: 'organizationVaultAddCipherController', resolve: { - orgId: function () { return $state.params.orgId; } + orgId: function () { return $state.params.orgId; }, + selectedType: function () { return $scope.selectedType; } } }); @@ -205,28 +185,6 @@ }); }; - $scope.removeCipher = function (cipher, collection) { - if (!confirm('Are you sure you want to remove this item (' + cipher.name + ') from the ' + - 'collection (' + collection.name + ') ?')) { - return; - } - - var request = { - collectionIds: [] - }; - - for (var i = 0; i < cipher.collectionIds.length; i++) { - if (cipher.collectionIds[i] !== collection.id) { - request.collectionIds.push(cipher.collectionIds[i]); - } - } - - apiService.ciphers.putCollections({ id: cipher.id }, request).$promise.then(function (response) { - $analytics.eventTrack('Removed Cipher From Collection'); - cipher.collectionIds = request.collectionIds; - }); - }; - $scope.deleteCipher = function (cipher) { if (!confirm('Are you sure you want to delete this item (' + cipher.name + ')?')) { return; @@ -240,4 +198,72 @@ } }); }; + + $scope.filterCollection = function (col) { + resetSelected(); + $scope.selectedCollection = col; + $scope.selectedIcon = 'fa-cube'; + $scope.filter = function (c) { + return c.collectionIds && c.collectionIds.indexOf(col.id) > -1; + }; + fixLayout(); + }; + + $scope.filterType = function (t) { + resetSelected(); + $scope.selectedType = t; + switch (t) { + case constants.cipherType.login: + $scope.selectedTitle = 'Login'; + $scope.selectedIcon = 'fa-globe'; + break; + case constants.cipherType.card: + $scope.selectedTitle = 'Card'; + $scope.selectedIcon = 'fa-credit-card'; + break; + case constants.cipherType.identity: + $scope.selectedTitle = 'Identity'; + $scope.selectedIcon = 'fa-id-card-o'; + break; + case constants.cipherType.secureNote: + $scope.selectedTitle = 'Secure Note'; + $scope.selectedIcon = 'fa-sticky-note-o'; + break; + default: + break; + } + $scope.filter = function (c) { + return c.type === t; + }; + fixLayout(); + }; + + $scope.filterAll = function () { + resetSelected(); + $scope.selectedAll = true; + $scope.selectedTitle = 'All'; + $scope.selectedIcon = 'fa-th'; + $scope.filter = null; + fixLayout(); + }; + + function resetSelected() { + $scope.selectedCollection = undefined; + $scope.selectedType = undefined; + $scope.selectedAll = false; + } + + function fixLayout() { + if ($.AdminLTE && $.AdminLTE.layout) { + $timeout(function () { + $.AdminLTE.layout.fix(); + }, 0); + } + } + + $scope.cipherFilter = function () { + return function (cipher) { + return !$scope.filter || $scope.filter(cipher); + }; + }; }); diff --git a/src/app/organization/views/organizationDashboard.html b/src/app/organization/views/organizationDashboard.html index 7e6e89c61b..82bc953b05 100644 --- a/src/app/organization/views/organizationDashboard.html +++ b/src/app/organization/views/organizationDashboard.html @@ -22,7 +22,7 @@

Let's Get Started!

-

Dashboard features are coming soon. Get started by inviting users and creating your collections.

+

Get started by inviting users and creating your collections.

Invite Users diff --git a/src/app/organization/views/organizationVault.html b/src/app/organization/views/organizationVault.html index 4ef3c0b61e..b41ab1d84f 100644 --- a/src/app/organization/views/organizationVault.html +++ b/src/app/organization/views/organizationVault.html @@ -10,31 +10,22 @@
-

Loading...

-
+

Loading...

+

- - {{collection.name}} - + + {{selectedCollection ? selectedCollection.name : selectedTitle}} +

-
- -
-
-
No items in this collection.
-
No unassigned items.
-
+
+
No items to list.
+
- +
+ diff --git a/src/app/services/authService.js b/src/app/services/authService.js index 87eaae9744..33d76db57e 100644 --- a/src/app/services/authService.js +++ b/src/app/services/authService.js @@ -95,7 +95,7 @@ angular _service.logOut = function () { tokenService.clearTokens(); cryptoService.clearKeys(); - $rootScope.vaultGroupings = $rootScope.vaultCiphers = null; + $rootScope.vaultCiphers = $rootScope.vaultFolders = $rootScope.vaultCollections = null; _userProfile = null; }; diff --git a/src/app/vault/vaultAddCipherController.js b/src/app/vault/vaultAddCipherController.js index 137deaf797..670cf3f2b2 100644 --- a/src/app/vault/vaultAddCipherController.js +++ b/src/app/vault/vaultAddCipherController.js @@ -2,15 +2,16 @@ .module('bit.vault') .controller('vaultAddCipherController', function ($scope, apiService, $uibModalInstance, cryptoService, cipherService, - passwordService, selectedFolder, $analytics, checkedFavorite, $rootScope, authService, $uibModal, constants, $filter) { + passwordService, selectedFolder, $analytics, checkedFavorite, $rootScope, authService, $uibModal, constants, + $filter, selectedType) { $analytics.eventTrack('vaultAddCipherController', { category: 'Modal' }); - $scope.folders = $filter('filter')($rootScope.vaultGroupings, { folder: true }); + $scope.folders = $rootScope.vaultFolders; $scope.constants = constants; - $scope.selectedType = constants.cipherType.login.toString(); + $scope.selectedType = selectedType ? selectedType.toString() : constants.cipherType.login.toString(); $scope.cipher = { folderId: selectedFolder ? selectedFolder.id : null, favorite: checkedFavorite === true, - type: constants.cipherType.login, + type: selectedType || constants.cipherType.login, login: { uris: [{ uri: null, diff --git a/src/app/vault/vaultController.js b/src/app/vault/vaultController.js index 5f936ea854..cc975f8b2b 100644 --- a/src/app/vault/vaultController.js +++ b/src/app/vault/vaultController.js @@ -5,24 +5,27 @@ cipherService, $q, $localStorage, $timeout, $rootScope, $state, $analytics, constants, validationService) { $scope.loading = true; $scope.ciphers = []; - $scope.folderCount = 0; - $scope.collectionCount = 0; - $scope.firstCollectionId = null; + $scope.folders = []; + $scope.collections = []; $scope.constants = constants; - $scope.favoriteCollapsed = $localStorage.collapsedFolders && 'favorite' in $localStorage.collapsedFolders; - $scope.groupingIdFilter = undefined; - $scope.typeFilter = undefined; + $scope.filter = undefined; + $scope.selectedType = undefined; + $scope.selectedFolder = undefined; + $scope.selectedCollection = undefined; + $scope.selectedFavorites = false; + $scope.selectedAll = true; + $scope.selectedTitle = 'All'; + $scope.selectedIcon = 'fa-th'; if ($state.params.refreshFromServer) { - $rootScope.vaultGroupings = $rootScope.vaultCiphers = null; + $rootScope.vaultFolders = $rootScope.vaultCollections = $rootScope.vaultCiphers = null; } $scope.$on('$viewContentLoaded', function () { $("#search").focus(); - if ($rootScope.vaultGroupings && $rootScope.vaultCiphers) { + if (($rootScope.vaultFolders || $rootScope.vaultCollections) && $rootScope.vaultCiphers) { $scope.loading = false; - loadGroupingData($rootScope.vaultGroupings); loadCipherData($rootScope.vaultCiphers); return; } @@ -31,30 +34,30 @@ }); function loadDataFromServer() { - var decGroupings = [{ + var decFolders = [{ id: null, - name: 'No Folder', - folder: true + name: 'No Folder' }]; + var decCollections = []; + var collectionPromise = apiService.collections.listMe({ writeOnly: false }, function (collections) { for (var i = 0; i < collections.Data.length; i++) { var decCollection = cipherService.decryptCollection(collections.Data[i], null, true); - decCollection.collection = true; - decGroupings.push(decCollection); + decCollections.push(decCollection); } }).$promise; var folderPromise = apiService.folders.list({}, function (folders) { for (var i = 0; i < folders.Data.length; i++) { var decFolder = cipherService.decryptFolderPreview(folders.Data[i]); - decFolder.folder = true; - decGroupings.push(decFolder); + decFolders.push(decFolder); } }).$promise; var groupingPromise = $q.all([collectionPromise, folderPromise]).then(function () { - loadGroupingData(decGroupings); + $rootScope.vaultCollections = decCollections; + $rootScope.vaultFolders = decFolders; }); var cipherPromise = apiService.ciphers.list({}, function (ciphers) { @@ -75,34 +78,7 @@ }); } - function loadGroupingData(decGroupings) { - $rootScope.vaultGroupings = $filter('orderBy')(decGroupings, ['folder', groupingSort]); - var collections = $filter('filter')($rootScope.vaultGroupings, { collection: true }); - $scope.collectionCount = collections.length; - $scope.folderCount = decGroupings.length - collections.length - 1; - if (collections && collections.length) { - $scope.firstCollectionId = collections[0].id; - } - } - function loadCipherData(decCiphers) { - angular.forEach($rootScope.vaultGroupings, function (grouping, groupingIndex) { - grouping.collapsed = $localStorage.collapsedFolders && - (grouping.id || 'none') in $localStorage.collapsedFolders; - - angular.forEach(decCiphers, function (cipherValue) { - if (cipherValue.favorite) { - cipherValue.sort = -1; - } - else if (grouping.folder && cipherValue.folderId == grouping.id) { - cipherValue.sort = groupingIndex; - } - else if (grouping.collection && cipherValue.collectionIds.indexOf(grouping.id) > -1) { - cipherValue.sort = groupingIndex; - } - }); - }); - $rootScope.vaultCiphers = $scope.ciphers = $filter('orderBy')(decCiphers, ['sort', 'name', 'subTitle']); var chunks = chunk($rootScope.vaultCiphers, 400); @@ -136,61 +112,19 @@ return chunks; } - function groupingSort(item) { + $scope.groupingSort = function (item) { if (!item.id) { return ''; } return item.name.toLowerCase(); - } + }; $scope.clipboardError = function (e) { alert('Your web browser does not support easy clipboard copying. ' + 'Edit the item and copy it manually instead.'); }; - $scope.collapseExpand = function (grouping, favorite) { - if (!$localStorage.collapsedFolders) { - $localStorage.collapsedFolders = {}; - } - - var id = favorite ? 'favorite' : (grouping.id || 'none'); - if (id in $localStorage.collapsedFolders) { - delete $localStorage.collapsedFolders[id]; - } - else { - $localStorage.collapsedFolders[id] = true; - } - }; - - $scope.collapseAll = function () { - if (!$localStorage.collapsedFolders) { - $localStorage.collapsedFolders = {}; - } - - $localStorage.collapsedFolders.none = true; - $localStorage.collapsedFolders.favorite = true; - - if ($rootScope.vaultGroupings) { - for (var i = 0; i < $rootScope.vaultGroupings.length; i++) { - $localStorage.collapsedFolders[$rootScope.vaultGroupings[i].id] = true; - } - } - - $('.box').addClass('collapsed-box'); - $('.box .box-header button i.fa-minus').removeClass('fa-minus').addClass('fa-plus'); - }; - - $scope.expandAll = function () { - if ($localStorage.collapsedFolders) { - delete $localStorage.collapsedFolders; - } - - $('.box').removeClass('collapsed-box'); - $('.box-body').show(); - $('.box .box-header button i.fa-plus').removeClass('fa-plus').addClass('fa-minus'); - }; - $scope.editCipher = function (cipher) { var editModel = $uibModal.open({ animation: true, @@ -225,14 +159,15 @@ $scope.addCipher(); }); - $scope.addCipher = function (grouping, favorite) { + $scope.addCipher = function () { var addModel = $uibModal.open({ animation: true, templateUrl: 'app/vault/views/vaultAddCipher.html', controller: 'vaultAddCipherController', resolve: { - selectedFolder: function () { return grouping && grouping.folder ? grouping : null; }, - checkedFavorite: function () { return favorite; } + selectedFolder: function () { return $scope.selectedFolder; }, + selectedType: function () { return $scope.selectedType; }, + checkedFavorite: function () { return $scope.selectedFavorites; } } }); @@ -332,36 +267,26 @@ }); addModel.result.then(function (addedFolder) { - addedFolder.folder = true; - $rootScope.vaultGroupings.push(addedFolder); - loadGroupingData($rootScope.vaultGroupings); + $rootScope.vaultFolders.push(addedFolder); }); }; $scope.deleteFolder = function (folder) { - if (!confirm('Are you sure you want to delete this folder (' + folder.name + ')?')) { + if (!confirm('Are you sure you want to delete this folder (' + folder.name + ')? ' + + 'Any items will be moved to "No Folder".')) { return; } apiService.folders.del({ id: folder.id }, function () { $analytics.eventTrack('Deleted Folder'); - var index = $rootScope.vaultGroupings.indexOf(folder); + var index = $rootScope.vaultFolders.indexOf(folder); if (index > -1) { - $rootScope.vaultGroupings.splice(index, 1); - $scope.folderCount--; + $rootScope.vaultFolders.splice(index, 1); + $scope.filterAll(); } }); }; - $scope.canDeleteFolder = function (folder) { - if (!folder || !folder.id || !$rootScope.vaultCiphers) { - return false; - } - - var ciphers = $filter('filter')($rootScope.vaultCiphers, { folderId: folder.id }); - return ciphers && ciphers.length === 0; - }; - $scope.share = function (cipher) { var modal = $uibModal.open({ animation: true, @@ -397,52 +322,94 @@ }); }; - $scope.filterGrouping = function (grouping) { - $scope.groupingIdFilter = grouping.id; + $scope.filterCollection = function (col) { + resetSelected(); + $scope.selectedCollection = col; + $scope.selectedIcon = 'fa-cube'; + $scope.filter = function (c) { + return c.collectionIds && c.collectionIds.indexOf(col.id) > -1; + }; + fixLayout(); + }; + $scope.filterFolder = function (f) { + resetSelected(); + $scope.selectedFolder = f; + $scope.selectedIcon = 'fa-folder-open' + (!f.id ? '-o' : ''); + $scope.filter = function (c) { + return c.folderId === f.id; + }; + fixLayout(); + }; + + $scope.filterType = function (t) { + resetSelected(); + $scope.selectedType = t; + switch (t) { + case constants.cipherType.login: + $scope.selectedTitle = 'Login'; + $scope.selectedIcon = 'fa-globe'; + break; + case constants.cipherType.card: + $scope.selectedTitle = 'Card'; + $scope.selectedIcon = 'fa-credit-card'; + break; + case constants.cipherType.identity: + $scope.selectedTitle = 'Identity'; + $scope.selectedIcon = 'fa-id-card-o'; + break; + case constants.cipherType.secureNote: + $scope.selectedTitle = 'Secure Note'; + $scope.selectedIcon = 'fa-sticky-note-o'; + break; + default: + break; + } + $scope.filter = function (c) { + return c.type === t; + }; + fixLayout(); + }; + + $scope.filterFavorites = function () { + resetSelected(); + $scope.selectedFavorites = true; + $scope.selectedTitle = 'Favorites'; + $scope.selectedIcon = 'fa-star'; + $scope.filter = function (c) { + return !!c.favorite; + }; + fixLayout(); + }; + + $scope.filterAll = function () { + resetSelected(); + $scope.selectedAll = true; + $scope.selectedTitle = 'All'; + $scope.selectedIcon = 'fa-th'; + $scope.filter = null; + fixLayout(); + }; + + function resetSelected() { + $scope.selectedFolder = undefined; + $scope.selectedCollection = undefined; + $scope.selectedType = undefined; + $scope.selectedFavorites = false; + $scope.selectedAll = false; + } + + function fixLayout() { if ($.AdminLTE && $.AdminLTE.layout) { $timeout(function () { $.AdminLTE.layout.fix(); }, 0); } - }; + } - $scope.filterType = function (type) { - $scope.typeFilter = type; - - if ($.AdminLTE && $.AdminLTE.layout) { - $timeout(function () { - $.AdminLTE.layout.fix(); - }, 0); - } - }; - - $scope.clearFilters = function () { - $scope.groupingIdFilter = undefined; - $scope.typeFilter = undefined; - - if ($.AdminLTE && $.AdminLTE.layout) { - $timeout(function () { - $.AdminLTE.layout.fix(); - }, 0); - } - }; - - $scope.groupingFilter = function (grouping) { - return $scope.groupingIdFilter === undefined || grouping.id === $scope.groupingIdFilter; - }; - - $scope.cipherFilter = function (grouping) { + $scope.cipherFilter = function () { return function (cipher) { - var matchesGrouping = grouping === null; - if (!matchesGrouping && grouping.folder && cipher.folderId === grouping.id) { - matchesGrouping = true; - } - else if (!matchesGrouping && grouping.collection && cipher.collectionIds.indexOf(grouping.id) > -1) { - matchesGrouping = true; - } - - return matchesGrouping && ($scope.typeFilter === undefined || cipher.type === $scope.typeFilter); + return !$scope.filter || $scope.filter(cipher); }; }; @@ -450,14 +417,8 @@ selectAll(false); }; - $scope.selectFolder = function (folder, $event) { - var checkbox = $($event.currentTarget).closest('.box').find('input[name="cipherSelection"]'); - checkbox.prop('checked', true); - }; - - $scope.select = function ($event) { - var checkbox = $($event.currentTarget).closest('tr').find('input[name="cipherSelection"]'); - checkbox.prop('checked', !checkbox.prop('checked')); + $scope.selectAll = function () { + selectAll(true); }; function distinct(value, index, self) { diff --git a/src/app/vault/vaultEditCipherController.js b/src/app/vault/vaultEditCipherController.js index 131c145e75..635cdaddff 100644 --- a/src/app/vault/vaultEditCipherController.js +++ b/src/app/vault/vaultEditCipherController.js @@ -4,7 +4,7 @@ .controller('vaultEditCipherController', function ($scope, apiService, $uibModalInstance, cryptoService, cipherService, passwordService, cipherId, $analytics, $rootScope, authService, $uibModal, constants, $filter) { $analytics.eventTrack('vaultEditCipherController', { category: 'Modal' }); - $scope.folders = $filter('filter')($rootScope.vaultGroupings, { folder: true }); + $scope.folders = $rootScope.vaultFolders; $scope.cipher = {}; $scope.readOnly = false; $scope.constants = constants; diff --git a/src/app/vault/vaultMoveCiphersController.js b/src/app/vault/vaultMoveCiphersController.js index 0a117b8deb..a4f13c3e22 100644 --- a/src/app/vault/vaultMoveCiphersController.js +++ b/src/app/vault/vaultMoveCiphersController.js @@ -4,7 +4,7 @@ .controller('vaultMoveCiphersController', function ($scope, apiService, $uibModalInstance, ids, $analytics, $rootScope, $filter) { $analytics.eventTrack('vaultMoveCiphersController', { category: 'Modal' }); - $scope.folders = $filter('filter')($rootScope.vaultGroupings, { folder: true }); + $scope.folders = $rootScope.vaultFolders; $scope.count = ids.length; $scope.save = function () { diff --git a/src/app/vault/views/vault.html b/src/app/vault/views/vault.html index a5cf4b0340..64d5a464af 100644 --- a/src/app/vault/views/vault.html +++ b/src/app/vault/views/vault.html @@ -16,19 +16,14 @@ +
  • + + Select All + +
  • - Unselect All - -
  • -
  • - - Collapse All - -
  • -
  • - - Expand All + Unselect All
  • @@ -36,184 +31,57 @@

    My Vault - , - , & + , + , &

    -
    +

    Loading...

    -
    +

    - - Favorites - + + {{selectedFolder ? selectedFolder.name : selectedCollection ? selectedCollection.name : selectedTitle}} +

    -
    +
    - -
    -
    -
    -
    -

    No favorite items.

    - -
    -
    - - - - - - - - - -
    - - - - - - - - {{cipher.name}} - -
    - {{cipher.subTitle}} -
    -
    -
    -
    -
    -
    -

    - - - {{grouping.name}} - -

    -
    -
    -
    -
    -

    No items in this folder.

    - -
    -
    -

    No items in this collection.

    -
    +
    +
    +

    No items to list.

    +
    -
    +
    - +