Skip to content

Commit c9d2054

Browse files
committed
[ui] [event-viewer] optimize vertical scrolling
1 parent f744913 commit c9d2054

4 files changed

Lines changed: 23 additions & 21 deletions

File tree

src/app/components/event-viewer/event-viewer.component.css

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,11 @@
33
font-size: 1.4rem;
44
font-weight: 900;
55
line-height: 53px;
6+
}
7+
8+
.loadmore {
9+
text-align: center;
10+
margin-top: 12px;
11+
height: 32px;
12+
line-height: 32px;
613
}

src/app/components/event-viewer/event-viewer.component.html

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<div class="container">
1+
<div class="container" style="height: 100%; overflow-y: auto;">
22

33
<!-- Title -->
44
<div class="title event-viewer-title">
@@ -28,14 +28,16 @@
2828
</div>
2929

3030
<!-- Main List-->
31-
<event-entry-item
32-
*ngFor="let event of viewModel.events"
33-
[event]="event">
34-
</event-entry-item>
35-
36-
<!-- Load More -->
37-
<div class="loadmore">
38-
<button nz-button *ngIf="!viewModel.loading && viewModel.hasMore" (click)="uiOnMoreClicked()">load more</button>
31+
<div>
32+
<event-entry-item
33+
*ngFor="let event of viewModel.events"
34+
[event]="event">
35+
</event-entry-item>
36+
37+
<!-- Load More -->
38+
<div class="loadmore" *ngIf="!viewModel.loading && viewModel.hasMore">
39+
<button nz-button (click)="uiOnMoreClicked()">load more</button>
40+
</div>
3941
</div>
4042

4143
<!-- Loaders & NoResults -->

src/app/components/main.component.html

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
<div class="main-container">
2+
<!-- Sidebar -->
23
<div id="sidebar">
34
<!-- Title -->
45
<div class="title">
@@ -18,8 +19,9 @@
1819

1920

2021
<!-- Events List-->
21-
<div style="height:100%">
22-
<event-viewer
22+
<event-viewer
23+
style="flex-grow: 1;"
24+
2325
*ngFor="let tab of tabs; let i = index"
2426
[hidden]="activeIndex != i"
2527

@@ -28,8 +30,7 @@
2830
(unreadEventsUpdated)="tabsWithNewContent[i]=$event"
2931
>
3032

31-
</event-viewer>
32-
</div>
33+
</event-viewer>
3334

3435

3536
</div>

src/styles.scss

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -41,12 +41,4 @@ html, body {
4141
}
4242
.event-icon-info {
4343
color:#486274;
44-
}
45-
46-
// Event-Viewer
47-
.loadmore {
48-
text-align: center;
49-
margin-top: 12px;
50-
height: 32px;
51-
line-height: 32px;
5244
}

0 commit comments

Comments
 (0)