|
1 | 1 | import { Component, OnDestroy, OnInit } from '@angular/core';
|
| 2 | +import { ResponsiveSizeInfoRx } from 'ngx-responsive'; |
2 | 3 | import { combineLatest, Subject } from 'rxjs';
|
3 | 4 | import { map, takeWhile } from 'rxjs/operators';
|
4 | 5 | import { CombErr } from '../../@dataflow/core';
|
@@ -59,7 +60,7 @@ import { ConnectionService } from '../connection.service';
|
59 | 60 | </nb-flip-card>
|
60 | 61 | </div>
|
61 | 62 | <div class="col-sm-12 col-md-6">
|
62 |
| - <nb-card size="medium"> |
| 63 | + <nb-card [size]="isSmallerThanSmSize ? '' : 'medium'"> |
63 | 64 | <nb-card-header> Summary </nb-card-header>
|
64 | 65 | <nb-card-body>
|
65 | 66 | <app-rng-summary [stats$]="stats$"> </app-rng-summary>
|
@@ -95,7 +96,7 @@ import { ConnectionService } from '../connection.service';
|
95 | 96 | ],
|
96 | 97 | })
|
97 | 98 | export class DashboardComponent implements OnInit, OnDestroy {
|
98 |
| - constructor(private cmdService: ConnectionService) {} |
| 99 | + constructor(private cmdService: ConnectionService, private resp: ResponsiveSizeInfoRx) {} |
99 | 100 |
|
100 | 101 | public stats$: CoreStatsFlow;
|
101 | 102 |
|
@@ -128,7 +129,12 @@ export class DashboardComponent implements OnInit, OnDestroy {
|
128 | 129 | private memTrigger = new Subject<number>();
|
129 | 130 | mem$: CoreMemstatsFlow;
|
130 | 131 |
|
| 132 | + isSmallerThanSmSize = false; |
| 133 | + |
131 | 134 | ngOnInit(): void {
|
| 135 | + this.resp.getResponsiveSize.subscribe(data => { |
| 136 | + this.isSmallerThanSmSize = data === 'xs'; |
| 137 | + }); |
132 | 138 | const outer = this;
|
133 | 139 | this.visable = true;
|
134 | 140 | this.stats$ = new (class extends CoreStatsFlow {
|
|
0 commit comments