fix(core): update
This commit is contained in:
parent
ad5c25d80e
commit
a15629a960
@ -139,17 +139,17 @@ export class WccDashboard extends LitElement {
|
|||||||
public async firstUpdated() {
|
public async firstUpdated() {
|
||||||
this.domtools = await plugins.deesDomtools.DomTools.setupDomTools();
|
this.domtools = await plugins.deesDomtools.DomTools.setupDomTools();
|
||||||
this.domtools.router.on('/:itemType/:itemName/:viewport/:theme', async (routeInfo) => {
|
this.domtools.router.on('/:itemType/:itemName/:viewport/:theme', async (routeInfo) => {
|
||||||
|
this.selectedType = routeInfo.params.itemType as TElementType;
|
||||||
|
this.selectedItemName = routeInfo.params.itemName;
|
||||||
|
this.selectedViewport = routeInfo.params.viewport as TViewport;
|
||||||
|
this.selectedTheme = routeInfo.params.theme as TTheme;
|
||||||
if (routeInfo.params.itemType === 'element') {
|
if (routeInfo.params.itemType === 'element') {
|
||||||
this.selectedType = 'element';
|
|
||||||
this.selectedItem = this.elements[routeInfo.params.itemName];
|
this.selectedItem = this.elements[routeInfo.params.itemName];
|
||||||
} else if (routeInfo.params.itemType === 'page') {
|
} else if (routeInfo.params.itemType === 'page') {
|
||||||
this.selectedType = 'page';
|
|
||||||
this.selectedItem = this.pages[routeInfo.params.itemName];
|
this.selectedItem = this.pages[routeInfo.params.itemName];
|
||||||
}
|
}
|
||||||
const domtoolsInstance = await plugins.deesDomtools.elementBasic.setup();
|
const domtoolsInstance = await plugins.deesDomtools.elementBasic.setup();
|
||||||
domtoolsInstance.setVirtualViewport(routeInfo.params.viewport as TViewport);
|
domtoolsInstance.setVirtualViewport(routeInfo.params.viewport as TViewport);
|
||||||
this.selectedViewport = routeInfo.params.viewport as TViewport;
|
|
||||||
this.selectedTheme = routeInfo.params.theme as TTheme;
|
|
||||||
domtoolsInstance.themeManager.goBrightBoolean = this.selectedTheme === 'bright';
|
domtoolsInstance.themeManager.goBrightBoolean = this.selectedTheme === 'bright';
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user