/
status-1_2x4.jigx
99 lines (84 loc) · 2.67 KB
/
status-1_2x4.jigx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
title: Status widget 1 (2x4)
type: jig.default
datasources:
device:
type: datasource.static
options:
data:
- device-name: iPhone 14 Pro
device-owner: Vojtěch Moudrý
batery: 80 # Try to change the number
children:
- type: component.entity
options:
children:
- type: component.entity-field
options:
label: Label
value: Value
widgets:
"2x4":
type: widget.status
options:
statuses:
# Battery less than 25 %
- when: =@ctx.datasources.device.batery <= 25 ? true:false
icon: battery-charge
top:
type: component.titles
options:
icon: mobile-phone-1
title: =@ctx.datasources.device.device-owner
subtitle: =@ctx.datasources.device.device-name
align: center
iconColor: color14
bottom:
type: component.titles
options:
title: =@ctx.datasources.device.batery & ' ' & '%'
subtitle: Battery
align: center
color: negative
# Battery less than 50 %
- when: =@ctx.datasources.device.batery <= 50 ? true:false
icon: battery-charge
top:
type: component.titles
options:
icon: mobile-phone-1
title: =@ctx.datasources.device.device-owner
subtitle: =@ctx.datasources.device.device-name
align: center
iconColor: color14
bottom:
type: component.titles
options:
title: =@ctx.datasources.device.batery & ' ' & '%'
subtitle: Battery
align: center
color: warning
# Battery more than 50 %
- when: =@ctx.datasources.device.batery > 50 ? true:false
icon: battery-charge
top:
type: component.titles
options:
icon: mobile-phone-1
title: =@ctx.datasources.device.device-owner
subtitle: =@ctx.datasources.device.device-name
align: center
iconColor: color14
bottom:
type: component.titles
options:
title: =@ctx.datasources.device.batery & ' ' & '%'
subtitle: Battery
align: center
color: positive
# [11:30] Lukáš Otáhal
# ne ,
# @ctx.datasource.nazev.cislo & '%'
# [11:30] Lukáš Otáhal
# tohle by melo pomoct
# [11:31] Lukáš Otáhal
# a maximalne $string(@ctx.datasource.nazev.cislo) & '%' kdyby neslo to prvni