Difference between revisions of "Code Panel"
| Line 18: | Line 18: | ||
|- | |- | ||
| <code>description</code> || <code>string</code> || <code>null</code> || No || data-sort-value=167|'''0.1.167''' || | | <code>description</code> || <code>string</code> || <code>null</code> || No || data-sort-value=167|'''0.1.167''' || | ||
| − | The description of the code panel | + | The description of the code panel. |
This property supports [[Inline Expressions]]. | This property supports [[Inline Expressions]]. | ||
| + | |||
| + | '''Note: This property is only used if the <code>digits</code> property is set.''' | ||
|- | |- | ||
| <code>value</code> || <code>string</code> || <code>null</code> || No || data-sort-value=0|0.1.0 || | | <code>value</code> || <code>string</code> || <code>null</code> || No || data-sort-value=0|0.1.0 || | ||
| Line 27: | Line 29: | ||
| <code>placeholder</code> || <code>string</code> || <code>"Code"</code> || No || data-sort-value=0|0.1.0 || | | <code>placeholder</code> || <code>string</code> || <code>"Code"</code> || No || data-sort-value=0|0.1.0 || | ||
The placeholder value of the code panel. This value is displayed if no code is entered. | The placeholder value of the code panel. This value is displayed if no code is entered. | ||
| − | |||
This property supports [[Inline Expressions]]. | This property supports [[Inline Expressions]]. | ||
| + | |||
| + | '''Note: This property is ignored if the <code>digits</code> property is set.''' | ||
|- | |- | ||
| <code>secret</code> || <code>boolean</code> || <code>false</code> || No || data-sort-value=0|0.1.0 || | | <code>secret</code> || <code>boolean</code> || <code>false</code> || No || data-sort-value=0|0.1.0 || | ||
| Line 45: | Line 48: | ||
| <code>delay</code> || <code>number</code> || <code>-1</code> || No || data-sort-value=167|'''0.1.167''' || | | <code>delay</code> || <code>number</code> || <code>-1</code> || No || data-sort-value=167|'''0.1.167''' || | ||
Specifies a delay in milliseconds after which the entered code should be automatically processed. | Specifies a delay in milliseconds after which the entered code should be automatically processed. | ||
| − | + | ||
| + | '''Note: This property is ignored if the <code>digits</code> property is set.''' | ||
|- | |- | ||
| <code>action</code> || <code>string</code> || <code>null</code> || No || data-sort-value=0|0.1.0 || | | <code>action</code> || <code>string</code> || <code>null</code> || No || data-sort-value=0|0.1.0 || | ||
Revision as of 12:08, 25 September 2026
It is possible to enter codes (i.e. numbers) with the integrated code panel. These codes can either be processed at the service or plugin level or embedded directly into action strings. This feature is available since version 0.1.0, but was significantly expanded in version 0.1.167.
Syntax[edit]
| Property | Type | Default Value | Mandatory | Since Version | Description |
|---|---|---|---|---|---|
headline |
string |
"Enter Code" |
No | 0.1.0 |
The headline of the code panel. This property supports Inline Expressions. |
extension |
string |
null |
No | 0.1.0 |
The extension of the code panel. This property can be used to display a small label in the upper right corner. This property supports Inline Expressions and Live Inline Expressions. |
description |
string |
null |
No | 0.1.167 |
The description of the code panel. This property supports Inline Expressions. Note: This property is only used if the |
value |
string |
null |
No | 0.1.0 |
The prefilled value of the code panel. The value must consist only of numbers and must not exceed the maximum length, otherwise, it is ignored. |
placeholder |
string |
"Code" |
No | 0.1.0 |
The placeholder value of the code panel. This value is displayed if no code is entered. This property supports Inline Expressions. Note: This property is ignored if the |
secret |
boolean |
false |
No | 0.1.0 |
Indicates if the code is secret and should not be displayed. |
digits |
number |
-1 |
No | 0.1.167 |
Specifies if a specific number of digits that should be entered. The value must be between |
clear |
boolean |
false|true |
No | 0.1.167 |
Indicates if the code should be cleared when it has been processed.
By default, the code is retained if the |
delay |
number |
-1 |
No | 0.1.167 |
Specifies a delay in milliseconds after which the entered code should be automatically processed. Note: This property is ignored if the |
action |
string |
null |
No | 0.1.0 |
The code action that is executed if the |
data |
object |
null |
No | 0.1.0 |
The additional data of the code action that is used if the action is executed. |
Example[edit]
Screenshot[edit]
Code[edit]
{
"type": "list",
"headline": "Code Panel",
"template": {
"enumerate": false,
"icon": "dialpad",
"type": "button",
"layout": "0,0,3,3"
},
"items": [{
"label": "Default",
"action": "execute:code:http://msx.benzac.de/services/echo.php"
}, {
"label": "Secret",
"action": "execute:code:http://msx.benzac.de/services/echo.php",
"data": {
"headline": "Enter Secret Code",
"placeholder": "Secret Code",
"secret": true,
"clear": true
}
}, {
"label": "Prefilled + Extension",
"action": "execute:code:http://msx.benzac.de/services/echo.php",
"data": {
"value": "1234",
"extension": "Prefilled"
}
}, {
"label": "1 Digit",
"titleFooter": "0.1.167+{br}{br}{br}",
"alignment": "center",
"action": "execute:code:http://msx.benzac.de/services/echo.php",
"data": {
"headline": "Enter 1 Digit",
"digits": 1
}
}, {
"label": "3 Digits + Decription",
"titleFooter": "0.1.167+{br}{br}{br}",
"alignment": "center",
"action": "execute:code:http://msx.benzac.de/services/echo.php",
"data": {
"headline": "Enter 3 Digits",
"description": "Execution takes place automatically as soon as all digits have been entered.",
"digits": 3
}
}, {
"label": "6 Secret Digits",
"titleFooter": "0.1.167+{br}{br}{br}",
"alignment": "center",
"action": "execute:code:http://msx.benzac.de/services/echo.php",
"data": {
"headline": "Enter 6 Secret Digits",
"digits": 6,
"secret": true
}
}, {
"badge": "Enter Action",
"label": "Switch Channel",
"titleFooter": "0.1.167+{br}{br}{br}",
"alignment": "center",
"action": "enter",
"data": {
"headline": "Switch Channel",
"placeholder": "Channel Number",
"extension": "Delay: 3 sec",
"action": "player:goto:number:{CODE}",
"delay": 3000
}
}, {
"badge": "Enter Action",
"label": "Switch Channel",
"titleFooter": "0.1.167+{br}{br}{br}",
"alignment": "center",
"action": "enter",
"data": {
"headline": "Switch Channel",
"description": "Enter the channel number to switch to this channel. Please load a playlist first so that this action can be executed.",
"action": "player:goto:number:{CODE}",
"digits": 4
}
}]
}