diff --git a/js/app.js b/js/app.js index 6edfe9e..1baef1c 100644 --- a/js/app.js +++ b/js/app.js @@ -7,6 +7,7 @@ ready(function(){ loadLatestUsedSettings(); displayVersion(); reApplyPeriodically(require('electron-settings').get('settings.reapply_periodically')); + displayOptionDescription(); document.isStarting = false; }); diff --git a/js/methods.js b/js/methods.js index 7f6d6d6..29f2f06 100644 --- a/js/methods.js +++ b/js/methods.js @@ -258,3 +258,20 @@ function reApplyPeriodically(seconds) { document.reapplyLoop = setInterval(applyRyzenSettings, seconds * 1000); } + +/** + * Display tooltip on each options. + */ +function displayOptionDescription() { + appendLog("displayOptionDescription():"); + const options_description = require('./js/options_description.json'); + for (const option in options_description) { + if (options_description.hasOwnProperty(option)) { + appendLog(`- option: ${option}`); + const description = options_description[option]; + const node = document.getElementById(option).parentElement.parentElement; + node.setAttribute('uk-tooltip', description); + UIkit.tooltip(node); + } + } +} diff --git a/js/options_description.json b/js/options_description.json new file mode 100644 index 0000000..f8bafa0 --- /dev/null +++ b/js/options_description.json @@ -0,0 +1,7 @@ +{ + "stapm_limit_w": "Skin Temperature Aware Power Management. This will define the socket power package limit which is used to manage the device boost period.", + "ppt_fast_limit_w": "The amount of power the CPU can draw while boost levels on.", + "ppt_slow_limit_w": "The amount of power the CPU can draw while boost levels off.", + "temperature_limit_c": "The temperature the CPU can reach before boost levels off.", + "vrm_current_m_a": "The limit of current we let the motherboard deliver to the CPU." +}