fix(core): Update dependencies and refactor registration process

This commit is contained in:
2024-10-04 15:43:36 +02:00
parent 629bf19845
commit 4deaafc3a2
18 changed files with 676 additions and 597 deletions
+13 -2
View File
@@ -61,14 +61,23 @@ export class IdpViewcontainer extends DeesElement {
// Remove the current element if it exists
if (this.currentElement) {
const currentElement = this.currentElement as any;
if (currentElement.hide) {
await currentElement.hide();
}
viewContainer.removeChild(this.currentElement);
}
// Create a new instance of the viewElement
const newElement = new viewElement();
const newElement = new viewElement() as any;
(newElement as any).viewContainer = this;
viewContainer.appendChild(newElement);
if (newElement.show) {
await newElement.show();
}
// Wait until the new element is fully rendered
await newElement.updateComplete;
@@ -87,11 +96,13 @@ export class IdpViewcontainer extends DeesElement {
break;
case 'login':
console.log('now on /login');
await this.loadElement(elements.IdpLogincontainer);
await this.loadElement(elements.IdpLoginPrompt);
break;
case 'register':
await this.loadElement(elements.IdpRegistrationPrompt);
break;
case 'finishregistration':
await this.loadElement(elements.IdpRegistrationStepper);
}
});
}