This commit is contained in:
MX 2024-03-20 20:17:16 +03:00
parent 4a673397b3
commit 8c0ba4de9f
No known key found for this signature in database
GPG key ID: 7CCC66B7DBDD1C83

View file

@ -2,6 +2,18 @@
#include "../js_modules.h"
#include <dialogs/dialogs.h>
// File icon
#include <gui/icon_i.h>
static const uint8_t _I_file_10px_0[] = {
0x00, 0x7f, 0x00, 0xa1, 0x00, 0x2d, 0x01, 0xe1, 0x01, 0x0d, 0x01,
0x01, 0x01, 0x7d, 0x01, 0x01, 0x01, 0x01, 0x01, 0xff, 0x01,
};
static const uint8_t* const _I_file_10px[] = {_I_file_10px_0};
static const Icon I_file_10px =
{.width = 10, .height = 10, .frame_count = 1, .frame_rate = 0, .frames = _I_file_10px};
// File icon end
static bool js_dialog_msg_parse_params(struct mjs* mjs, const char** hdr, const char** msg) {
size_t num_args = mjs_nargs(mjs);
if(num_args != 2) {
@ -166,6 +178,7 @@ static void js_dialog_pick_file(struct mjs* mjs) {
DialogsApp* dialogs = furi_record_open(RECORD_DIALOGS);
const DialogsFileBrowserOptions browser_options = {
.extension = extension,
.icon = &I_file_10px,
.base_path = base_path,
};
FuriString* path = furi_string_alloc_set(base_path);