mirror of
https://gitlab.com/ryzen-controller-team/ryzen-controller.git
synced 2024-12-22 18:13:28 +07:00
Whitespaces
This commit is contained in:
parent
50bc53290e
commit
2654786160
44
main.js
44
main.js
@ -59,33 +59,33 @@ if (old_version !== new_version) {
|
|||||||
return updated_settings;
|
return updated_settings;
|
||||||
};
|
};
|
||||||
const update_presets_to_1_11_0 = function(preset_list) {
|
const update_presets_to_1_11_0 = function(preset_list) {
|
||||||
var updated_preset_list = {};
|
var updated_preset_list = {};
|
||||||
// For each preset.
|
// For each preset.
|
||||||
for (const preset_name in preset_list) {
|
for (const preset_name in preset_list) {
|
||||||
if (preset_list.hasOwnProperty(preset_name)) {
|
if (preset_list.hasOwnProperty(preset_name)) {
|
||||||
const preset_settings = preset_list[preset_name];
|
const preset_settings = preset_list[preset_name];
|
||||||
updated_preset_list[preset_name] = {};
|
updated_preset_list[preset_name] = {};
|
||||||
// For each setting.
|
// For each setting.
|
||||||
for (const setting_name in preset_settings) {
|
for (const setting_name in preset_settings) {
|
||||||
if (preset_settings.hasOwnProperty(setting_name)) {
|
if (preset_settings.hasOwnProperty(setting_name)) {
|
||||||
const setting_value = preset_settings[setting_name];
|
const setting_value = preset_settings[setting_name];
|
||||||
// Register current setting.
|
// Register current setting.
|
||||||
updated_preset_list[preset_name][setting_name] = setting_value;
|
updated_preset_list[preset_name][setting_name] = setting_value;
|
||||||
if (setting_name.indexOf('_range') <= 0) {
|
if (setting_name.indexOf('_range') <= 0) {
|
||||||
continue;
|
|
||||||
}
|
|
||||||
if (setting_name.indexOf('apply_') <= 0) {
|
|
||||||
// Add apply checkbox.
|
|
||||||
updated_preset_list[preset_name][`apply_${setting_name}`] = true;
|
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
if (setting_name.indexOf('apply_') <= 0) {
|
||||||
|
// Add apply checkbox.
|
||||||
|
updated_preset_list[preset_name][`apply_${setting_name}`] = true;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
// Adding missing options.
|
||||||
|
updated_preset_list[preset_name]['apply_stapm_time_ms'] = false;
|
||||||
|
updated_preset_list[preset_name]['apply_psi0_current_limit'] = false;
|
||||||
}
|
}
|
||||||
// Adding missing options.
|
|
||||||
updated_preset_list[preset_name]['apply_stapm_time_ms'] = false;
|
|
||||||
updated_preset_list[preset_name]['apply_psi0_current_limit'] = false;
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
return updated_preset_list;
|
return updated_preset_list;
|
||||||
};
|
};
|
||||||
settings.set('presets', update_presets_to_1_11_0(settings.get('presets')));
|
settings.set('presets', update_presets_to_1_11_0(settings.get('presets')));
|
||||||
|
Loading…
Reference in New Issue
Block a user