mirror of
https://github.com/bitwarden/browser.git
synced 2024-12-23 16:38:45 +01:00
style org icon for self host
This commit is contained in:
parent
30abd52189
commit
06a877c755
@ -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;
|
||||
|
@ -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>
|
||||
|
Loading…
Reference in New Issue
Block a user