Page settings redesign

Clean up the UI of settings page.
Prepare for translations.
This commit is contained in:
Edward Firmo
2023-09-04 17:55:04 +02:00
parent 3523ad8756
commit 7f6b5a7115
17 changed files with 316 additions and 200 deletions

View File

@@ -5,6 +5,7 @@ Program.s
int h=0,s=0,v=0
int p=0,q=0,t=0,f=0
int api=0 // 0 = disconnected from HA, 1 = connected to HA
int sleep_mode=0
int is_alarm=0,is_entities=0,is_qrcode=0,is_notification=0
int brightness=100,brightness_dim=40
bauds=115200//Configure baudrat

View File

@@ -32,22 +32,16 @@ Variable (int32) disdim
Scope: global
Value: 0
Variable (int32) sleepmodus
Attributes
ID : 14
Scope: global
Value: 0
Variable (string) lastclick
Attributes
ID : 46
ID : 45
Scope : local
Text :
Max. Text Size: 100
Variable (string) entity
Attributes
ID : 47
ID : 46
Scope : global
Text :
Max. Text Size: 100
@@ -104,7 +98,7 @@ Text value01_state
Text left_bt_text
Attributes
ID : 15
ID : 14
Scope : global
Dragging : 0
Send Component ID : disabled
@@ -114,7 +108,7 @@ Text left_bt_text
Text right_bt_text
Attributes
ID : 16
ID : 15
Scope : global
Dragging : 0
Send Component ID : disabled
@@ -124,7 +118,7 @@ Text right_bt_text
Text icon_top_01
Attributes
ID : 17
ID : 16
Scope : global
Dragging : 0
Send Component ID : disabled
@@ -134,7 +128,7 @@ Text icon_top_01
Text icon_top_02
Attributes
ID : 18
ID : 17
Scope : global
Dragging : 0
Send Component ID : disabled
@@ -144,7 +138,7 @@ Text icon_top_02
Text icon_top_03
Attributes
ID : 19
ID : 18
Scope : global
Dragging : 0
Send Component ID : disabled
@@ -154,7 +148,7 @@ Text icon_top_03
Text icon_top_04
Attributes
ID : 20
ID : 19
Scope : global
Dragging : 0
Send Component ID : disabled
@@ -164,7 +158,7 @@ Text icon_top_04
Text icon_top_05
Attributes
ID : 21
ID : 20
Scope : global
Dragging : 0
Send Component ID : disabled
@@ -174,7 +168,7 @@ Text icon_top_05
Text icon_top_06
Attributes
ID : 22
ID : 21
Scope : global
Dragging : 0
Send Component ID : disabled
@@ -184,7 +178,7 @@ Text icon_top_06
Text icon_top_07
Attributes
ID : 23
ID : 22
Scope : global
Dragging : 0
Send Component ID : disabled
@@ -194,7 +188,7 @@ Text icon_top_07
Text icon_top_08
Attributes
ID : 24
ID : 23
Scope : global
Dragging : 0
Send Component ID : disabled
@@ -204,7 +198,7 @@ Text icon_top_08
Text icon_top_09
Attributes
ID : 25
ID : 24
Scope : global
Dragging : 0
Send Component ID : disabled
@@ -214,7 +208,7 @@ Text icon_top_09
Text icon_top_10
Attributes
ID : 26
ID : 25
Scope : global
Dragging : 0
Send Component ID : disabled
@@ -224,7 +218,7 @@ Text icon_top_10
Text value01_icon
Attributes
ID : 27
ID : 26
Scope : global
Dragging : 0
Send Component ID : disabled
@@ -234,7 +228,7 @@ Text value01_icon
Text value03_state
Attributes
ID : 28
ID : 27
Scope : global
Dragging : 0
Send Component ID : disabled
@@ -244,7 +238,7 @@ Text value03_state
Text value03_icon
Attributes
ID : 29
ID : 28
Scope : global
Dragging : 0
Send Component ID : disabled
@@ -254,7 +248,7 @@ Text value03_icon
Text value02_icon
Attributes
ID : 30
ID : 29
Scope : global
Dragging : 0
Send Component ID : disabled
@@ -264,7 +258,7 @@ Text value02_icon
Text value02_state
Attributes
ID : 31
ID : 30
Scope : global
Dragging : 0
Send Component ID : disabled
@@ -274,7 +268,7 @@ Text value02_state
Text wifi_icon
Attributes
ID : 32
ID : 31
Scope : global
Dragging : 0
Send Component ID : disabled
@@ -284,7 +278,7 @@ Text wifi_icon
Text indoortempicon
Attributes
ID : 33
ID : 32
Scope : global
Dragging : 0
Send Component ID : disabled
@@ -294,7 +288,7 @@ Text indoortempicon
Text button01_icon
Attributes
ID : 34
ID : 33
Scope : local
Dragging : 0
Send Component ID : disabled
@@ -304,7 +298,7 @@ Text button01_icon
Text button02_icon
Attributes
ID : 35
ID : 34
Scope : global
Dragging : 0
Send Component ID : disabled
@@ -314,7 +308,7 @@ Text button02_icon
Text button03_icon
Attributes
ID : 36
ID : 35
Scope : global
Dragging : 0
Send Component ID : disabled
@@ -324,7 +318,7 @@ Text button03_icon
Text bt_notific
Attributes
ID : 37
ID : 36
Scope : global
Dragging : 0
Send Component ID : disabled
@@ -341,7 +335,7 @@ Text bt_notific
Text bt_qrcode
Attributes
ID : 38
ID : 37
Scope : global
Dragging : 0
Send Component ID : disabled
@@ -355,7 +349,7 @@ Text bt_qrcode
Text bt_entities
Attributes
ID : 39
ID : 38
Scope : global
Dragging : 0
Send Component ID : disabled
@@ -372,7 +366,7 @@ Text bt_entities
Text bt_alarm
Attributes
ID : 40
ID : 39
Scope : global
Dragging : 0
Send Component ID : disabled
@@ -390,7 +384,7 @@ Text bt_alarm
Text meridiem
Attributes
ID : 45
ID : 44
Scope : global
Dragging : 0
Send Component ID : disabled
@@ -407,7 +401,7 @@ Picture weather
Dual-state Button left_bt_pic
Attributes
ID : 49
ID : 48
Scope : global
Dragging : 0
Send Component ID: disabled
@@ -417,7 +411,7 @@ Dual-state Button left_bt_pic
Dual-state Button right_bt_pic
Attributes
ID : 50
ID : 49
Scope : global
Dragging : 0
Send Component ID: disabled
@@ -479,7 +473,7 @@ Hotspot jump_climate
Hotspot button01
Attributes
ID : 41
ID : 40
Scope : local
Dragging : 0
Send Component ID: disabled
@@ -496,7 +490,7 @@ Hotspot button01
Hotspot button02
Attributes
ID : 42
ID : 41
Scope : local
Dragging : 0
Send Component ID: disabled
@@ -513,7 +507,7 @@ Hotspot button02
Hotspot button03
Attributes
ID : 43
ID : 42
Scope : local
Dragging : 0
Send Component ID: disabled
@@ -530,7 +524,7 @@ Hotspot button03
Hotspot settings_click
Attributes
ID : 44
ID : 43
Scope : local
Dragging : 0
Send Component ID: disabled
@@ -577,7 +571,7 @@ Timer sleeptimer
Events
Timer Event
if(sleepmodus.val==1)
if(sleep_mode==1)
{
screensaver.orign.val=0
// Go to screensaver page
@@ -586,7 +580,7 @@ Timer sleeptimer
Timer settings_timer
Attributes
ID : 48
ID : 47
Scope : local
Period (ms): 1000
Enabled : no

View File

@@ -14,7 +14,9 @@ Page settings
Preinitialize Event
dim=brightness
covx brightslider.val,bright_text.txt,0,0
bright_text.txt+="%"
covx dimslider.val,dim_text.txt,0,0
dim_text.txt+="%"
printh 92
prints "nspanelevent",0
printh 00
@@ -45,8 +47,8 @@ Text bright_text
Dragging : 0
Send Component ID : disabled
Associated Keyboard: none
Text :
Max. Text Size : 3
Text : 80%
Max. Text Size : 4
Text dim_text
Attributes
@@ -55,33 +57,33 @@ Text dim_text
Dragging : 0
Send Component ID : disabled
Associated Keyboard: none
Text :
Max. Text Size : 3
Text : 20%
Max. Text Size : 4
Text lbl_reboot
Attributes
ID : 5
Scope : local
Scope : global
Dragging : 0
Send Component ID : disabled
Associated Keyboard: none
Text : Reboot
Max. Text Size : 6
Max. Text Size : 15
Text lbl_sleep
Attributes
ID : 6
Scope : local
Scope : global
Dragging : 0
Send Component ID : disabled
Associated Keyboard: none
Text : Sleep
Max. Text Size : 5
Text : Sleep mode
Max. Text Size : 15
Text lbl_brightness
Attributes
ID : 7
Scope : local
Scope : global
Dragging : 0
Send Component ID : disabled
Associated Keyboard: none
@@ -91,13 +93,33 @@ Text lbl_brightness
Text lbl_dimming
Attributes
ID : 8
Scope : local
Scope : global
Dragging : 0
Send Component ID : disabled
Associated Keyboard: none
Text : Dimming
Max. Text Size : 7
Text icon_bright
Attributes
ID : 16
Scope : local
Dragging : 0
Send Component ID : disabled
Associated Keyboard: none
Text :
Max. Text Size : 3
Text icon_dim
Attributes
ID : 17
Scope : local
Dragging : 0
Send Component ID : disabled
Associated Keyboard: none
Text :
Max. Text Size : 3
Slider brightslider
Attributes
ID : 1
@@ -109,8 +131,17 @@ Slider brightslider
Lower range limit: 0
Events
Touch Press Event
printh 92
prints "touchevent",0
printh 00
prints "{\"page\": \"settings\", \"component\": \"touchevent\", \"value\": \"press\"}",0
printh 00
printh FF FF FF
Touch Release Event
covx brightslider.val,bright_text.txt,0,0
bright_text.txt+="%"
printh 91
prints "brightslider",0
printh 00
@@ -128,8 +159,17 @@ Slider dimslider
Lower range limit: 0
Events
Touch Press Event
printh 92
prints "touchevent",0
printh 00
prints "{\"page\": \"settings\", \"component\": \"touchevent\", \"value\": \"press\"}",0
printh 00
printh FF FF FF
Touch Release Event
covx dimslider.val,dim_text.txt,0,0
dim_text.txt+="%"
printh 91
prints "dimslider",0
printh 00
@@ -157,8 +197,8 @@ Dual-state Button bt_reboot
Dragging : 0
Send Component ID: on press and release
State : unpressed
Text :
Max. Text Size : 0
Text :
Max. Text Size : 3
Dual-state Button bt_sleep
Attributes
@@ -167,8 +207,8 @@ Dual-state Button bt_sleep
Dragging : 0
Send Component ID: on press and release
State : unpressed
Text :
Max. Text Size : 0
Text :
Max. Text Size : 3
Hotspot bt_bright_down
Attributes