Skip to content
Snippets Groups Projects
Commit e2c8ae24 authored by Reiter, Christoph's avatar Reiter, Christoph :snake:
Browse files

Add an attribute to display the profile link and disable it by default

We don't need it in all cases.
parent f7bf48d3
No related branches found
No related tags found
No related merge requests found
...@@ -36,6 +36,7 @@ class VPUAuth extends VPULitElement { ...@@ -36,6 +36,7 @@ class VPUAuth extends VPULitElement {
this.lang = 'de'; this.lang = 'de';
this.forceLogin = false; this.forceLogin = false;
this.loadPerson = false; this.loadPerson = false;
this.showProfile = false;
this.clientId = ""; this.clientId = "";
this.token = ""; this.token = "";
this.subject = ""; this.subject = "";
...@@ -147,6 +148,7 @@ class VPUAuth extends VPULitElement { ...@@ -147,6 +148,7 @@ class VPUAuth extends VPULitElement {
loadPerson: { type: Boolean, attribute: 'load-person' }, loadPerson: { type: Boolean, attribute: 'load-person' },
clientId: { type: String, attribute: 'client-id' }, clientId: { type: String, attribute: 'client-id' },
silentCheckSsoUri: { type: String, attribute: 'silent-check-sso-uri' }, silentCheckSsoUri: { type: String, attribute: 'silent-check-sso-uri' },
showProfile: { type: Boolean, attribute: 'show-profile' },
name: { type: String, attribute: false }, name: { type: String, attribute: false },
token: { type: String, attribute: false }, token: { type: String, attribute: false },
subject: { type: String, attribute: false }, subject: { type: String, attribute: false },
...@@ -378,7 +380,7 @@ class VPUAuth extends VPULitElement { ...@@ -378,7 +380,7 @@ class VPUAuth extends VPULitElement {
<div class="dropdown-content"> <div class="dropdown-content">
${imageURL ? html`<img alt="" src="${imageURL}" class="dropdown-item">` : ''} ${imageURL ? html`<img alt="" src="${imageURL}" class="dropdown-item">` : ''}
<div class="menu"> <div class="menu">
<a href="#" @click="${this.onProfileClicked}" class="dropdown-item">${i18n.t('profile')}</a> ${this.showProfile ? html`<a href="#" @click="${this.onProfileClicked}" class="dropdown-item">${i18n.t('profile')}</a>` :''}
<a href="#" @click="${this.onLogoutClicked}" class="dropdown-item">${i18n.t('logout')}</a> <a href="#" @click="${this.onLogoutClicked}" class="dropdown-item">${i18n.t('logout')}</a>
</div> </div>
</div> </div>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment