Update our previous debug component to use this generic/basic dialog to displayh HTML inside it
This commit is contained in:
@@ -101,15 +101,11 @@ export class UmbDebug extends UmbLitElement {
|
|||||||
this._debugPaneOpen = !this._debugPaneOpen;
|
this._debugPaneOpen = !this._debugPaneOpen;
|
||||||
}
|
}
|
||||||
|
|
||||||
private async _openDialog() {
|
private _openDialog() {
|
||||||
// Open a modal that uses the HTML component called 'umb-debug-modal-layout'
|
this._modalService?.openBasic({
|
||||||
await import('./debug.modal.element.js');
|
header: html`<uui-icon name="umb:bug"></uui-icon> Debug: Contexts`,
|
||||||
this._modalService?.open('umb-debug-modal-layout', {
|
content: this._htmlContent(),
|
||||||
size: 'small',
|
overlaySize: 'small'
|
||||||
type: 'sidebar',
|
|
||||||
data: {
|
|
||||||
content: this._renderContextAliases(),
|
|
||||||
},
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -130,14 +126,20 @@ export class UmbDebug extends UmbLitElement {
|
|||||||
|
|
||||||
<div class="events ${this._debugPaneOpen ? 'open' : ''}">
|
<div class="events ${this._debugPaneOpen ? 'open' : ''}">
|
||||||
<div>
|
<div>
|
||||||
<ul>
|
${this._htmlContent()}
|
||||||
${this._renderContextAliases()}
|
|
||||||
</ul>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>`;
|
</div>`;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private _htmlContent() {
|
||||||
|
return html `
|
||||||
|
<ul>
|
||||||
|
${this._renderContextAliases()}
|
||||||
|
</ul>
|
||||||
|
`;
|
||||||
|
}
|
||||||
|
|
||||||
private _renderContextAliases() {
|
private _renderContextAliases() {
|
||||||
const contextsTemplates: TemplateResult[] = [];
|
const contextsTemplates: TemplateResult[] = [];
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user