diff --git a/src/popup/app/vault/vaultController.js b/src/popup/app/vault/vaultController.js index e6ccb9d47a..56ed20c3c1 100644 --- a/src/popup/app/vault/vaultController.js +++ b/src/popup/app/vault/vaultController.js @@ -1,7 +1,7 @@ angular .module('bit.vault') - .controller('vaultController', function ($scope, $rootScope, siteService, folderService, $q, cipherService, $state, $stateParams) { + .controller('vaultController', function ($scope, $rootScope, siteService, folderService, $q, cipherService, $state, $stateParams, $uibModal, toastr) { $('#search').focus(); var delayLoad = true; @@ -62,6 +62,12 @@ usernamePromise.then(function (obj) { decSites[obj.index].username = obj.val; }); + + var passwordPromise = cipherService.decrypt(sites[j].password, j); + promises.push(passwordPromise); + passwordPromise.then(function (obj) { + decSites[obj.index].password = obj.val; + }); } $q.all(promises).then(function () { @@ -91,7 +97,7 @@ $scope.setFolderFilter = function (folder) { $scope.folderFilter = {}; $scope.folderFilter.folderId = folder.id; - } + }; $scope.addSite = function () { $state.go('addSite', { @@ -110,15 +116,24 @@ }); }; + $scope.clipboardError = function (e) { + toastr.info('Your web browser does not support easy clipboard copying. Copy it manually instead.'); + }; + + $scope.clipboardSuccess = function (e, type) { + e.clearSelection(); + toastr.info(type + ' copied!'); + }; + function getScrollY() { var content = document.getElementsByClassName('content')[0]; return content.scrollTop; - }; + } function setScrollY() { if ($stateParams.scrollY) { var content = document.getElementsByClassName('content')[0]; content.scrollTop = $stateParams.scrollY; } - }; + } }); diff --git a/src/popup/app/vault/vaultViewSiteController.js b/src/popup/app/vault/vaultViewSiteController.js index 6c384ea0e0..b0e0ec6e99 100644 --- a/src/popup/app/vault/vaultViewSiteController.js +++ b/src/popup/app/vault/vaultViewSiteController.js @@ -43,7 +43,7 @@ returnScrollY: returnScrollY || 0, returnSearchText: returnSearchText }); - } + }; $scope.close = function () { $state.go('tabs.vault', { diff --git a/src/popup/app/vault/views/vault.html b/src/popup/app/vault/views/vault.html index 4d1dffc367..c692eaddaf 100644 --- a/src/popup/app/vault/views/vault.html +++ b/src/popup/app/vault/views/vault.html @@ -13,12 +13,19 @@
{{folder.name}}
- - + + + + + + {{site.name}} {{site.username}} - + diff --git a/src/popup/app/vault/views/vaultViewSite.html b/src/popup/app/vault/views/vaultViewSite.html index 818f77aa2c..8dc25b2c7b 100644 --- a/src/popup/app/vault/views/vaultViewSite.html +++ b/src/popup/app/vault/views/vaultViewSite.html @@ -19,14 +19,14 @@ {{site.name}}
- + Website {{site.website}}
- @@ -34,11 +34,13 @@ {{site.username}}
- - + + + Password {{site.maskedPassword}} {{site.password}} diff --git a/src/popup/less/components.less b/src/popup/less/components.less index 820ee923ae..58fd915d39 100644 --- a/src/popup/less/components.less +++ b/src/popup/less/components.less @@ -253,14 +253,24 @@ cursor: pointer; float: right; display: block; - padding: 10px 8px 10px 12px; + padding: 10px 8px 10px 8px; + background: none; + border: none; + + &.disabled { + color: @text-disabled; + + &:hover { + color: @text-disabled; + } + } } &.condensed { padding: 3px 10px; .btn-list { - padding: 8px 8px 8px 12px; + padding: 8px; } } diff --git a/src/popup/less/variables.less b/src/popup/less/variables.less index 08083d0c07..e304760e40 100644 --- a/src/popup/less/variables.less +++ b/src/popup/less/variables.less @@ -8,6 +8,7 @@ @border-color: #f0f0f0; @border-color-dark: #ddd; @list-item-hover: #fbfbfb; +@text-disabled: #d2d6de; @brand-primary: #3c8dbc; @brand-danger: #dd4b39;