section dashboard & sidebar
This commit is contained in:
@@ -3,7 +3,7 @@ import { UUITextStyles } from '@umbraco-ui/uui-css/lib';
|
||||
import { css, html, LitElement } from 'lit';
|
||||
|
||||
import './backoffice-header.element';
|
||||
import './backoffice-sidebar.element';
|
||||
import '../section/section-sidebar.element';
|
||||
import './backoffice-main.element';
|
||||
|
||||
@defineElement('umb-backoffice')
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
import { css, html, LitElement } from 'lit';
|
||||
import { UUITextStyles } from '@umbraco-ui/uui-css/lib';
|
||||
import { customElement, property, state } from 'lit/decorators.js';
|
||||
import { UmbContextConsumerMixin } from '../../core/context';
|
||||
import { UmbNodeStore } from '../../core/stores/node.store';
|
||||
import { UmbContextConsumerMixin } from '../../../core/context';
|
||||
import { UmbNodeStore } from '../../../core/stores/node.store';
|
||||
import { Subscription } from 'rxjs';
|
||||
import { DocumentNode } from '../../mocks/data/content.data';
|
||||
import { DocumentNode } from '../../../mocks/data/content.data';
|
||||
|
||||
@customElement('umb-content-editor')
|
||||
export class UmbContentEditor extends UmbContextConsumerMixin(LitElement) {
|
||||
@@ -23,7 +23,7 @@ export class UmbContentSection extends LitElement {
|
||||
private _routes: Array<IRoute> = [
|
||||
{
|
||||
path: 'dashboard',
|
||||
component: () => import('./content-dashboards.element'),
|
||||
component: () => import('../../../section/section-dashboards.element'),
|
||||
},
|
||||
{
|
||||
path: 'node/:nodeId',
|
||||
@@ -45,9 +45,9 @@ export class UmbContentSection extends LitElement {
|
||||
render() {
|
||||
return html`
|
||||
<!-- TODO: Figure out how we name layout components -->
|
||||
<umb-backoffice-sidebar>
|
||||
<umb-section-sidebar>
|
||||
<umb-content-tree .id="${this._currentNodeId}"></umb-content-tree>
|
||||
</umb-backoffice-sidebar>
|
||||
</umb-section-sidebar>
|
||||
<router-slot id="router-slot" .routes="${this._routes}"></router-slot>
|
||||
`;
|
||||
}
|
||||
@@ -1,7 +1,7 @@
|
||||
import { css, html, LitElement } from 'lit';
|
||||
import { customElement, state, property } from 'lit/decorators.js';
|
||||
import { UUITextStyles } from '@umbraco-ui/uui-css/lib';
|
||||
import { data } from '../../mocks/data/content.data';
|
||||
import { data } from '../../../mocks/data/content.data';
|
||||
|
||||
@customElement('umb-content-tree')
|
||||
class UmbContentTree extends LitElement {
|
||||
@@ -2,8 +2,8 @@ import { UUITextStyles } from '@umbraco-ui/uui-css/lib';
|
||||
import { css, html, LitElement } from 'lit';
|
||||
import { customElement, state } from 'lit/decorators.js';
|
||||
import { Subscription } from 'rxjs';
|
||||
import { UmbContextConsumerMixin } from '../../core/context';
|
||||
import { UmbExtensionManifest, UmbExtensionRegistry } from '../../core/extension';
|
||||
import { UmbContextConsumerMixin } from '../../../core/context';
|
||||
import { UmbExtensionManifest, UmbExtensionRegistry } from '../../../core/extension';
|
||||
|
||||
@customElement('umb-settings-section')
|
||||
export class UmbSettingsSection extends UmbContextConsumerMixin(LitElement) {
|
||||
@@ -32,7 +32,7 @@ const registerInternalManifests = async () => {
|
||||
alias: 'Umb.Section.Content',
|
||||
name: 'Content',
|
||||
elementName: 'umb-content-section',
|
||||
js: () => import('./extensions/content/content-section.element'),
|
||||
js: () => import('./extensions/sections/content/content-section.element'),
|
||||
meta: {
|
||||
pathname: 'content', // TODO: how to we want to support pretty urls?
|
||||
weight: 50,
|
||||
@@ -53,7 +53,7 @@ const registerInternalManifests = async () => {
|
||||
alias: 'Umb.Section.Settings',
|
||||
name: 'Settings',
|
||||
elementName: 'umb-settings-section',
|
||||
js: () => import('./extensions/settings/settings-section.element'),
|
||||
js: () => import('./extensions/sections/settings/settings-section.element'),
|
||||
meta: {
|
||||
pathname: 'settings', // TODO: how to we want to support pretty urls?
|
||||
weight: 20,
|
||||
|
||||
@@ -12,8 +12,8 @@ import {
|
||||
createExtensionElement,
|
||||
} from '../core/extension';
|
||||
|
||||
@customElement('umb-content-dashboards')
|
||||
export class UmbContentDashboards extends UmbContextConsumerMixin(LitElement) {
|
||||
@customElement('umb-section-dashboards')
|
||||
export class UmbSectionDashboards extends UmbContextConsumerMixin(LitElement) {
|
||||
static styles = [
|
||||
UUITextStyles,
|
||||
css`
|
||||
@@ -90,6 +90,7 @@ export class UmbContentDashboards extends UmbContextConsumerMixin(LitElement) {
|
||||
}
|
||||
|
||||
private _handleTabClick(e: PointerEvent, dashboard: UmbExtensionManifestDashboard) {
|
||||
// TODO: generate URL from context/location. Or use Router-link concept?
|
||||
history.pushState(null, '', `/section/content/dashboard/${dashboard.meta.pathname}`);
|
||||
this._current = dashboard.name;
|
||||
}
|
||||
@@ -116,10 +117,10 @@ export class UmbContentDashboards extends UmbContextConsumerMixin(LitElement) {
|
||||
}
|
||||
}
|
||||
|
||||
export default UmbContentDashboards;
|
||||
export default UmbSectionDashboards;
|
||||
|
||||
declare global {
|
||||
interface HTMLElementTagNameMap {
|
||||
'umb-content-dashboards': UmbContentDashboards;
|
||||
'umb-section-dashboards': UmbSectionDashboards;
|
||||
}
|
||||
}
|
||||
@@ -2,8 +2,8 @@ import { UUITextStyles } from '@umbraco-ui/uui-css/lib';
|
||||
import { css, html, LitElement } from 'lit';
|
||||
import { customElement } from 'lit/decorators.js';
|
||||
|
||||
@customElement('umb-backoffice-sidebar')
|
||||
export class UmbBackofficeSidebar extends LitElement {
|
||||
@customElement('umb-section-sidebar')
|
||||
export class UmbSectionSidebar extends LitElement {
|
||||
static styles = [
|
||||
UUITextStyles,
|
||||
css`
|
||||
@@ -26,6 +26,6 @@ export class UmbBackofficeSidebar extends LitElement {
|
||||
|
||||
declare global {
|
||||
interface HTMLElementTagNameMap {
|
||||
'umb-backoffice-sidebar': UmbBackofficeSidebar;
|
||||
'umb-section-sidebar': UmbSectionSidebar;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user