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
|
angular
|
||||||
.module('bit.global')
|
.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.$state = $state;
|
||||||
$scope.params = $state.params;
|
$scope.params = $state.params;
|
||||||
$scope.orgs = [];
|
$scope.orgs = [];
|
||||||
$scope.name = '';
|
$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) {
|
authService.getUserProfile().then(function (userProfile) {
|
||||||
$scope.name = userProfile.extended && userProfile.extended.name ?
|
$scope.name = userProfile.extended && userProfile.extended.name ?
|
||||||
userProfile.extended.name : userProfile.email;
|
userProfile.extended.name : userProfile.email;
|
||||||
|
@ -135,8 +135,8 @@
|
|||||||
<li ng-repeat="org in orgs | orderBy: ['name'] track by org.id">
|
<li ng-repeat="org in orgs | orderBy: ['name'] track by org.id">
|
||||||
<a href="#" stop-click ng-click="viewOrganization(org)">
|
<a href="#" stop-click ng-click="viewOrganization(org)">
|
||||||
<letter-avatar data="{{org.name}}" avclass="img-responsive img-rounded" round="false"
|
<letter-avatar data="{{org.name}}" avclass="img-responsive img-rounded" round="false"
|
||||||
avheight="40" avwidth="40" bgcolor="#2c3b41" avborder="true"
|
avheight="40" avwidth="40" bgcolor="{{orgIconBgColor}}" avborder="true"
|
||||||
borderstyle="3px solid #1a2226"></letter-avatar>
|
borderstyle="{{orgIconBorder}}" textcolor="{{orgIconTextColor}}"></letter-avatar>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
Loading…
Reference in New Issue
Block a user