You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Lidarr/src/UI/Shared/UiSettingsController.js

26 lines
588 B

var $ = require('jquery');
var _ = require('underscore');
var UiSettingsModel = require('./UiSettingsModel');
var Controller = {
appInitializer : function() {
UiSettingsModel.on('sync', this._updateUiSettings);
this._updateUiSettings();
},
_updateUiSettings: function() {
if (UiSettingsModel.get('enableColorImpairedMode')) {
$('body').addClass('color-impaired-mode');
} else {
$('body').removeClass('color-impaired-mode');
}
}
};
_.bindAll(Controller, 'appInitializer');
module.exports = Controller;