From 3c83741b13b841a2a96841040047a206b0b264f7 Mon Sep 17 00:00:00 2001 From: Kyle Spearrin Date: Sat, 25 Mar 2017 16:09:06 -0400 Subject: [PATCH] ui updates for vault logins list --- src/app/vault/vaultAddLoginController.js | 6 +++-- src/app/vault/vaultController.js | 5 +++-- src/app/vault/views/vault.html | 28 ++++++++++++++---------- src/less/vault.less | 4 ++++ 4 files changed, 27 insertions(+), 16 deletions(-) diff --git a/src/app/vault/vaultAddLoginController.js b/src/app/vault/vaultAddLoginController.js index e5618a74d4..9513459cf9 100644 --- a/src/app/vault/vaultAddLoginController.js +++ b/src/app/vault/vaultAddLoginController.js @@ -1,11 +1,13 @@ angular .module('bit.vault') - .controller('vaultAddLoginController', function ($scope, apiService, $uibModalInstance, cryptoService, cipherService, passwordService, folders, selectedFolder, $analytics) { + .controller('vaultAddLoginController', function ($scope, apiService, $uibModalInstance, cryptoService, cipherService, + passwordService, folders, selectedFolder, $analytics, checkedFavorite) { $analytics.eventTrack('vaultAddLoginController', { category: 'Modal' }); $scope.folders = folders; $scope.login = { - folderId: selectedFolder ? selectedFolder.id : null + folderId: selectedFolder ? selectedFolder.id : null, + favorite: checkedFavorite === true }; $scope.savePromise = null; diff --git a/src/app/vault/vaultController.js b/src/app/vault/vaultController.js index 50f54026fc..dafa882387 100644 --- a/src/app/vault/vaultController.js +++ b/src/app/vault/vaultController.js @@ -92,14 +92,15 @@ $scope.addLogin(); }); - $scope.addLogin = function (folder) { + $scope.addLogin = function (folder, favorite) { var addModel = $uibModal.open({ animation: true, templateUrl: 'app/vault/views/vaultAddLogin.html', controller: 'vaultAddLoginController', resolve: { folders: function () { return $scope.folders; }, - selectedFolder: function () { return folder; } + selectedFolder: function () { return folder; }, + checkedFavorite: function () { return favorite; } } }); diff --git a/src/app/vault/views/vault.html b/src/app/vault/views/vault.html index cc0d617fb1..04ee8bda39 100644 --- a/src/app/vault/views/vault.html +++ b/src/app/vault/views/vault.html @@ -23,7 +23,7 @@ @@ -35,7 +35,7 @@

No favorite logins.

- +
@@ -54,15 +54,17 @@ uib-tooltip="Delete"> - +
+ +
{{login.name}} - @@ -126,11 +128,13 @@ uib-tooltip="Delete"> - +
+ +
diff --git a/src/less/vault.less b/src/less/vault.less index 7978e8074a..6cc3c1bbee 100644 --- a/src/less/vault.less +++ b/src/less/vault.less @@ -250,3 +250,7 @@ form .btn .loading-icon { text-decoration: line-through; color: @text-muted; } + +.tooltip-wrapper { + display: inline-block; +}