style org icon for self host

This commit is contained in:
Kyle Spearrin 2017-09-19 22:20:42 -04:00
parent 30abd52189
commit 06a877c755
2 changed files with 14 additions and 3 deletions

View File

@ -1,12 +1,23 @@
angular
.module('bit.global')
.controller('sideNavController', function ($scope, $state, authService, toastr, $analytics, constants) {
.controller('sideNavController', function ($scope, $state, authService, toastr, $analytics, constants, appSettings) {
$scope.$state = $state;
$scope.params = $state.params;
$scope.orgs = [];
$scope.name = '';
if(appSettings.selfHosted) {
$scope.orgIconBgColor = '#ffffff';
$scope.orgIconBorder = '3px solid #a0a0a0';
$scope.orgIconTextColor = '#333333';
}
else {
$scope.orgIconBgColor = '#2c3b41';
$scope.orgIconBorder = '3px solid #1a2226';
$scope.orgIconTextColor = '#ffffff';
}
authService.getUserProfile().then(function (userProfile) {
$scope.name = userProfile.extended && userProfile.extended.name ?
userProfile.extended.name : userProfile.email;

View File

@ -135,8 +135,8 @@
<li ng-repeat="org in orgs | orderBy: ['name'] track by org.id">
<a href="#" stop-click ng-click="viewOrganization(org)">
<letter-avatar data="{{org.name}}" avclass="img-responsive img-rounded" round="false"
avheight="40" avwidth="40" bgcolor="#2c3b41" avborder="true"
borderstyle="3px solid #1a2226"></letter-avatar>
avheight="40" avwidth="40" bgcolor="{{orgIconBgColor}}" avborder="true"
borderstyle="{{orgIconBorder}}" textcolor="{{orgIconTextColor}}"></letter-avatar>
</a>
</li>
</ul>