JS: Add illegalSymbols prop for gui/text_input (#290)

* JS: Add illegalSymbols prop for gui/text_input

* Update changelog

* Fix gui example
This commit is contained in:
WillyJL
2024-11-04 08:38:59 +00:00
committed by GitHub
parent f8b280cb28
commit 30d7589f5c
7 changed files with 42 additions and 5 deletions

View File

@@ -32,6 +32,12 @@ let views = {
loading: loading.make(),
};
// Enable illegal filename symbols since we're not choosing filenames, gives more flexibility
// Not available in all firmwares, good idea to check if it is supported
if (doesSdkSupport(["gui-textinput-illegalsymbols"])) {
views.textInput.set("illegalSymbols", true);
}
eventLoop.subscribe(views.dialog.input, function (_sub, button, gui, views) {
if (button === "center") {
gui.viewDispatcher.switchTo(views.textInput);