diff --git a/core/client.js b/core/client.js index f950fa90..e4d83a84 100644 --- a/core/client.js +++ b/core/client.js @@ -139,8 +139,9 @@ class TfNavigationElement extends LitElement { } } - set_active_identity(event) { - send({action: 'setActiveIdentity', identity: event.srcElement.value}); + set_active_identity(id) { + send({action: 'setActiveIdentity', identity: id}); + this.renderRoot.getElementById('id_dropdown').classList.remove('w3-show'); } create_identity(event) { @@ -149,20 +150,38 @@ class TfNavigationElement extends LitElement { } } + toggle_id_dropdown() { + this.renderRoot.getElementById('id_dropdown').classList.toggle('w3-show'); + } + render_identity() { let self = this; if (this.identities?.length) { return html` - +
+ +
+ + ${this.identities.map( + (x) => html` + + ` + )} +
+
`; } else { return html`