From ea5dc4b7fc8a0008f534a602b798ce9c904b6894 Mon Sep 17 00:00:00 2001 From: Kyle Spearrin Date: Wed, 5 Apr 2017 17:59:48 -0400 Subject: [PATCH] remove gravatar for letter avatars #4 --- gulpfile.js | 8 ++++---- package.json | 4 ++-- src/app/app.js | 2 +- src/app/config.js | 11 +++++++++-- src/app/global/sideNavController.js | 4 ++++ src/app/organization/views/organizationPeople.html | 3 +-- .../views/organizationSubvaultsUsers.html | 3 +-- src/app/settings/views/settings.html | 7 +------ src/app/views/organizationLayout.html | 3 +-- src/app/views/userLayout.html | 5 ++--- src/index.html | 2 +- 11 files changed, 27 insertions(+), 25 deletions(-) diff --git a/gulpfile.js b/gulpfile.js index d26ac30b9c..c4828efcd0 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -126,10 +126,6 @@ gulp.task('lib', ['clean:lib'], function () { src: paths.npmDir + 'angular-jwt/dist/*.js', dest: paths.libDir + 'angular-jwt' }, - { - src: paths.npmDir + 'angular-md5/angular-md5*.js', - dest: paths.libDir + 'angular-md5' - }, { src: paths.npmDir + 'angular-resource/*resource*.js', dest: paths.libDir + 'angular-resource' @@ -168,6 +164,10 @@ gulp.task('lib', ['clean:lib'], function () { paths.npmDir + 'angulartics/src/angulartics.js' ], dest: paths.libDir + 'angulartics' + }, + { + src: paths.npmDir + 'ngletteravatar/ngletteravatar.js', + dest: paths.libDir + 'ngletteravatar' } ]; diff --git a/package.json b/package.json index 76a15c9748..164f61b40c 100644 --- a/package.json +++ b/package.json @@ -31,7 +31,6 @@ "angular-jwt": "0.1.9", "angular-cookies": "1.6.3", "admin-lte": "2.3.11", - "angular-md5": "0.1.10", "angular-toastr": "2.1.1", "angular-bootstrap-show-errors": "2.3.0", "angular-messages": "1.6.3", @@ -47,6 +46,7 @@ "angular-credit-cards": "3.1.6", "browserify": "14.1.0", "vinyl-source-stream": "1.1.0", - "gulp-derequire": "2.1.0" + "gulp-derequire": "2.1.0", + "ngletteravatar": "4.0.4" } } diff --git a/src/app/app.js b/src/app/app.js index 75e54d47f9..a20ec226c8 100644 --- a/src/app/app.js +++ b/src/app/app.js @@ -3,13 +3,13 @@ 'ui.router', 'ngMessages', 'angular-jwt', - 'angular-md5', 'ui.bootstrap.showErrors', 'toastr', 'angulartics', 'angulartics.google.analytics', 'angular-stripe', 'credit-cards', + 'ngLetterAvatar', 'bit.directives', 'bit.filters', diff --git a/src/app/config.js b/src/app/config.js index fc34d35251..a2de1aa5fe 100644 --- a/src/app/config.js +++ b/src/app/config.js @@ -2,7 +2,7 @@ angular .module('bit') .config(function ($stateProvider, $urlRouterProvider, $httpProvider, jwtInterceptorProvider, jwtOptionsProvider, - $uibTooltipProvider, toastrConfig, $locationProvider, $qProvider, stripeProvider) { + $uibTooltipProvider, toastrConfig, $locationProvider, $qProvider, stripeProvider, defaultSettings) { $qProvider.errorOnUnhandledRejections(false); $locationProvider.hashPrefix(''); jwtOptionsProvider.config({ @@ -49,6 +49,14 @@ angular return refreshPromise; }; + angular.extend(defaultSettings, { + fontFamily: 'Open Sans', + height: 45, + width: 45, + charCount: 2, + dynamic: 'true' + }); + stripeProvider.setPublishableKey('pk_test_KPoCfZXu7mznb9uSCPZ2JpTD'); angular.extend(toastrConfig, { @@ -61,7 +69,6 @@ angular $uibTooltipProvider.options({ popupDelay: 600, appendToBody: true - }); if ($httpProvider.defaults.headers.post) { diff --git a/src/app/global/sideNavController.js b/src/app/global/sideNavController.js index 76e2048844..b5096802da 100644 --- a/src/app/global/sideNavController.js +++ b/src/app/global/sideNavController.js @@ -5,8 +5,12 @@ angular $scope.$state = $state; $scope.params = $state.params; $scope.orgs = []; + $scope.name = ''; authService.getUserProfile().then(function (userProfile) { + $scope.name = userProfile.extended && userProfile.extended.name ? + userProfile.extended.name : userProfile.email; + if (!userProfile.organizations) { return; } diff --git a/src/app/organization/views/organizationPeople.html b/src/app/organization/views/organizationPeople.html index 7171a531c4..9b6735e255 100644 --- a/src/app/organization/views/organizationPeople.html +++ b/src/app/organization/views/organizationPeople.html @@ -58,8 +58,7 @@ - User Image + {{user.email}} diff --git a/src/app/organization/views/organizationSubvaultsUsers.html b/src/app/organization/views/organizationSubvaultsUsers.html index 1846488e1c..c7df4e68ed 100644 --- a/src/app/organization/views/organizationSubvaultsUsers.html +++ b/src/app/organization/views/organizationSubvaultsUsers.html @@ -20,8 +20,7 @@ - User Image + {{user.email}} diff --git a/src/app/settings/views/settings.html b/src/app/settings/views/settings.html index 24b8348f98..7140abfb08 100644 --- a/src/app/settings/views/settings.html +++ b/src/app/settings/views/settings.html @@ -36,12 +36,7 @@
- - User Image - - Update Photo +
diff --git a/src/app/views/organizationLayout.html b/src/app/views/organizationLayout.html index 7fe9124470..e3eaa85e7d 100644 --- a/src/app/views/organizationLayout.html +++ b/src/app/views/organizationLayout.html @@ -22,8 +22,7 @@