Skip to content

Commit

Permalink
Avoid URL and email fields getting masked in add-on config view (#24509)
Browse files Browse the repository at this point in the history
* 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>
  • Loading branch information
agners and MindFreeze authored Mar 5, 2025
1 parent 48338e0 commit ba19849
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions hassio/src/addon-view/config/hassio-addon-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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",
},
Expand Down

0 comments on commit ba19849

Please sign in to comment.