configEditor, explain why input is disabled

This commit is contained in:
Nathan DECHER 2020-04-14 16:31:11 +02:00
parent bbb34e63b6
commit 3d50bf805d

View file

@ -67,7 +67,7 @@ class ConfigEditor extends Popup {
input.disabled= input.disabled=
data.excludes data.excludes
.some(key => config.getB(key)); .some(key => config.getB(key));
input.title=input.disabled?`Disable ${data.excludes.join(',')} to enable`:''; input.title=input.disabled?`Disable '${data.excludes.map(k => metaConfig[k].name).join('\', \'')}' to enable`:'';
}; };
setEnabled(); setEnabled();
@ -78,7 +78,7 @@ class ConfigEditor extends Popup {
} else if(data.parent) { } else if(data.parent) {
const setEnabled=() => { const setEnabled=() => {
input.disabled=!config.getB(data.parent); input.disabled=!config.getB(data.parent);
input.title=input.disabled?`Enable ${data.parent} to enable`:''; input.title=input.disabled?`Enable '${metaConfig[data.parent].name}' to enable`:'';
}; };
setEnabled(); setEnabled();