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

Don't show the profile image by default

parent 7100ed44
Branches
No related tags found
No related merge requests found
...@@ -39,6 +39,7 @@ export class Auth extends ScopedElementsMixin(VPULitElement) { ...@@ -39,6 +39,7 @@ export class Auth extends ScopedElementsMixin(VPULitElement) {
this.forceLogin = false; this.forceLogin = false;
this.loadPerson = false; this.loadPerson = false;
this.showProfile = false; this.showProfile = false;
this.showImage = false;
this.token = ""; this.token = "";
this.tokenParsed = null; this.tokenParsed = null;
this.subject = ""; this.subject = "";
...@@ -174,6 +175,7 @@ export class Auth extends ScopedElementsMixin(VPULitElement) { ...@@ -174,6 +175,7 @@ export class Auth extends ScopedElementsMixin(VPULitElement) {
tryLogin: { type: Boolean, attribute: 'try-login' }, tryLogin: { type: Boolean, attribute: 'try-login' },
loadPerson: { type: Boolean, attribute: 'load-person' }, loadPerson: { type: Boolean, attribute: 'load-person' },
showProfile: { type: Boolean, attribute: 'show-profile' }, showProfile: { type: Boolean, attribute: 'show-profile' },
showImage: { type: Boolean, attribute: 'show-image' },
entryPointUrl: { type: String, attribute: 'entry-point-url' }, entryPointUrl: { type: String, attribute: 'entry-point-url' },
keycloakConfig: { type: Object, attribute: 'keycloak-config' }, keycloakConfig: { type: Object, attribute: 'keycloak-config' },
name: { type: String, attribute: false }, name: { type: String, attribute: false },
...@@ -315,7 +317,6 @@ export class Auth extends ScopedElementsMixin(VPULitElement) { ...@@ -315,7 +317,6 @@ export class Auth extends ScopedElementsMixin(VPULitElement) {
.dropdown-menu { .dropdown-menu {
display: none; display: none;
min-width: 8em; min-width: 8em;
padding-top: 4px;
position: absolute; position: absolute;
z-index: 20; z-index: 20;
border: solid 1px black; border: solid 1px black;
...@@ -443,7 +444,7 @@ export class Auth extends ScopedElementsMixin(VPULitElement) { ...@@ -443,7 +444,7 @@ export class Auth extends ScopedElementsMixin(VPULitElement) {
} }
renderLoggedIn() { renderLoggedIn() {
const imageURL = (this.person && this.person.image) ? this.person.image : null; const imageURL = (this.showImage && this.person && this.person.image) ? this.person.image : null;
return html` return html`
<div class="dropdown" @click="${this.onDropdownClick}"> <div class="dropdown" @click="${this.onDropdownClick}">
......
...@@ -84,7 +84,7 @@ class AuthDemo extends ScopedElementsMixin(LitElement) { ...@@ -84,7 +84,7 @@ class AuthDemo extends ScopedElementsMixin(LitElement) {
<h1 class="title">Auth-Demo</h1> <h1 class="title">Auth-Demo</h1>
</div> </div>
<div class="container"> <div class="container">
<vpu-auth lang="${this.lang}" keycloak-config='{"url": "https://auth-dev.tugraz.at/auth", "realm": "tugraz", "clientId": "auth-dev-mw-frontend-local", "silentCheckSsoRedirectUri": "${silentCheckSsoUri}", "scope": "optional-test-scope"}' load-person try-login></vpu-auth> <vpu-auth lang="${this.lang}" keycloak-config='{"url": "https://auth-dev.tugraz.at/auth", "realm": "tugraz", "clientId": "auth-dev-mw-frontend-local", "silentCheckSsoRedirectUri": "${silentCheckSsoUri}", "scope": "optional-test-scope"}' load-person try-login show-image></vpu-auth>
</div> </div>
</section> </section>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment