Fix reference to BlockGrid layoutStylesheet and add mock

This commit is contained in:
Rick Butterfield
2024-08-15 11:43:24 +01:00
committed by GitHub
parent e4cf0de467
commit 1eef31da68
3 changed files with 6 additions and 2 deletions

View File

@@ -702,6 +702,10 @@ export const data: Array<UmbMockDataTypeModel> = [
alias: 'blockGroups',
value: [{ key: 'demo-block-group-id', name: 'Demo Blocks' }],
},
{
alias: 'layoutStylesheet',
value: '/wwwroot/css/umbraco-blockgridlayout.css'
},
{
alias: 'blocks',
value: [

View File

@@ -29,7 +29,7 @@ export class UmbBlockGridManagerContext<
if (layoutStylesheet) {
// Cause we await initAppUrl in setting the _editorConfiguration, we can trust the appUrl begin here.
return this.#appUrl! + removeInitialSlashFromPath(transformServerPathToClientPath(layoutStylesheet));
return this.#appUrl! + transformServerPathToClientPath(layoutStylesheet);
}
return undefined;
});

View File

@@ -28,7 +28,7 @@ export class UmbBlockTypeCardElement extends UmbLitElement {
value = transformServerPathToClientPath(value);
if (value) {
this.#init.then(() => {
this._iconFile = this.#appUrl + removeInitialSlashFromPath(value);
this._iconFile = this.#appUrl + value;
});
} else {
this._iconFile = undefined;