Skip to content
This repository was archived by the owner on Mar 4, 2025. It is now read-only.

Fixed dashboard badge size to 70x70 px for better visibility #1233

Merged
merged 3 commits into from
Oct 4, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 3 additions & 10 deletions app/directives/page-state-header/page-state-header.directive.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,17 +64,10 @@ import _ from 'lodash'
// gets member's profile
ProfileService.getUserProfile(vm.handle).then(function(profile) {
vm.profile = profile

// get members dashboard badge
UserService.getV2UserProfile(vm.handle).then(function(resp) {

var dashboardAchievement = _filterDashboardAchievement(resp.Achievements || [])[0]
if (dashboardAchievement) {
//Get dashboard badges
vm.dashboardBadge = BadgeService.getAchievementVm(dashboardAchievement)
}
vm.dashboardAchievement = _filterDashboardAchievement(resp.Achievements || [])[0]
})

})

// get member's challenges to display number of active challenges
Expand All @@ -84,8 +77,9 @@ import _ from 'lodash'
]).then(function(challenges){
var marathonMatches = challenges[0]
var devDesignChallenges = challenges[1]

vm.activeChallenges = marathonMatches.length + devDesignChallenges.length

})

displayMoneyEarned(vm.handle)
Expand Down Expand Up @@ -132,6 +126,5 @@ import _ from 'lodash'
return (achievement.description === vm.dashboardBadgeName)
})
}

}
})()
5 changes: 3 additions & 2 deletions app/directives/page-state-header/page-state-header.jade
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,6 @@
p.number(ng-bind="vm.moneyEarned | currency:'$':0")
.title
p Won in Prizes
.badgeItem(ng-if="vm.dashboardBadge")
.badge(ng-class="(vm.dashboardBadge.specificClass || vm.dashboardBadge.groupClass) + ' ' + (vm.dashboardBadge.type) + 'Badge'" title='{{vm.dashboardBadgeName}}')
.badgeItem(ng-if="vm.dashboardAchievement")
.dashboardBadge(title='{{vm.dashboardBadgeName}}')

9 changes: 0 additions & 9 deletions app/services/badge.service.js
Original file line number Diff line number Diff line change
Expand Up @@ -648,17 +648,8 @@ import moment from 'moment-timezone'
name: 'iOS Community',
groupClass: 'iOS-Community',
active: false
},
{
id: 1010,
name: 'SRM Engagement Honor',
groupClass: 'SRM-Engagement-Honor-Badge',
active: false
}
]
}

}


})()
9 changes: 6 additions & 3 deletions assets/css/directives/badge-tooltip.scss
Original file line number Diff line number Diff line change
Expand Up @@ -679,6 +679,9 @@ span.subBadge.selected {
background-position: 0 0;
}

.SRM-Engagement-Honor-Badge {
background-position: -146px -671px;
}
.dashboardBadge {
background: url(https://github.com/images/badge05-70x70.png) no-repeat;
width: 70px;
height: 70px;
}

2 changes: 1 addition & 1 deletion assets/css/directives/page-state-header.directive.scss
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
flex-direction: column;
justify-content: space-between;
align-items: flex-end;

height: 39px;
position: relative;
margin-left: 40px;
margin-right: 20px;
Expand Down
Binary file added assets/images/badge05-70x70.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.