interface: small html fixes

This commit is contained in:
Nicolò Balzarotti 2022-11-19 23:44:27 +01:00
parent 51ac9d1842
commit a2a28007f3
1 changed files with 10 additions and 5 deletions

15
dist/server.js vendored
View File

@ -123,7 +123,10 @@ function render_sensors(sensordata) {
} }
function navigate(path, link) { function navigate(path, link) {
console.log(link); if (link !== undefined) {
window.location.href = "./" + link
return;
}
localstate.page = path; localstate.page = path;
applyState(); applyState();
} }
@ -135,7 +138,7 @@ function render_sidebar(data) {
<p class="menu-label">{{name}}</p> <p class="menu-label">{{name}}</p>
<ul class="menu-list"> <ul class="menu-list">
{{#subitems}} {{#subitems}}
<li><a onclick="navigate({{path}}, {{link}})" <li><a onclick="navigate({{path}}, '{{link}}')"
class="{{#current}}is-active{{/current}}">{{name}}</a></li> class="{{#current}}is-active{{/current}}">{{name}}</a></li>
{{/subitems}} {{/subitems}}
</ul> </ul>
@ -190,10 +193,12 @@ function render_load_recipe(data) {
</div> </div>
{{#selected_recipe}} {{#selected_recipe}}
{{description}} {{description}}
Controllers: Controllers:<br/>
<ul>
{{#controllers}} {{#controllers}}
{{.}} <li>{{.}}</li>
{{/controllers}} {{/controllers}}
</ul>
{{#phases}} {{#phases}}
<br><br> <br><br>
<div class="content"><h4>{{name}}</h4></div> <div class="content"><h4>{{name}}</h4></div>
@ -241,7 +246,7 @@ function current_recipe(data) {
{{current_phase.text}} {{current_phase.text}}
<br/> <br/>
<br/> <br/>
Next Cond: {{current_phase.text}} Next Cond: {{current_phase.nextcond}}
<br/> <br/>
On Load: {{current_phase.onload}} On Load: {{current_phase.onload}}
<br/> <br/>