Skip to content

Commit

Permalink
v2.0.17
Browse files Browse the repository at this point in the history
  • Loading branch information
holgerlembke committed Mar 1, 2025
1 parent 4c35ebb commit ac3b699
Show file tree
Hide file tree
Showing 9 changed files with 830 additions and 694 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,5 @@ notizen.txt
.vscode
makeESPFMfGKdeflate
examplesCopy
sicherung
!postbuild.cmd
64 changes: 54 additions & 10 deletions filemanager/fm.css
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ div {
white-space: nowrap;
display: grid;
grid-auto-rows: 1fr;
grid-template-columns: 1fr 20px;
grid-template-columns: 1fr 20px 20px;
gap: 0px 0px;
}

Expand Down Expand Up @@ -434,14 +434,6 @@ div {
border-left: 2px solid #D8A570;
}

#tect {
background-color: white;
padding: 2px;
white-space: pre;
overflow-wrap: normal;
overflow-x: scroll;
}

.windowcontent pre {
background-color: white;
display: inline-block;
Expand All @@ -452,7 +444,7 @@ div {
display: grid;
margin: 0;
grid-auto-rows: 1fr;
grid-template-columns: 1fr auto 2px 20px;
grid-template-columns: 1fr auto auto 2px 20px;
gap: 0px 0px;
}

Expand All @@ -461,6 +453,12 @@ div {
margin: 0;
}

.windowtitle .p {
padding: 2px;
margin:0px;
background: #FE9A00;
}

.windowtitle .t {
padding-right: 10px;
padding-left: 10px;
Expand Down Expand Up @@ -532,3 +530,49 @@ dialog::backdrop {
border-radius: 2px;
outline: none;
}

/* Editor */
form {
background-color: white;
border: 1px solid black;
}

.editor {
display: inline-flex;
gap: 0px;
padding: 0px 0px;
background-color: white;
margin: 0;
font-family: monospace;
}

.line-numbers {
display: none;
position: relative;
overflow-y: hidden;
width: 30px;
font: inherit;
text-align: right;
margin: 0;
}

.line-numbers span {
padding: 1px 0 0 0;
}

textarea {
overflow-y: hidden;
padding: 0;
border: 0;
font: inherit;
background-color: white !important;
}

aaaatect {
background-color: white;
padding: 2px;
white-space: pre;
overflow-wrap: normal;
overflow-x: scroll;
}

3 changes: 2 additions & 1 deletion filemanager/fm.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
<!-- <div class="o2" id="o2">&nbsp;</div> -->
<div class="o2" id="o2">
<div id="o2i1">&nbsp;</div>
<div id="o2i2" title="Reload file list" onclick="getfileinsert();">&nbsp;&#x27F3;&nbsp;</div>
<div id="o2i2" title="Create an empty file" onclick="makeemptyfile();">&nbsp;&#xFF0B;&nbsp;</div>
</div>
<div class="o3" id="o3">&nbsp;</div>
Expand Down Expand Up @@ -90,4 +91,4 @@

</body>

</html>
</html>
20 changes: 16 additions & 4 deletions filemanager/fm.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,11 @@ const filedeleteinsert =
"Delete file <i>%f%</i>?<br><input type=\"hidden\" id=\"filename\"><p><br>Deleting files is final.</p>";

const windowhtml = "<div id=\"%i%\"><div class=\"windowtitle\"><div class=\"t\">%t%</div>" +
"<div class=\"tsi\"><div class=\"ts\">Save</div></div>" +
"<div class=\"ts idL\" title=\"Show/Hide line numbers\">#</div><div class=\"ts idS\">Save</div>" +
"<div class=\"g\"></div>" +
"<div class=\"windowclose\">&nbsp;</div></div><div class=\"windowcontent\"></div>" +
"<div class=\"windowgrip\">:::</div></div>";


// Callbacks für die HTMLIncludes
let callbackFileinsert = [];

Expand Down Expand Up @@ -356,6 +355,7 @@ function AnswerProcessor() {
msgline("");
waitspinner(false);


for (let i = 0; i < callbackFileinsert.length; i++) {
callbackFileinsert[i]();
}
Expand Down Expand Up @@ -483,6 +483,11 @@ function makeemptyfile(filename) {
executecommand("job=createnew&fn=" + foldername + "/newfile");
}

//------------------------------------------------------------------------------------------------------------
function insertAfter(referenceNode, newNode) {
referenceNode.parentNode.insertBefore(newNode, referenceNode.nextSibling);
}

//------------------------------------------------------------------------------------------------------------
function previewfile(filename) {
msgline("Please wait. Creating preview...");
Expand All @@ -509,6 +514,14 @@ function previewfile(filename) {
let node = document.querySelector(winid);
linksverschieber(node);

let spacer = document.querySelector(winid + " .g");
let div1 = document.createElement("div");
div1.classList.add("p");
let div2 = document.createElement("div");
div2.classList.add("p");
insertAfter(spacer,div1);
insertAfter(spacer,div2);

if (previewxhr.getResponseHeader('content-type').startsWith("image/")) {
var image = new Image();
image.src = URL.createObjectURL(previewxhr.response);
Expand Down Expand Up @@ -805,8 +818,7 @@ function makeDraggable(box) {
if (content.clientHeight > window.innerHeight) {
content.style.height = window.innerHeight / 2 + "px";
} else {
// content.style.height = content.offsetHeight + "px";
content.style.height = "100px";
content.style.height = content.offsetHeight + "px";
}
if (content.clientWidth > window.innerWidth) {
content.style.width = window.innerWidth / 2 + "px";
Expand Down
2 changes: 1 addition & 1 deletion library.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name=ESP32 File Manager for Generation Klick ESPFMfGK
version=2.0.16
version=2.0.17
author=Holger Lembke
maintainer=Holger Lembke <lembke@gmail.com>
sentence=Manage your ES32 file system content with a simple web based interface
Expand Down
Binary file added sicheruung/2025-03-01.zip
Binary file not shown.
5 changes: 4 additions & 1 deletion src/ESPFMfGK.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,10 @@
Changes
V2.0.16
V2.0.17
+ fixing https://github.com/holgerlembke/ESPFMfGK/issues/17#issuecomment-2692343418
V2.0.16
+ added authentication into all HTTP_GET calls
V2.0.15
Expand Down
86 changes: 72 additions & 14 deletions src/ESPFMfGKWp.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ static const char ESPFMfGKWpindexpage[] PROGMEM = R"==x==(
<!-- <div class="o2" id="o2">&nbsp;</div> -->
<div class="o2" id="o2">
<div id="o2i1">&nbsp;</div>
<div id="o2i2" title="Reload file list" onclick="getfileinsert();">&nbsp;&#x27F3;&nbsp;</div>
<div id="o2i2" title="Create an empty file" onclick="makeemptyfile();">&nbsp;&#xFF0B;&nbsp;</div>
</div>
<div class="o3" id="o3">&nbsp;</div>
Expand Down Expand Up @@ -99,6 +100,7 @@ static const char ESPFMfGKWpindexpage[] PROGMEM = R"==x==(
</body>
</html>
)==x==";

static const char ESPFMfGKWpjavascript[] PROGMEM = R"==x==(
Expand Down Expand Up @@ -154,12 +156,11 @@ const filedeleteinsert =
"Delete file <i>%f%</i>?<br><input type=\"hidden\" id=\"filename\"><p><br>Deleting files is final.</p>";
const windowhtml = "<div id=\"%i%\"><div class=\"windowtitle\"><div class=\"t\">%t%</div>" +
"<div class=\"tsi\"><div class=\"ts\">Save</div></div>" +
"<div class=\"ts idL\" title=\"Show/Hide line numbers\">#</div><div class=\"ts idS\">Save</div>" +
"<div class=\"g\"></div>" +
"<div class=\"windowclose\">&nbsp;</div></div><div class=\"windowcontent\"></div>" +
"<div class=\"windowgrip\">:::</div></div>";
// Callbacks für die HTMLIncludes
let callbackFileinsert = [];
Expand Down Expand Up @@ -461,6 +462,7 @@ function AnswerProcessor() {
msgline("");
waitspinner(false);
for (let i = 0; i < callbackFileinsert.length; i++) {
callbackFileinsert[i]();
}
Expand Down Expand Up @@ -588,6 +590,11 @@ function makeemptyfile(filename) {
executecommand("job=createnew&fn=" + foldername + "/newfile");
}
//------------------------------------------------------------------------------------------------------------
function insertAfter(referenceNode, newNode) {
referenceNode.parentNode.insertBefore(newNode, referenceNode.nextSibling);
}
//------------------------------------------------------------------------------------------------------------
function previewfile(filename) {
msgline("Please wait. Creating preview...");
Expand All @@ -614,6 +621,14 @@ function previewfile(filename) {
let node = document.querySelector(winid);
linksverschieber(node);
let spacer = document.querySelector(winid + " .g");
let div1 = document.createElement("div");
div1.classList.add("p");
let div2 = document.createElement("div");
div2.classList.add("p");
insertAfter(spacer,div1);
insertAfter(spacer,div2);
if (previewxhr.getResponseHeader('content-type').startsWith("image/")) {
var image = new Image();
image.src = URL.createObjectURL(previewxhr.response);
Expand Down Expand Up @@ -910,8 +925,7 @@ function makeDraggable(box) {
if (content.clientHeight > window.innerHeight) {
content.style.height = window.innerHeight / 2 + "px";
} else {
// content.style.height = content.offsetHeight + "px";
content.style.height = "100px";
content.style.height = content.offsetHeight + "px";
}
if (content.clientWidth > window.innerWidth) {
content.style.width = window.innerWidth / 2 + "px";
Expand Down Expand Up @@ -1213,7 +1227,7 @@ div {
white-space: nowrap;
display: grid;
grid-auto-rows: 1fr;
grid-template-columns: 1fr 20px;
grid-template-columns: 1fr 20px 20px;
gap: 0px 0px;
}
Expand Down Expand Up @@ -1594,14 +1608,6 @@ div {
border-left: 2px solid #D8A570;
}
#tect {
background-color: white;
padding: 2px;
white-space: pre;
overflow-wrap: normal;
overflow-x: scroll;
}
.windowcontent pre {
background-color: white;
display: inline-block;
Expand All @@ -1612,7 +1618,7 @@ div {
display: grid;
margin: 0;
grid-auto-rows: 1fr;
grid-template-columns: 1fr auto 2px 20px;
grid-template-columns: 1fr auto auto 2px 20px;
gap: 0px 0px;
}
Expand All @@ -1621,6 +1627,12 @@ div {
margin: 0;
}
.windowtitle .p {
padding: 2px;
margin:0px;
background: #FE9A00;
}
.windowtitle .t {
padding-right: 10px;
padding-left: 10px;
Expand Down Expand Up @@ -1692,6 +1704,52 @@ dialog::backdrop {
border-radius: 2px;
outline: none;
}
/* Editor */
form {
background-color: white;
border: 1px solid black;
}
.editor {
display: inline-flex;
gap: 0px;
padding: 0px 0px;
background-color: white;
margin: 0;
font-family: monospace;
}
.line-numbers {
display: none;
position: relative;
overflow-y: hidden;
width: 30px;
font: inherit;
text-align: right;
margin: 0;
}
.line-numbers span {
padding: 1px 0 0 0;
}
textarea {
overflow-y: hidden;
padding: 0;
border: 0;
font: inherit;
background-color: white !important;
}
aaaatect {
background-color: white;
padding: 2px;
white-space: pre;
overflow-wrap: normal;
overflow-x: scroll;
}
)==g==";


Expand Down
Loading

0 comments on commit ac3b699

Please sign in to comment.