Browse Source

Fix app dashboard padding.

pull/878/head
Sebastian 4 years ago
parent
commit
cd15a43b14
  1. 2
      frontend/src/app/features/dashboard/pages/dashboard-page.component.html
  2. 8
      frontend/src/app/features/dashboard/pages/dashboard-page.component.scss
  3. 7
      frontend/src/app/features/dashboard/pages/dashboard-page.component.ts

2
frontend/src/app/features/dashboard/pages/dashboard-page.component.html

@ -70,6 +70,8 @@
</ng-container>
</ng-container>
</gridster-item>
<div [style.height]="extendedHeight"></div>
</gridster>
<div class="dashboard-settings" *ngIf="grid">

8
frontend/src/app/features/dashboard/pages/dashboard-page.component.scss

@ -25,6 +25,14 @@ gridster-item {
/* stylelint-disable */
gridster {
background: none;
&::after {
@include absolute(100%, 0, null, 0);
content: '';
padding: 0;
padding-bottom: var(--gridster-margin);
pointer-events: none;
}
}
gridster-item {

7
frontend/src/app/features/dashboard/pages/dashboard-page.component.ts

@ -24,6 +24,7 @@ export class DashboardPageComponent extends ResourceOwner implements AfterViewIn
public selectedApp = this.appsState.selectedApp.pipe(defined());
public isStacked = false;
public isScrolled = false;
public storageCurrent?: CurrentStorageDto;
public storageUsage?: ReadonlyArray<StorageUsagePerDateDto>;
@ -33,7 +34,7 @@ export class DashboardPageComponent extends ResourceOwner implements AfterViewIn
public gridConfig?: GridsterItem[];
public gridOptions = DEFAULT_OPTIONS;
public isScrolled = false;
public extendedHeight: string = '';
public user = this.authState.user?.displayName;
@ -89,6 +90,10 @@ export class DashboardPageComponent extends ResourceOwner implements AfterViewIn
});
}
public ngAfterViewChecked() {
this.extendedHeight = `${this.grid.gridRows.length * this.grid.curRowHeight - 10}px`;
}
public changeIsStacked(value: boolean) {
this.localStore.setBoolean(Settings.Local.DASHBOARD_CHART_STACKED, value);

Loading…
Cancel
Save