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
No related branches found
No related tags found
No related merge requests found
......@@ -39,6 +39,7 @@ export class Auth extends ScopedElementsMixin(VPULitElement) {
this.forceLogin = false;
this.loadPerson = false;
this.showProfile = false;
this.showImage = false;
this.token = "";
this.tokenParsed = null;
this.subject = "";
......@@ -174,6 +175,7 @@ export class Auth extends ScopedElementsMixin(VPULitElement) {
tryLogin: { type: Boolean, attribute: 'try-login' },
loadPerson: { type: Boolean, attribute: 'load-person' },
showProfile: { type: Boolean, attribute: 'show-profile' },
showImage: { type: Boolean, attribute: 'show-image' },
entryPointUrl: { type: String, attribute: 'entry-point-url' },
keycloakConfig: { type: Object, attribute: 'keycloak-config' },
name: { type: String, attribute: false },
......@@ -315,7 +317,6 @@ export class Auth extends ScopedElementsMixin(VPULitElement) {
.dropdown-menu {
display: none;
min-width: 8em;
padding-top: 4px;
position: absolute;
z-index: 20;
border: solid 1px black;
......@@ -443,7 +444,7 @@ export class Auth extends ScopedElementsMixin(VPULitElement) {
}
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`
<div class="dropdown" @click="${this.onDropdownClick}">
......
......@@ -84,7 +84,7 @@ class AuthDemo extends ScopedElementsMixin(LitElement) {
<h1 class="title">Auth-Demo</h1>
</div>
<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>
</section>
......
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