1
0
mirror of https://github.com/bitwarden/desktop.git synced 2024-11-02 08:30:14 +01:00

add none folder from service layer

This commit is contained in:
Kyle Spearrin 2016-09-21 00:43:29 -04:00
parent fe2460bad8
commit 9a19acef22
4 changed files with 7 additions and 13 deletions

View File

@ -25,10 +25,7 @@
popupUtils.initListSectionItemListeners(); popupUtils.initListSectionItemListeners();
$q.when(folderService.getAllDecrypted()).then(function (folders) { $q.when(folderService.getAllDecrypted()).then(function (folders) {
$scope.folders = folders.concat([{ $scope.folders = folders;
id: null,
name: '(none)'
}]);
}); });
$scope.savePromise = null; $scope.savePromise = null;

View File

@ -43,10 +43,7 @@
$q.all(promises).then(function () { $q.all(promises).then(function () {
$scope.loaded = true; $scope.loaded = true;
$rootScope.vaultFolders = decFolders.concat([{ $rootScope.vaultFolders = decFolders;
id: null,
name: '(none)'
}]);
$rootScope.vaultSites = decSites; $rootScope.vaultSites = decSites;
if (!delayLoad) { if (!delayLoad) {
setScrollY(); setScrollY();

View File

@ -23,10 +23,7 @@ angular
} }
$q.when(folderService.getAllDecrypted()).then(function (folders) { $q.when(folderService.getAllDecrypted()).then(function (folders) {
$scope.folders = folders.concat([{ $scope.folders = folders;
id: null,
name: '(none)'
}]);
}); });
popupUtils.initListSectionItemListeners(); popupUtils.initListSectionItemListeners();

View File

@ -70,7 +70,10 @@ function initFolderService() {
} }
var promises = []; var promises = [];
var decFolders = []; var decFolders = [{
id: null,
name: '(none)'
}];
self.getAll(function (folders) { self.getAll(function (folders) {
for (var i = 0; i < folders.length; i++) { for (var i = 0; i < folders.length; i++) {
promises.push(folders[i].decrypt().then(function (folder) { promises.push(folders[i].decrypt().then(function (folder) {