mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-17 14:26:35 +00:00
Use more text selector types for add-on configuration (#12303)
This commit is contained in:
parent
d900e40d04
commit
714f2447b7
@ -55,6 +55,8 @@ const ADDON_YAML_SCHEMA = DEFAULT_SCHEMA.extend([
|
|||||||
}),
|
}),
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
const MASKED_FIELDS = ["password", "secret", "token"];
|
||||||
|
|
||||||
@customElement("hassio-addon-config")
|
@customElement("hassio-addon-config")
|
||||||
class HassioAddonConfig extends LitElement {
|
class HassioAddonConfig extends LitElement {
|
||||||
@property({ attribute: false }) public addon!: HassioAddonDetails;
|
@property({ attribute: false }) public addon!: HassioAddonDetails;
|
||||||
@ -113,7 +115,14 @@ class HassioAddonConfig extends LitElement {
|
|||||||
: {
|
: {
|
||||||
name: entry.name,
|
name: entry.name,
|
||||||
required: entry.required,
|
required: entry.required,
|
||||||
selector: { text: { type: "text" } },
|
selector: {
|
||||||
|
text: {
|
||||||
|
type:
|
||||||
|
entry.format || MASKED_FIELDS.includes(entry.name)
|
||||||
|
? "password"
|
||||||
|
: "text",
|
||||||
|
},
|
||||||
|
},
|
||||||
}
|
}
|
||||||
: entry.type === "boolean"
|
: entry.type === "boolean"
|
||||||
? {
|
? {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user