mirror of
https://github.com/4gray/iptvnator.git
synced 2026-10-15 21:56:18 -08:00
refactor: code improvements
This commit is contained in:
1 parent
3cb33aa9d0
commit
994b1cf9f5
7 files changed
+37
-56
No files matched your search
@@ -28,6 +28,9 @@
|
||||
|
||||
|
||||
::ng-deep {
|
||||
.mat-tab-group {
|
||||
height: 100%;
|
||||
}
|
||||
.mat-tab-label {
|
||||
height: 63px !important;
|
||||
}
|
||||
|
||||
@@ -30,14 +30,14 @@
|
||||
<mat-form-field class="full-width">
|
||||
<input matInput placeholder="Playlist URL (m3u, m3u8)" [(ngModel)]="playlistUrl">
|
||||
</mat-form-field>
|
||||
<button mat-flat-button [disabled]="!playlistUrl" color="primary" (click)="sendUrl()">ADD PLAYLIST</button>
|
||||
<button mat-flat-button [disabled]="!playlistUrl" color="primary" (click)="sendPlaylistsUrl()">ADD PLAYLIST</button>
|
||||
</div>
|
||||
</ng-template>
|
||||
</mat-tab>
|
||||
</mat-tab-group>
|
||||
</div>
|
||||
<div fxFlex="50" id="recent-playlists">
|
||||
<mat-card-subtitle>Recently added playlists ({{playlists.length}})</mat-card-subtitle>
|
||||
<mat-card-subtitle>Added playlists ({{playlists.length}})</mat-card-subtitle>
|
||||
<app-recent-playlists [playlists]="playlists" (playlistClicked)="getPlaylist($event)"
|
||||
(removeClicked)="removePlaylist($event)">
|
||||
</app-recent-playlists>
|
||||
|
||||
@@ -34,13 +34,12 @@ export class PlaylistUploaderComponent {
|
||||
concurrency: 1,
|
||||
maxUploads: 1,
|
||||
};
|
||||
playlists: Playlist[] = [];
|
||||
playlists: { count: number; title: string; _id: string }[] = [];
|
||||
isLoading = false;
|
||||
|
||||
/**
|
||||
* Creates an instanceof PlaylistUploaderComponent
|
||||
* @param channelStore channels store
|
||||
* @param m3uService m3u service
|
||||
* @param router angulars router
|
||||
* @param snackBar snackbars with notification messages
|
||||
*/
|
||||
@@ -155,7 +154,10 @@ export class PlaylistUploaderComponent {
|
||||
this.router.navigateByUrl('/iptv', { skipLocationChange: true });
|
||||
}
|
||||
|
||||
sendUrl(): void {
|
||||
/**
|
||||
* Sends url of the playlist to the renderer process
|
||||
*/
|
||||
sendPlaylistsUrl(): void {
|
||||
this.renderer.send('parse-playlist-by-url', {
|
||||
title: this.getLastUrlSegment(this.playlistUrl),
|
||||
url: this.playlistUrl,
|
||||
|
||||
+1
-1
@@ -7,7 +7,7 @@ $material-icons-font-path: '~material-icons/iconfont/';
|
||||
|
||||
body,
|
||||
html {
|
||||
background: #56598e;
|
||||
background: #011627;
|
||||
font-family: caption;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user