@@ -2,47 +2,43 @@ import { Component, ElementRef, ViewChild } from '@angular/core';
22import { FormsModule } from '@angular/forms' ;
33import {
44 IonButton ,
5- IonButtons ,
6- IonCard ,
7- IonCardContent ,
8- IonCardHeader ,
9- IonCardSubtitle , IonCardTitle ,
10- IonContent ,
5+ IonButtons , IonContent ,
116 IonFab , IonFabButton ,
12- IonHeader , IonIcon , IonInput , IonItem ,
13- IonItemOption , IonItemOptions ,
14- IonLabel , IonList ,
7+ IonHeader , IonIcon , IonInput , IonItem , IonLabel , IonList ,
158 IonMenu ,
169 IonMenuToggle ,
17- IonNote , IonRefresher ,
10+ IonRefresher ,
1811 IonRefresherContent , IonText ,
1912 IonThumbnail ,
2013 IonTitle , IonToolbar ,
2114 ModalController ,
2215 ScrollDetail
2316} from '@ionic/angular/standalone' ;
2417import { addIcons } from 'ionicons' ;
25- import { bookmark , bookmarkOutline , chevronForward , chevronUpOutline , ellipsisVertical , filterOutline , shareSocialOutline } from 'ionicons/icons' ;
26- import { PreviewComponent } from '../preview/preview.component' ;
18+ import { chevronForward , chevronUpOutline , ellipsisVertical , filterOutline , shareSocialOutline } from 'ionicons/icons' ;
19+ import { ArticleListComponent } from '../article-list/article-list.component' ;
20+ import { formatDateAsDay , formatDateAsLong , formatDateRelative } from '../lib/date-utils' ;
2721import { BookmarkService } from '../services/bookmark.service' ;
2822import { FeedService } from '../services/feed.service' ;
2923import { PlatformService } from '../services/platform.service' ;
3024import { SettingsService } from '../services/settings.service' ;
3125import { SourcesService } from '../services/sources.service' ;
3226import { SettingsComponent } from '../settings/settings.component' ;
33- import { formatDateAsDay , formatDateAsLong , formatDateRelative } from '../lib/date-utils' ;
3427
3528@Component ( {
3629 selector : 'app-feed' ,
3730 templateUrl : 'feed.page.html' ,
3831 styleUrls : [ 'feed.page.scss' ] ,
3932 standalone : true ,
40- imports : [ FormsModule , IonCard , IonCardHeader , IonCardContent ,
41- IonCardSubtitle , IonCardTitle , IonHeader , IonToolbar , IonTitle , IonNote ,
42- IonContent , IonList , IonInput , IonItem , IonItemOption , IonItemOptions ,
33+ imports : [
34+ FormsModule , IonItem ,
35+ IonHeader , IonToolbar , IonTitle ,
36+ IonContent , IonList , IonInput ,
4337 IonIcon , IonButton , IonButtons , IonText , IonMenu , IonThumbnail , IonMenuToggle ,
4438 IonLabel , IonRefresher , IonRefresherContent , IonFab , IonFabButton ,
45- SettingsComponent ]
39+ SettingsComponent ,
40+ ArticleListComponent
41+ ]
4642} )
4743
4844export class FeedPage {
@@ -56,11 +52,11 @@ export class FeedPage {
5652 public formatDateAsLong = formatDateAsLong ;
5753 public formatDateRelative = formatDateRelative ;
5854
59- constructor ( public sourcesService : SourcesService , public platformService : PlatformService ,
55+ constructor ( public elementRef : ElementRef ,
56+ public sourcesService : SourcesService , public platformService : PlatformService ,
6057 public bookmarkService : BookmarkService , public feedService : FeedService ,
61- private modalController : ModalController , public elementRef : ElementRef ,
62- public settingsService : SettingsService ) {
63- addIcons ( { bookmark, bookmarkOutline, shareSocialOutline, ellipsisVertical, filterOutline, chevronForward,
58+ private modalController : ModalController , public settingsService : SettingsService ) {
59+ addIcons ( { shareSocialOutline, ellipsisVertical, filterOutline, chevronForward,
6460 chevronUpOutline } ) ;
6561 }
6662
@@ -80,38 +76,6 @@ export class FeedPage {
8076 this . filter = '' ;
8177 }
8278
83- // eslint-disable-next-line @typescript-eslint/no-explicit-any
84- public addBookmark ( event : Event , entry : any ) {
85- this . bookmarkService . addEntry ( entry ) ;
86- event . stopPropagation ( ) ;
87- }
88-
89- // eslint-disable-next-line @typescript-eslint/no-explicit-any
90- public removeBookmark ( event : Event , entry : any ) {
91- this . bookmarkService . removeEntry ( entry ) ;
92- event . stopPropagation ( ) ;
93- }
94-
95- async openPreview ( title : string , content : string , url : string ) {
96- if ( this . settingsService . getSettings ( ) . preview ) {
97- const preview = await this . modalController . create ( {
98- component : PreviewComponent ,
99- componentProps : {
100- articleTitle : title ,
101- articleContent : content ,
102- articleLink : url
103- } ,
104- presentingElement : this . elementRef . nativeElement ,
105-
106- } ) ;
107-
108- preview . present ( ) ;
109- }
110- else {
111- this . platformService . openUrlInPlatformBrowser ( url ) ;
112- }
113- }
114-
11579 async openSettings ( ) {
11680 const settings = await this . modalController . create ( {
11781 component : SettingsComponent ,
0 commit comments