travis-web/app/components/requests-item.coffee
Lisa P 9baadcfd9e try two-line /builds
fix white ghosting on api icon

check requests for existing branch

tweak cc icon

tweak settings fields

try hover over settigns menu
2015-12-02 16:13:26 +01:00

46 lines
947 B
CoffeeScript

`import Ember from 'ember'`
`import config from 'travis/config/environment'`
RequestsItemComponent = Ember.Component.extend
classNames: ['request-item']
classNameBindings: ['requestClass']
tagName: 'li'
requestClass: (->
if @get('request.isAccepted')
'accepted'
else
'rejected'
).property('content.isAccepted')
type: (->
if @get('request.isPullRequest')
'pull_request'
else
'push'
).property('request.isPullRequest')
status: (->
if @get('request.isAccepted')
'Accepted'
else
'Rejected'
).property('request.isAccepted')
hasBranchName: (->
@get('request.branchName')
).property('request')
message: (->
message = @get('request.message')
if config.pro && message == "private repository"
''
else if !message
'Build created successfully '
else
message
).property('request.message')
`export default RequestsItemComponent`