mirror of
https://gitlab.com/ryzen-controller-team/ryzen-controller.git
synced 2024-12-22 18:13:28 +07:00
Fixed option display toggle when applying presets.
This commit is contained in:
parent
9da9fd5da2
commit
261f53a938
@ -219,11 +219,9 @@ function loadLatestUsedSettings() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Listen settings tab inputs to save their values.
|
* Will show or display options based on apply checkboxes value.
|
||||||
*/
|
*/
|
||||||
function registerEventListenerForSettingsInput() {
|
function toggleOptionDisplayBasedOnApplyCheckbox() {
|
||||||
const settings = require('electron-settings');
|
|
||||||
|
|
||||||
var checkbox_toggle_options = document.querySelectorAll('#controller-tab input[id^=apply_], #experimental-tab input[id^=apply_]');
|
var checkbox_toggle_options = document.querySelectorAll('#controller-tab input[id^=apply_], #experimental-tab input[id^=apply_]');
|
||||||
const hideOptionBasedOnInput = function (input) {
|
const hideOptionBasedOnInput = function (input) {
|
||||||
if (input.checked) {
|
if (input.checked) {
|
||||||
@ -238,7 +236,15 @@ function registerEventListenerForSettingsInput() {
|
|||||||
hideOptionBasedOnInput(input);
|
hideOptionBasedOnInput(input);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Listen settings tab inputs to save their values.
|
||||||
|
*/
|
||||||
|
function registerEventListenerForSettingsInput() {
|
||||||
|
const settings = require('electron-settings');
|
||||||
|
|
||||||
|
toggleOptionDisplayBasedOnApplyCheckbox();
|
||||||
|
|
||||||
var apply_last_settings_on_launch = document.getElementById('apply_last_settings_on_launch');
|
var apply_last_settings_on_launch = document.getElementById('apply_last_settings_on_launch');
|
||||||
apply_last_settings_on_launch.addEventListener('change', function() {
|
apply_last_settings_on_launch.addEventListener('change', function() {
|
||||||
@ -486,6 +492,7 @@ function applyPreset(presetName) {
|
|||||||
appendLog(`applyPreset(): saved preset: ${JSON.stringify(ret)}`);
|
appendLog(`applyPreset(): saved preset: ${JSON.stringify(ret)}`);
|
||||||
loadLatestUsedSettings();
|
loadLatestUsedSettings();
|
||||||
applyRyzenSettings();
|
applyRyzenSettings();
|
||||||
|
toggleOptionDisplayBasedOnApplyCheckbox();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user