From 80b18f847307b745458e0e6b582c3bf0ec5f1bf4 Mon Sep 17 00:00:00 2001 From: Kyle Spearrin Date: Mon, 24 Jul 2017 10:44:09 -0400 Subject: [PATCH] premium checks and layout updates for attachments --- src/popup/app/vault/vaultAttachmentsController.js | 5 +++-- src/popup/app/vault/vaultViewLoginController.js | 1 + src/popup/app/vault/views/vaultAttachments.html | 6 +++--- src/popup/app/vault/views/vaultViewLogin.html | 4 ++-- src/popup/less/components.less | 1 + 5 files changed, 10 insertions(+), 7 deletions(-) diff --git a/src/popup/app/vault/vaultAttachmentsController.js b/src/popup/app/vault/vaultAttachmentsController.js index 348c651fe9..921c774c54 100644 --- a/src/popup/app/vault/vaultAttachmentsController.js +++ b/src/popup/app/vault/vaultAttachmentsController.js @@ -2,10 +2,11 @@ angular .module('bit.vault') .controller('vaultAttachmentsController', function ($scope, $state, $stateParams, loginService, $q, toastr, - SweetAlert, utilsService, $analytics, i18nService, cryptoService) { + SweetAlert, utilsService, $analytics, i18nService, cryptoService, tokenService) { $scope.i18n = i18nService; utilsService.initListSectionItemListeners($(document), angular); + $scope.isPremium = tokenService.getPremium(); loginService.get($stateParams.id, function (login) { $q.when(login.decrypt()).then(function (model) { $scope.login = model; @@ -15,7 +16,7 @@ angular $scope.canUseAttachments = false; cryptoService.getEncKey().then(function (key) { $scope.canUseAttachments = !!key; - if (!$scope.canUseAttachments) { + if (!$scope.canUseAttachments && $scope.isPremium) { SweetAlert.swal({ title: i18nService.featureUnavailable, text: i18nService.updateKey, diff --git a/src/popup/app/vault/vaultViewLoginController.js b/src/popup/app/vault/vaultViewLoginController.js index 6ce0334292..c4127707b3 100644 --- a/src/popup/app/vault/vaultViewLoginController.js +++ b/src/popup/app/vault/vaultViewLoginController.js @@ -7,6 +7,7 @@ angular var from = $stateParams.from, totpInterval = null; + $scope.isPremium = tokenService.getPremium(); $scope.login = null; loginService.get($stateParams.loginId, function (login) { if (!login) { diff --git a/src/popup/app/vault/views/vaultAttachments.html b/src/popup/app/vault/views/vaultAttachments.html index effa1bf522..dec25b1e7a 100644 --- a/src/popup/app/vault/views/vaultAttachments.html +++ b/src/popup/app/vault/views/vaultAttachments.html @@ -3,7 +3,7 @@
{{i18n.close}}
-
+
@@ -17,16 +17,16 @@ {{i18n.noAttachments}}
- {{attachment.fileName}} {{attachment.sizeName}} + {{attachment.fileName}}
-
+
{{i18n.newAttachment}}
diff --git a/src/popup/app/vault/views/vaultViewLogin.html b/src/popup/app/vault/views/vaultViewLogin.html index a9999fe1f5..24acad4322 100644 --- a/src/popup/app/vault/views/vaultViewLogin.html +++ b/src/popup/app/vault/views/vaultViewLogin.html @@ -76,7 +76,7 @@
{{login.notes}}
-
+
diff --git a/src/popup/less/components.less b/src/popup/less/components.less index f797bc6cec..c16ebd6a8a 100644 --- a/src/popup/less/components.less +++ b/src/popup/less/components.less @@ -350,6 +350,7 @@ .item-sub-label { float: right; + display: block; margin-right: 15px; color: @gray-light; }