mirror of
https://github.com/bitwarden/browser.git
synced 2024-10-10 06:08:34 +02:00
29 lines
932 B
JavaScript
29 lines
932 B
JavaScript
|
angular
|
|||
|
.module('bit.vault')
|
|||
|
|
|||
|
.controller('vaultMoveLoginsController', function ($scope, apiService, $uibModalInstance, ids, $analytics,
|
|||
|
$rootScope) {
|
|||
|
$analytics.eventTrack('vaultMoveLoginsController', { category: 'Modal' });
|
|||
|
$scope.folders = $rootScope.vaultFolders;
|
|||
|
$scope.count = ids.length;
|
|||
|
|
|||
|
$scope.save = function () {
|
|||
|
$scope.savePromise = apiService.ciphers.moveMany({ ids: ids, folderId: $scope.folderId }, function () {
|
|||
|
$analytics.eventTrack('Bulk Moved Logins');
|
|||
|
$uibModalInstance.close($scope.folderId || null);
|
|||
|
}).$promise;
|
|||
|
};
|
|||
|
|
|||
|
$scope.folderSort = function (item) {
|
|||
|
if (!item.id) {
|
|||
|
return '!';
|
|||
|
}
|
|||
|
|
|||
|
return item.name.toLowerCase();
|
|||
|
};
|
|||
|
|
|||
|
$scope.close = function () {
|
|||
|
$uibModalInstance.dismiss('cancel');
|
|||
|
};
|
|||
|
});
|