Skip to content
Snippets Groups Projects
Commit 8f16a016 authored by Bekerle, Patrizio's avatar Bekerle, Patrizio :fire: Committed by Reiter, Christoph
Browse files

Implement noAuth parameter

parent 96360741
No related branches found
No related tags found
No related merge requests found
......@@ -9,11 +9,13 @@ class KnowledgeBaseWebPageElementViewDemo extends LitElement {
constructor() {
super();
this.lang = 'de';
this.noAuth = false;
}
static get properties() {
return {
lang: { type: String },
noAuth: { type: Boolean, attribute: 'no-auth' },
};
}
......@@ -27,6 +29,14 @@ class KnowledgeBaseWebPageElementViewDemo extends LitElement {
super.update(changedProperties);
}
getAuthComponentHtml() {
return this.noAuth ? html`` : html`
<div class="content">
<vpu-auth lang="${this.lang}" client-id="${commonUtils.setting('keyCloakClientId')}" load-person remember-login></vpu-auth>
</div>
`;
}
render() {
commonUtils.initAssetBaseURL('vpu-knowledge-base-web-page-element-view-src');
const bulmaCSS = commonUtils.getAssetURL(bulmaCSSPath);
......@@ -48,9 +58,7 @@ class KnowledgeBaseWebPageElementViewDemo extends LitElement {
<div class="content">
<h1 class="title">KnowledgeBaseWebPageElementView-Demo</h1>
</div>
<div class="content">
<vpu-auth lang="${this.lang}" client-id="${commonUtils.setting('keyCloakClientId')}" load-person remember-login></vpu-auth>
</div>
${this.getAuthComponentHtml()}
<div class="content">
<h2 class="subtitle">Deutsch</h2>
<p>Ein erster Schritt</p>
......
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