mirror of
https://github.com/4gray/iptvnator.git
synced 2026-10-08 17:06:15 -08:00
feat: add recently added widget to dashboard with necessary imports and case handling
This commit is contained in:
1 parent
36c3d26559
commit
f58a5c1290
4 files changed
+5
-22
No files matched your search
@@ -8,6 +8,9 @@
|
||||
@case ('recently-watched') {
|
||||
<app-recently-watched-widget [widget]="widget()" />
|
||||
}
|
||||
@case ('recently-added') {
|
||||
<app-recently-added-widget [widget]="widget()" />
|
||||
}
|
||||
@case ('global-favorites') {
|
||||
<app-global-favorites-widget [widget]="widget()" />
|
||||
}
|
||||
|
||||
@@ -3,6 +3,7 @@ import { TranslatePipe } from '@ngx-translate/core';
|
||||
import { DashboardWidgetConfig } from 'workspace-dashboard-data-access';
|
||||
import { ContinueWatchingWidgetComponent } from './widgets/continue-watching-widget.component';
|
||||
import { GlobalFavoritesWidgetComponent } from './widgets/global-favorites-widget.component';
|
||||
import { RecentlyAddedWidgetComponent } from './widgets/recently-added-widget.component';
|
||||
import { RecentlyWatchedWidgetComponent } from './widgets/recently-watched-widget.component';
|
||||
import { SourceStatsWidgetComponent } from './widgets/source-stats-widget.component';
|
||||
|
||||
@@ -11,6 +12,7 @@ import { SourceStatsWidgetComponent } from './widgets/source-stats-widget.compon
|
||||
imports: [
|
||||
ContinueWatchingWidgetComponent,
|
||||
GlobalFavoritesWidgetComponent,
|
||||
RecentlyAddedWidgetComponent,
|
||||
RecentlyWatchedWidgetComponent,
|
||||
SourceStatsWidgetComponent,
|
||||
TranslatePipe,
|
||||
|
||||
@@ -18,7 +18,6 @@ import {
|
||||
DashboardContentKind,
|
||||
DashboardDataService,
|
||||
DashboardWidgetConfig,
|
||||
createDefaultWidgetScope,
|
||||
} from 'workspace-dashboard-data-access';
|
||||
import {
|
||||
DashboardActivityItemViewModel,
|
||||
@@ -64,9 +63,6 @@ export class GlobalFavoritesWidgetComponent implements OnInit {
|
||||
this.readStoredViewMode() ?? 'list'
|
||||
);
|
||||
readonly visibleItemLimit = signal(INITIAL_PAGE_SIZE);
|
||||
readonly scope = computed(
|
||||
() => this.widget().settings?.scope ?? createDefaultWidgetScope()
|
||||
);
|
||||
|
||||
readonly counts = computed(() => {
|
||||
const items = this.data.globalFavoriteItems();
|
||||
@@ -84,13 +80,6 @@ export class GlobalFavoritesWidgetComponent implements OnInit {
|
||||
.filter((item) =>
|
||||
this.data.isTypeInKind(item.type, this.selectedKind())
|
||||
)
|
||||
.filter((item) =>
|
||||
this.data.matchesScope(
|
||||
item.playlist_id,
|
||||
item.source,
|
||||
this.scope()
|
||||
)
|
||||
)
|
||||
);
|
||||
|
||||
readonly activityItems = computed<DashboardActivityItemViewModel[]>(() =>
|
||||
|
||||
@@ -18,7 +18,6 @@ import {
|
||||
DashboardContentKind,
|
||||
DashboardDataService,
|
||||
DashboardWidgetConfig,
|
||||
createDefaultWidgetScope,
|
||||
} from 'workspace-dashboard-data-access';
|
||||
import {
|
||||
DashboardActivityItemViewModel,
|
||||
@@ -64,9 +63,6 @@ export class RecentlyWatchedWidgetComponent implements OnInit {
|
||||
this.readStoredViewMode() ?? 'list'
|
||||
);
|
||||
readonly visibleItemLimit = signal(INITIAL_PAGE_SIZE);
|
||||
readonly scope = computed(
|
||||
() => this.widget().settings?.scope ?? createDefaultWidgetScope()
|
||||
);
|
||||
|
||||
readonly counts = computed(() => {
|
||||
const items = this.data.globalRecentItems();
|
||||
@@ -84,13 +80,6 @@ export class RecentlyWatchedWidgetComponent implements OnInit {
|
||||
.filter((item) =>
|
||||
this.data.isTypeInKind(item.type, this.selectedKind())
|
||||
)
|
||||
.filter((item) =>
|
||||
this.data.matchesScope(
|
||||
item.playlist_id,
|
||||
item.source,
|
||||
this.scope()
|
||||
)
|
||||
)
|
||||
);
|
||||
|
||||
readonly activityItems = computed<DashboardActivityItemViewModel[]>(() =>
|
||||
|
||||
Reference in new issue
Block a user