Settings pages can now have password protected fields

This commit is contained in:
nuttylmao
2025-05-07 19:00:11 +10:00
parent 0d616be1d7
commit 782cd412bf
2 changed files with 8 additions and 0 deletions
@@ -93,6 +93,13 @@ function LoadJSON(settingsJson) {
inputElement.value = settingsMap.has(setting.id) ? settingsMap.get(setting.id) : setting.defaultValue;
inputElement.autocomplete = 'new-password';
break;
case 'password':
inputElement = document.createElement('input');
inputElement.type = 'password';
inputElement.id = setting.id; //Added setting ID
inputElement.value = settingsMap.has(setting.id) ? settingsMap.get(setting.id) : setting.defaultValue;
inputElement.autocomplete = 'new-password';
break;
case 'checkbox':
const labelDiv = document.createElement('label');
labelDiv.classList.add('switch');
@@ -207,6 +207,7 @@ a {
}
input[type="text"],
input[type="password"],
select,
input[type="number"] {
width: 250px;