From 0e777193fc8c1adb33d21ea43b951a9e9f4d0c2b Mon Sep 17 00:00:00 2001 From: Barbudor Date: Sun, 3 Oct 2021 20:11:14 +0200 Subject: [PATCH] add 'show hidden files' checkbox in fileman --- .../html_compressed/HTTP_HEAD_LAST_SCRIPT.h | 7 +- tasmota/html_compressed/HTTP_HEAD_STYLE2.h | 5 +- .../html_uncompressed/HTTP_HEAD_LAST_SCRIPT.h | 9 +++ tasmota/html_uncompressed/HTTP_HEAD_STYLE2.h | 3 +- tasmota/language/af_AF.h | 1 + tasmota/language/bg_BG.h | 1 + tasmota/language/cs_CZ.h | 1 + tasmota/language/de_DE.h | 1 + tasmota/language/el_GR.h | 1 + tasmota/language/en_GB.h | 1 + tasmota/language/es_ES.h | 1 + tasmota/language/fr_FR.h | 1 + tasmota/language/fy_NL.h | 1 + tasmota/language/he_HE.h | 1 + tasmota/language/hu_HU.h | 1 + tasmota/language/it_IT.h | 1 + tasmota/language/ko_KO.h | 1 + tasmota/language/nl_NL.h | 1 + tasmota/language/pl_PL.h | 1 + tasmota/language/pt_BR.h | 1 + tasmota/language/pt_PT.h | 1 + tasmota/language/ro_RO.h | 1 + tasmota/language/ru_RU.h | 1 + tasmota/language/sk_SK.h | 1 + tasmota/language/sv_SE.h | 1 + tasmota/language/tr_TR.h | 1 + tasmota/language/uk_UA.h | 1 + tasmota/language/vi_VN.h | 1 + tasmota/language/zh_CN.h | 1 + tasmota/language/zh_TW.h | 1 + tasmota/xdrv_50_filesystem.ino | 64 ++++++++++--------- 31 files changed, 79 insertions(+), 35 deletions(-) diff --git a/tasmota/html_compressed/HTTP_HEAD_LAST_SCRIPT.h b/tasmota/html_compressed/HTTP_HEAD_LAST_SCRIPT.h index feaa2ee1e..41ed93443 100644 --- a/tasmota/html_compressed/HTTP_HEAD_LAST_SCRIPT.h +++ b/tasmota/html_compressed/HTTP_HEAD_LAST_SCRIPT.h @@ -2,7 +2,7 @@ // compressed by tools/unishox/compress-html-uncompressed.py ///////////////////////////////////////////////////////////////////// -const size_t HTTP_HEAD_LAST_SCRIPT_SIZE = 226; +const size_t HTTP_HEAD_LAST_SCRIPT_SIZE = 355; const char HTTP_HEAD_LAST_SCRIPT_COMPRESSED[] PROGMEM = "\x30\x2F\x83\xAD\xCE\x46\xB1\x0E\xE9\xDE\x3D\xA6\x77\xF5\x47\xC3\x8C\xEA\x2D\x3E" "\x09\x81\x8B\x1A\xFA\x8E\x86\xA1\x6F\xE6\x45\xE6\x13\x0E\xB3\xE5\x61\x04\x77\x4F" "\xBD\xE1\x82\xE8\xEA\x1C\x2E\xAB\x38\xEA\xA6\x6C\xAB\xFB\xB3\xAB\xCC\x26\x1D\x1F" @@ -11,6 +11,9 @@ const char HTTP_HEAD_LAST_SCRIPT_COMPRESSED[] PROGMEM = "\x30\x2F\x83\xAD\xCE\x4 "\xCF\x87\x77\x4F\x7A\x8F\x7C\xE8\x2A\x2B\xFC\x57\x55\xFD\x1C\x2E\x99\xDD\x3E\xF4" "\x43\xEC\xEF\x1F\xA3\xF4\x77\x4F\xE0\x27\x57\xEB\x1A\xCF\xB3\xBC\x77\x8E\xF1\xDA" "\x04\x1C\x87\x44\x3E\xCF\x7C\xF3\x04\x7C\xB0\xF0\x7B\xA8\xED\x9D\xB3\xC1\xEE\x3D" - "\xC3\xE1\x1D\xD3\x58\x87\x78\xF0\x7A\x1D\x9E\x0F\xFA\x32\x8F\xC3"; + "\xC0\x89\xC1\x77\x8C\x1D\xDF\x03\x02\xE0\xBC\xE8\x28\xC0\x2F\x70\x2C\x74\xF5\x19" + "\x04\xCE\x82\x6F\x86\x05\x66\x47\xCF\x1D\xA3\xEC\x70\x58\x19\xA1\xF6\x79\x9F\x7D" + "\x9C\xCF\xB0\x43\xD7\x47\xC2\x3B\xA6\xB1\x0E\xF1\xE0\xF4\x3B\x3C\x1F\xF4\x65\x1F" + "\x86"; #define HTTP_HEAD_LAST_SCRIPT Decompress(HTTP_HEAD_LAST_SCRIPT_COMPRESSED,HTTP_HEAD_LAST_SCRIPT_SIZE).c_str() \ No newline at end of file diff --git a/tasmota/html_compressed/HTTP_HEAD_STYLE2.h b/tasmota/html_compressed/HTTP_HEAD_STYLE2.h index 4c1da5898..97f2bde73 100644 --- a/tasmota/html_compressed/HTTP_HEAD_STYLE2.h +++ b/tasmota/html_compressed/HTTP_HEAD_STYLE2.h @@ -2,7 +2,7 @@ // compressed by tools/unishox/compress-html-uncompressed.py ///////////////////////////////////////////////////////////////////// -const size_t HTTP_HEAD_STYLE2_SIZE = 478; +const size_t HTTP_HEAD_STYLE2_SIZE = 496; const char HTTP_HEAD_STYLE2_COMPRESSED[] PROGMEM = "\x1C\x2E\xAB\x38\xF6\x8E\xCF\x88\xFE\x79\x9C\x67\x82\x04\x18\xA7\x5F\xEC\x4D\x17" "\xE3\xCC\xE3\x3A\x59\x7D\x8D\x3C\x0E\xB0\xCD\x07\xBF\x82\xF8\x43\xCC\xF2\x3E\x8E" "\x3E\x23\x61\xE0\x3C\x0B\x3E\x08\x52\x02\xDE\x67\x58\xA7\xA3\xC2\xA8\xF3\x39\x47" @@ -15,6 +15,7 @@ const char HTTP_HEAD_STYLE2_COMPRESSED[] PROGMEM = "\x1C\x2E\xAB\x38\xF6\x8E\xCF "\x61\xED\x30\x16\x5D\x1E\x61\x33\x14\x08\x38\x05\x85\xA3\xDC\x08\x33\x0F\x71\xD0" "\xD4\x08\x56\xFF\xA3\xC2\x81\x22\xE0\x20\xCD\x3D\xC7\x4F\x82\x17\x20\x60\x8D\xC7" "\xD3\x1A\x78\x19\x62\x09\xBC\x3C\x79\x9C\xA2\x18\x6C\x3C\x0D\xBF\x8F\x6F\x1E\x67" - "\x38\x86\x1B\x11\xCA\x21\x86\xC3\xC1\xEE"; + "\x38\x86\x1B\x11\xCA\x21\x86\xC3\xC1\xEE\x3A\x0A\x30\x7B\x44\xDF\x0C\x0A\xCC\x81" + "\x0B\x61"; #define HTTP_HEAD_STYLE2 Decompress(HTTP_HEAD_STYLE2_COMPRESSED,HTTP_HEAD_STYLE2_SIZE).c_str() \ No newline at end of file diff --git a/tasmota/html_uncompressed/HTTP_HEAD_LAST_SCRIPT.h b/tasmota/html_uncompressed/HTTP_HEAD_LAST_SCRIPT.h index e2937fd62..6a3a01c49 100644 --- a/tasmota/html_uncompressed/HTTP_HEAD_LAST_SCRIPT.h +++ b/tasmota/html_uncompressed/HTTP_HEAD_LAST_SCRIPT.h @@ -8,5 +8,14 @@ const char HTTP_HEAD_LAST_SCRIPT[] PROGMEM = "t++;" "}" "}" + "function sf(s){" + "var t=0,i=document.querySelectorAll('.hf');" + "while(i.length>=t){" + "if(i[t]){" + "i[t].style.display=s?'block':'none';" + "}" + "t++;" + "}" + "}" "wl(jd);" // Add name='' to any id='' in input,button,textarea,select ""; diff --git a/tasmota/html_uncompressed/HTTP_HEAD_STYLE2.h b/tasmota/html_uncompressed/HTTP_HEAD_STYLE2.h index 8ca4ffed8..f0fabbd91 100644 --- a/tasmota/html_uncompressed/HTTP_HEAD_STYLE2.h +++ b/tasmota/html_uncompressed/HTTP_HEAD_STYLE2.h @@ -8,4 +8,5 @@ const char HTTP_HEAD_STYLE2[] PROGMEM = "a{color:#%06x;text-decoration:none;}" // COLOR_BUTTON ".p{float:left;text-align:left;}" ".q{float:right;text-align:right;}" - ".r{border-radius:0.3em;padding:2px;margin:6px 2px;}"; + ".r{border-radius:0.3em;padding:2px;margin:6px 2px;}" + ".hf{display:none;}"; diff --git a/tasmota/language/af_AF.h b/tasmota/language/af_AF.h index 1e4067cda..c2c993908 100644 --- a/tasmota/language/af_AF.h +++ b/tasmota/language/af_AF.h @@ -950,6 +950,7 @@ #define D_CREATE_NEW_FILE "Create and edit new file" #define D_EDIT_FILE "Edit File" #define D_CONFIRM_FILE_DEL "Confirm file deletion" +#define D_SHOW_HIDDEN_FILES "Show hidden files" //xsns_67_as3935.ino #define D_AS3935_GAIN "versterking:" diff --git a/tasmota/language/bg_BG.h b/tasmota/language/bg_BG.h index 8685937f1..535490e2e 100644 --- a/tasmota/language/bg_BG.h +++ b/tasmota/language/bg_BG.h @@ -949,6 +949,7 @@ #define D_CREATE_NEW_FILE "Create and edit new file" #define D_EDIT_FILE "Edit File" #define D_CONFIRM_FILE_DEL "Confirm file deletion" +#define D_SHOW_HIDDEN_FILES "Show hidden files" //xsns_67_as3935.ino #define D_AS3935_GAIN "усилване:" diff --git a/tasmota/language/cs_CZ.h b/tasmota/language/cs_CZ.h index 30a70d7dd..5869c70b8 100644 --- a/tasmota/language/cs_CZ.h +++ b/tasmota/language/cs_CZ.h @@ -950,6 +950,7 @@ #define D_CREATE_NEW_FILE "Create and edit new file" #define D_EDIT_FILE "Edit File" #define D_CONFIRM_FILE_DEL "Confirm file deletion" +#define D_SHOW_HIDDEN_FILES "Show hidden files" //xsns_67_as3935.ino #define D_AS3935_GAIN "gain:" diff --git a/tasmota/language/de_DE.h b/tasmota/language/de_DE.h index fd46e8b93..19801605e 100644 --- a/tasmota/language/de_DE.h +++ b/tasmota/language/de_DE.h @@ -950,6 +950,7 @@ #define D_CREATE_NEW_FILE "Datei erstellen und bearbeiten" #define D_EDIT_FILE "Datei bearbeiten" #define D_CONFIRM_FILE_DEL "Datei löschen bestätigen" +#define D_SHOW_HIDDEN_FILES "Show hidden files" //xsns_67_as3935.ino #define D_AS3935_GAIN "Umgebung:" diff --git a/tasmota/language/el_GR.h b/tasmota/language/el_GR.h index c8045a79e..40924a999 100644 --- a/tasmota/language/el_GR.h +++ b/tasmota/language/el_GR.h @@ -950,6 +950,7 @@ #define D_CREATE_NEW_FILE "Create and edit new file" #define D_EDIT_FILE "Edit File" #define D_CONFIRM_FILE_DEL "Confirm file deletion" +#define D_SHOW_HIDDEN_FILES "Show hidden files" //xsns_67_as3935.ino #define D_AS3935_GAIN "gain:" diff --git a/tasmota/language/en_GB.h b/tasmota/language/en_GB.h index 462d64971..c2dd499b8 100644 --- a/tasmota/language/en_GB.h +++ b/tasmota/language/en_GB.h @@ -950,6 +950,7 @@ #define D_CREATE_NEW_FILE "Create and edit new file" #define D_EDIT_FILE "Edit File" #define D_CONFIRM_FILE_DEL "Confirm file deletion" +#define D_SHOW_HIDDEN_FILES "Show hidden files" //xsns_67_as3935.ino #define D_AS3935_GAIN "gain:" diff --git a/tasmota/language/es_ES.h b/tasmota/language/es_ES.h index be52d59a9..867b6c538 100644 --- a/tasmota/language/es_ES.h +++ b/tasmota/language/es_ES.h @@ -950,6 +950,7 @@ #define D_CREATE_NEW_FILE "Crear y editar un archivo nuevo" #define D_EDIT_FILE "Editar Archivo" #define D_CONFIRM_FILE_DEL "Confirmar la eliminación del archivo" +#define D_SHOW_HIDDEN_FILES "Show hidden files" //xsns_67_as3935.ino #define D_AS3935_GAIN "Ganancia:" diff --git a/tasmota/language/fr_FR.h b/tasmota/language/fr_FR.h index 7fa9836c5..3274dc358 100644 --- a/tasmota/language/fr_FR.h +++ b/tasmota/language/fr_FR.h @@ -949,6 +949,7 @@ #define D_CREATE_NEW_FILE "Créer and modifier un nouveau fichier" #define D_EDIT_FILE "Modification de fichier" #define D_CONFIRM_FILE_DEL "Confirmez la suppression du fichier" +#define D_SHOW_HIDDEN_FILES "Affichez les fichiers cachés" //xsns_67_as3935.ino #define D_AS3935_GAIN "gain:" diff --git a/tasmota/language/fy_NL.h b/tasmota/language/fy_NL.h index 3356d7963..c8de55528 100644 --- a/tasmota/language/fy_NL.h +++ b/tasmota/language/fy_NL.h @@ -950,6 +950,7 @@ #define D_CREATE_NEW_FILE "Create and edit new file" #define D_EDIT_FILE "Edit File" #define D_CONFIRM_FILE_DEL "Confirm file deletion" +#define D_SHOW_HIDDEN_FILES "Show hidden files" //xsns_67_as3935.ino #define D_AS3935_GAIN "gain:" diff --git a/tasmota/language/he_HE.h b/tasmota/language/he_HE.h index 75a6cae2c..0f26efe5e 100644 --- a/tasmota/language/he_HE.h +++ b/tasmota/language/he_HE.h @@ -950,6 +950,7 @@ #define D_CREATE_NEW_FILE "Create and edit new file" #define D_EDIT_FILE "Edit File" #define D_CONFIRM_FILE_DEL "Confirm file deletion" +#define D_SHOW_HIDDEN_FILES "Show hidden files" //xsns_67_as3935.ino #define D_AS3935_GAIN "gain:" diff --git a/tasmota/language/hu_HU.h b/tasmota/language/hu_HU.h index f9db1b371..f2d13f08c 100644 --- a/tasmota/language/hu_HU.h +++ b/tasmota/language/hu_HU.h @@ -950,6 +950,7 @@ #define D_CREATE_NEW_FILE "Create and edit new file" #define D_EDIT_FILE "Edit File" #define D_CONFIRM_FILE_DEL "Confirm file deletion" +#define D_SHOW_HIDDEN_FILES "Show hidden files" //xsns_67_as3935.ino #define D_AS3935_GAIN "nyereség:" diff --git a/tasmota/language/it_IT.h b/tasmota/language/it_IT.h index 61e3cdcb2..2655f2885 100644 --- a/tasmota/language/it_IT.h +++ b/tasmota/language/it_IT.h @@ -950,6 +950,7 @@ #define D_CREATE_NEW_FILE "Crea e modifica nuovo file" #define D_EDIT_FILE "Modifica file" #define D_CONFIRM_FILE_DEL "Conferma eliminazione file" +#define D_SHOW_HIDDEN_FILES "Show hidden files" //xsns_67_as3935.ino #define D_AS3935_GAIN "guadagno:" diff --git a/tasmota/language/ko_KO.h b/tasmota/language/ko_KO.h index d446aa0e0..2b866a3bf 100644 --- a/tasmota/language/ko_KO.h +++ b/tasmota/language/ko_KO.h @@ -950,6 +950,7 @@ #define D_CREATE_NEW_FILE "Create and edit new file" #define D_EDIT_FILE "Edit File" #define D_CONFIRM_FILE_DEL "Confirm file deletion" +#define D_SHOW_HIDDEN_FILES "Show hidden files" //xsns_67_as3935.ino #define D_AS3935_GAIN "gain:" diff --git a/tasmota/language/nl_NL.h b/tasmota/language/nl_NL.h index e1d0f60e5..d14b74087 100644 --- a/tasmota/language/nl_NL.h +++ b/tasmota/language/nl_NL.h @@ -950,6 +950,7 @@ #define D_CREATE_NEW_FILE "Create and edit new file" #define D_EDIT_FILE "Edit File" #define D_CONFIRM_FILE_DEL "Confirm file deletion" +#define D_SHOW_HIDDEN_FILES "Show hidden files" //xsns_67_as3935.ino #define D_AS3935_GAIN "gain:" diff --git a/tasmota/language/pl_PL.h b/tasmota/language/pl_PL.h index d4eea1c59..713df76ad 100644 --- a/tasmota/language/pl_PL.h +++ b/tasmota/language/pl_PL.h @@ -950,6 +950,7 @@ #define D_CREATE_NEW_FILE "Utwórz i edytuj nowy plik" #define D_EDIT_FILE "Edytuj Plik" #define D_CONFIRM_FILE_DEL "Confirm file deletion" +#define D_SHOW_HIDDEN_FILES "Show hidden files" //xsns_67_as3935.ino #define D_AS3935_GAIN "wejście:" diff --git a/tasmota/language/pt_BR.h b/tasmota/language/pt_BR.h index 5dcbd96f3..70c596063 100644 --- a/tasmota/language/pt_BR.h +++ b/tasmota/language/pt_BR.h @@ -950,6 +950,7 @@ #define D_CREATE_NEW_FILE "Criar e editar um novo arquivo" #define D_EDIT_FILE "Editar arquivo" #define D_CONFIRM_FILE_DEL "Confirmar remoção do arquivo" +#define D_SHOW_HIDDEN_FILES "Show hidden files" //xsns_67_as3935.ino #define D_AS3935_GAIN "ganho:" diff --git a/tasmota/language/pt_PT.h b/tasmota/language/pt_PT.h index 7f16771aa..b430481e3 100644 --- a/tasmota/language/pt_PT.h +++ b/tasmota/language/pt_PT.h @@ -950,6 +950,7 @@ #define D_CREATE_NEW_FILE "Create and edit new file" #define D_EDIT_FILE "Edit File" #define D_CONFIRM_FILE_DEL "Confirm file deletion" +#define D_SHOW_HIDDEN_FILES "Show hidden files" //xsns_67_as3935.ino #define D_AS3935_GAIN "gain:" diff --git a/tasmota/language/ro_RO.h b/tasmota/language/ro_RO.h index 59ecc19fc..b0c62eb4d 100644 --- a/tasmota/language/ro_RO.h +++ b/tasmota/language/ro_RO.h @@ -950,6 +950,7 @@ #define D_CREATE_NEW_FILE "Create and edit new file" #define D_EDIT_FILE "Edit File" #define D_CONFIRM_FILE_DEL "Confirm file deletion" +#define D_SHOW_HIDDEN_FILES "Show hidden files" //xsns_67_as3935.ino #define D_AS3935_GAIN "gain:" diff --git a/tasmota/language/ru_RU.h b/tasmota/language/ru_RU.h index 5734acb95..e25356cae 100644 --- a/tasmota/language/ru_RU.h +++ b/tasmota/language/ru_RU.h @@ -950,6 +950,7 @@ #define D_CREATE_NEW_FILE "Create and edit new file" #define D_EDIT_FILE "Edit File" #define D_CONFIRM_FILE_DEL "Confirm file deletion" +#define D_SHOW_HIDDEN_FILES "Show hidden files" //xsns_67_as3935.ino #define D_AS3935_GAIN "gain:" diff --git a/tasmota/language/sk_SK.h b/tasmota/language/sk_SK.h index ceba0deba..824ddac76 100644 --- a/tasmota/language/sk_SK.h +++ b/tasmota/language/sk_SK.h @@ -950,6 +950,7 @@ #define D_CREATE_NEW_FILE "Create and edit new file" #define D_EDIT_FILE "Edit File" #define D_CONFIRM_FILE_DEL "Confirm file deletion" +#define D_SHOW_HIDDEN_FILES "Show hidden files" //xsns_67_as3935.ino #define D_AS3935_GAIN "gain:" diff --git a/tasmota/language/sv_SE.h b/tasmota/language/sv_SE.h index 30f9771a8..fa394a22e 100644 --- a/tasmota/language/sv_SE.h +++ b/tasmota/language/sv_SE.h @@ -950,6 +950,7 @@ #define D_CREATE_NEW_FILE "Create and edit new file" #define D_EDIT_FILE "Edit File" #define D_CONFIRM_FILE_DEL "Confirm file deletion" +#define D_SHOW_HIDDEN_FILES "Show hidden files" //xsns_67_as3935.ino #define D_AS3935_GAIN "gain:" diff --git a/tasmota/language/tr_TR.h b/tasmota/language/tr_TR.h index 38da2ebb5..3730512bc 100644 --- a/tasmota/language/tr_TR.h +++ b/tasmota/language/tr_TR.h @@ -950,6 +950,7 @@ #define D_CREATE_NEW_FILE "Create and edit new file" #define D_EDIT_FILE "Edit File" #define D_CONFIRM_FILE_DEL "Confirm file deletion" +#define D_SHOW_HIDDEN_FILES "Show hidden files" //xsns_67_as3935.ino #define D_AS3935_GAIN "gain:" diff --git a/tasmota/language/uk_UA.h b/tasmota/language/uk_UA.h index 4da3f94ac..423eb770b 100644 --- a/tasmota/language/uk_UA.h +++ b/tasmota/language/uk_UA.h @@ -950,6 +950,7 @@ #define D_CREATE_NEW_FILE "Create and edit new file" #define D_EDIT_FILE "Edit File" #define D_CONFIRM_FILE_DEL "Confirm file deletion" +#define D_SHOW_HIDDEN_FILES "Show hidden files" //xsns_67_as3935.ino #define D_AS3935_GAIN "gain:" diff --git a/tasmota/language/vi_VN.h b/tasmota/language/vi_VN.h index 69eb3a49d..abec88be9 100644 --- a/tasmota/language/vi_VN.h +++ b/tasmota/language/vi_VN.h @@ -950,6 +950,7 @@ #define D_CREATE_NEW_FILE "Create and edit new file" #define D_EDIT_FILE "Edit File" #define D_CONFIRM_FILE_DEL "Confirm file deletion" +#define D_SHOW_HIDDEN_FILES "Show hidden files" //xsns_67_as3935.ino #define D_AS3935_GAIN "khuếch đại:" diff --git a/tasmota/language/zh_CN.h b/tasmota/language/zh_CN.h index e01f62177..3461ccae1 100644 --- a/tasmota/language/zh_CN.h +++ b/tasmota/language/zh_CN.h @@ -950,6 +950,7 @@ #define D_CREATE_NEW_FILE "Create and edit new file" #define D_EDIT_FILE "Edit File" #define D_CONFIRM_FILE_DEL "Confirm file deletion" +#define D_SHOW_HIDDEN_FILES "Show hidden files" //xsns_67_as3935.ino #define D_AS3935_GAIN "gain:" diff --git a/tasmota/language/zh_TW.h b/tasmota/language/zh_TW.h index 3031041ae..10ec030fe 100644 --- a/tasmota/language/zh_TW.h +++ b/tasmota/language/zh_TW.h @@ -950,6 +950,7 @@ #define D_CREATE_NEW_FILE "Create and edit new file" #define D_EDIT_FILE "Edit File" #define D_CONFIRM_FILE_DEL "Confirm file deletion" +#define D_SHOW_HIDDEN_FILES "Show hidden files" //xsns_67_as3935.ino #define D_AS3935_GAIN "gain:" diff --git a/tasmota/xdrv_50_filesystem.ino b/tasmota/xdrv_50_filesystem.ino index e4b40ce99..7d9f6b5b5 100644 --- a/tasmota/xdrv_50_filesystem.ino +++ b/tasmota/xdrv_50_filesystem.ino @@ -563,20 +563,25 @@ const char UFS_FORM_FILE_UPGb[] PROGMEM = "
" "
" #endif + "" D_SHOW_HIDDEN_FILES "" "" "" ""; +const char UFS_FORM_SDC_DIR_NORMAL[] PROGMEM = + ""; +const char UFS_FORM_SDC_DIR_HIDDABLE[] PROGMEM = + " class='hf'"; const char UFS_FORM_SDC_DIRd[] PROGMEM = "
%s
"; const char UFS_FORM_SDC_DIRb[] PROGMEM = - "
%s %s %8d %s %s
"; + "%s %s %8d %s %s"; const char UFS_FORM_SDC_HREF[] PROGMEM = "ufsd?download=%s/%s"; #ifdef GUI_TRASH_FILE const char UFS_FORM_SDC_HREFdel[] PROGMEM = //"🗑"; // 🗑️ - "🔥"; // 🔥 + "🔥"; // 🔥 #endif // GUI_TRASH_FILE #ifdef GUI_EDIT_FILE @@ -584,7 +589,7 @@ const char UFS_FORM_SDC_HREFdel[] PROGMEM = #define FILE_BUFFER_SIZE 1024 const char UFS_FORM_SDC_HREFedit[] PROGMEM = - "📝"; // 📝 + "📝"; // 📝 const char HTTP_EDITOR_FORM_START[] PROGMEM = "
 " D_EDIT_FILE " " @@ -710,41 +715,40 @@ void UfsListDir(char *path, uint8_t depth) { if (!*(pp + 1)) { pp++; } char *cp = name; // osx formatted disks contain a lot of stuff we dont want - if (!UfsReject((char*)ep)) { + bool hiddable = UfsReject((char*)ep); - for (uint8_t cnt = 0; cnt 1) { + strcat(path, "/"); } - - sprintf(cp, format, ep); - if (entry.isDirectory()) { - ext_snprintf_P(npath, sizeof(npath), UFS_FORM_SDC_HREF, pp, ep); - WSContentSend_P(UFS_FORM_SDC_DIRd, npath, ep, name); - uint8_t plen = strlen(path); - if (plen > 1) { - strcat(path, "/"); - } - strcat(path, ep); - UfsListDir(path, depth + 4); - path[plen] = 0; - } else { + strcat(path, ep); + UfsListDir(path, depth + 4); + path[plen] = 0; + } else { #ifdef GUI_TRASH_FILE - char delpath[128]; - ext_snprintf_P(delpath, sizeof(delpath), UFS_FORM_SDC_HREFdel, pp, ep); + char delpath[128]; + ext_snprintf_P(delpath, sizeof(delpath), UFS_FORM_SDC_HREFdel, pp, ep); #else - char delpath[2]; - delpath[0]=0; + char delpath[2]; + delpath[0]=0; #endif // GUI_TRASH_FILE #ifdef GUI_EDIT_FILE - char editpath[128]; - ext_snprintf_P(editpath, sizeof(editpath), UFS_FORM_SDC_HREFedit, pp, ep); + char editpath[128]; + ext_snprintf_P(editpath, sizeof(editpath), UFS_FORM_SDC_HREFedit, pp, ep); #else - char editpath[2]; - editpath[0]=0; + char editpath[2]; + editpath[0]=0; #endif // GUI_TRASH_FILE - ext_snprintf_P(npath, sizeof(npath), UFS_FORM_SDC_HREF, pp, ep); - WSContentSend_P(UFS_FORM_SDC_DIRb, npath, ep, name, tstr.c_str(), entry.size(), delpath, editpath); - } + ext_snprintf_P(npath, sizeof(npath), UFS_FORM_SDC_HREF, pp, ep); + WSContentSend_P(UFS_FORM_SDC_DIRb, hiddable ? UFS_FORM_SDC_DIR_HIDDABLE : UFS_FORM_SDC_DIR_NORMAL, npath, ep, name, tstr.c_str(), entry.size(), delpath, editpath); } entry.close(); }