Skip to content

Commit

Permalink
Set webhooks context
Browse files Browse the repository at this point in the history
  • Loading branch information
bjarnef committed Nov 5, 2023
1 parent 312e0d8 commit 4a39b06
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -1,17 +1,24 @@
//import '../../components/index.js';
import { UmbWebhooksWorkspaceContext } from '../webhooks.context.js';
import { PropertyValueMap, css, html, customElement } from '@umbraco-cms/backoffice/external/lit';
import { UmbTextStyles } from "@umbraco-cms/backoffice/style";
import { UmbLitElement } from '@umbraco-cms/internal/lit-element';

@customElement('umb-webhooks-workspace')
export class UmbWebhooksWorkspaceElement extends UmbLitElement {
#webhooksContext = new UmbWebhooksWorkspaceContext(this);

firstUpdated(props: PropertyValueMap<unknown>) {
super.firstUpdated(props);

// TODO: This should be moved to the log viewer context:
window.addEventListener('changestate', this.#webhooksContext.onChangeState);
this.#webhooksContext.onChangeState();
}

disconnectedCallback(): void {
super.disconnectedCallback();
window.removeEventListener('changestate', this.#webhooksContext.onChangeState);
}

load(): void {
Expand Down

0 comments on commit 4a39b06

Please sign in to comment.