Show new tracker search result data

- score
- totalChapters
This commit is contained in:
schroda
2025-07-19 16:26:05 +02:00
parent b9d6339270
commit 13a7d21e60
6 changed files with 92 additions and 30 deletions

View File

@@ -6,7 +6,12 @@
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
*/
import { TrackerType, TrackRecordType, TrackSearchType } from '@/lib/graphql/generated/graphql.ts';
import {
TrackerType,
TrackRecordSearchFieldsFragment,
TrackRecordType,
TrackSearchType,
} from '@/lib/graphql/generated/graphql.ts';
export type MetadataTrackingSettings = {
updateProgressAfterReading: boolean;
@@ -52,18 +57,8 @@ export type TTrackRecordBind = TTrackRecordBase &
| 'startDate'
| 'finishDate'
>;
export type TTrackerManga = Pick<
TrackSearchType,
| 'id'
| 'remoteId'
| 'trackingUrl'
| 'title'
| 'coverUrl'
| 'publishingType'
| 'startDate'
| 'publishingStatus'
| 'summary'
>;
export type TTrackerManga = TrackRecordSearchFieldsFragment;
export type TTrackerBase = Pick<TrackerType, 'id' | 'name' | 'icon' | 'isLoggedIn' | 'isTokenExpired'>;
export type TTrackerSearch = TTrackerBase & Pick<TrackerType, 'authUrl'>;
export type TTrackerBind = TTrackerBase & Pick<TrackerType, 'icon' | 'supportsTrackDeletion' | 'scores' | 'statuses'>;

View File

@@ -187,6 +187,12 @@ export const TrackerMangaCard = ({
value={t(PUBLISHING_STATUS_TO_TRANSLATION[Trackers.getPublishingStatus(manga)])}
/>
)}
{manga.score > 0 && (
<Metadata title={t('tracking.track_record.label.score')} value={manga.score} />
)}
{manga.totalChapters > 0 && (
<Metadata title={t('chapter.title_other')} value={manga.totalChapters} />
)}
</Stack>
</Stack>
<TrackerMangaCardSummary summary={manga.summary} />