Avoid URL and email fields getting masked in add-on config view (#24509)

* Avoid URL and email fields getting masked in add-on config view

The backend will set "format" for add-on config options of type
"password", "url" and "email", to exactly these three values. Only
"password" fields should be masked though.

* lint

---------

Co-authored-by: Petar Petrov <MindFreeze@users.noreply.github.com>
This commit is contained in:
Stefan Agner 2025-03-05 07:56:34 +01:00 committed by GitHub
parent 48338e0886
commit ba19849182
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -113,8 +113,9 @@ class HassioAddonConfig extends LitElement {
required: entry.required,
selector: {
text: {
type:
entry.format || MASKED_FIELDS.includes(entry.name)
type: entry.format
? entry.format
: MASKED_FIELDS.includes(entry.name)
? "password"
: "text",
},