mirror of
https://github.com/4gray/iptvnator.git
synced 2026-10-12 20:16:15 -08:00
refactor: replace shared COMPONENT_OVERLAY_REF with local tokens
This commit is contained in:
1 parent
aee5d93118
commit
487b721d7c
2 files changed
+22
-10
No files matched your search
@@ -1,7 +1,14 @@
|
||||
import { Overlay, OverlayRef } from '@angular/cdk/overlay';
|
||||
import { ComponentPortal } from '@angular/cdk/portal';
|
||||
import { AsyncPipe, CommonModule } from '@angular/common';
|
||||
import { Component, Injector, OnInit, effect, inject } from '@angular/core';
|
||||
import {
|
||||
Component,
|
||||
InjectionToken,
|
||||
Injector,
|
||||
OnInit,
|
||||
effect,
|
||||
inject,
|
||||
} from '@angular/core';
|
||||
import { MatDialog } from '@angular/material/dialog';
|
||||
import { MatSidenavModule } from '@angular/material/sidenav';
|
||||
import { ActivatedRoute, Router, RouterLink } from '@angular/router';
|
||||
@@ -27,7 +34,6 @@ import {
|
||||
import { Observable, combineLatestWith, filter, map, switchMap } from 'rxjs';
|
||||
import { DataService, PlaylistsService } from 'services';
|
||||
import {
|
||||
COMPONENT_OVERLAY_REF,
|
||||
Channel,
|
||||
PLAYLIST_PARSE_BY_URL,
|
||||
STORE_KEY,
|
||||
@@ -67,6 +73,10 @@ export class VideoPlayerComponent implements OnInit {
|
||||
private readonly storage = inject(StorageMap);
|
||||
private readonly store = inject(Store);
|
||||
|
||||
private readonly COMPONENT_OVERLAY_REF = new InjectionToken<OverlayRef>(
|
||||
'COMPONENT_OVERLAY_REF'
|
||||
);
|
||||
|
||||
/** Active selected channel */
|
||||
readonly activeChannel$ = this.store
|
||||
.select(selectActive)
|
||||
@@ -204,7 +214,7 @@ export class VideoPlayerComponent implements OnInit {
|
||||
const injector = Injector.create({
|
||||
providers: [
|
||||
{
|
||||
provide: COMPONENT_OVERLAY_REF,
|
||||
provide: this.COMPONENT_OVERLAY_REF,
|
||||
useValue: this.overlayRef,
|
||||
},
|
||||
],
|
||||
|
||||
Reference in new issue
Block a user