mirror of
https://github.com/OpenEPaperLink/OpenEPaperLink.git
synced 2026-03-21 03:04:25 +01:00
- AP info screen content card. Can run on any tag.
- now, you can use {variables} in the 'text' entries in a json template. You can set variables via a http call. If you update a variable, all tags with a json template containing that variable get updated.
- font name in json template is more flexible. You can just use 'filename.ttf' or 'filename.vlw'. A full path is still possible.
- colors in the json template can now be set using #rrggbb color values, and using 'black', 'white' or 'red'.
- added direct output for the TFT display for the yellow esp32-s3. No file writes needed.
- added POST variable 'ttl' to json template upload and image upload, to set the next checkin time
- added /variables-demo.html to demonstrate the variables.
- json templates received from jsonupload are now saved in /current, and reused.
- known issue: 'backup db' button doesn't work due to some browser policy change. Fixing.
thanks to @steinwedel for the inspiration on the variables and some other fixes.
42 lines
1.1 KiB
HTML
42 lines
1.1 KiB
HTML
<!DOCTYPE html>
|
|
<html>
|
|
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<title>Variables upload Form</title>
|
|
</head>
|
|
|
|
<body>
|
|
<h3>demo Json variables</h3>
|
|
<p>You can use this as an example how to change variables to be uses in a json template. Look at the html source for the workings. You can use the variables in any json template, using <pre>{variablename}</pre>. As soon as a variable is changed, the tag is being refreshed with the new info.</p>
|
|
<p>
|
|
Change one variable:<br>
|
|
<form method="POST" action="/set_var">
|
|
key: <input type="text" name="key" value="testkey"><br>
|
|
value: <input type="text" name="val" value="MyCoolValue"><br>
|
|
<input type="submit" value="submit"><br>
|
|
</form>
|
|
</p>
|
|
<p>
|
|
Change multiple variables, using json:<br>
|
|
<form method="POST" action="/set_vars">
|
|
<p>
|
|
<label for="vars">Place the json string here</label><br>
|
|
<textarea id="vars" name="json" style="width:500px;height:80px;">
|
|
{ "temperature": 28.5,
|
|
"door": "open",
|
|
"testkey": "MyCoolValue"
|
|
}
|
|
</textarea>
|
|
</p>
|
|
|
|
<p>
|
|
<input type="submit" value="submit json">
|
|
</p>
|
|
|
|
</form>
|
|
</p>
|
|
</body>
|
|
|
|
</html>
|