tela.html is built with pieces. Each piece has a short @ name (used in the Skill and in componentes.md) and a <dt-*> tag you write:
The pieces use the same components as the DoglyTdc site: the select box and color picker are the ones from the rest of the panel, in light and dark themes.
bind: where the value comes from and goes to
Every piece that holds or shows a value needs bind="field". The field is the value’s name in the connection’s reply and in what gets saved.
- Name: starts with a letter; letters, numbers,
_,.and-, up to 64 characters. - With
connect.type: "config", thebindmust be inconnect.keys. - With
connect.type: "collection", onlydt-tableanddt-stat.
@text and @textarea
@text accepts up to 2,000 characters; @textarea, up to 8,000.
@number
null.
@switch
true or false.
@select — select box
<dt-select> is the box; each <dt-option> is an option. <dt-option> only works inside <dt-select> and needs value and label.
- The saved value is always text, e.g.
"rapido". - Default value: return the field on load (
"modo": "natural") or keep it saved in the configuration. - With more than 6 options, the box gets search automatically.
- Translated labels:
label="@t.modo.rapido".
@color — color picker
- The value is saved as a 6-digit hex:
"#8b5cf6". - If the saved value is not in that format (or missing), the picker starts at
#8b5cf6. - For another default, save the color in the configuration first or return it on load.
@table
connect.type: "collection", the table shows the collection’s records. Otherwise it shows values.<bind> or, if that is not a list, rows.
@stat
@alert
Optional
icon changes the icon.
@button
Layout
To arrange the screen use:section, div, header, footer, h2, h3, h4, p, span, strong, small and hr, with optional class.
Other classes are ignored.
What is not allowed
- JavaScript,
<script>,<style>,style=""andon…="". - Links, images and iframes.
- Elements outside the list and attributes the piece does not have.
- More than 250 elements, 12 levels or 32 KB per screen.
Elemento não permitido: <img>, <dt-select> precisa de bind="campo"., bind="cor" não está em connect.keys.
