discourse/app/assets/javascripts/admin/controllers/admin_dashboard_controller.js.coffee

26 lines
No EOL
644 B
CoffeeScript

window.Discourse.AdminDashboardController = Ember.Controller.extend
loading: true
versionCheck: null
upToDate: (->
if @versionCheck
@versionCheck.latest_version == @versionCheck.installed_version
else
true
).property('versionCheck')
updateIconClasses: (->
classes = "icon icon-warning-sign "
if @get('versionCheck.critical_updates')
classes += "critical-updates-available"
else
classes += "updates-available"
classes
).property('versionCheck')
priorityClass: (->
if @get('versionCheck.critical_updates')
'critical'
else
'normal'
).property('versionCheck')