diff --git a/core/client.js b/core/client.js index 7398a155..acad4ae5 100644 --- a/core/client.js +++ b/core/client.js @@ -118,28 +118,6 @@ class TfNavigationElement extends LitElement { return this.spark_lines[key]; } - /** - * TODOC - * @returns - */ - render_login() { - if (this?.credentials?.session?.name) { - return html`logout ${this.credentials.session.name}`; - } else { - return html`login`; - } - } - set_active_identity(id) { send({action: 'setActiveIdentity', identity: id}); this.renderRoot.getElementById('id_dropdown').classList.remove('w3-show'); @@ -159,66 +137,102 @@ class TfNavigationElement extends LitElement { window.location.href = '/~core/ssb/#' + this.identity; } + logout() { + window.location.href = `/login/logout?return=${encodeURIComponent(url() + hash())}`; + } + render_identity() { let self = this; - if (this.identities?.length) { - return html` - -