mirror of
https://github.com/4gray/iptvnator.git
synced 2026-10-08 17:06:15 -08:00
feat(xtream): lazy loading in live-stream layout
This commit is contained in:
1 parent
ffdc68688c
commit
21538b0671
4 files changed
+24
-4
No files matched your search
@@ -11,8 +11,14 @@
|
||||
[multiple]="false"
|
||||
[hideSingleSelectionIndicator]="true"
|
||||
>
|
||||
@for (item of channels; track $index) {
|
||||
<mat-list-option (click)="itemClicked.emit(item)">
|
||||
<cdk-virtual-scroll-viewport
|
||||
itemSize="56"
|
||||
class="scroll-viewport-portals"
|
||||
>
|
||||
<mat-list-option
|
||||
*cdkVirtualFor="let item of channels"
|
||||
(click)="itemClicked.emit(item)"
|
||||
>
|
||||
<img
|
||||
matListItemAvatar
|
||||
class="stream-icon"
|
||||
@@ -23,7 +29,7 @@
|
||||
{{ item.name }}
|
||||
</div>
|
||||
</mat-list-option>
|
||||
}
|
||||
</cdk-virtual-scroll-viewport>
|
||||
</mat-selection-list>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -44,4 +44,5 @@
|
||||
height: 100%;
|
||||
overflow-y: auto;
|
||||
border-right: #111 1px solid;
|
||||
overflow-x: hidden;
|
||||
}
|
||||
@@ -1,3 +1,4 @@
|
||||
import { ScrollingModule } from '@angular/cdk/scrolling';
|
||||
import { NgIf } from '@angular/common';
|
||||
import { Component, EventEmitter, Input, Output } from '@angular/core';
|
||||
import { MatListModule } from '@angular/material/list';
|
||||
@@ -12,7 +13,13 @@ import { WebPlayerViewComponent } from '../web-player-view/web-player-view.compo
|
||||
selector: 'app-live-stream-layout',
|
||||
templateUrl: './live-stream-layout.component.html',
|
||||
styleUrls: ['./live-stream-layout.component.scss'],
|
||||
imports: [EpgViewComponent, MatListModule, NgIf, WebPlayerViewComponent],
|
||||
imports: [
|
||||
EpgViewComponent,
|
||||
MatListModule,
|
||||
NgIf,
|
||||
ScrollingModule,
|
||||
WebPlayerViewComponent,
|
||||
],
|
||||
})
|
||||
export class LiveStreamLayoutComponent {
|
||||
@Input({ required: true }) channels: XtreamItem[];
|
||||
|
||||
@@ -2,6 +2,12 @@
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.details {
|
||||
h2 {
|
||||
word-wrap: break-word;
|
||||
}
|
||||
}
|
||||
|
||||
.container {
|
||||
display: grid;
|
||||
grid-gap: 10px;
|
||||
|
||||
Reference in new issue
Block a user