removed padding from section-dashboards
This commit is contained in:
@@ -7,7 +7,12 @@ import { UmbSectionContext } from '../section.context';
|
||||
import { UmbObserverMixin } from '@umbraco-cms/observable-api';
|
||||
import { createExtensionElement } from '@umbraco-cms/extensions-api';
|
||||
import { UmbContextConsumerMixin } from '@umbraco-cms/context-api';
|
||||
import type { ManifestDashboard, ManifestDashboardCollection, ManifestSection, ManifestWithMeta } from '@umbraco-cms/models';
|
||||
import type {
|
||||
ManifestDashboard,
|
||||
ManifestDashboardCollection,
|
||||
ManifestSection,
|
||||
ManifestWithMeta,
|
||||
} from '@umbraco-cms/models';
|
||||
import { umbExtensionsRegistry } from '@umbraco-cms/extensions-registry';
|
||||
|
||||
@customElement('umb-section-dashboards')
|
||||
@@ -28,16 +33,14 @@ export class UmbSectionDashboardsElement extends UmbContextConsumerMixin(UmbObse
|
||||
}
|
||||
|
||||
#scroll-container {
|
||||
width: calc(-300px + 100vw);
|
||||
height: calc(100vh - 70px - 60px); // TODO: This is a temporary fix to get scrolling to work
|
||||
// changed it so the height is correct but the fix is still not ideal. the 70px and 60px are the height of the blue top bar and the dashboard menu. Need a better solution still.
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
#router-slot {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
box-sizing: border-box;
|
||||
padding: var(--uui-size-space-5);
|
||||
display: block;
|
||||
}
|
||||
`,
|
||||
@@ -85,7 +88,9 @@ export class UmbSectionDashboardsElement extends UmbContextConsumerMixin(UmbObse
|
||||
?.extensionsOfTypes(['dashboard', 'dashboardCollection'])
|
||||
.pipe(
|
||||
map((extensions) =>
|
||||
extensions.filter((extension) => (extension as ManifestWithMeta).meta.sections.includes(this._currentSectionAlias))
|
||||
extensions.filter((extension) =>
|
||||
(extension as ManifestWithMeta).meta.sections.includes(this._currentSectionAlias)
|
||||
)
|
||||
)
|
||||
),
|
||||
(dashboards) => {
|
||||
@@ -106,14 +111,14 @@ export class UmbSectionDashboardsElement extends UmbContextConsumerMixin(UmbObse
|
||||
if (dashboard.type === 'dashboardCollection') {
|
||||
return import('src/backoffice/dashboards/collection/dashboard-collection.element');
|
||||
}
|
||||
return createExtensionElement(dashboard)
|
||||
return createExtensionElement(dashboard);
|
||||
},
|
||||
setup: (component: Promise<HTMLElement> | HTMLElement, info: IRoutingInfo) => {
|
||||
this._currentDashboardPathname = info.match.route.path;
|
||||
// When its using import, we get an element, when using createExtensionElement we get a Promise.
|
||||
(component as any).manifest = dashboard;
|
||||
if((component as any).then) {
|
||||
(component as any).then((el: any) => el.manifest = dashboard);
|
||||
if ((component as any).then) {
|
||||
(component as any).then((el: any) => (el.manifest = dashboard));
|
||||
}
|
||||
},
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user