refactor: update navigation and recently added components for improved UI and functionality

This commit is contained in:
4gray committed 2026-02-04 22:55:02 +01:00
1 parent 9a04c42e79
commit 2691e3f36e
3 files changed
+13 -14

No files matched your search

@@ -27,8 +27,8 @@ export class ContentCardComponent {
/** Content type (live, movie, series) */
readonly type = input<string>();
/** Optional date to display */
readonly date = input<Date | string>();
/** Optional date to display (Date, string, or timestamp number) */
readonly date = input<Date | string | number>();
/** Whether to show the remove button */
readonly showRemoveButton = input<boolean>(false);
@@ -6,13 +6,13 @@
<h3>{{ 'PORTALS.SIDEBAR.MOVIES' | translate }}</h3>
<div class="carousel">
@for (item of recentlyAddedVod(); track item.xtream_id) {
<app-search-result-item
<app-content-card
class="carousel-item"
[title]="item.title || item.name"
[description]="getDate(item) | date : 'mediumDate'"
[posterUrl]="item.poster_url || item.stream_icon"
[type]="'movie'"
(itemClick)="openItem(item, 'vod')"
[date]="getDate(item)"
(cardClick)="openItem(item, 'vod')"
/>
}
</div>
@@ -24,13 +24,13 @@
<h3>{{ 'PORTALS.SIDEBAR.SERIES' | translate }}</h3>
<div class="carousel">
@for (item of recentlyAddedSeries(); track item.xtream_id) {
<app-search-result-item
<app-content-card
class="carousel-item"
[title]="item.title || item.name"
[description]="getDate(item) | date : 'mediumDate'"
[posterUrl]="item.poster_url || item.cover"
[type]="'series'"
(itemClick)="openItem(item, 'series')"
[date]="getDate(item)"
(cardClick)="openItem(item, 'series')"
/>
}
</div>
@@ -42,13 +42,13 @@
<h3>{{ 'PORTALS.SIDEBAR.LIVE_TV' | translate }}</h3>
<div class="carousel">
@for (item of recentlyAddedLive(); track item.xtream_id) {
<app-search-result-item
<app-content-card
class="carousel-item"
[title]="item.title || item.name"
[description]="getDate(item) | date : 'mediumDate'"
[posterUrl]="item.poster_url || item.stream_icon"
[type]="'live'"
(itemClick)="openItem(item, 'live')"
[date]="getDate(item)"
(cardClick)="openItem(item, 'live')"
/>
}
</div>
@@ -1,8 +1,7 @@
import { DatePipe } from '@angular/common';
import { Component, computed, inject } from '@angular/core';
import { ActivatedRoute, Router } from '@angular/router';
import { TranslatePipe } from '@ngx-translate/core';
import { SearchResultItemComponent } from '../../shared/components/search-result-item/search-result-item.component';
import { ContentCardComponent } from '../../shared/components/content-card/content-card.component';
import { XtreamStore } from '../stores/xtream.store';
import { ContentType } from '../xtream-state';
@@ -10,7 +9,7 @@ import { ContentType } from '../xtream-state';
selector: 'app-recently-added',
templateUrl: './recently-added.component.html',
styleUrls: ['./recently-added.component.scss'],
imports: [DatePipe, SearchResultItemComponent, TranslatePipe],
imports: [ContentCardComponent, TranslatePipe],
})
export class RecentlyAddedComponent {
private readonly xtreamStore = inject(XtreamStore);