This commit is contained in:
JesmoDev
2024-04-17 11:11:39 +02:00
committed by Jacob Overgaard
parent 4afa02bc96
commit ff8da16560

View File

@@ -1,15 +1,9 @@
import { UmbTextStyles } from '@umbraco-cms/backoffice/style';
import { UMB_CURRENT_USER_CONTEXT } from '@umbraco-cms/backoffice/current-user';
import { css, html, customElement, state } from '@umbraco-cms/backoffice/external/lit';
import { css, html, customElement } from '@umbraco-cms/backoffice/external/lit';
import { UmbLitElement } from '@umbraco-cms/backoffice/lit-element';
@customElement('umb-umbraco-news-dashboard')
export class UmbUmbracoNewsDashboardElement extends UmbLitElement {
#currentUserContext?: typeof UMB_CURRENT_USER_CONTEXT.TYPE;
@state()
private _name = '';
#infoLinks = [
{
name: 'Documentation',
@@ -33,21 +27,6 @@ export class UmbUmbracoNewsDashboardElement extends UmbLitElement {
},
];
constructor() {
super();
this.consumeContext(UMB_CURRENT_USER_CONTEXT, (instance) => {
this.#currentUserContext = instance;
this.#observeCurrentUser();
});
}
#observeCurrentUser(): void {
if (!this.#currentUserContext) return;
this.observe(this.#currentUserContext.currentUser, (user) => {
this._name = user?.name ?? '';
});
}
render() {
return html`
<div id="info-links" class="uui-text">
@@ -74,20 +53,6 @@ export class UmbUmbracoNewsDashboardElement extends UmbLitElement {
`,
)}
</div>
<!-- <uui-box class="uui-text">
<h1 class="uui-h2" style="margin-top: var(--uui-size-layout-1);">
<umb-localize key="dashboard_welcome">Welcome</umb-localize>, ${this._name}
</h1>
<p class="uui-lead">
This is the beta version of Umbraco 14, where you can have a first-hand look at the new Backoffice.
</p>
<p>
Please refer to the
<a target="_blank" href="https://docs.umbraco.com/umbraco-cms/v/14.latest-beta/">documentation</a> to learn
more about what is possible. Here you will find excellent tutorials, guides, and references to help you get
started extending the Backoffice.
</p>
</uui-box> -->
`;
}