Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: shell app loading spinner + minor improvements in libs #259

Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,18 @@
<div class="figure flex h-2rem w-2rem md:h-3rem md:w-3rem" *ngIf="showFigure">
<div #previewImage class="figure-image absolute top-0 left-0 right-0 bottom-0">
<ng-content select="[figureImage]"></ng-content>
<img *ngIf="figureImage" [ocxSrc]="figureImage" alt="Figure image" class="w-full" />
<img
*ngIf="figureImage && !figureImageLoadError"
[ocxSrc]="figureImage"
alt="Figure image"
class="w-full"
(error)="figureImageLoadError = true"
SchettlerKoehler marked this conversation as resolved.
Show resolved Hide resolved
/>
</div>
<div class="colorblob flex-1 border-round" *ngIf="previewImage.children.length === 0"></div>
<div
class="colorblob flex-1 border-round"
*ngIf="previewImage.children.length === 0 || figureImageLoadError"
></div>
</div>
<ng-template #skeletonBar>
<div class="header justify-content-evenly">
Expand All @@ -25,11 +34,12 @@
</ng-template>
<div class="header" *ngIf="!loading; else skeletonBar">
<h1 id="page-header" *ngIf="!!header">{{ header }}</h1>
<h2 id='page-subheader' *ngIf="!!subheader">{{ subheader }}</h2>
<h2 id="page-subheader" *ngIf="!!subheader">{{ subheader }}</h2>
</div>
</div>
<div class="action-items-wrap mt-2 md:mt-0">
<ng-container *ngIf="additionalToolbarContentLeft" [ngTemplateOutlet]="additionalToolbarContentLeft"> </ng-container>
<ng-container *ngIf="additionalToolbarContentLeft" [ngTemplateOutlet]="additionalToolbarContentLeft">
</ng-container>

<ng-container *ngIf="!disableDefaultActions"> </ng-container>
<ng-template #skeletonActions>
Expand Down Expand Up @@ -87,7 +97,9 @@ <h2 id='page-subheader' *ngIf="!!subheader">{{ subheader }}</h2>
class="object-info flex flex-row md:flex-column align-items-baseline md:align-items-center justify-content-between"
*ngFor="let item of objectDetails"
>
<label class="flex font-medium text-600" name="object-detail-label">{{ item.label | dynamicPipe:item.labelPipe }}</label>
<label class="flex font-medium text-600" name="object-detail-label"
>{{ item.label | dynamicPipe:item.labelPipe }}</label
>
<span
*ngIf="item.icon || item.value"
class="flex text-900 mt-2"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,8 @@ export class PageHeaderComponent implements OnInit, OnChanges {

home$!: Observable<HomeItem>

figureImageLoadError = false;

protected breadcrumbs: BreadcrumbService

constructor(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,13 +56,6 @@
</div>
</ng-template>
</ocx-slot>
<ul class="layout-topbar-items">
<!-- Only desktop: Actions (favorites, support, search, ...) as icon buttons -->
<ng-container *ocxIfBreakpoint="'desktop'"> </ng-container>

<!-- Only mobile: Actions (favorites, support, search, ...) as 'more' button + overlay -->
<li class="layout-topbar-item" *ocxIfBreakpoint="'mobile'"></li>
</ul>
</div>
</div>
</div>
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@
<p-toast></p-toast>

<div class="menu-wrapper">
<div class="layout-menu-container" *ngIf="isStaticalMenuVisible()">
<div class="layout-menu-container overflow-auto" *ngIf="isStaticalMenuVisible()">
<ocx-slot name="menu">
<ng-template #skeleton>
<p-skeleton class="w-full h-full mb-4 inline-block" height="35px" width="120px"></p-skeleton>
<p-skeleton class="w-full h-full inline-block p-2" height="35px"></p-skeleton>
</ng-template>
</ocx-slot>
</div>
Expand Down
Loading