From 5bc40738ce568ca27277660385ec2222489742f0 Mon Sep 17 00:00:00 2001
From: Christoph Reiter <reiter.christoph@gmail.com>
Date: Wed, 24 Jun 2020 13:05:38 +0200
Subject: [PATCH] auth-button: remove the show-profile option

It's no longer used.
---
 packages/app-shell/src/auth-menu-button.js      | 13 -------------
 packages/app-shell/src/i18n/de/translation.json |  3 +--
 packages/app-shell/src/i18n/en/translation.json |  3 +--
 3 files changed, 2 insertions(+), 17 deletions(-)

diff --git a/packages/app-shell/src/auth-menu-button.js b/packages/app-shell/src/auth-menu-button.js
index 24d70da8..d0fcd0e1 100644
--- a/packages/app-shell/src/auth-menu-button.js
+++ b/packages/app-shell/src/auth-menu-button.js
@@ -14,7 +14,6 @@ export class AuthMenuButton extends ScopedElementsMixin(LitElement) {
     constructor() {
         super();
         this.lang = 'de';
-        this.showProfile = false;
         this.showImage = false;
         this._loginData = {};
 
@@ -31,7 +30,6 @@ export class AuthMenuButton extends ScopedElementsMixin(LitElement) {
     static get properties() {
         return {
             lang: { type: String },
-            showProfile: { type: Boolean, attribute: 'show-profile' },
             showImage: { type: Boolean, attribute: 'show-image' },
             _loginData: { type: Object, attribute: false },
         };
@@ -251,16 +249,6 @@ export class AuthMenuButton extends ScopedElementsMixin(LitElement) {
         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() {
         const person = this._loginData.person;
         const imageURL = (this.showImage && person && person.image) ? person.image : null;
@@ -277,7 +265,6 @@ export class AuthMenuButton extends ScopedElementsMixin(LitElement) {
                     <div class="dropdown-content" @blur="${this.closeDropdown}">
                         ${imageURL ? html`<div class="dropdown-item"><img alt="" src="${imageURL}"></div>` : ''}
                         <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>
                         </div>
                     </div>
diff --git a/packages/app-shell/src/i18n/de/translation.json b/packages/app-shell/src/i18n/de/translation.json
index e6a23067..d8212b8e 100644
--- a/packages/app-shell/src/i18n/de/translation.json
+++ b/packages/app-shell/src/i18n/de/translation.json
@@ -15,6 +15,5 @@
       "headline": "Willkommen bei der Applikation '{{appname}}'."
   },
   "login": "Einloggen",
-  "logout": "Ausloggen",
-  "profile": "Profil"
+  "logout": "Ausloggen"
 }
\ No newline at end of file
diff --git a/packages/app-shell/src/i18n/en/translation.json b/packages/app-shell/src/i18n/en/translation.json
index 25b10a90..e1195f11 100644
--- a/packages/app-shell/src/i18n/en/translation.json
+++ b/packages/app-shell/src/i18n/en/translation.json
@@ -15,6 +15,5 @@
       "headline": "Welcome to the '{{appname}}' application."
   },
   "login": "Login",
-  "logout": "Logout",
-  "profile": "Profile"
+  "logout": "Logout"
 }
-- 
GitLab