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

auth-button: remove the show-profile option

It's no longer used.
parent b9afc780
No related branches found
No related tags found
No related merge requests found
...@@ -14,7 +14,6 @@ export class AuthMenuButton extends ScopedElementsMixin(LitElement) { ...@@ -14,7 +14,6 @@ export class AuthMenuButton extends ScopedElementsMixin(LitElement) {
constructor() { constructor() {
super(); super();
this.lang = 'de'; this.lang = 'de';
this.showProfile = false;
this.showImage = false; this.showImage = false;
this._loginData = {}; this._loginData = {};
...@@ -31,7 +30,6 @@ export class AuthMenuButton extends ScopedElementsMixin(LitElement) { ...@@ -31,7 +30,6 @@ export class AuthMenuButton extends ScopedElementsMixin(LitElement) {
static get properties() { static get properties() {
return { return {
lang: { type: String }, lang: { type: String },
showProfile: { type: Boolean, attribute: 'show-profile' },
showImage: { type: Boolean, attribute: 'show-image' }, showImage: { type: Boolean, attribute: 'show-image' },
_loginData: { type: Object, attribute: false }, _loginData: { type: Object, attribute: false },
}; };
...@@ -251,16 +249,6 @@ export class AuthMenuButton extends ScopedElementsMixin(LitElement) { ...@@ -251,16 +249,6 @@ export class AuthMenuButton extends ScopedElementsMixin(LitElement) {
this.setChevron('chevron-down'); this.setChevron('chevron-down');
} }
onProfileClicked(event) {
event.preventDefault();
const profileEvent = new CustomEvent("vpu-auth-profile", {
"detail": "Profile event",
bubbles: true,
composed: true,
});
this.dispatchEvent(profileEvent);
}
renderLoggedIn() { renderLoggedIn() {
const person = this._loginData.person; const person = this._loginData.person;
const imageURL = (this.showImage && person && person.image) ? person.image : null; const imageURL = (this.showImage && person && person.image) ? person.image : null;
...@@ -277,7 +265,6 @@ export class AuthMenuButton extends ScopedElementsMixin(LitElement) { ...@@ -277,7 +265,6 @@ export class AuthMenuButton extends ScopedElementsMixin(LitElement) {
<div class="dropdown-content" @blur="${this.closeDropdown}"> <div class="dropdown-content" @blur="${this.closeDropdown}">
${imageURL ? html`<div class="dropdown-item"><img alt="" src="${imageURL}"></div>` : ''} ${imageURL ? html`<div class="dropdown-item"><img alt="" src="${imageURL}"></div>` : ''}
<div class="menu"> <div class="menu">
${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>
......
...@@ -15,6 +15,5 @@ ...@@ -15,6 +15,5 @@
"headline": "Willkommen bei der Applikation '{{appname}}'." "headline": "Willkommen bei der Applikation '{{appname}}'."
}, },
"login": "Einloggen", "login": "Einloggen",
"logout": "Ausloggen", "logout": "Ausloggen"
"profile": "Profil"
} }
\ No newline at end of file
...@@ -15,6 +15,5 @@ ...@@ -15,6 +15,5 @@
"headline": "Welcome to the '{{appname}}' application." "headline": "Welcome to the '{{appname}}' application."
}, },
"login": "Login", "login": "Login",
"logout": "Logout", "logout": "Logout"
"profile": "Profile"
} }
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