mirror of
https://github.com/lidarr/lidarr.git
synced 2025-07-31 04:00:18 -07:00
New: Added Color-Impaired mode to UI settings.
This commit is contained in:
parent
2f7e3c1c3c
commit
b4e8a39c2c
8 changed files with 88 additions and 1 deletions
26
src/UI/Shared/UiSettingsController.js
Normal file
26
src/UI/Shared/UiSettingsController.js
Normal file
|
@ -0,0 +1,26 @@
|
|||
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;
|
Loading…
Add table
Add a link
Reference in a new issue