mirror of
https://github.com/4gray/iptvnator.git
synced 2026-10-15 21:56:18 -08:00
116 lines
4.3 KiB
HTML
116 lines
4.3 KiB
HTML
@if (allPlaylistsLoaded()) {
|
|
<mat-form-field
|
|
class="full-width"
|
|
subscriptSizing="dynamic"
|
|
style="border-radius: 0px"
|
|
>
|
|
<input
|
|
matInput
|
|
#searchQuery
|
|
type="search"
|
|
[placeholder]="'HOME.PLAYLISTS.SEARCH_PLAYLISTS' | translate"
|
|
(input)="onSearchQueryUpdate(searchQuery.value)"
|
|
/></mat-form-field>
|
|
@defer {
|
|
<mat-nav-list
|
|
cdkDropList
|
|
(cdkDropListDropped)="drop($event, playlists)"
|
|
*ngIf="playlists$ | async as playlists"
|
|
class="playlists-list"
|
|
>
|
|
<mat-list-item
|
|
*ngIf="playlists.length === 0; else playlistsTemplate"
|
|
>
|
|
<mat-icon class="favorites-icon" matListItemAvatar
|
|
>search</mat-icon
|
|
>
|
|
<div matListItemTitle>
|
|
{{ 'HOME.PLAYLISTS.NO_PLAYLISTS' | translate }}
|
|
</div>
|
|
<div matListItemLine class="meta">
|
|
{{ 'HOME.PLAYLISTS.ADD_FIRST' | translate }}
|
|
</div>
|
|
</mat-list-item>
|
|
|
|
<ng-template #playlistsTemplate>
|
|
<mat-list-item (click)="getGlobalFavorites()">
|
|
<mat-icon class="favorites-icon" matListItemAvatar
|
|
>star</mat-icon
|
|
>
|
|
<div matListItemTitle>
|
|
{{ 'HOME.PLAYLISTS.GLOBAL_FAVORITES' | translate }}
|
|
</div>
|
|
<div matListItemLine class="meta">
|
|
{{
|
|
'HOME.PLAYLISTS.GLOBAL_FAVORITES_DESCRIPTION'
|
|
| translate
|
|
}}
|
|
</div>
|
|
</mat-list-item>
|
|
<mat-divider></mat-divider>
|
|
|
|
<app-playlist-item
|
|
*ngFor="
|
|
let item of playlists;
|
|
last as last;
|
|
trackBy: trackByFn
|
|
"
|
|
[item]="item"
|
|
[showActions]="!sidebarMode"
|
|
(editPlaylistClicked)="openInfoDialog($event)"
|
|
(playlistClicked)="getPlaylist(item)"
|
|
(refreshClicked)="refreshPlaylist($event)"
|
|
(removeClicked)="removeClicked($event)"
|
|
></app-playlist-item>
|
|
|
|
<div *ngIf="isMigrationPossible" id="migration-container">
|
|
<p>{{ migrationMessage }}</p>
|
|
<button
|
|
mat-button
|
|
(click)="migratePlaylists()"
|
|
class="migration-btn"
|
|
color="accent"
|
|
>
|
|
<mat-icon>playlist_add</mat-icon>
|
|
Migrate playlists</button
|
|
>
|
|
<button
|
|
mat-button
|
|
(click)="deleteMigratedPlaylists()"
|
|
class="migration-btn"
|
|
color="accent"
|
|
>
|
|
<mat-icon>delete</mat-icon>
|
|
{{ 'SETTINGS.REMOVE_DIALOG.TITLE' | translate }}
|
|
</button>
|
|
</div>
|
|
</ng-template>
|
|
</mat-nav-list>
|
|
} @placeholder {
|
|
<div id="skeleton-container">
|
|
<div class="skeleton-item" *ngFor="let a of [].constructor(10)">
|
|
<ngx-skeleton-loader
|
|
count="1"
|
|
appearance="circle"
|
|
></ngx-skeleton-loader>
|
|
<div class="text">
|
|
<ngx-skeleton-loader
|
|
count="1"
|
|
[theme]="{ width: '30%', height: '20px' }"
|
|
></ngx-skeleton-loader>
|
|
<ngx-skeleton-loader
|
|
count="1"
|
|
[theme]="{ width: '50%', height: '10px' }"
|
|
></ngx-skeleton-loader>
|
|
</div>
|
|
<div class="actions">
|
|
<ngx-skeleton-loader
|
|
count="2"
|
|
appearance="circle"
|
|
></ngx-skeleton-loader>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
}
|
|
}
|