mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
Log a warning on an unknown input type
This commit is contained in:
@ -284,9 +284,7 @@ export class Popup {
|
|||||||
}
|
}
|
||||||
|
|
||||||
this.inputControls.appendChild(label);
|
this.inputControls.appendChild(label);
|
||||||
}
|
} else if (input.type === 'text') {
|
||||||
|
|
||||||
if (input.type === 'text') {
|
|
||||||
const label = document.createElement('label');
|
const label = document.createElement('label');
|
||||||
label.classList.add('text_label', 'justifyCenter');
|
label.classList.add('text_label', 'justifyCenter');
|
||||||
label.setAttribute('for', input.id);
|
label.setAttribute('for', input.id);
|
||||||
@ -306,6 +304,9 @@ export class Popup {
|
|||||||
label.appendChild(inputElement);
|
label.appendChild(inputElement);
|
||||||
|
|
||||||
this.inputControls.appendChild(label);
|
this.inputControls.appendChild(label);
|
||||||
|
} else {
|
||||||
|
console.warn('Unknown custom input type. Only checkbox and text are supported.', input);
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user