Skip to content

Commit

Permalink
updare resources for new button lib support
Browse files Browse the repository at this point in the history
  • Loading branch information
vortigont committed Jan 17, 2024
1 parent 03443e7 commit f86cb70
Show file tree
Hide file tree
Showing 9 changed files with 205 additions and 5 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ user_*.ini
.vscode/c_cpp_properties.json
include/user_config.h
include/user_cfg*
!/data/benc.json
/data/*.json
/data.*
resources/embui.zip
Expand Down
Binary file modified data/css/style.css.gz
Binary file not shown.
Binary file modified data/index.html.gz
Binary file not shown.
Binary file modified data/js/embui.js.gz
Binary file not shown.
Binary file modified data/js/ui_lamp.json.gz
Binary file not shown.
1 change: 0 additions & 1 deletion resources/html/buttons_config.json

This file was deleted.

1 change: 0 additions & 1 deletion resources/html/events_config.json

This file was deleted.

4 changes: 2 additions & 2 deletions resources/html/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@
</script>

<script type="text/html" id="tmpl_content">
{{#if _this.line && _this.section!="line124"}}<div class="pure-u-sm-1-2 {{#if2 _this.block.length > 2}}pure-u-md-1-3{{/if2}} {{#if2 _this.block.length > 3}}pure-u-lg-1-4{{/if2}} {{#if2 _this.block.length > 4}}pure-u-xl-1-5{{/if2}}">{{/if}}
{{#if _this.line && _this.section!="line124"}}<div class="pure-u-sm-1-2 {{#if2 _this.block.length > 2}}pure-u-sm-1-3{{/if2}} {{#if2 _this.block.length > 3}}pure-u-md-1-4{{/if2}} {{#if2 _this.block.length > 4}}pure-u-lg-1-5{{/if2}}">{{/if}}
{{#if _this.line && _this.section=="line124"}}<div class="pure-u-sm-1-2 {{#if2 _this.block.length > 2}}pure-u-lg-1-4{{/if2}}">{{/if}}
{{#if !_this.line}}<div class="pure-u-1" {{#if2 html == "hidden"}}style="display:hidden;"{{/if2}}>{{/if}}

Expand Down Expand Up @@ -180,7 +180,7 @@
<span>{{label}}</span>
{{#if2 type == "range" || type == "color"}}<span id="{{id}}-val">: {{value}}</span>{{/if2}}
{{#if2 type == "text" || type == "password"}}<span id="{{id}}-val"> ({{calc value.length || 0}})</span>{{/if2}}
<input type="{{type}}" id="{{id}}" name="{{id}}" class="pure-u-1 mr" value="{{value}}"
<input type="{{type}}" id="{{id}}" name="{{id}}" class="pure-u-1" value="{{value}}"
{{#if2 (min || min === 0)}}min="{{min}}"{{/if2}}
{{#if2 (max || max === 0)}}max="{{max}}"{{/if2}}
{{#if2 (step || step === 0)}}step="{{step}}"{{/if2}}
Expand Down
203 changes: 202 additions & 1 deletion resources/html/js/ui_lamp.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"type":"interface",
"version":3,
"version":4,
"descr":"FireLamp UI objects",
"settings":{
"hub75":{
Expand Down Expand Up @@ -612,6 +612,207 @@
"label": "Выход"
}
]
},
"button":{
"section":"set_button",
"main": true,
"label":"Параметры кнопки",
"block":[
{
"section": "set_button_block",
"label": "Button GPIO",
"hidden": true,
"block":[
{
"section": "set_button_gpio",
"block": [
{
"section": "enagpio",
"line": true,
"block": [
{
"id":"enabled",
"html":"input",
"label":"Enable button",
"type":"checkbox"
},
{
"id": "gpio",
"html": "input",
"value": -1,
"type": "number",
"label": "GPIO pin",
"min": -1,
"step": 1
}
]
},
{
"section": "enagpio",
"line": true,
"block": [
{
"id":"logicL",
"html":"input",
"label":"HIGH logic level",
"type":"checkbox"
},
{
"id":"debounce",
"html":"input",
"label":"Debounce",
"type":"checkbox"
}
]
},
{
"id": "set_button_gpio",
"html": "button",
"type": 1,
"color": "green",
"label": "Сохранить"
}
]
}
]
},
{
"section": "set_button_block2",
"label": "Button Events",
"hidden": true,
"block":[
{
"section":"button_events_list",
"block":[]
}
]
},
{
"id": "ui_page_settings",
"html": "button",
"type": 0,
"label": "Выход"
}
]
}
},
"sections":{
"button_event":{
"section":"button_evt_save",
"block":[
{
"id":"idx",
"html":"hidden",
"value":-1
},
{
"id":"enabled",
"html":"input",
"label":"Active",
"type":"checkbox"
},
{
"id":"lamppwr",
"html":"input",
"label":"Device On/Off",
"type":"checkbox"
},
{
"id":"btn_event",
"html":"select",
"value":0,
"label":"Button action",
"section":"options",
"block":[
{
"value":2,
"label":"Click"
},
{
"value":3,
"label":"Long press"
},
{
"value":5,
"label":"Hold repeat"
},
{
"value":6,
"label":"Multi Click"
}
]
},
{
"id":"clicks",
"html":"input",
"type":"number",
"label":"MultiClicks",
"min":2,
"step":1
},
{
"id":"lamp_event",
"html":"select",
"value":0,
"label":"Lamp action",
"section":"options",
"block":[
{
"value":11,
"label":"Power On"
},
{
"value":12,
"label":"Power Off"
},
{
"value":13,
"label":"Power Toggle"
},
{
"value":24,
"label":"Brightness step:"
},
{
"value":30,
"label":"Sw Effect to:"
},
{
"value":31,
"label":"Sw Next Effect"
},
{
"value":32,
"label":"Sw Prev Effect"
},
{
"value":33,
"label":"Sw Random Effect"
}
]
},
{
"id":"arg",
"html":"input",
"type":"number",
"label":"Argument",
"step":1
},
{
"id": "button_evt_save",
"html": "button",
"type": 1,
"color": "green",
"label": "Save"
},
{
"id": "ui_page",
"html": "button",
"type": 0,
"value": 55,
"label": "Exit"
}
]
}
}
}

0 comments on commit f86cb70

Please sign in to comment.