${this.name}
-
+
+ ${this.viewTabs.map(
+ (view) => html`
+
{
+ this.loadView(view);
+ }}>${view.name}
+ `
+ )}
+ {
this.dispatchEvent(new CustomEvent('logout'));
@@ -134,7 +171,7 @@ export class DeesSimpleAppDash extends DeesElement {
-
+
@@ -170,4 +207,15 @@ export class DeesSimpleAppDash extends DeesElement {
terminal.style.opacity = '1';
terminal.style.transform = 'translateY(0px)';
}
+
+ private currentView: DeesElement;
+ public async loadView(viewArg: IView) {
+ const appcontent = this.shadowRoot.querySelector('.appcontent');
+ const view = new viewArg.element();
+ if (this.currentView) {
+ this.currentView.remove();
+ }
+ appcontent.appendChild(view);
+ this.currentView = view;
+ }
}