This repository has been archived on 2025-05-04. You can view files and clone it, but you cannot make any changes to it's state, such as pushing and creating new issues, pull requests or comments.
discourse/app/assets/javascripts/admin/controllers/admin_dashboard_controller.js

33 lines
921 B
JavaScript
Raw Normal View History

(function() {
window.Discourse.AdminDashboardController = Ember.Controller.extend({
loading: true,
versionCheck: null,
upToDate: (function() {
if (this.versionCheck) {
return this.versionCheck.latest_version === this.versionCheck.installed_version;
} else {
return true;
}
}).property('versionCheck'),
updateIconClasses: (function() {
var classes;
classes = "icon icon-warning-sign ";
if (this.get('versionCheck.critical_updates')) {
classes += "critical-updates-available";
} else {
classes += "updates-available";
}
return classes;
}).property('versionCheck'),
priorityClass: (function() {
if (this.get('versionCheck.critical_updates')) {
return 'version-check critical';
} else {
return 'version-check normal';
}
}).property('versionCheck')
});
}).call(this);