mirror of
https://github.com/4gray/iptvnator.git
synced 2026-10-08 17:06:15 -08:00
fix(xtream): live channel selection state
This commit is contained in:
1 parent
dbd8b4a438
commit
0c4e7dab11
3 files changed
+26
-7
No files matched your search
@@ -7,16 +7,18 @@
|
||||
>
|
||||
<div class="sidebar">
|
||||
<div class="sidebar-content">
|
||||
<mat-selection-list
|
||||
[multiple]="false"
|
||||
[hideSingleSelectionIndicator]="true"
|
||||
>
|
||||
<mat-selection-list [multiple]="false">
|
||||
<cdk-virtual-scroll-viewport
|
||||
itemSize="56"
|
||||
[itemSize]="56"
|
||||
class="scroll-viewport-portals"
|
||||
>
|
||||
<mat-list-option
|
||||
*cdkVirtualFor="let item of channels"
|
||||
*cdkVirtualFor="
|
||||
let item of channels;
|
||||
trackBy: trackBy;
|
||||
templateCacheSize: 0
|
||||
"
|
||||
[value]="item"
|
||||
(click)="itemClicked.emit(item)"
|
||||
>
|
||||
<img
|
||||
|
||||
@@ -50,3 +50,7 @@
|
||||
.no-channel-selected {
|
||||
margin: 10px;
|
||||
}
|
||||
|
||||
mat-list-option {
|
||||
width: 320px;
|
||||
}
|
||||
@@ -1,6 +1,13 @@
|
||||
import { ScrollingModule } from '@angular/cdk/scrolling';
|
||||
import { NgIf } from '@angular/common';
|
||||
import { Component, EventEmitter, Input, Output } from '@angular/core';
|
||||
import {
|
||||
ChangeDetectionStrategy,
|
||||
Component,
|
||||
EventEmitter,
|
||||
Input,
|
||||
Output,
|
||||
} from '@angular/core';
|
||||
import { FormsModule } from '@angular/forms';
|
||||
import { MatListModule } from '@angular/material/list';
|
||||
import { XtreamItem } from '../../../../shared/xtream-item.interface';
|
||||
import { VideoPlayer } from '../../settings/settings.interface';
|
||||
@@ -19,7 +26,9 @@ import { WebPlayerViewComponent } from '../web-player-view/web-player-view.compo
|
||||
NgIf,
|
||||
ScrollingModule,
|
||||
WebPlayerViewComponent,
|
||||
FormsModule,
|
||||
],
|
||||
changeDetection: ChangeDetectionStrategy.OnPush,
|
||||
})
|
||||
export class LiveStreamLayoutComponent {
|
||||
@Input({ required: true }) channels: XtreamItem[];
|
||||
@@ -28,4 +37,8 @@ export class LiveStreamLayoutComponent {
|
||||
@Input() streamUrl: string;
|
||||
|
||||
@Output() itemClicked = new EventEmitter<XtreamItem>();
|
||||
|
||||
trackBy(_index: number, item: XtreamItem) {
|
||||
return item.stream_id;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user