Skip to content
Snippets Groups Projects
Commit 5f9ed692 authored by leo.muff's avatar leo.muff
Browse files

more cleanup

parent 0f314b80
No related branches found
No related tags found
No related merge requests found
......@@ -5,7 +5,6 @@ ROCKET_ADDRESS = "127.0.0.1"
ROCKET_PORT = "8888"
KEY_API = "/keys"
IMAGE_API= "/images"
SOUND_API = "/sound"
INFO_API = "/info"
COMMANDS_API="/commands"
BUFFERMAXLEN = 50
......
......@@ -20,7 +20,6 @@ pub struct DataFile {
pub enum DataType {
Keys,
Image,
Sound,
Info
}
......@@ -38,7 +37,6 @@ impl DataFile {
let path = match kind {
DataType::Keys => basedir + &env::var("KEY_API").ok()?,
DataType::Image => basedir + &env::var("IMAGE_API").ok()?,
DataType::Sound => basedir + &env::var("SOUND_API").ok()?,
DataType::Info => basedir + &env::var("INFO_API").ok()?
};
if let Ok(_) = check_data_path(&path){
......
......@@ -66,22 +66,15 @@
</tbody>
</table>
</div>
<button class="btn btn-primary" type="button" data-bs-toggle="collapse" data-bs-target="#images" aria-expanded="false" aria-controls="images">
Show images
</button>
<div style="text-align:center">
<button class="btn btn-outline-dark mb-5" type="button" data-bs-toggle="collapse" data-bs-target="#images" aria-expanded="false" aria-controls="images">
Show images
</button>
</div>
<div class="w-75 mx-auto mt-2 collapse" id="images">
<div class="container">
{% for image in images %}
{% if loop.index % 3 == 0%}
<div class="row-3">
{% endif %}
<div class="col-3">
<img src="{{image}}" class="img-thumbnail">
</div>
{% if loop.index % 3 == 0%}
</div>
{% endif %}
{% for image in images %}
<img src="{{image}}" class="rounded d-block mb-2 mx-auto">
{% endfor %}
</div>
</div>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment