From 23b3c998bd5321985b531e2416db43a03b12aa08 Mon Sep 17 00:00:00 2001 From: Cory McWilliams Date: Sun, 14 Apr 2024 17:47:47 -0400 Subject: [PATCH] Re-CSS'd the identity dropdown. --- core/client.js | 41 ++++++++++++++++++++++++++++++----------- 1 file changed, 30 insertions(+), 11 deletions(-) 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`