Commit Graph

22 Commits

Author SHA1 Message Date
lorol
35ef3ad842 Bugfix - my additions. 2020-10-25 22:11:22 -04:00
lorol
1ce5cabfeb A logic bugfix of SmartSwitch.ino sketch.
Reverting the PR idea of ACE editor' supporting fles to be moved to sf data/extras subfolder, moved back to root fs.
(workers didn't work this way)
edit.htm can be binary-embedded in a firmware or a in gzipped file on fs (saves 4k of program storage, RAM usage is identical)
To embed: Comment #define EDFS in SPIFFSEditor.cpp and run do_emb.bat
On fs: Enable #define EDFS in SPIFFSEditor.cpp and run do_ed_fs.bat
2020-09-23 14:49:17 -04:00
Dmytro Korniienko
1ec044ba42 /edit moved to FS 2020-09-12 20:01:52 +03:00
lorol
0823e9d940 Minor corrections 2020-07-03 18:29:55 -04:00
lorol
ea80883726 In src/SPIFFSEditor.cpp:
using Arduino esp32 FS' LITTLEFS.mkdir(path) and LITTLEFS.rmdir(path) to get web file management working w/ LITTLEFS on ESP32.
It is slightly different than with esp8266 LittleFS.h library.
- On ESP32 w/ LITTLEFS, a new file can be created same way as with SPIFFS, /folder/folder/file.txt - folders are created silently, idea taken from:
https://github.com/esp8266/Arduino/blob/master/libraries/LittleFS/src/LittleFS.cpp#L55
- On ESP32 w/ LITTLEFS file remove - first delete the file, then folders if empty 
- For a compatibility, a folder alone cannot be purposely created. A file will be created instead.
- Note, a confuse may occur: /mystuff  could be a folder or a file, both will look same way on SPIFFSEditor web file tree.
2020-07-03 16:47:21 -04:00
lorol
0ca699fa53 LittleFS can be used (a choice for ESP8266 for now)
- To make and upload FS https://github.com/earlephilhower/arduino-esp8266littlefs-plugin
- Simply redefine SPIFFS to LittleFS
Changes are in src/SPIFFSEditor.cpp including the src/edit.htm
See ESP_AsyncFSBrowser and SmartSwitch examples
2020-06-05 07:40:37 -04:00
lorol
f0987eb9ae Added tool to help embedding htm file to code with one click
See in /extras
2020-03-31 23:38:33 -04:00
lorol
b7b70936b7 - fix more problems caused by html editor code minifying before embedding as gz->C-values to SPIFFSEditor.cpp.
- This time, used online http://beautifytools.com/html-minifier.php with default settings. Hope is OK.
- This is (very ugly) workaround at server-side SPIFFSEditor.cpp (and edit.htm source) for old iOS 9 Safari browsers to save current file through ACE editor w/o file upload allowed natively by the browser. Side effect: the line endings are always Win style after saving due to application/x-www-form-urlencoded enforcement of FormData JS
2020-03-25 17:26:31 -04:00
lorol
575d79e92a - fix a missing ';' in index.htm (found after code minifying test)
- A (very ugly) workaround at server-side SPIFFSEditor.cpp (and edit.htm source) for old iOS 9 Safari browsers to save current file through ACE editor w/o file upload allowed natively by the browser. Side effect: the line endings are always Win style after saving due to application/x-www-form-urlencoded enforcement of FormData JS
2020-03-25 14:10:56 -04:00
lorol
406f21c5dd Applied important changes of other forks after master ESPAsyncWebServer release (at the moment)
- fixes
- SPIFFSEditor is changed to be standalone - works with acefull.js.gz, see the example
Added a real SmartSwitch application to examples
2020-03-11 23:21:50 -04:00
Merlin Schumacher
fc71230a31 Change JSON MIME type to application/json (#311) 2018-07-24 20:13:14 +02:00
me-no-dev
05306e407f Optimize exclude file logic in SPIFFSEditor 2017-10-09 00:28:15 +03:00
me-no-dev
e54369756a Disable exclude in Editor 2017-10-08 20:05:08 +03:00
me-no-dev
b681dbc3cd Add cache for the editor
Idea from:
http://tinkerman.cat/embed-your-website-in-your-esp8266-firmware-image/
2017-09-12 23:30:11 +03:00
me-no-dev
3e6690396a Some small adjustments for ESP32
- bump version
- remove compilation warnings
- do not require SPIFFS
2017-09-09 09:04:50 +03:00
me-no-dev
75fb9573e8 Make SPIFFSEditor work with other file systems (ESP32) 2017-09-08 13:36:24 +03:00
me-no-dev
d37bd16c22 Initial ESP32 compatibility 2017-09-07 22:01:58 +03:00
Me No Dev
2540507664 The following changes and enhancements are included: (#208)
- Added "SAVE-Button
- Upgraded to ACE 1.2.6
- Added additional field, which shows name of the current edited File
- Reset upload path after uploading or creating a File (avoid confusion about which file is shown in editor)
- added the possibility, to run the editor completly from flash. When ace.js.gz or ace.js and the corresponding files are found on SPIFFS, the editor can be used in AP mode also.  Otherwise the files are searched on cloudflare like before.
- added all gzipped js-files in data directory
- added an exclude list, containing wildcards, telling which files should not be listed in the editor (to prevent deletion of needed files)
- minified the embedded HTML/Javascript with https://kangax.github.io/html-minifier/ before gzipping.  With all additions the resulting hex-code is now 700 bytes smaller
- embedded the plain html as documentation
2017-08-18 20:14:12 +03:00
Me No Dev
05ed854d7b Update SPIFFSEditor.cpp
Fix URL Encode logic
2017-08-18 17:41:31 +03:00
Max Lunin
a7c4dfb04f Template container instead of direct pointer manipulation. (#95)
* using Container instead ofdirect pointers list manipulation

* fixed different type of virtual methods.

* Fixed typo in conditional

* Renamed ListArray to LinkedList

* Const reference to String as method parameters to prevent additional copy and memory allocation when String passed by value

* fix 'min' redefinition

* removed #include <iterator>
begin/end methods it's enough for 'for( : )' loop
count() renamed to length()
spacing fixing

* Const reference to String as method parameters to prevent additional copy and memory allocation when String passed by value

* Fixed unused params warnings
2016-11-27 17:42:09 +02:00
me-no-dev
41c57bcdd1 add size to returned file data 2016-11-17 01:33:50 +02:00
me-no-dev
a39051a2d5 Add SPIFFSEditor to the library 2016-09-23 15:11:50 +03:00