change tower icon color logic
This commit is contained in:
parent
380204bb44
commit
aad5530d2e
|
@ -31,7 +31,10 @@ Controller = Ember.Controller.extend
|
|||
options.headers = { Authorization: "token #{@auth.token()}" }
|
||||
|
||||
seenBroadcasts = Travis.storage.getItem('travis.seen_broadcasts')
|
||||
seenBroadcasts = JSON.parse(seenBroadcasts) if seenBroadcasts
|
||||
if seenBroadcasts
|
||||
seenBroadcasts = JSON.parse(seenBroadcasts)
|
||||
else
|
||||
seenBroadcasts = []
|
||||
|
||||
$.ajax("#{apiEndpoint}/v3/broadcasts", options).then (response) ->
|
||||
if response.broadcasts.length
|
||||
|
@ -44,7 +47,13 @@ Controller = Ember.Controller.extend
|
|||
).reverse()
|
||||
|
||||
if receivedBroadcasts.length
|
||||
broadcasts.set('lastBroadcastStatus', receivedBroadcasts[0].category)
|
||||
if receivedBroadcasts.findBy('category', 'warning')
|
||||
broadcasts.set('lastBroadcastStatus', 'warning')
|
||||
else if receivedBroadcasts.findBy('category', 'announcement')
|
||||
broadcasts.set('lastBroadcastStatus', 'announcement')
|
||||
else
|
||||
broadcasts.set('lastBroadcastStatus', '')
|
||||
|
||||
broadcasts.set('content', receivedBroadcasts)
|
||||
broadcasts.set('isLoading', false)
|
||||
|
||||
|
|
|
@ -126,12 +126,12 @@
|
|||
.radio-wave--right
|
||||
.tower-path
|
||||
transform-origin: left center
|
||||
animation: pulsating-right 1s linear infinite
|
||||
animation: pulsating-right 1.5s linear infinite
|
||||
|
||||
.radio-wave--left
|
||||
.tower-path
|
||||
transform-origin: right center
|
||||
animation: pulsating-left 1s linear infinite
|
||||
animation: pulsating-left 1.5s linear infinite
|
||||
|
||||
|
||||
@keyframes pulsating-right
|
||||
|
|
Loading…
Reference in New Issue
Block a user