remove gravatar for letter avatars #4

This commit is contained in:
Kyle Spearrin 2017-04-05 17:59:48 -04:00
parent acc214d7c1
commit ea5dc4b7fc
11 changed files with 27 additions and 25 deletions

View File

@ -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'
}
];

View File

@ -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"
}
}

View File

@ -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',

View File

@ -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) {

View File

@ -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;
}

View File

@ -58,8 +58,7 @@
</div>
</td>
<td style="width: 45px;">
<img src="//www.gravatar.com/avatar/{{user.email | gravatar}}.jpg?s=45&d=mm"
class="img-circle" alt="User Image">
<ng-letter-avatar data="{{user.name || user.email}}" shape="round"></ng-letter-avatar>
</td>
<td>
<a href="javascript:void(0)" ng-click="edit(user.id)">{{user.email}}</a>

View File

@ -20,8 +20,7 @@
</button>
</td>
<td style="width: 45px;">
<img src="//www.gravatar.com/avatar/{{user.email | gravatar}}.jpg?s=45&d=mm"
class="img-circle" alt="User Image">
<ng-letter-avatar data="{{user.name || user.email}}" shape="round"></ng-letter-avatar>
</td>
<td>
<a href="javascript:void(0)" ng-click="edit(user.id)">{{user.email}}</a>

View File

@ -36,12 +36,7 @@
</div>
</div>
<div class="col-sm-3 settings-photo">
<a href="http://www.gravatar.com/" target="_blank">
<img src="//www.gravatar.com/avatar/{{ model.email | gravatar }}.jpg?s=150&d=mm"
class="img-rounded img-responsive" alt="User Image">
</a>
<a href="http://www.gravatar.com/" target="_blank" class="btn btn-link"
analytics-on="click" analytics-event="Clicked Update Photo">Update Photo</a>
<ng-letter-avatar data="{{model.profile.name || model.email}}"></ng-letter-avatar>
</div>
</div>
</div>

View File

@ -22,8 +22,7 @@
<section class="sidebar">
<div class="user-panel">
<div class="pull-left image">
<img src="//www.gravatar.com/avatar/{{ orgProfile.name | gravatar }}.jpg?s=45&d=mm"
class="img-circle" alt="User Image">
<ng-letter-avatar charCount="1" data="{{orgProfile.name}}" shape="round"></ng-letter-avatar>
</div>
<div class="pull-left info">
<p>{{orgProfile.name}}</p>

View File

@ -22,11 +22,10 @@
<section class="sidebar">
<div class="user-panel">
<div class="pull-left image">
<img src="//www.gravatar.com/avatar/{{ main.userProfile.email | gravatar }}.jpg?s=45&d=mm"
class="img-circle" alt="User Image">
<ng-letter-avatar data="{{name}}" shape="round"></ng-letter-avatar>
</div>
<div class="pull-left info">
<p>{{main.userProfile.extended && main.userProfile.extended.name ? main.userProfile.extended.name : main.userProfile.email}}</p>
<p>{{name}}</p>
<a ui-sref="frontend.logout">Log Out</a>
</div>
</div>

View File

@ -67,7 +67,6 @@
<script src="lib/angular-resource/angular-resource.js"></script>
<script src="lib/angular-ui-router/angular-ui-router.js"></script>
<script src="lib/angular-ui-bootstrap/ui-bootstrap-tpls.js"></script>
<script src="lib/angular-md5/angular-md5.js"></script>
<script src="lib/angular-toastr/angular-toastr.tpls.js"></script>
<script src="lib/angular-bootstrap-show-errors/showErrors.js"></script>
<script src="lib/ngstorage/ngStorage.js"></script>
@ -76,6 +75,7 @@
<script src="lib/angulartics/angulartics-ga.js"></script>
<script src="lib/angular-stripe/angular-stripe.js"></script>
<script src="lib/angular-credit-cards/angular-credit-cards.js"></script>
<script src="lib/ngletteravatar/ngletteravatar.js"></script>
<script src="app/app.js"></script>
<script src="app/settings.js"></script>