diff --git a/src/Umbraco.Web.UI.Client/src/backoffice/shared/components/debug/debug.element.ts b/src/Umbraco.Web.UI.Client/src/backoffice/shared/components/debug/debug.element.ts index eeddd4ec30..5bb8792dfc 100644 --- a/src/Umbraco.Web.UI.Client/src/backoffice/shared/components/debug/debug.element.ts +++ b/src/Umbraco.Web.UI.Client/src/backoffice/shared/components/debug/debug.element.ts @@ -1,8 +1,11 @@ import { UUITextStyles } from '@umbraco-ui/uui-css/lib'; import { css, html, LitElement, nothing } from 'lit'; import { customElement, property, state } from 'lit/decorators.js'; -import { UmbContextDebugRequest, UmbContextRequestEventImplementation, umbContextRequestEventType } from '@umbraco-cms/context-api'; - +import { + UmbContextDebugRequest, + UmbContextRequestEventImplementation, + umbContextRequestEventType, +} from '@umbraco-cms/context-api'; @customElement('umb-debug') export class UmbDebug extends LitElement { @@ -13,63 +16,64 @@ export class UmbDebug extends LitElement { display: block; font-family: monospace; - z-index:10000; + z-index: 10000; - width:100%; - padding:10px 0; + width: 100%; + padding: 10px 0; } .events { - background-color:var(--uui-color-danger); - color:var(--uui-color-selected-contrast); - height:0; + background-color: var(--uui-color-danger); + color: var(--uui-color-selected-contrast); + height: 0; transition: height 0.3s ease-out; } .events.open { - height:auto; + height: auto; } .events > div { - padding:10px; + padding: 10px; } h4 { - margin:0; + margin: 0; } `, ]; - @property({reflect: true, type: Boolean}) - enabled = false; + @property({ reflect: true, type: Boolean }) + enabled = false; @property() contextAliases = new Map(); - @state() + @state() private _debugPaneOpen = false; - private _toggleDebugPane() { - this._debugPaneOpen = !this._debugPaneOpen; - } + private _toggleDebugPane() { + this._debugPaneOpen = !this._debugPaneOpen; + } connectedCallback(): void { super.connectedCallback(); - - // Dispatch it - this.dispatchEvent(new UmbContextDebugRequest((instances)=> { - console.log('I have contexts now', instances); - this.contextAliases = instances; - })); + // Dispatch it + this.dispatchEvent( + new UmbContextDebugRequest((instances) => { + console.log('I have contexts now', instances); + + this.contextAliases = instances; + }) + ); } render() { - - if(this.enabled){ - return html` -