JS: Sync small differences from OFW PR

This commit is contained in:
Willy-JL
2024-10-17 23:43:21 +01:00
parent be968980cf
commit 799ff282f4
7 changed files with 13 additions and 6 deletions

View File

@@ -59,7 +59,7 @@ eventLoop.subscribe(views.dialog.input, function (_sub, button, eventLoop, gui)
notify.error();
}
// Optional, but allows to interchange with usbdisk
// Optional, but allows to unlock usb interface to switch profile
badusb.quit();
eventLoop.stop();

View File

@@ -80,6 +80,7 @@ eventLoop.subscribe(views.demos.chosen, function (_sub, index, gui, eventLoop, v
// say hi after keyboard input
eventLoop.subscribe(views.keyboard.input, function (_sub, name, gui, views) {
views.keyboard.set("defaultText", name); // Remember for next usage
views.helloDialog.set("text", "Hi " + name + "! :)");
views.helloDialog.set("center", "Hi Flipper! :)");
gui.viewDispatcher.switchTo(views.helloDialog);

View File

@@ -6,4 +6,4 @@ if (storage.fileExists(__dirpath + "/math.js")) {
print("math.js exist here.");
} else {
print("math.js does not exist here.");
}
}

View File

@@ -25,5 +25,5 @@ storage.remove(path);
print("Done")
// You don't need to close the file after each operation, this is just to show some different ways to use
// There's also many more functions and options, check types docs in firmware repo
// You don't need to close the file after each operation, this is just to show some different ways to use the API
// There's also many more functions and options, check type definitions in firmware repo