Fix icons for gitlab and some spacing

This commit is contained in:
Joseph Schorr 2015-05-03 10:43:08 -07:00
parent d07f9f04e9
commit c8d3ded95a
2 changed files with 13 additions and 5 deletions

View file

@ -8,7 +8,7 @@
</td>
<td>
<div class="current-repo">
<i class="dropdown-select-icon org-icon fa" ng-class="'fa-' + kind"
<i class="dropdown-select-icon org-icon fa" ng-class="scmIcon(kind)"
ng-show="!state.currentRepo.avatar_url"></i>
<img class="dropdown-select-icon org-icon"
ng-src="{{ state.currentRepo.avatar_url ? state.currentRepo.avatar_url : '/static/img/empty.png' }}"
@ -54,11 +54,11 @@
<div class="dropdown-select" placeholder="'Enter or select a repository'" selected-item="state.currentRepo"
lookahead-items="repoLookahead" allow-custom-input="true">
<!-- Icons -->
<i class="dropdown-select-icon none-icon fa fa-lg" ng-class="'fa-' + kind"></i>
<i class="dropdown-select-icon none-icon fa fa-lg" ng-class="scmIcon(kind)"></i>
<img class="dropdown-select-icon org-icon"
ng-show="state.currentRepo.avatar_url"
ng-src="{{ state.currentRepo.avatar_url ? state.currentRepo.avatar_url : '/static/img/empty.png' }}">
<i class="dropdown-select-icon org-icon fa fa-lg" ng-class="'fa-' + kind"
<i class="dropdown-select-icon org-icon fa fa-lg" ng-class="scmIcon(kind)"
ng-show="!state.currentRepo.avatar_url"></i>
<!-- Dropdown menu -->
@ -68,7 +68,7 @@
</li>
<li ng-repeat="repo in org.repos" class="trigger-repo-listing">
<a href="javascript:void(0)" ng-click="selectRepo(repo, org)">
<i class="fa fa-lg" ng-class="'fa-' + kind"></i> {{ repo }}
<i class="fa fa-lg" ng-class="scmIcon(kind)"></i> {{ repo }}
</a>
</li>
<li role="presentation" class="divider" ng-repeat-end ng-show="$index < orgs.length - 1"></li>
@ -132,7 +132,7 @@
</ul>
<span ng-if="branchNames.length > 20">...</span>
</div>
<div class="ref-matches" ng-if="tagNames.length" style="margin-bottom: -20px">
<div class="ref-matches" ng-if="tagNames.length">
<span class="kind">Tags:</span>
<ul class="matching-refs tags">
<li ng-repeat="tagName in tagNames | limitTo:20"

View file

@ -178,6 +178,14 @@ angular.module('quay').directive('triggerSetupGithost', function () {
};
};
$scope.scmIcon = function(kind) {
if (kind == 'gitlab') {
return 'fa-git-square';
}
return 'fa-' + kind;
};
var setupTypeahead = function() {
var repos = [];
for (var i = 0; i < $scope.orgs.length; ++i) {